SHARE
TWEET

Untitled

a guest Apr 26th, 2019 72 in 338 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package de.main.pl;
  2.  
  3. import org.bukkit.plugin.java.JavaPlugin;
  4.  
  5. import de.kits.pl.KIT_DESTROYER;
  6. import de.kits.pl.KIT_TRAPE;
  7. import de.kits.pl.KIT_ULTRA;
  8. import de.kits.pl.KIT_VIP;
  9.  
  10. import org.bukkit.Material;
  11. import org.bukkit.entity.Player;
  12. import org.bukkit.event.EventHandler;
  13. import org.bukkit.event.Listener;
  14. import org.bukkit.event.entity.PlayerDeathEvent;
  15. import org.bukkit.event.player.PlayerJoinEvent;
  16. import org.bukkit.event.player.PlayerRespawnEvent;
  17. import org.bukkit.inventory.ItemStack;
  18.  
  19.  
  20.  
  21. public class Main extends JavaPlugin {
  22.    
  23.     @Override
  24.  
  25.       public void onEnable()
  26.      
  27.      
  28.       {
  29.         getServer().getPluginManager().registerEvents((Listener) this, this);
  30.         System.out.println("Das plugin ist Aktiv");
  31.        
  32.         registerCommands();
  33.       }
  34.      
  35.       private void registerCommands()
  36.       {
  37.         getCommand("vip").setExecutor(new KIT_VIP());
  38.         getCommand("ultra").setExecutor(new KIT_ULTRA());
  39.         getCommand("destroyer").setExecutor(new KIT_DESTROYER());
  40.         getCommand("trape").setExecutor(new KIT_TRAPE());
  41.       }
  42.      
  43.       @EventHandler
  44.       public void onJoin(PlayerJoinEvent e)
  45.       {
  46.         Player player = e.getPlayer();
  47.         if (player.hasPlayedBefore()) {
  48.           return;
  49.         }
  50.         player.getInventory().clear();
  51.         player.sendMessage("§6----------------------------------------------------");
  52.         player.sendMessage("§f§lDas System hat erkant das du neu auf §cSkyPvP§f§l bist");
  53.         player.sendMessage("§f§l dir wurden start items gegeben");
  54.         player.sendMessage("§f§lViel Spaß beim Zocken :D");
  55.         player.sendMessage("§6----------------------------------------------------");
  56.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_BOOTS) });
  57.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.DIAMOND_LEGGINGS) });
  58.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.DIAMOND_CHESTPLATE) });
  59.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.DIAMOND_HELMET) });
  60.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.BOW) });
  61.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.ARROW, 32) });
  62.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_SWORD) });
  63.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.GOLDEN_APPLE) });
  64.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.ENDER_PEARL, 10) });
  65.        
  66.         getServer().broadcastMessage("�c" + player.getName() + " �aist zum Ersten mal auf �cSkyPvP");
  67.       }
  68.      
  69.       @EventHandler
  70.       public void onJoinr(PlayerJoinEvent e)
  71.       {
  72.         Player player = e.getPlayer();
  73.        
  74.         player.sendMessage("�eWilkommen Zur�ck " + player.getName() + " �eauf �cSkyPvP");
  75.         player.getInventory().clear();
  76.         player.sendMessage("�aDir wurde das standart Kit Gegeben");
  77.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_HELMET) });
  78.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_CHESTPLATE) });
  79.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_LEGGINGS) });
  80.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_BOOTS) });
  81.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_SWORD) });
  82.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.BOW) });
  83.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.ARROW, 32) });
  84.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.GOLDEN_APPLE, 3) });
  85.         player.getInventory().addItem(new ItemStack[] { new ItemStack(Material.ENDER_PEARL, 10) });
  86.       }
  87.      
  88.       @EventHandler
  89.       public void onDeath(PlayerDeathEvent e)
  90.       {
  91.         Player p = e.getEntity();
  92.         p.sendMessage("�cDer Spieler �6" + p.getName() + " �awurde von �c" + p.getKiller() + " �aget�tet");
  93.       }
  94.      
  95.       @EventHandler
  96.       public void onRespawn(PlayerRespawnEvent e)
  97.       {
  98.         Player p = e.getPlayer();
  99.        
  100.         p.getInventory().clear();
  101.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_HELMET) });
  102.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_CHESTPLATE) });
  103.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_LEGGINGS) });
  104.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_BOOTS) });
  105.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.IRON_SWORD) });
  106.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.BOW) });
  107.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.ARROW, 32) });
  108.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.GOLDEN_APPLE, 3) });
  109.         p.getInventory().addItem(new ItemStack[] { new ItemStack(Material.ENDER_PEARL, 10) });
  110.       }
  111.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top