Added particle cool down to config
This commit is contained in:
parent
a8a7a3e9e1
commit
a8667e84e3
|
|
@ -80,4 +80,21 @@ public final class Config extends AbstractConfig {
|
||||||
private static void loadSettings() {
|
private static void loadSettings() {
|
||||||
DEBUG = config.getBoolean("settings.debug", DEBUG);
|
DEBUG = config.getBoolean("settings.debug", DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int HEAD_COOL_DOWN = 0;
|
||||||
|
public static int TRAIL_COOL_DOWN = 0;
|
||||||
|
public static int BREAK_PLACE_BLOCK_COOL_DOWN = 5;
|
||||||
|
public static int DEATH_COOL_DOWN = 30;
|
||||||
|
public static int KILL_COOL_DOWN = 5;
|
||||||
|
public static int CLICK_BLOCK_COOL_DOWN = 60;
|
||||||
|
public static int TELEPORT_ARRIVE_COOL_DOWN = 5;
|
||||||
|
private static void loadCoolDown() {
|
||||||
|
HEAD_COOL_DOWN = config.getInt("cool_down.head", HEAD_COOL_DOWN);
|
||||||
|
TRAIL_COOL_DOWN = config.getInt("cool_down.trail", TRAIL_COOL_DOWN);
|
||||||
|
BREAK_PLACE_BLOCK_COOL_DOWN = config.getInt("cool_down.break_place-block", BREAK_PLACE_BLOCK_COOL_DOWN);
|
||||||
|
DEATH_COOL_DOWN = config.getInt("cool_down.death", DEATH_COOL_DOWN);
|
||||||
|
KILL_COOL_DOWN = config.getInt("cool_down.kill", KILL_COOL_DOWN);
|
||||||
|
CLICK_BLOCK_COOL_DOWN = config.getInt("cool_down.click-block", CLICK_BLOCK_COOL_DOWN);
|
||||||
|
TELEPORT_ARRIVE_COOL_DOWN = config.getInt("cool_down.teleport-arrive", TELEPORT_ARRIVE_COOL_DOWN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,19 @@
|
||||||
package com.alttd.objects;
|
package com.alttd.objects;
|
||||||
|
|
||||||
|
import com.alttd.config.Config;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public enum APartType { //TODO add description?
|
public enum APartType { //TODO add description?
|
||||||
HEAD("HEAD", "Head", Material.PLAYER_HEAD, 0,null, false),
|
HEAD("HEAD", "Head", Material.PLAYER_HEAD, TimeUnit.SECONDS.toMillis(Config.HEAD_COOL_DOWN),null, false),
|
||||||
TRAIL("TRAIL", "Trail", Material.GOLD_INGOT, 0, null, false),
|
TRAIL("TRAIL", "Trail", Material.GOLD_INGOT, TimeUnit.SECONDS.toMillis(Config.TRAIL_COOL_DOWN), null, false),
|
||||||
BREAK_PLACE_BLOCK("BREAK_PLACE_BLOCK", "Break/place block", Material.GRASS_BLOCK, TimeUnit.SECONDS.toMillis(5), null, true),
|
BREAK_PLACE_BLOCK("BREAK_PLACE_BLOCK", "Break/place block", Material.GRASS_BLOCK, TimeUnit.SECONDS.toMillis(Config.BREAK_PLACE_BLOCK_COOL_DOWN), null, true),
|
||||||
DEATH("DEATH", "Death", Material.SKELETON_SKULL, TimeUnit.SECONDS.toMillis(30), null, true),
|
DEATH("DEATH", "Death", Material.SKELETON_SKULL, TimeUnit.SECONDS.toMillis(Config.DEATH_COOL_DOWN), null, true),
|
||||||
KILL("KILL", "Kill", Material.DIAMOND_SWORD, TimeUnit.SECONDS.toMillis(5), null, true),
|
KILL("KILL", "Kill", Material.DIAMOND_SWORD, TimeUnit.SECONDS.toMillis(Config.KILL_COOL_DOWN), null, true),
|
||||||
CLICK_BLOCK("CLICK_BLOCK", "Right click block", Material.DIAMOND_BLOCK, TimeUnit.SECONDS.toMillis(60), null, true),
|
CLICK_BLOCK("CLICK_BLOCK", "Right click block", Material.DIAMOND_BLOCK, TimeUnit.SECONDS.toMillis(Config.CLICK_BLOCK_COOL_DOWN), null, true),
|
||||||
TELEPORT_ARRIVE("TELEPORT", "Teleport", Material.DRAGON_EGG, TimeUnit.SECONDS.toMillis(5), null, true);
|
TELEPORT_ARRIVE("TELEPORT", "Teleport", Material.DRAGON_EGG, TimeUnit.SECONDS.toMillis(Config.TELEPORT_ARRIVE_COOL_DOWN), null, true);
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String displayName;
|
private final String displayName;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user