Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BugPluginClass1 extends JavaPlugin {
- @Override
- public void onEnable() {
- String NameDesPlugins = this.getDescription().getName();
- super.onEnable();
- System.out.println("TESTAUSGABE Plugin " + NameDesPlugins + " 1.0.0 geladen.");
- }
- public static void wartemal(long millis) {
- try {
- Thread.sleep(millis);
- } catch (InterruptedException e) {}
- }
- @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
- Player player = null ;
- if(sender instanceof Player) {
- player = (Player) sender;
- }
- //Kommandos
- //Kommando Paintballs
- if(cmd.getName().equalsIgnoreCase("pbTB")){
- if (player == null) {
- sender.sendMessage("Sorry, this only works ingame!");
- return true;
- } else {
- player.sendMessage(ChatColor.GREEN + "[PB]" + ChatColor.YELLOW +"Paintball InvLoad Started!");
- //wartemal(3000);
- ItemStack item = new ItemStack(Material.LEATHER_CHESTPLATE, 1);
- ItemMeta met =item.getItemMeta();
- met.setDisplayName("TeamBlau");
- item.addEnchantment(Enchantment.BINDING_CURSE, 1);
- LeatherArmorMeta brustMeta = (LeatherArmorMeta)item.getItemMeta();
- brustMeta.setColor(Color.BLUE);
- item.setItemMeta(met);
- player.getInventory().setChestplate(item);
- //wartemal(3000);
- ItemStack PBB = new ItemStack(Material.SNOW_BALL, 32);
- }
- return false;
- }
- }
Add Comment
Please, Sign In to add comment