mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 03:25:13 +01:00
Add a few methods for setting lookclose/gravity directly.
This commit is contained in:
parent
3faa57ee70
commit
0021b57f44
@ -22,6 +22,10 @@ public class Gravity extends Trait implements Toggleable {
|
|||||||
npc.getBukkitEntity().setVelocity(velocity);
|
npc.getBukkitEntity().setVelocity(velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void gravitate(boolean gravitate) {
|
||||||
|
enabled = gravitate;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean toggle() {
|
public boolean toggle() {
|
||||||
return enabled = !enabled;
|
return enabled = !enabled;
|
||||||
|
@ -39,6 +39,10 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
|
|||||||
realisticLooking = args.hasFlag('r');
|
realisticLooking = args.hasFlag('r');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void lookClose(boolean lookClose) {
|
||||||
|
enabled = lookClose;
|
||||||
|
}
|
||||||
|
|
||||||
private void findNewTarget() {
|
private void findNewTarget() {
|
||||||
List<Entity> nearby = npc.getBukkitEntity().getNearbyEntities(range, range, range);
|
List<Entity> nearby = npc.getBukkitEntity().getNearbyEntities(range, range, range);
|
||||||
final Location npcLocation = npc.getBukkitEntity().getLocation();
|
final Location npcLocation = npc.getBukkitEntity().getLocation();
|
||||||
|
@ -53,5 +53,6 @@ public class WaypointTriggerRegistry implements Persister {
|
|||||||
addTrigger("chat", ChatTrigger.class, ChatTriggerPrompt.class);
|
addTrigger("chat", ChatTrigger.class, ChatTriggerPrompt.class);
|
||||||
addTrigger("delay", DelayTrigger.class, DelayTriggerPrompt.class);
|
addTrigger("delay", DelayTrigger.class, DelayTriggerPrompt.class);
|
||||||
addTrigger("teleport", TeleportTrigger.class, TeleportTriggerPrompt.class);
|
addTrigger("teleport", TeleportTrigger.class, TeleportTriggerPrompt.class);
|
||||||
|
addTrigger("pose", PoseTrigger.class, PoseTriggerPrompt.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user