if (args.isEmpty())
{
me.sendMessage(ERROR_COLOR + "You must enter the name of the BO2.");
return true;
}
CustomObject spawnObject = null;
if (bukkitWorld != null)
spawnObject = bukkitWorld.getConfigs().getCustomObjects().parseCustomObject(args.get(0));
if (spawnObject == null)
{
sender.sendMessage(ERROR_COLOR + "Object not found, use '/tc list' to list the available ones.");
return true;
}
Block block = this.getWatchedBlock(me, true);
if (block == null)
return true;
if (spawnObject.spawnForced(bukkitWorld, random, Rotation.NORTH, block.getX(), block.getY(), block.getZ()))
{
me.sendMessage(BaseCommand.MESSAGE_COLOR + spawnObject.getName() + " was spawned.");
} else
{
me.sendMessage(BaseCommand.ERROR_COLOR + "Object can't be spawned over there.");
}