Advertisement
Guest User

Untitled

a guest
Oct 20th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
  2. Player player = (Player) sender;
  3. if (commandLabel.equalsIgnoreCase("Soup") && sender instanceof Player){
  4. if (!plugin.kits.contains(player.getName())){
  5. if (player.hasPermission("CustomKits.Soup")){
  6. player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 100, 9));
  7. player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 100, 9));
  8. player.addPotionEffect(new PotionEffect(PotionEffectType.WEAKNESS, 100, 99));
  9. for (int i = 0; i < 33; i++){
  10. player.getInventory().addItem(new ItemStack(Material.MUSHROOM_SOUP));
  11. plugin.SoupCooldown.add(player.getName());
  12. }
  13. }
  14. else player.sendMessage(ChatColor.RED + "You do not have permission to do /soup");
  15. }
  16. else player.sendMessage(ChatColor.RED + "You must wait to do /soup again.");
  17. }
  18.  
  19. return false;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement