mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 03:25:13 +01:00
Fix an issue with Gravity
This commit is contained in:
parent
14931b32a9
commit
5c6509046e
@ -289,8 +289,9 @@ public class NPCCommands {
|
||||
}
|
||||
}
|
||||
|
||||
if (args.hasValueFlag("b")) {
|
||||
npc.getTrait(Behaviour.class).addScripts(Splitter.on(",").split(args.getFlag("behaviour")));
|
||||
if (args.hasValueFlag("b") || args.hasValueFlag("behaviours") || args.hasValueFlag("behaviors")) {
|
||||
String behaviours = args.getFlag("b", args.getFlag("behaviours", args.getFlag("behaviors")));
|
||||
npc.getTrait(Behaviour.class).addScripts(Splitter.on(',').split(behaviours));
|
||||
msg += " with the specified behaviours";
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ public class Gravity extends Trait implements Toggleable {
|
||||
@Persist
|
||||
private boolean enabled;
|
||||
|
||||
public Gravity(String name) {
|
||||
public Gravity() {
|
||||
super("gravity");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user