Fix /npc hologram remove off by one

This commit is contained in:
fullwall 2020-10-26 17:20:09 +08:00
parent 11a231cd13
commit e8cdba65df

View File

@ -760,7 +760,7 @@ public class NPCCommands {
throw new CommandException(Messages.HOLOGRAM_INVALID_LINE);
}
int idx = Math.max(0, args.getInteger(2));
if (idx > trait.getLines().size()) {
if (idx >= trait.getLines().size()) {
throw new CommandException(Messages.HOLOGRAM_INVALID_LINE);
}
if (args.argsLength() == 3) {