mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-23 13:30:06 +00:00
Move getPlayer from ProxyCommon to PlayerUtil
This commit is contained in:
1 parent
84968c6021
commit
02c25142cd
9 files changed
+41
-35
No files matched your search
@@ -32,6 +32,7 @@ import forestry.api.mail.ITradeStation;
|
||||
import forestry.api.mail.PostManager;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.PlayerUtil;
|
||||
import forestry.mail.items.ItemLetter;
|
||||
import forestry.mail.network.PacketPOBoxInfoResponse;
|
||||
|
||||
@@ -73,7 +74,7 @@ public class PostRegistry implements IPostRegistry {
|
||||
pobox.markDirty();
|
||||
cachedPOBoxes.put(address, pobox);
|
||||
|
||||
EntityPlayer player = Proxies.common.getPlayer(world, address.getPlayerProfile());
|
||||
EntityPlayer player = PlayerUtil.getPlayer(world, address.getPlayerProfile());
|
||||
if (player != null) {
|
||||
Proxies.net.sendToPlayer(new PacketPOBoxInfoResponse(pobox.getPOBoxInfo()), player);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import forestry.api.mail.ITradeStation;
|
||||
import forestry.api.mail.PostManager;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.TextureManager;
|
||||
import forestry.core.utils.PlayerUtil;
|
||||
import forestry.core.utils.StringUtil;
|
||||
import forestry.mail.network.PacketPOBoxInfoResponse;
|
||||
|
||||
@@ -85,7 +86,7 @@ public class PostalCarrier implements IPostalCarrier {
|
||||
if (!pobox.storeLetter(letterStack.copy())) {
|
||||
return EnumDeliveryState.MAILBOX_FULL;
|
||||
} else {
|
||||
EntityPlayer player = Proxies.common.getPlayer(world, recipient.getPlayerProfile());
|
||||
EntityPlayer player = PlayerUtil.getPlayer(world, recipient.getPlayerProfile());
|
||||
if (player instanceof EntityPlayerMP) {
|
||||
Proxies.net.sendToPlayer(new PacketPOBoxInfoResponse(pobox.getPOBoxInfo()), (EntityPlayerMP) player);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user