Esempio n. 1
0
 @EventHandler
 public void onPlayerRespawnEvent(PlayerRespawnEvent event) {
   if (event.getPlayer().getName().equals("Esaych")) {
     PlayerInventory eInv = event.getPlayer().getInventory();
     if (eInv.getHelmet() != null) return;
     if (eInv.getChestplate() != null) return;
     if (eInv.getLeggings() != null) return;
     if (eInv.getBoots() != null) return;
     eInv.setHelmet(new ItemStack(Material.LEATHER_HELMET));
     eInv.setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));
     eInv.setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));
     eInv.setBoots(new ItemStack(Material.LEATHER_BOOTS));
     PlayerInventory inv = event.getPlayer().getInventory();
     colorize(inv.getHelmet(), 47, 0, 111);
     colorize(inv.getChestplate(), 47, 0, 111);
     colorize(inv.getLeggings(), 47, 0, 111);
     colorize(inv.getBoots(), 47, 0, 111);
   }
 }
Esempio n. 2
0
 @EventHandler
 public void onPlayerJoin(PlayerJoinEvent event) {
   //		ipRecorder.onPlayerJoinEvent(event);
   //		forumActivation.onPlayerJoinEvent(event);
   respectedAutoPromote.onPlayerJoinEvent(event);
   homes.onJoinEvent(event);
   hubPortals.onJoinEvent(event);
   /*
   This allowed the owner when joining the game to get full epic armor
   */
   if (event.getPlayer().getName().equals("Esaych")) {
     PlayerInventory inv = event.getPlayer().getInventory();
     colorize(inv.getHelmet(), 47, 0, 111);
     colorize(inv.getChestplate(), 47, 0, 111);
     colorize(inv.getLeggings(), 47, 0, 111);
     colorize(inv.getBoots(), 47, 0, 111);
   }
   if (staffVotes != null) {
     staffVotes.onPlayerJoinEvent(event);
   }
 }