mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-19 05:45:01 +00:00
31 lines
969 B
Java
31 lines
969 B
Java
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.enchantments.Enchantment;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
|
@CommandParameters(description = "Lists all possible enchantments.", usage = "/<command>")
|
|
public class Command_enchantments extends FreedomCommand
|
|
{
|
|
|
|
@Override
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
{
|
|
String list = "All possible enchantments: ";
|
|
|
|
for (Enchantment enchantment : Enchantment.values())
|
|
{
|
|
list += enchantment.getName() + ", ";
|
|
}
|
|
|
|
// Remove extra comma at the end of the list
|
|
list = list.substring(0, list.length() - 2);
|
|
|
|
msg(list);
|
|
return true;
|
|
}
|
|
}
|