mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 08:27:45 +00:00
Fix NPC Tab Completion and String Format for Decimals
This commit is contained in:
1 parent
f7c0f2bdf9
commit
110a7c71fb
2 files changed
+6
-4
No files matched your search
@@ -93,9 +93,11 @@ public class CommandKamkeel extends CommandBase{
|
||||
}
|
||||
}
|
||||
if(args.length <= useArgs.length + 2) {
|
||||
String usage = useArgs[args.length - 3];
|
||||
if(usage.equals("<player>") || usage.equals("[player]")) {
|
||||
return CommandBase.getListOfStringsMatchingLastWord(args, MinecraftServer.getServer().getAllUsernames());
|
||||
if(args.length - 3 >= 0){
|
||||
String usage = useArgs[args.length - 3];
|
||||
if(usage.equals("<player>") || usage.equals("[player]")) {
|
||||
return CommandBase.getListOfStringsMatchingLastWord(args, MinecraftServer.getServer().getAllUsernames());
|
||||
}
|
||||
}
|
||||
}
|
||||
return command.addTabCompletionOptions(sender, Arrays.copyOfRange(args, 1, args.length));
|
||||
|
||||
@@ -94,7 +94,7 @@ public class NpcCommand extends CommandKamkeelBase {
|
||||
}
|
||||
|
||||
selectedNpc.ai.startPos = new int[]{MathHelper.floor_double(posX), MathHelper.floor_double(posY), MathHelper.floor_double(posZ)};
|
||||
sendResult(sender, String.format("Set NPC \u00A7e%s\u00A77 Home to \u00A7b[%f] [%f] [%f]\u00A77", selectedNpc.display.name, posX, posY, posZ));
|
||||
sendResult(sender, String.format("Set NPC \u00A7e%s\u00A77 Home to \u00A7b[%.1f] [%.1f] [%.1f]\u00A77", selectedNpc.display.name, posX, posY, posZ));
|
||||
}
|
||||
|
||||
@SubCommand(
|
||||
|
||||
Reference in new issue
Block a user