This commit is contained in:
Daniel Mills 2020-08-01 11:11:53 -04:00
parent 75f6a93024
commit 92e7ac7f20
5 changed files with 16 additions and 16 deletions

View File

@ -45,20 +45,20 @@ public class CommandIrisGoto extends MortarCommand
int tries = 10000; int tries = 10000;
boolean cave = false; boolean cave = false;
IrisBiome biome2 = null; IrisBiome biome2 = null;
if(args.length > 2) if(args.length > 1)
{ {
if(args[2].equalsIgnoreCase("-cave")) if(args[1].equalsIgnoreCase("-cave"))
{ {
cave = true; cave = true;
} }
else else
{ {
biome2 = Iris.data.getBiomeLoader().load(args[2]); biome2 = Iris.data.getBiomeLoader().load(args[1]);
if(biome2 == null) if(biome2 == null)
{ {
sender.sendMessage(args[2] + " is not a biome. Use the file name (without extension)"); sender.sendMessage(args[1] + " is not a biome. Use the file name (without extension)");
return true; return true;
} }
} }
@ -72,11 +72,11 @@ public class CommandIrisGoto extends MortarCommand
} }
} }
IrisBiome biome = Iris.data.getBiomeLoader().load(args[1]); IrisBiome biome = Iris.data.getBiomeLoader().load(args[0]);
if(biome == null) if(biome == null)
{ {
sender.sendMessage(args[1] + " is not a biome. Use the file name (without extension)"); sender.sendMessage(args[0] + " is not a biome. Use the file name (without extension)");
return true; return true;
} }

View File

@ -38,7 +38,7 @@ public class CommandIrisObjectContract extends MortarCommand
return true; return true;
} }
int amt = Integer.valueOf(args[2]); int amt = Integer.valueOf(args[0]);
Location[] b = WandController.getCuboid(p.getInventory().getItemInMainHand()); Location[] b = WandController.getCuboid(p.getInventory().getItemInMainHand());
Location a1 = b[0].clone(); Location a1 = b[0].clone();
Location a2 = b[1].clone(); Location a2 = b[1].clone();

View File

@ -38,7 +38,7 @@ public class CommandIrisObjectExpand extends MortarCommand
return true; return true;
} }
int amt = Integer.valueOf(args[2]); int amt = Integer.valueOf(args[0]);
Location[] b = WandController.getCuboid(p.getInventory().getItemInMainHand()); Location[] b = WandController.getCuboid(p.getInventory().getItemInMainHand());
Location a1 = b[0].clone(); Location a1 = b[0].clone();
Location a2 = b[1].clone(); Location a2 = b[1].clone();

View File

@ -36,7 +36,7 @@ public class CommandIrisObjectPaste extends MortarCommand
} }
Player p = sender.player(); Player p = sender.player();
File file = new File(Iris.instance.getDataFolder(), "objects/" + args[1] + ".iob"); File file = new File(Iris.instance.getDataFolder(), "objects/" + args[0] + ".iob");
boolean intoWand = false; boolean intoWand = false;
for(String i : args) for(String i : args)
@ -49,7 +49,7 @@ public class CommandIrisObjectPaste extends MortarCommand
if(!file.exists()) if(!file.exists())
{ {
sender.sendMessage("Can't find " + "objects/" + args[1] + ".iob"); sender.sendMessage("Can't find " + "objects/" + args[0] + ".iob");
} }
ItemStack wand = ((Player) sender).getInventory().getItemInMainHand(); ItemStack wand = ((Player) sender).getInventory().getItemInMainHand();
@ -57,8 +57,8 @@ public class CommandIrisObjectPaste extends MortarCommand
try try
{ {
o.read(new File(Iris.instance.getDataFolder(), "objects/" + args[1] + ".iob")); o.read(new File(Iris.instance.getDataFolder(), "objects/" + args[0] + ".iob"));
sender.sendMessage("Loaded " + "objects/" + args[1] + ".iob"); sender.sendMessage("Loaded " + "objects/" + args[0] + ".iob");
((Player) sender).getWorld().playSound(((Player) sender).getLocation(), Sound.BLOCK_ENCHANTMENT_TABLE_USE, 1f, 1.5f); ((Player) sender).getWorld().playSound(((Player) sender).getLocation(), Sound.BLOCK_ENCHANTMENT_TABLE_USE, 1f, 1.5f);
Location block = ((Player) sender).getTargetBlock((Set<Material>) null, 256).getLocation().clone().add(0, 1, 0); Location block = ((Player) sender).getTargetBlock((Set<Material>) null, 256).getLocation().clone().add(0, 1, 0);
@ -67,16 +67,16 @@ public class CommandIrisObjectPaste extends MortarCommand
{ {
wand = WandController.createWand(block.clone().subtract(o.getCenter()).add(o.getW() - 1, o.getH(), o.getD() - 1), block.clone().subtract(o.getCenter())); wand = WandController.createWand(block.clone().subtract(o.getCenter()).add(o.getW() - 1, o.getH(), o.getD() - 1), block.clone().subtract(o.getCenter()));
p.getInventory().setItemInMainHand(wand); p.getInventory().setItemInMainHand(wand);
sender.sendMessage("Updated wand for " + "objects/" + args[1] + ".iob"); sender.sendMessage("Updated wand for " + "objects/" + args[0] + ".iob");
} }
WandController.pasteSchematic(o, block); WandController.pasteSchematic(o, block);
sender.sendMessage("Placed " + "objects/" + args[1] + ".iob"); sender.sendMessage("Placed " + "objects/" + args[0] + ".iob");
} }
catch(IOException e) catch(IOException e)
{ {
sender.sendMessage("Failed to load " + "objects/" + args[1] + ".iob"); sender.sendMessage("Failed to load " + "objects/" + args[0] + ".iob");
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -38,7 +38,7 @@ public class CommandIrisObjectShift extends MortarCommand
return true; return true;
} }
int amt = Integer.valueOf(args[2]); int amt = Integer.valueOf(args[0]);
Location[] b = WandController.getCuboid(p.getInventory().getItemInMainHand()); Location[] b = WandController.getCuboid(p.getInventory().getItemInMainHand());
Location a1 = b[0].clone(); Location a1 = b[0].clone();
Location a2 = b[1].clone(); Location a2 = b[1].clone();