Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.koscile.tutorial.commands;
- import org.bukkit.attribute.Attribute;
- 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 tutorialCommands implements CommandExecutor {
- private Object PotionEffectType;
- @Override
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
- if (!(sender instanceof Player)) {
- return true;
- }
- Player player = (Player) sender;
- if (cmd.getName().equalsIgnoreCase("potion")) {
- player.addPotionEffect(new PotionEffect(org.bukkit.potion.PotionEffectType.JUMP, 60, 0));
- }
- if (cmd.getName().equalsIgnoreCase("feed")) {
- player.setFoodLevel(20);
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement