String valstring = toggleval ? " on" : " off";
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
player.addChatMessage(new ChatComponentText("Toggled " + module.getModule().getDataName() + valstring));
}
MuseItemUtils.toggleModuleForPlayer(player, module.getModule().getDataName(), toggleval);
MusePacketToggleRequest toggleRequest = new MusePacketToggleRequest(player, module.getModule().getDataName(), toggleval);
PacketSender.sendToServer(toggleRequest);
}
toggleval = !toggleval;
}