Browse Source

Add toggle to disable event information on player join

nossr50 6 years ago
parent
commit
734dfcdec5

+ 1 - 0
Changelog.txt

@@ -2,6 +2,7 @@ Version 2.1.61
     Fixed the locale string formatting of 'Mining.SubSkill.DoubleDrops.Stat'
     Fixed the locale string formatting of 'Mining.SubSkill.DoubleDrops.Stat'
     Updated the Japanese locale (thanks snake0053)
     Updated the Japanese locale (thanks snake0053)
     Added toggle to turn off event message broadcasts (XP rate) to config.yml - 'General.EventBroadcasts'
     Added toggle to turn off event message broadcasts (XP rate) to config.yml - 'General.EventBroadcasts'
+    Added toggle to not inform players of events when they join (XP rate, etc) to config.yml 'General.EventInfoOnPlayerJoin'
 
 
     NOTE: The toggle for event message broadcasts is separate from the titles being shown, that's another config option (titles are the BIG TEXT in the middle of the screen)
     NOTE: The toggle for event message broadcasts is separate from the titles being shown, that's another config option (titles are the BIG TEXT in the middle of the screen)
 
 

+ 1 - 0
src/main/java/com/gmail/nossr50/config/Config.java

@@ -569,4 +569,5 @@ public class Config extends AutoUpdateConfigLoader {
     //public float getMasterVolume() { return (float) config.getDouble("Sounds.MasterVolume", 1.0); }
     //public float getMasterVolume() { return (float) config.getDouble("Sounds.MasterVolume", 1.0); }
 
 
     public boolean broadcastEventMessages() { return config.getBoolean("General.EventBroadcasts", true);}
     public boolean broadcastEventMessages() { return config.getBoolean("General.EventBroadcasts", true);}
+    public boolean playerJoinEventInfo() { return config.getBoolean("General.EventInfoOnPlayerJoin", true);}
 }
 }

+ 1 - 1
src/main/java/com/gmail/nossr50/listeners/PlayerListener.java

@@ -529,7 +529,7 @@ public class PlayerListener implements Listener {
             Motd.displayAll(player);
             Motd.displayAll(player);
         }
         }
 
 
-        if (plugin.isXPEventEnabled()) {
+        if (plugin.isXPEventEnabled() && Config.getInstance().playerJoinEventInfo()) {
             player.sendMessage(LocaleLoader.getString("XPRate.Event", ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
             player.sendMessage(LocaleLoader.getString("XPRate.Event", ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
         }
         }
     }
     }

+ 1 - 0
src/main/resources/config.yml

@@ -17,6 +17,7 @@ General:
     AprilFoolsEvent: true
     AprilFoolsEvent: true
     MOTD_Enabled: true
     MOTD_Enabled: true
     EventBroadcasts: true
     EventBroadcasts: true
+    EventInfoOnPlayerJoin: true
     # Send a message to the player when his profile was successfully loaded
     # Send a message to the player when his profile was successfully loaded
     Show_Profile_Loaded: false
     Show_Profile_Loaded: false
     # Amount of time (in minutes) to wait between saves of player information
     # Amount of time (in minutes) to wait between saves of player information