mirror of
https://github.com/TotalFreedomMC/TotalFreedomMod.git
synced 2024-06-21 05:20:37 +00:00
![Paldiu](/assets/img/avatar_default.png)
Lombok implementation removal. I have also gone through and replaced things with inline methods and variables, lambdas, and simplified loops down, removed unnecessary guard clauses, and overall cleaned up every single class. This took a long time, please do remember to follow proper naming conventions, don't include unnecessary guard clauses, follow exception rules and comment rules, and please PLEASE remember to use the DIAMOND OPERATOR rather than just inferring RAW TYPES!!! Thank you!!
31 lines
1,017 B
Java
31 lines
1,017 B
Java
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
import org.bukkit.attribute.Attribute;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
|
@CommandParameters(description = "Lists all possible attributes.", usage = "/<command>")
|
|
public class Command_attributelist extends FreedomCommand
|
|
{
|
|
|
|
@Override
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
{
|
|
StringBuilder list = new StringBuilder("All possible attributes: ");
|
|
|
|
for (Attribute attribute : Attribute.values())
|
|
{
|
|
list.append(attribute.name()).append(", ");
|
|
}
|
|
|
|
// Remove extra comma at the end of the list
|
|
list = new StringBuilder(list.substring(0, list.length() - 2));
|
|
|
|
msg(list.toString());
|
|
return true;
|
|
}
|
|
}
|