mirror of
https://github.com/amalthea-mc/Ore-Market.git
synced 2024-11-22 02:12:26 +00:00
Implement toggling value update message
This commit is contained in:
parent
97d4187af3
commit
7a2868a165
@ -12,6 +12,7 @@ public class ValueUpdates {
|
||||
Placeholders plh = new Placeholders();
|
||||
|
||||
public void announceValue() {
|
||||
if(OreMarket.main().getConfig().getBoolean("valuemessage.enabled")) {
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(OreMarket.main(), () -> {
|
||||
for (String key : Objects.requireNonNull(OreMarket.main().getGuiConfig().getConfigurationSection("items")).getKeys(false)) {
|
||||
ConfigurationSection keySection = Objects.requireNonNull(OreMarket.main().getGuiConfig().getConfigurationSection("items")).getConfigurationSection(key);
|
||||
@ -31,3 +32,4 @@ public class ValueUpdates {
|
||||
}, 0L, (OreMarket.main().getConfig().getInt("valuemessage.time")* 20L*60));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
prefix: '&bOreMarket '
|
||||
|
||||
valuemessage:
|
||||
enabled: true
|
||||
# Time (in minutes) to send this message
|
||||
time: 5
|
||||
# The below will look like: (These values are just examples)
|
||||
|
Loading…
Reference in New Issue
Block a user