mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
more work on notifications config
This commit is contained in:
parent
4068d61246
commit
51291f7c49
@ -495,11 +495,6 @@ public class AdvancedConfig extends ConfigValidated {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* GENERAL */
|
/* GENERAL */
|
||||||
public int getStartingLevel() { return getIntValue(SKILLS, GENERAL, STARTING_LEVEL); }
|
|
||||||
|
|
||||||
public boolean allowPlayerTips() {
|
|
||||||
return config.getBoolean("Feedback.PlayerTips", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns the maximum level at which superabilities will stop lengthening from scaling alongside skill level.
|
* This returns the maximum level at which superabilities will stop lengthening from scaling alongside skill level.
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.gmail.nossr50.config.hocon.notifications;
|
||||||
|
|
||||||
|
import ninja.leaping.configurate.objectmapping.Setting;
|
||||||
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
|
@ConfigSerializable
|
||||||
|
public class ConfigNotificationGeneral {
|
||||||
|
|
||||||
|
public static final boolean PLAYER_TIPS_DEFAULT = true;
|
||||||
|
@Setting(value = "Player-Tips", comment = "Allows mcMMO to send players automated helpful tips." +
|
||||||
|
"\n Default value: "+PLAYER_TIPS_DEFAULT)
|
||||||
|
public boolean playerTips = PLAYER_TIPS_DEFAULT;
|
||||||
|
|
||||||
|
public boolean isPlayerTips() {
|
||||||
|
return playerTips;
|
||||||
|
}
|
||||||
|
}
|
@ -19,4 +19,15 @@ public class ConfigNotifications {
|
|||||||
@Setting(value = "Action-Bar-Notifications", comment = "Settings related to action bar messages." +
|
@Setting(value = "Action-Bar-Notifications", comment = "Settings related to action bar messages." +
|
||||||
"\nThe action bar is the area above your health and armor.")
|
"\nThe action bar is the area above your health and armor.")
|
||||||
public ConfigActionBarNotifications actionBarNotifications = new ConfigActionBarNotifications();
|
public ConfigActionBarNotifications actionBarNotifications = new ConfigActionBarNotifications();
|
||||||
|
|
||||||
|
@Setting(value = "General", comment = "General settings for Notifications")
|
||||||
|
public ConfigNotificationGeneral configNotificationGeneral = new ConfigNotificationGeneral();
|
||||||
|
|
||||||
|
public ConfigActionBarNotifications getActionBarNotifications() {
|
||||||
|
return actionBarNotifications;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfigNotificationGeneral getConfigNotificationGeneral() {
|
||||||
|
return configNotificationGeneral;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -594,7 +594,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
new ClearRegisteredXPGainTask().runTaskTimer(this, 60, 60);
|
new ClearRegisteredXPGainTask().runTaskTimer(this, 60, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(AdvancedConfig.getInstance().allowPlayerTips())
|
if(configManager.getConfigNotifications().getConfigNotificationGeneral().isPlayerTips())
|
||||||
{
|
{
|
||||||
new NotifySquelchReminderTask().runTaskTimer(this, 60, ((20 * 60) * 60));
|
new NotifySquelchReminderTask().runTaskTimer(this, 60, ((20 * 60) * 60));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user