mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-02 04:56:40 +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:
@ -20,6 +20,16 @@ import org.bukkit.inventory.ItemStack;
|
||||
public class Command_dispfill extends FreedomCommand
|
||||
{
|
||||
|
||||
private static void setDispenserContents(final Block targetBlock, final ItemStack[] items)
|
||||
{
|
||||
if (targetBlock.getType() == Material.DISPENSER)
|
||||
{
|
||||
final Inventory dispenserInv = ((Dispenser)targetBlock.getState()).getInventory();
|
||||
dispenserInv.clear();
|
||||
dispenserInv.addItem(items);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
@ -54,7 +64,7 @@ public class Command_dispfill extends FreedomCommand
|
||||
}
|
||||
}
|
||||
|
||||
final ItemStack[] itemsArray = items.toArray(new ItemStack[items.size()]);
|
||||
final ItemStack[] itemsArray = items.toArray(new ItemStack[0]);
|
||||
|
||||
int affected = 0;
|
||||
final Location centerLocation = playerSender.getLocation();
|
||||
@ -88,14 +98,4 @@ public class Command_dispfill extends FreedomCommand
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void setDispenserContents(final Block targetBlock, final ItemStack[] items)
|
||||
{
|
||||
if (targetBlock.getType() == Material.DISPENSER)
|
||||
{
|
||||
final Inventory dispenserInv = ((Dispenser)targetBlock.getState()).getInventory();
|
||||
dispenserInv.clear();
|
||||
dispenserInv.addItem(items);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user