aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
Diffstat (limited to 'forge')
-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()));