removed isClientPlayer from MailAddress

This commit is contained in:
mezz committed 2014-09-28 21:54:30 -07:00
1 parent f02426b219
commit a8583bfbfd
3 files changed
+4 -12

No files matched your search

+1 -1
Submodule api updated: 5836e53d01...f3a061a11f.
@@ -143,16 +143,6 @@ public class MailAddress implements INBTTagable, IMailAddress {
return address;
}
public boolean isClientPlayer(World world) {
if (!this.isPlayer())
return false;
EntityPlayer addressPlayer = Proxies.common.getPlayer(world, gameProfile);
EntityPlayer clientPlayer = Proxies.common.getPlayer();
return addressPlayer != null && clientPlayer != null && clientPlayer.equals(addressPlayer);
}
public GameProfile getPlayerProfile() {
if (!this.isPlayer())
return null;
@@ -11,6 +11,7 @@
package forestry.mail.proxy;
import com.mojang.authlib.GameProfile;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import forestry.core.network.ForestryPacket;
@@ -50,7 +51,8 @@ public class ClientProxyMail extends ProxyMail {
@Override
public void setPOBoxInfo(World world, IMailAddress address, POBoxInfo info) {
if (address.isClientPlayer(world))
EntityPlayer clientPlayer = Proxies.common.getPlayer();
if (clientPlayer != null && clientPlayer.getGameProfile().equals(address.getPlayerProfile()))
GuiMailboxInfo.instance.setPOBoxInfo(info);
}
}