From 3b0ba43e94326cb50d9ee4ffe3ff79b4a814b5f3 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 3 Apr 2012 02:52:04 -0400 Subject: [PATCH] Added config value to enable/disable power level display w/ Spout --- src/main/java/com/gmail/nossr50/config/LoadProperties.java | 5 ++++- .../java/com/gmail/nossr50/listeners/mcSpoutListener.java | 6 +++++- src/main/resources/config.yml | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index 3419822b8..fdbff8e88 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -132,7 +132,8 @@ public class LoadProperties extends ConfigLoader{ * SPOUT SETTINGS */ - public static Boolean spoutEnabled; + public static boolean spoutEnabled; + public static boolean showPowerLevel; /* Spout Party HUD */ public static Boolean showDisplayName, showFaces, partybar; @@ -213,6 +214,8 @@ public class LoadProperties extends ConfigLoader{ showDisplayName = config.getBoolean("Spout.Party.HUD.Show_Display_Name", false); partybar = config.getBoolean("Spout.Party.HUD.Enabled", true); + showPowerLevel = config.getBoolean("Spout.HUD.Show_Power_Level", true); + acrobatics_r = config.getDouble("Spout.HUD.Retro.Colors.Acrobatics.RED", 0.3); acrobatics_g = config.getDouble("Spout.HUD.Retro.Colors.Acrobatics.GREEN", 0.3); acrobatics_b = config.getDouble("Spout.HUD.Retro.Colors.Acrobatics.BLUE", 0.75); diff --git a/src/main/java/com/gmail/nossr50/listeners/mcSpoutListener.java b/src/main/java/com/gmail/nossr50/listeners/mcSpoutListener.java index eb37a64a8..fc5eb7d1f 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcSpoutListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcSpoutListener.java @@ -7,6 +7,7 @@ import org.getspout.spoutapi.player.SpoutPlayer; import com.gmail.nossr50.Users; import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.config.LoadProperties; import com.gmail.nossr50.datatypes.HUDmmo; import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.spout.SpoutStuff; @@ -32,7 +33,10 @@ public class mcSpoutListener implements Listener { SpoutStuff.playerHUDs.put(sPlayer, new HUDmmo(sPlayer)); //Setup Party HUD stuff PlayerProfile PPs = Users.getProfile(sPlayer); PPs.toggleSpoutEnabled(); - sPlayer.setTitle(String.valueOf(PPs.getPowerLevel())); + + if (LoadProperties.showPowerLevel) { + sPlayer.setTitle(String.valueOf(PPs.getPowerLevel())); + } } } } \ No newline at end of file diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index c19b07922..6f2d3a9e7 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -340,6 +340,7 @@ Spout: Enabled: true Show_Display_Name: false HUD: + Show_Power_Level: true Default: STANDARD Retro: Colors: