mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-25 18:47:40 +01:00
wp dt is now a toggle
This commit is contained in:
parent
7092926784
commit
c880ef8bc5
@ -9,6 +9,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.citizensnpcs.Citizens;
|
||||
import net.citizensnpcs.api.ai.TeleportStuckAction;
|
||||
import net.citizensnpcs.api.astar.pathfinder.ChunkBlockSource;
|
||||
import net.citizensnpcs.api.command.Command;
|
||||
import net.citizensnpcs.api.command.CommandContext;
|
||||
@ -61,9 +62,15 @@ public class WaypointCommands {
|
||||
max = 1,
|
||||
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);
|
||||
npc.data().setPersistent(NPC.DISABLE_DEFAULT_STUCK_ACTION_METADATA,
|
||||
!npc.data().get(NPC.DISABLE_DEFAULT_STUCK_ACTION_METADATA, false));
|
||||
if (npc.data().get(NPC.DISABLE_DEFAULT_STUCK_ACTION_METADATA, false)) {
|
||||
npc.getNavigator().getDefaultParameters().stuckAction(null);
|
||||
Messaging.sendTr(sender, Messages.WAYPOINT_TELEPORTING_DISABLED, npc.getName());
|
||||
} else {
|
||||
npc.getNavigator().getDefaultParameters().stuckAction(TeleportStuckAction.INSTANCE);
|
||||
Messaging.sendTr(sender, Messages.WAYPOINT_TELEPORTING_ENABLED, npc.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Command(
|
||||
|
@ -412,6 +412,7 @@ public class Messages {
|
||||
public static final String WAYPOINT_ADDED = "citizens.commands.waypoints.add.waypoint-added";
|
||||
public static final String WAYPOINT_PROVIDER_SET = "citizens.waypoints.set-provider";
|
||||
public static final String WAYPOINT_TELEPORTING_DISABLED = "citizens.commands.waypoints.disableteleporting.disabled";
|
||||
public static final String WAYPOINT_TELEPORTING_ENABLED = "citizens.commands.waypoints.disableteleporting.enabled";
|
||||
public static final String WAYPOINT_TRIGGER_ADD_PROMPT = "citizens.editors.waypoints.triggers.add.prompt";
|
||||
public static final String WAYPOINT_TRIGGER_ADDED_SUCCESSFULLY = "citizens.editors.waypoints.triggers.add.added";
|
||||
public static final String WAYPOINT_TRIGGER_CHAT_INVALID_RADIUS = "citizens.editors.waypoints.triggers.chat.invalid-radius";
|
||||
|
@ -295,6 +295,7 @@ citizens.commands.traitc.not-on-npc=The NPC doesn''t have that trait.
|
||||
citizens.commands.unknown-command=Unknown command. Did you mean:
|
||||
citizens.commands.waypoints.add.waypoint-added=Added waypoint at [[{0}]] (index [[{1}]]).
|
||||
citizens.commands.waypoints.disableteleporting.disabled=[[{0}]] will no longer teleport when stuck pathfinding.
|
||||
citizens.commands.waypoints.disableteleporting.enabled=[[{0}]] will now teleport when stuck pathfinding.
|
||||
citizens.commands.waypoints.opendoors.enabled=[[{0}]] will now open doors while pathfinding.
|
||||
citizens.commands.waypoints.opendoors.disabled=[[{0}]] will no longer doors while pathfinding.
|
||||
citizens.commands.wolf.traits-updated=[[{0}]]''s Traits were updated. Angry:[[{1}]], Sitting:[[{2}]], Tamed:[[{3}]], Collar Color:[[{4}]]
|
||||
|
Loading…
Reference in New Issue
Block a user