forked from RepoMirrors/kami-blue
code cleanup in dupe book command
This commit is contained in:
parent
d04ef24971
commit
d9c5ba112e
|
@ -38,7 +38,8 @@ public class DupeBookCommand extends Command {
|
|||
pages.appendTag(new NBTTagString(joinedPages.substring(page * 210, (page + 1) * 210)));
|
||||
}
|
||||
|
||||
if(is.hasTagCompound()){
|
||||
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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue