Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.thepureanarchy;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- import org.bukkit.potion.PotionEffect;
- import org.bukkit.potion.PotionEffectType;
- public class gapplecmd extends JavaPlugin {
- @Override
- public void onEnable () {
- getLogger().info("Plugin successfully loaded!");
- }
- @Override
- public void onDisable() {
- }
- public boolean onCommand(CommandSender sender, Command cmd, String laber, String[]args) {
- if (cmd.getName().equalsIgnoreCase("gapple") && sender instanceof Player) {
- Player player = (Player) sender;
- player.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 2400, 1));
- player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 600, 5 ));
- player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 6000, 1));
- player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 6000, 1));
- player.sendMessage("Gapple Effect Successfully Activated for" + player.getName());
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement