mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
removed isClientPlayer from MailAddress
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user