aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-05-09 13:27:17 +0900
committersyeyoung <cyong06@naver.com>2021-05-09 13:27:17 +0900
commitc4a55b2540bb79cf087040721fd3146a3fe9ae92 (patch)
tree04fa8b811bd02ebc6f2b7699789ae00c921bf842 /src/main/java
parent646cbb7b39cae7176d82b29217ebf4f639a82ba4 (diff)
downloadSkyblock-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')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java19
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;
+ }
+ };
+ }
}