}
if (shouldSync)
{
LogHelper.info(String.format("Syncing EnergyValues with player '%s' at their request", commandSender.getCommandSenderName()));
PacketHandler.INSTANCE.sendTo(new MessageSyncEnergyValues(EnergyValueRegistry.getInstance()), (EntityPlayerMP) commandSender);
commandSender.addChatMessage(new ChatComponentTranslation("command.ee3.sync-values.self.success"));
}
else
{
throw new WrongUsageException("command.ee3.sync-values.self.denied", new Object[]{coolDown / 1000f});
}
}
else if (args[0].equalsIgnoreCase("all"))
{
if (PlayerHelper.isPlayerOp((EntityPlayer) commandSender))
{
LogHelper.info(String.format("Syncing EnergyValues with all players at %s's request", commandSender.getCommandSenderName()));
PacketHandler.INSTANCE.sendToAll(new MessageSyncEnergyValues(EnergyValueRegistry.getInstance()));
func_152373_a(commandSender, this, "command.ee3.sync-values.all.success", new Object[]{commandSender.getCommandSenderName()});
}
else
{
throw new WrongUsageException("command.ee3.sync-values.all.denied");