-
-
Save Splodgebox/94bf5d617a3c66a73ffd5aa8c57cf0e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.splodge.heal.commands; | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; | |
import org.bukkit.command.Command; | |
import org.bukkit.entity.Player; | |
import org.bukkit.potion.PotionEffect; | |
import org.bukkit.potion.PotionEffectType; | |
import org.inventivetalent.particle.ParticleEffect; | |
public class Heal implements org.bukkit.command.CommandExecutor{ | |
public boolean onCommand(org.bukkit.command.CommandSender sender, Command cmd, String label, String[] args) | |
{ | |
Player player = (Player)sender; | |
if (player.hasPermission("heal.allow")) { | |
if ((sender instanceof Player)) { | |
player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&a&l(!) HEALED (!)")); | |
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 60, 2)); | |
player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 60, 2)); | |
ParticleEffect.FLAME.send(Bukkit.getOnlinePlayers(), player.getLocation(), 0, 0, 0, 0, 1); | |
return true; | |
} | |
} | |
else { | |
player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&4&lYou Don't Have The Right Permissions!")); | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment