Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.bukkit.ColdFireStuds;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.potion.PotionEffect;
- import org.bukkit.potion.PotionEffectType;
- public class Effects implements CommandExecutor {
- public Effects(Main main) {
- // TODO Auto-generated constructor stub
- }
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- if(command.getName().equalsIgnoreCase("Speed")) {
- if(sender instanceof Player) {
- Player player = (Player) sender;
- if (player.hasPermission("pvpe.speed") == true);
- try { player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 200, 1));
- if(command.getName().equalsIgnoreCase("Absorb")) {
- if (player.hasPermission("pvpe.absorb") == true);
- try { player.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 200, 1));
- if (command.getName().equalsIgnoreCase("Invis")) {
- if (player.hasPermission("pvpe.invis") == true);
- try { player.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 200, 1));
- if (command.getName().equalsIgnoreCase("Health")) {
- if (player.hasPermission("pvpe.health") == true);
- try { player.getPotionEffect(PotionEffectType.HEALTH_BOOST);
- if (command.getName().equalsIgnoreCase("saturate")) {
- if (player.hasPermission("pvpe.saturate") == true);
- try { player.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 200, 1));
- }finally {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement