my end of the bargain

This commit is contained in:
Ivan
2021-02-25 16:42:30 -05:00
parent 3b666f1fde
commit 0367d9fd3a
22 changed files with 1221 additions and 1158 deletions

View File

@ -6,6 +6,7 @@ import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import me.totalfreedom.totalfreedommod.LoginProcess;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Obtain a clown fish", usage = "/<command>")
@ -15,14 +16,14 @@ public class Command_clownfish extends FreedomCommand
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (plugin.pl.getData(playerSender).hasItem(ShopItem.CLOWN_FISH))
if (plugin.pl.getData(playerSender).hasItem(ShopItem.CLOWN_FISH) && (!plugin.lp.CLOWNFISH_TOGGLE.contains(playerSender.getName())))
{
playerSender.getInventory().addItem(plugin.sh.getClownFish());
msg("You have been given a Clown Fish", ChatColor.GREEN);
}
else
{
msg("You do not own a Clown Fish! Purchase one from the shop.", ChatColor.RED);
msg("You do not own a Clown Fish or an admin has toggled your ability to use it. Purchase one from the shop.", ChatColor.RED);
}
return true;
}