code cleanup in dupe book command

This commit is contained in:
Bella 2020-03-12 11:58:50 -04:00
parent d04ef24971
commit d9c5ba112e
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 3 additions and 2 deletions

View File

@ -39,6 +39,7 @@ public class DupeBookCommand extends Command {
}
if (is.hasTagCompound()) {
assert is.getTagCompound() != null;
is.getTagCompound().setTag("pages", pages);
is.getTagCompound().setTag("title", new NBTTagString(""));
is.getTagCompound().setTag("author", new NBTTagString(Wrapper.getPlayer().getName()));
@ -54,7 +55,7 @@ public class DupeBookCommand extends Command {
Wrapper.getPlayer().connection.sendPacket(new CPacketCustomPayload("MC|BEdit", buf));
Command.sendChatMessage("Dupe book generated.");
} else {
Command.sendChatMessage("You must be holding a writable book.");
Command.sendErrorMessage("You must be holding a writable book.");
}
}
}