Advertisement
Guest User

lolo pate a leau

a guest
Jun 25th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1.  
  2. private static void giveStaffItems(final Player p) {
  3. final ItemStack compass = new ItemStack(Material.COMPASS);
  4. final ItemMeta compassm = compass.getItemMeta();
  5. compassm.setDisplayName("§cT\u00e9l\u00e9portation");
  6. compass.setItemMeta(compassm);
  7. final ItemStack vanishon = new ItemStack(Material.INK_SACK, 1, (short)8);
  8. final ItemMeta vanishonm = vanishon.getItemMeta();
  9. vanishonm.setDisplayName("§7Vanish §f[§aON§f]");
  10. vanishon.setItemMeta(vanishonm);
  11. final ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short)3);
  12. final ItemMeta headm = head.getItemMeta();
  13. headm.setDisplayName("§6Staff en ligne");
  14. head.setItemMeta(headm);
  15. final ItemStack disc = new ItemStack(Material.RECORD_4);
  16. final ItemMeta discm = disc.getItemMeta();
  17. discm.setDisplayName("§bT\u00e9l\u00e9portation al\u00e9atoire");
  18. disc.setItemMeta(discm);
  19. final ItemStack bars = new ItemStack(Material.IRON_FENCE);
  20. final ItemMeta barsm = bars.getItemMeta();
  21. barsm.setDisplayName("§3Freeze");
  22. bars.setItemMeta(barsm);
  23. final ItemStack chest = new ItemStack(Material.CHEST);
  24. final ItemMeta chestm = chest.getItemMeta();
  25. chestm.setDisplayName("§cVerif");
  26. chest.setItemMeta(chestm);
  27. p.getInventory().setItem(8, vanishon);
  28. p.getInventory().setItem(7, head);
  29. p.getInventory().setItem(0, compass);
  30. p.getInventory().setItem(4, disc);
  31. p.getInventory().setItem(1, chest);
  32. p.getInventory().setItem(2, bars);
  33. }
  34.  
  35. public static void toggleVanish(final Player p) {
  36. final ItemStack vanishon = new ItemStack(Material.INK_SACK, 1, (short)8);
  37. final ItemMeta vanishonm = vanishon.getItemMeta();
  38. vanishonm.setDisplayName("§7Vanish §f[§aON§f]");
  39. vanishon.setItemMeta(vanishonm);
  40. final ItemStack vanishoff = new ItemStack(Material.INK_SACK, 1, (short)10);
  41. final ItemMeta vanishoffm = vanishoff.getItemMeta();
  42. vanishoffm.setDisplayName("§7Vanish §f[§cOFF§f]");
  43. vanishoff.setItemMeta(vanishoffm);
  44. final BaseUser user = Core.getPlugin().getUserManager().getUser(p.getUniqueId());
  45. if (user.isVanished()) {
  46. p.setItemInHand(vanishoff);
  47. user.setVanished(false);
  48. p.sendMessage("§eTu es de nouveau visible.");
  49. }
  50. else {
  51. p.setItemInHand(vanishon);
  52. user.setVanished(true);
  53. p.sendMessage("§eTu es d\u00e9sormais invisible.");
  54. }
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement