aboutsummaryrefslogtreecommitdiff
path: root/forge/src/main/java/de
diff options
context:
space:
mode:
authorHacktheTime <l4bg0jb7@duck.com>2023-12-15 19:06:11 +0100
committerHacktheTime <l4bg0jb7@duck.com>2023-12-15 19:06:11 +0100
commit2a22b024361e195819337b736e57a68742029a5a (patch)
tree2c37c7f89f6f4ccbc3dc8ec80765451ea235c36f /forge/src/main/java/de
parent595bb1aca851f8ab4eb216fadbd0e15f7831e4f5 (diff)
downloadBBsentials-2a22b024361e195819337b736e57a68742029a5a.tar.gz
BBsentials-2a22b024361e195819337b736e57a68742029a5a.tar.bz2
BBsentials-2a22b024361e195819337b736e57a68742029a5a.zip
added toggles for the Splash Overlay.
Diffstat (limited to 'forge/src/main/java/de')
-rw-r--r--forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java29
1 files changed, 16 insertions, 13 deletions
diff --git a/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java b/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java
index 66e92b6..6376cb5 100644
--- a/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java
+++ b/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java
@@ -132,22 +132,25 @@ public class MCUtils implements de.hype.bbsentials.common.mclibraries.MCUtils {
List<IChatComponent> toDisplay = new ArrayList<>();
toDisplay.add(new ChatComponentText("§6Total: " + allParticipants.size() + " | Bingos: " + (allParticipants.size() - splashLeechers.size()) + " | Leechers: " + splashLeechers.size()));
+ boolean doPants = BBsentials.config.showMusicPants;
for (EntityPlayer participant : allParticipants) {
- boolean hasPants = false;
- for (ItemStack armorItem : participant.inventory.armorInventory) {
- try {
- if (armorItem.getTagCompound().getCompoundTag("ExtraAttributes").getString("display").contains("MUSIC_PANTS")) {
- musicPants.add(participant);
- hasPants = true;
+ if (doPants) {
+ boolean hasPants = false;
+ for (ItemStack armorItem : participant.inventory.armorInventory) {
+ try {
+ if (armorItem.getTagCompound().getCompoundTag("ExtraAttributes").getString("display").contains("MUSIC_PANTS")) {
+ musicPants.add(participant);
+ hasPants = true;
+ }
+ } catch (Exception ignored) {
+ continue;
}
- } catch (Exception ignored) {
- continue;
}
- }
- if (hasPants) {
- String pantsAddition = IChatComponent.Serializer.componentToJson(new ChatComponentText("§4[♪]§ "));
- String normal = IChatComponent.Serializer.componentToJson(participant.getDisplayName());
- toDisplay.add(IChatComponent.Serializer.jsonToComponent("[" + pantsAddition + "," + normal + "]"));
+ if (hasPants) {
+ String pantsAddition = IChatComponent.Serializer.componentToJson(new ChatComponentText("§4[♪]§ "));
+ String normal = IChatComponent.Serializer.componentToJson(participant.getDisplayName());
+ toDisplay.add(IChatComponent.Serializer.jsonToComponent("[" + pantsAddition + "," + normal + "]"));
+ }
}
}
toDisplay.addAll(splashLeechers.stream().map(EntityPlayer::getDisplayName).collect(Collectors.toList()));