1
0
mirror of https://bitbucket.org/HeshamTB/greet.git synced 2024-11-21 23:42:15 +01:00

optimized kit command

This commit is contained in:
hesham 2018-05-03 12:23:09 +03:00
parent 6ea1095dc7
commit faee743a28

View File

@ -59,19 +59,12 @@ public class commands extends JavaPlugin {
}
if(cmd.getName().equalsIgnoreCase("kit1")) {
ItemStack kit1p = new ItemStack(Material.STONE_PICKAXE);
ItemStack kit1s = new ItemStack(Material.STONE_SWORD);
ItemStack kit1a = new ItemStack(Material.STONE_AXE);
ItemStack kit1t = new ItemStack(Material.TORCH,5);
p.sendMessage( greetprefix + ChatColor.AQUA + "Survival Kit");
p.getInventory().addItem(kit1p);
p.getInventory().addItem(kit1s);
p.getInventory().addItem(kit1a);
p.getInventory().addItem(kit1t);
if(cmd.getName().equalsIgnoreCase("kit1") && p.isOp()) {
p.getInventory().addItem(new ItemStack(Material.STONE_PICKAXE));
p.getInventory().addItem(new ItemStack(Material.STONE_SWORD));
p.getInventory().addItem(new ItemStack(Material.STONE_SWORD));
p.getInventory().addItem(new ItemStack(Material.STONE_SWORD));
}
/*if(cmd.getName().equalsIgnoreCase("setspwan")) { // TODO: give option of new arg to set cords &
p.setBedSpawnLocation(p.getLocation());
@ -82,12 +75,4 @@ public class commands extends JavaPlugin {
}
public String hesh() {
String Players;
Players = Bukkit.getServer().getOnlinePlayers().toString();
return Players;
}
}