mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 12:36:41 +00:00
Removal of Lombok
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!!
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
@ -17,6 +16,16 @@ import org.bukkit.entity.Player;
|
||||
public class Command_whohas extends FreedomCommand
|
||||
{
|
||||
|
||||
public static List<String> getAllMaterials()
|
||||
{
|
||||
List<String> names = new ArrayList<>();
|
||||
for (Material material : Material.values())
|
||||
{
|
||||
names.add(material.name());
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
@ -69,16 +78,6 @@ public class Command_whohas extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
public static List<String> getAllMaterials()
|
||||
{
|
||||
List<String> names = new ArrayList<>();
|
||||
for (Material material : Material.values())
|
||||
{
|
||||
names.add(material.name());
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
|
||||
{
|
||||
@ -89,7 +88,7 @@ public class Command_whohas extends FreedomCommand
|
||||
|
||||
if (args.length == 2 && plugin.al.isAdmin(sender))
|
||||
{
|
||||
return Arrays.asList("clear");
|
||||
return Collections.singletonList("clear");
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
|
Reference in New Issue
Block a user