mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-16 07:35:32 +01:00
Implement new metadata for /wp disableteleport
This commit is contained in:
parent
b9e6418d52
commit
79f048fe0c
@ -59,6 +59,7 @@ public class WaypointCommands {
|
||||
permission = "citizens.waypoints.disableteleport")
|
||||
public void disableTeleporting(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
|
||||
npc.getNavigator().getDefaultParameters().stuckAction(null);
|
||||
npc.data().setPersistent(NPC.DISABLE_DEFAULT_STUCK_ACTION_METADATA, true);
|
||||
Messaging.sendTr(sender, Messages.WAYPOINT_TELEPORTING_DISABLED);
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,9 @@ public class CitizensNavigator implements Navigator, Runnable {
|
||||
|
||||
public CitizensNavigator(NPC npc) {
|
||||
this.npc = npc;
|
||||
if (npc.data().get(NPC.DISABLE_DEFAULT_STUCK_ACTION_METADATA, false)) {
|
||||
defaultParams.stuckAction(null);
|
||||
}
|
||||
defaultParams.examiner(new SwimmingExaminer(npc));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user