aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-08-05 19:46:47 +0200
committerGitHub <noreply@github.com>2022-08-05 19:46:47 +0200
commit1b6b70610fb2b486ecca664806b57b949526b388 (patch)
tree3812e3c060b7529b88b70cd0c343ca382a8c1e2e
parentd15348fe2682af83a253198af1925309224dfe8c (diff)
downloadNotEnoughUpdates-1b6b70610fb2b486ecca664806b57b949526b388.tar.gz
NotEnoughUpdates-1b6b70610fb2b486ecca664806b57b949526b388.tar.bz2
NotEnoughUpdates-1b6b70610fb2b486ecca664806b57b949526b388.zip
Pv hide offline location (#200)
* hide location text "unknown" in pv page when the player is offline * fixed the pr Co-authored-by: nopo <noahogno@gmail.com>
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
index e3a2091f..455bbf36 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -4656,16 +4656,24 @@ public class GuiProfileViewer extends GuiScreen {
String locationStr = null;
if (profile.getUuid().equals("20934ef9488c465180a78f861586b4cf")) {
locationStr = "Ignoring DMs";
- } else if(profile.getUuid().equals("b876ec32e396476ba1158438d83c67d4")) {
+ } else if (profile.getUuid().equals("b876ec32e396476ba1158438d83c67d4")) {
statusStr = EnumChatFormatting.LIGHT_PURPLE + "Long live Potato King";
ItemStack potato_crown = NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager
.getItemInformation()
.get("POTATO_CROWN"));
potato_crown.addEnchantment(Enchantment.unbreaking, 1656638942); // this number may be useful
- Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(new ItemStack(Items.potato), guiLeft + 35, guiTop + 160);
+ Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(
+ new ItemStack(Items.potato),
+ guiLeft + 35,
+ guiTop + 160
+ );
Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(potato_crown, guiLeft + 50, guiTop + 162);
- Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(new ItemStack(Items.potato), guiLeft + 63, guiTop + 160);
- } else {
+ Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(
+ new ItemStack(Items.potato),
+ guiLeft + 63,
+ guiTop + 160
+ );
+ } else if (online) {
locationStr = NotEnoughUpdates.INSTANCE.navigation.getNameForAreaModeOrUnknown(location);
}
if (locationStr != null) {