Cleaned up a few things.

This commit is contained in:
Brianna 2020-11-16 12:24:19 -06:00
parent 43624e07f8
commit 477a4e7aca
2 changed files with 3 additions and 19 deletions

View File

@ -10,10 +10,10 @@ public class Level {
private final ArrayList<Module> registeredModules;
private final List<String> description = new ArrayList<>();
private int level, costExperience, costEconomy, range, amount, linkAmount;
private boolean filter, teleport;
private final int level, costExperience, costEconomy, range, amount, linkAmount;
private final boolean filter, teleport;
Level(int level, int costExperience, int costEconomy, int range, int amount, boolean filter, boolean teleport, int linkAmount, ArrayList<Module> registeredModules) {
public Level(int level, int costExperience, int costEconomy, int range, int amount, boolean filter, boolean teleport, int linkAmount, ArrayList<Module> registeredModules) {
this.level = level;
this.costExperience = costExperience;
this.costEconomy = costEconomy;

View File

@ -43,22 +43,6 @@ public class Methods {
return false;
}
public static boolean canMove(ItemStack[] contents, ItemStack item) {
final ItemMeta itemMeta = item.getItemMeta();
for (int i = 0; i < contents.length - 2; i++) {
final ItemStack stack = contents[i];
if (stack == null || stack.getAmount() == 0)
return true;
final ItemMeta stackMeta;
if (isSimilarMaterial(stack, item) && (stack.getAmount() + item.getAmount()) < stack.getMaxStackSize()
&& ((itemMeta == null) == ((stackMeta = stack.getItemMeta()) == null))
&& (itemMeta == null || Bukkit.getItemFactory().equals(itemMeta, stackMeta))) {
return true;
}
}
return false;
}
public static boolean canMoveReserved(Inventory inventory, ItemStack item) {
if (inventory.firstEmpty() != inventory.getSize() - 1) return true;