mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-03 02:23:44 +01:00 
			
		
		
		
	Add toggle to disable event information on player join
This commit is contained in:
		@@ -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)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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);}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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()));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user