Merge branch 'development'

This commit is contained in:
Brianna 2020-11-16 12:27:27 -06:00
commit b9f0b5fcc4
4 changed files with 5 additions and 21 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId> <groupId>com.songoda</groupId>
<artifactId>EpicHoppers</artifactId> <artifactId>EpicHoppers</artifactId>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>4.6.15b</version> <version>4.6.16</version>
<build> <build>
<defaultGoal>clean install</defaultGoal> <defaultGoal>clean install</defaultGoal>
<finalName>EpicHoppers-${project.version}</finalName> <finalName>EpicHoppers-${project.version}</finalName>

View File

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

View File

@ -103,7 +103,7 @@ public class BlockListeners implements Listener {
Level level = hopper.getLevel(); Level level = hopper.getLevel();
if (level.getLevel() > 1) { if (level.getLevel() > 1 || Settings.ALLOW_NORMAL_HOPPERS.getBoolean()) {
event.setCancelled(true); event.setCancelled(true);
ItemStack item = plugin.newHopperItem(level); ItemStack item = plugin.newHopperItem(level);

View File

@ -43,22 +43,6 @@ public class Methods {
return false; 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) { public static boolean canMoveReserved(Inventory inventory, ItemStack item) {
if (inventory.firstEmpty() != inventory.getSize() - 1) return true; if (inventory.firstEmpty() != inventory.getSize() - 1) return true;