mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Add ScrapCollector and wire up profile loading message toggle
This commit is contained in:
parent
a654762f4d
commit
b29d87df8c
@ -6,10 +6,19 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
@ConfigSerializable
|
||||
public class ConfigNotificationGeneral {
|
||||
|
||||
public static final boolean PLAYER_TIPS_DEFAULT = true;
|
||||
private static final boolean PLAYER_TIPS_DEFAULT = true;
|
||||
public static final boolean PROFILE_LOADED_DEFAULT = false;
|
||||
@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;
|
||||
private boolean playerTips = PLAYER_TIPS_DEFAULT;
|
||||
|
||||
@Setting(value = "Show-Profile-Loaded-Message", comment = "If set to true, players will be shown a message when their profile has been loaded." +
|
||||
"\nDefault value: "+PROFILE_LOADED_DEFAULT)
|
||||
private boolean showProfileLoadedMessage = PROFILE_LOADED_DEFAULT;
|
||||
|
||||
public boolean isShowProfileLoadedMessage() {
|
||||
return showProfileLoadedMessage;
|
||||
}
|
||||
|
||||
public boolean isPlayerTips() {
|
||||
return playerTips;
|
||||
|
@ -6,16 +6,33 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
@ConfigSerializable
|
||||
public class ConfigNotifications {
|
||||
|
||||
public static final boolean SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT = true;
|
||||
private static final boolean SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT = true;
|
||||
|
||||
@Setting(value = "Action-Bar-Notifications", comment = "Settings related to action bar messages." +
|
||||
"\nThe action bar is the area above your health and armor.")
|
||||
public ConfigActionBarNotifications actionBarNotifications = new ConfigActionBarNotifications();
|
||||
private ConfigActionBarNotifications actionBarNotifications = new ConfigActionBarNotifications();
|
||||
|
||||
|
||||
@Setting(value = "General", comment = "General settings for Notifications")
|
||||
public ConfigNotificationGeneral configNotificationGeneral = new ConfigNotificationGeneral();
|
||||
private ConfigNotificationGeneral configNotificationGeneral = new ConfigNotificationGeneral();
|
||||
|
||||
@Setting(value = "Super-Ability-Tool-Raising-Lowering-Notification",
|
||||
comment = "Notifies the player when they go into the tool readying state for super abilities.")
|
||||
private boolean superAbilityToolMessage = SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT;
|
||||
|
||||
|
||||
public boolean isShowProfileLoadedMessage() {
|
||||
return configNotificationGeneral.isShowProfileLoadedMessage();
|
||||
}
|
||||
|
||||
public boolean isPlayerTips() {
|
||||
return configNotificationGeneral.isPlayerTips();
|
||||
}
|
||||
|
||||
public static boolean isSuperAbilityToolNotificationDefault() {
|
||||
return SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT;
|
||||
}
|
||||
|
||||
public boolean isSuperAbilityToolMessage() {
|
||||
return superAbilityToolMessage;
|
||||
}
|
||||
|
@ -6,14 +6,14 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
@ConfigSerializable
|
||||
public class ConfigRanksSalvage {
|
||||
|
||||
@Setting(value = "Advanced-Salvage")
|
||||
private SkillRankProperty advancedSalvage = new SkillRankProperty(35);
|
||||
@Setting(value = "Scrap-Collector")
|
||||
private SkillRankProperty scrapCollector = new SkillRankProperty(2, 10, 15, 20, 25, 30, 35, 40);
|
||||
|
||||
@Setting(value = "Arcane-Salvage")
|
||||
private SkillRankProperty arcaneSalvage = new SkillRankProperty(10, 25, 35, 50, 65, 75, 85, 100);
|
||||
|
||||
public SkillRankProperty getAdvancedSalvage() {
|
||||
return advancedSalvage;
|
||||
public SkillRankProperty getScrapCollector() {
|
||||
return scrapCollector;
|
||||
}
|
||||
|
||||
public SkillRankProperty getArcaneSalvage() {
|
||||
|
@ -91,7 +91,7 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
||||
}
|
||||
}
|
||||
|
||||
if (MainConfig.getInstance().getShowProfileLoadedMessage()) {
|
||||
if (mcMMO.getConfigManager().getConfigNotifications().isShowProfileLoadedMessage()) {
|
||||
player.sendMessage(LocaleLoader.getString("Profile.Loading.Success"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user