mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Add disarm config settings
This commit is contained in:
parent
43600ef800
commit
ab56464bc4
@ -1,8 +1,24 @@
|
|||||||
package com.gmail.nossr50.config.hocon.skills.unarmed;
|
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;
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
@ConfigSerializable
|
@ConfigSerializable
|
||||||
public class ConfigUnarmed {
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
@ -31,6 +31,7 @@ import org.bukkit.metadata.FixedMetadataValue;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class HerbalismManager extends SkillManager {
|
public class HerbalismManager extends SkillManager {
|
||||||
|
|
||||||
public HerbalismManager(McMMOPlayer mcMMOPlayer) {
|
public HerbalismManager(McMMOPlayer mcMMOPlayer) {
|
||||||
super(mcMMOPlayer, PrimarySkillType.HERBALISM);
|
super(mcMMOPlayer, PrimarySkillType.HERBALISM);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user