public void save() {
   GuiNpcTextField.unfocus();
   if (!this.categorySelection && this.dialog.id >= 0) {
     Client.sendData(
         EnumPacketServer.DialogSave,
         new Object[] {
           Integer.valueOf(this.category.id), this.dialog.writeToNBT(new NBTTagCompound())
         });
   } else if (this.categorySelection && this.category.id >= 0) {
     Client.sendData(
         EnumPacketServer.DialogCategorySave,
         new Object[] {this.category.writeNBT(new NBTTagCompound())});
   }
 }