Add toggle to disable event information on player join

This commit is contained in:
nossr50 2019-05-16 11:40:47 -07:00
parent c8a32b8b38
commit 734dfcdec5
4 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@ Version 2.1.61
Fixed the locale string formatting of 'Mining.SubSkill.DoubleDrops.Stat'
Updated the Japanese locale (thanks snake0053)
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)

View File

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

View File

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

View File

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