Removes unnecessary options #8
Removes the DISABLE_COOL_DOWN option Removes the DISABLE_DELAY option Uses the old DISABLE_COOL_DOWN behavior if cool-down is set to 0 or below Uses the old DISABLE_DELAY behavior if max-delay is set to 0 or below
This commit is contained in:
		@@ -12,16 +12,6 @@ public enum NPCSetting {
 | 
			
		||||
     */
 | 
			
		||||
    DROP_ITEM("dropItem", SettingValueType.BOOLEAN, true, "dropItem"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The setting for whether the cool-down period between reforging sessions should be disabled
 | 
			
		||||
     */
 | 
			
		||||
    DISABLE_COOL_DOWN("disableCoolDown", SettingValueType.BOOLEAN, false, "disableCoolDown"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The setting for whether the delay it takes for an item to be repaired should be disabled
 | 
			
		||||
     */
 | 
			
		||||
    DISABLE_DELAY("disableDelay", SettingValueType.BOOLEAN, false, "disableDelay"),
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The setting for the chance of a reforging to fail
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -248,7 +248,7 @@ public class NPCSettings {
 | 
			
		||||
     * @return <p>Whether to drop reforged items on the ground</p>
 | 
			
		||||
     */
 | 
			
		||||
    public boolean getDropItem() {
 | 
			
		||||
        return asBoolean(NPCSetting.DROP_ITEM);
 | 
			
		||||
        return ConfigHelper.asBoolean(getValue(NPCSetting.DROP_ITEM));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -257,7 +257,7 @@ public class NPCSettings {
 | 
			
		||||
     * @return <p>Whether to disable the reforge-cool-down</p>
 | 
			
		||||
     */
 | 
			
		||||
    public boolean getDisableCoolDown() {
 | 
			
		||||
        return asBoolean(NPCSetting.DISABLE_COOL_DOWN);
 | 
			
		||||
        return asInt(NPCSetting.REFORGE_COOL_DOWN) <= 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -266,19 +266,7 @@ public class NPCSettings {
 | 
			
		||||
     * @return <p>Whether to disable the reforge delay</p>
 | 
			
		||||
     */
 | 
			
		||||
    public boolean getDisableDelay() {
 | 
			
		||||
        return asBoolean(NPCSetting.DISABLE_DELAY);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Gets the given value as a boolean
 | 
			
		||||
     *
 | 
			
		||||
     * <p>This will throw an exception if used for a non-boolean value</p>
 | 
			
		||||
     *
 | 
			
		||||
     * @param setting <p>The setting to get the value of</p>
 | 
			
		||||
     * @return <p>The value of the given setting as a boolean</p>
 | 
			
		||||
     */
 | 
			
		||||
    private boolean asBoolean(NPCSetting setting) {
 | 
			
		||||
        return ConfigHelper.asBoolean(getValue(setting));
 | 
			
		||||
        return asInt(NPCSetting.MAX_REFORGE_DELAY) <= 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -32,12 +32,6 @@ defaults:
 | 
			
		||||
  # up yet.
 | 
			
		||||
  reforgeAbleItems: [ ]
 | 
			
		||||
 | 
			
		||||
  # Whether to disable the cool-down period between each reforge
 | 
			
		||||
  disableCoolDown: false
 | 
			
		||||
 | 
			
		||||
  # Whether to disable the reforging delay, making re-forging complete instantly
 | 
			
		||||
  disableDelay: false
 | 
			
		||||
 | 
			
		||||
  # The chance to fail reforging an item, which only repairs the item a tiny bit or not at all (0-100)
 | 
			
		||||
  failReforgeChance: 10 # Default = 10%
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user