Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.59 KB | None | 0 0
  1.             if (args.length == 1 && sender.hasPermission("skit.give.other")) {
  2.                 Player target = Bukkit.getPlayer(args[0]);
  3.                
  4.                 ((HumanEntity) target).getInventory().clear();
  5.                 ((HumanEntity) target).getEnderChest().clear();
  6.                 ((Player) target).setLevel(0);
  7.                 ((Player) target).setExp(0);
  8.                 ((Player) target).setFoodLevel(40);
  9.                 ((Player) target).setHealth(20);
  10.                
  11.                 //Book
  12.                 ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
  13.                 BookMeta meta = (BookMeta) book.getItemMeta();
  14.                 meta.setAuthor("Vroengard");
  15.                 meta.setDisplayName("§aVroengard Info Buch");
  16.                 meta.addPage("§cComing Soon");
  17.                 meta.addPage("§cComing Soon");
  18.                 meta.addPage("§cComing Soon");
  19.                 meta.addPage("§cComing Soon");
  20.                 meta.addPage("§cComing Soon");
  21.                 meta.addPage("§cComing Soon");
  22.                 meta.addPage("§9Ich sags doch..." + "\n" + "§cComing Soon");
  23.                 book.setItemMeta(meta);
  24.                 ((HumanEntity) target).getInventory().setItem(7, book);
  25.  
  26.                 //Sword
  27.                 ItemStack sword = new ItemStack(Material.IRON_SWORD);
  28.                 ItemMeta swordmeta = sword.getItemMeta();
  29.                 swordmeta.setDisplayName("§aDein erstes Schwert");
  30.                 ArrayList<String> swordlore = new ArrayList<>();
  31.                 swordmeta.setLore(swordlore);
  32.                 swordmeta.addEnchant(Enchantment.DAMAGE_ALL, 1, true);
  33.                 swordmeta.addEnchant(Enchantment.DURABILITY, 1, true);
  34.                 sword.setItemMeta(swordmeta);
  35.                 ((HumanEntity) target).getInventory().setItem(0, sword);
  36.  
  37.                 //Pickaxe
  38.                 ItemStack pickaxe = new ItemStack(Material.IRON_PICKAXE);
  39.                 ItemMeta pickaxemeta = pickaxe.getItemMeta();
  40.                 pickaxemeta.setDisplayName("§aDeine erste Spitzhacke");
  41.                 ArrayList<String> pickaxelore = new ArrayList<>();
  42.                 pickaxemeta.setLore(pickaxelore);
  43.                 pickaxemeta.addEnchant(Enchantment.DIG_SPEED, 1, true);
  44.                 pickaxemeta.addEnchant(Enchantment.DURABILITY, 1, true);
  45.                 pickaxe.setItemMeta(pickaxemeta);
  46.                 ((HumanEntity) target).getInventory().setItem(1, pickaxe);
  47.  
  48.                 //Axe
  49.                 ItemStack axe = new ItemStack(Material.IRON_AXE);
  50.                 ItemMeta axemeta = pickaxe.getItemMeta();
  51.                 axemeta.setDisplayName("§aDeine erste Axt");
  52.                 ArrayList<String> axelore = new ArrayList<>();
  53.                 axemeta.setLore(axelore);
  54.                 axemeta.addEnchant(Enchantment.DIG_SPEED, 1, true);
  55.                 axemeta.addEnchant(Enchantment.DURABILITY, 1, true);
  56.                 axe.setItemMeta(axemeta);
  57.                 ((HumanEntity) target).getInventory().setItem(2, axe);
  58.  
  59.                 //Shovel
  60.                 ItemStack shovel = new ItemStack(Material.IRON_SPADE);
  61.                 ItemMeta shovelmeta = shovel.getItemMeta();
  62.                 shovelmeta.setDisplayName("§aDeine erste Schaufel");
  63.                 ArrayList<String> shovellore = new ArrayList<>();
  64.                 shovelmeta.setLore(shovellore);
  65.                 shovelmeta.addEnchant(Enchantment.DIG_SPEED, 1, true);
  66.                 shovelmeta.addEnchant(Enchantment.DURABILITY, 1, true);
  67.                 shovel.setItemMeta(shovelmeta);
  68.                 ((HumanEntity) target).getInventory().setItem(3, shovel);
  69.  
  70.                 //Steak
  71.                 ItemStack steak = new ItemStack(Material.COOKED_BEEF, 64);
  72.                 ItemMeta steakmeta = steak.getItemMeta();
  73.                 steakmeta.setDisplayName("§aDein erstes Essen");
  74.                 steak.setItemMeta(steakmeta);
  75.                 ((HumanEntity) target).getInventory().setItem(4, steak);
  76.                
  77.                 //Diamond
  78.                 ItemStack dia = new ItemStack(Material.DIAMOND);
  79.                 ItemMeta diameta = dia.getItemMeta();
  80.                 diameta.setDisplayName("§aS§bU§cP§dE§eR §1T§2O§3L§4§5L§6E§aR §bS§cU§dP§1E§2R §3D§4I§5A§6M§aA§bN§cT");
  81.                 ArrayList<String> dialore = new ArrayList<>();
  82.                 diameta.addEnchant(Enchantment.LUCK, 10, true);
  83.                 dialore.add("§aCraftItem");
  84.                 diameta.setLore(dialore);
  85.                 dia.setItemMeta(diameta);
  86.                 ((HumanEntity) target).getInventory().setItem(8, dia);
  87.                
  88.                 //Bread Enderchest
  89.                 ItemStack bread = new ItemStack(Material.BREAD, 5);
  90.                 ItemMeta breadmeta = bread.getItemMeta();
  91.                 breadmeta.setDisplayName("§4DEIN LETZTES ESSEN §cD:");
  92.                 bread.setItemMeta(breadmeta);
  93.                 ((HumanEntity) target).getEnderChest().addItem(bread);
  94.  
  95.                 //helmet
  96.                 ItemStack helmet = new ItemStack(Material.LEATHER_HELMET);
  97.                 ItemMeta helmetmeta = helmet.getItemMeta();
  98.                 helmetmeta.setDisplayName("§aDein erster Helm");
  99.                 ArrayList<String> helmetlore = new ArrayList<>();
  100.                 helmetmeta.setLore(helmetlore);
  101.                 helmetmeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 1, true);
  102.                 helmetmeta.addEnchant(Enchantment.DURABILITY, 1, true);
  103.                 helmet.setItemMeta(helmetmeta);
  104.                 ((HumanEntity) target).getInventory().setHelmet(helmet);
  105.  
  106.                 //Chestplate
  107.                 ItemStack chestplate = new ItemStack(Material.LEATHER_CHESTPLATE);
  108.                 ItemMeta chestplatemeta = chestplate.getItemMeta();
  109.                 chestplatemeta.setDisplayName("§aDein erster Brustpanzer");
  110.                 ArrayList<String> chestplatelore = new ArrayList<>();
  111.                 chestplatemeta.setLore(chestplatelore);
  112.                 chestplatemeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 1, true);
  113.                 chestplatemeta.addEnchant(Enchantment.DURABILITY, 1, true);
  114.                 chestplate.setItemMeta(chestplatemeta);
  115.                 ((HumanEntity) target).getInventory().setChestplate(chestplate);
  116.  
  117.                 //Leggings
  118.                 ItemStack leggins = new ItemStack(Material.LEATHER_LEGGINGS);
  119.                 ItemMeta legginsmeta = leggins.getItemMeta();
  120.                 legginsmeta.setDisplayName("§aDeine erste Hose");
  121.                 ArrayList<String> leginslore = new ArrayList<>();
  122.                 legginsmeta.setLore(leginslore);
  123.                 legginsmeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 1, true);
  124.                 legginsmeta.addEnchant(Enchantment.DURABILITY, 1, true);
  125.                 leggins.setItemMeta(legginsmeta);
  126.                 ((HumanEntity) target).getInventory().setLeggings(leggins);
  127.  
  128.                 //Boots
  129.                 ItemStack boots = new ItemStack(Material.LEATHER_BOOTS);
  130.                 ItemMeta bootsmeta = boots.getItemMeta();
  131.                 bootsmeta.setDisplayName("§aDeine ersten Schuhe");
  132.                 ArrayList<String> bootslore = new ArrayList<>();
  133.                 bootsmeta.setLore(bootslore);
  134.                 bootsmeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 1, true);
  135.                 bootsmeta.addEnchant(Enchantment.DURABILITY, 1, true);
  136.                 boots.setItemMeta(bootsmeta);
  137.                 ((HumanEntity) target).getInventory().setBoots(boots);
  138.                
  139.                 target.sendMessage("§9[§aVroengard§9] §aDein Inventar wurde von §9" + sender.getName() + " §agelöscht und es wurde ein Starterkit geladen!");
  140.                 sender.sendMessage("§9[§aVroengard§9] §aDu hast das Inventar von §9" + target.getName() + " §agelöscht und ein Starterkit geladen!");
  141.                 return true;
  142.                
  143.  
  144.             } else {
  145.                 sender.sendMessage("§9[§aVroengard§9] §aStarterkit Plugin von fantahund" + "\n" +
  146.                            "§9/skit give§a: lädt ein starterkit" + "\n" +
  147.                            "§9/skit NAME§a Lädt das Starterkit bei einem Spieler!");
  148.                
  149.             }          
  150.  
  151.             return true;
  152.         }
  153.  
  154.         return false;
  155.     }
  156. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement