TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_fireball.java

30 lines
1.0 KiB
Java
Raw Normal View History

2020-04-08 02:20:01 +00:00
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.shop.ShopItem;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Obtain a fire ball", usage = "/<command>")
public class Command_fireball extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
2020-06-30 07:25:38 +00:00
if (plugin.pl.getData(playerSender).hasItem(ShopItem.FIRE_BALL))
2020-04-08 02:20:01 +00:00
{
playerSender.getInventory().addItem(plugin.sh.getFireBall());
msg("You have been given a Fire Ball", ChatColor.GREEN);
}
else
{
msg("You do not own a Fire Ball! Purchase one from the shop.", ChatColor.RED);
}
return true;
}
}