From 3415f2c63084577e9c49b4f3e658b6795917bf84 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sat, 1 Sep 2012 23:17:07 +0800 Subject: [PATCH] Make /npc speed modify the speed as a percentage --- .../java/net/citizensnpcs/command/command/NPCCommands.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java index 6c0a6930e..f9b7bae50 100644 --- a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java @@ -545,16 +545,16 @@ public class NPCCommands { @Command( aliases = { "npc" }, usage = "speed [speed]", - desc = "Sets the movement speed of an NPC", + desc = "Sets the movement speed of an NPC as a percentage", modifiers = { "speed" }, min = 2, max = 2, permission = "npc.speed") public void speed(CommandContext args, CommandSender sender, NPC npc) throws CommandException { float newSpeed = (float) args.getDouble(1); - npc.getNavigator().getDefaultParameters().speed(newSpeed); + npc.getNavigator().getDefaultParameters().speedModifier(newSpeed); - Messaging.sendF(sender, ChatColor.GREEN + "NPC speed set to %f.", newSpeed); + Messaging.sendF(sender, ChatColor.GREEN + "NPC speed modifier set to %f.", newSpeed); } @Command(