Add disarm config settings

This commit is contained in:
nossr50 2019-06-14 11:16:46 -07:00
parent 43600ef800
commit ab56464bc4
4 changed files with 52 additions and 0 deletions

View File

@ -1,8 +1,24 @@
package com.gmail.nossr50.config.hocon.skills.unarmed;
import com.gmail.nossr50.config.ConfigConstants;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigUnarmed {
@Setting(value = ConfigConstants.SUB_SKILL_NODE)
private ConfigUnarmedSubskills subskills = new ConfigUnarmedSubskills();
public ConfigUnarmedSubskills getSubskills() {
return subskills;
}
public ConfigUnarmedDisarm getDisarm() {
return subskills.getDisarm();
}
public boolean isPreventItemTheft() {
return subskills.isPreventItemTheft();
}
}

View File

@ -0,0 +1,16 @@
package com.gmail.nossr50.config.hocon.skills.unarmed;
import ninja.leaping.configurate.objectmapping.Setting;
public class ConfigUnarmedDisarm {
private static final boolean PREVENT_ITEM_THEFT = false;
@Setting(value = "Prevent-Item-Theft", comment = "Prevents weapons thrown to the ground by disarm from being picked up by anyone but the owner of said item." +
"\nDefault value: "+PREVENT_ITEM_THEFT)
private boolean preventItemTheft = PREVENT_ITEM_THEFT;
public boolean isPreventItemTheft() {
return preventItemTheft;
}
}

View File

@ -0,0 +1,19 @@
package com.gmail.nossr50.config.hocon.skills.unarmed;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigUnarmedSubskills {
@Setting(value = "Disarm")
public ConfigUnarmedDisarm disarm = new ConfigUnarmedDisarm();
public ConfigUnarmedDisarm getDisarm() {
return disarm;
}
public boolean isPreventItemTheft() {
return disarm.isPreventItemTheft();
}
}

View File

@ -31,6 +31,7 @@ import org.bukkit.metadata.FixedMetadataValue;
import java.util.List;
public class HerbalismManager extends SkillManager {
public HerbalismManager(McMMOPlayer mcMMOPlayer) {
super(mcMMOPlayer, PrimarySkillType.HERBALISM);
}