Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
- Player player = (Player) sender;
- if (commandLabel.equalsIgnoreCase("Soup") && sender instanceof Player){
- if (!plugin.kits.contains(player.getName())){
- if (player.hasPermission("CustomKits.Soup")){
- player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 100, 9));
- player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 100, 9));
- player.addPotionEffect(new PotionEffect(PotionEffectType.WEAKNESS, 100, 99));
- for (int i = 0; i < 33; i++){
- player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
- plugin.SoupCooldown.add(player.getName());
- }
- }
- else player.sendMessage(ChatColor.RED + "You do not have permission to do /soup");
- }
- else player.sendMessage(ChatColor.RED + "You must wait to do /soup again.");
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement