diff options
author | syeyoung <cyong06@naver.com> | 2021-05-09 13:27:17 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-05-09 13:27:17 +0900 |
commit | c4a55b2540bb79cf087040721fd3146a3fe9ae92 (patch) | |
tree | 04fa8b811bd02ebc6f2b7699789ae00c921bf842 /src/main/java/kr/syeyoung/dungeonsguide | |
parent | 646cbb7b39cae7176d82b29217ebf4f639a82ba4 (diff) | |
download | Skyblock-Dungeons-Guide-c4a55b2540bb79cf087040721fd3146a3fe9ae92.tar.gz Skyblock-Dungeons-Guide-c4a55b2540bb79cf087040721fd3146a3fe9ae92.tar.bz2 Skyblock-Dungeons-Guide-c4a55b2540bb79cf087040721fd3146a3fe9ae92.zip |
patch playernames showing on private islands.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java index 3cd52d52..f487f2fb 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java @@ -60,10 +60,14 @@ import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.resources.DefaultPlayerSkin; import net.minecraft.client.resources.SkinManager; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.event.HoverEvent; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.scoreboard.ScorePlayerTeam; +import net.minecraft.scoreboard.Scoreboard; +import net.minecraft.scoreboard.Team; import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.client.event.ClientChatReceivedEvent; @@ -537,6 +541,21 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen public ItemStack[] getInventory() { return this.inventory.armorInventory; } + + @Override + public boolean isInvisibleToPlayer(EntityPlayer player) { + return true; + } + + @Override + public Team getTeam() { + return new ScorePlayerTeam(null, null) { + @Override + public EnumVisible getNameTagVisibility() { + return EnumVisible.NEVER; + } + }; + } } |