use of pneumaticCraft.common.network.PacketCommandGetGlobalVariableOutput in project PneumaticCraft by MineMaarten.
the class CommandGetGlobalVariable method processCommand.
@Override
public void processCommand(ICommandSender sender, String[] args) {
if (sender instanceof EntityPlayerMP) {
if (args.length != 1)
throw new WrongUsageException("command.deliverAmazon.args");
String varName = args[0].startsWith("#") ? args[0].substring(1) : args[0];
ChunkPosition pos = GlobalVariableManager.getInstance().getPos(varName);
ItemStack stack = GlobalVariableManager.getInstance().getItem(varName);
NetworkHandler.sendTo(new PacketCommandGetGlobalVariableOutput(varName, pos, stack), (EntityPlayerMP) sender);
}
}
Aggregations