mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-22 10:15:43 +01:00
Merge branch 'development'
This commit is contained in:
commit
b9f0b5fcc4
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicHoppers</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>4.6.15b</version>
|
||||
<version>4.6.16</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>EpicHoppers-${project.version}</finalName>
|
||||
|
@ -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;
|
||||
|
@ -103,7 +103,7 @@ public class BlockListeners implements Listener {
|
||||
|
||||
Level level = hopper.getLevel();
|
||||
|
||||
if (level.getLevel() > 1) {
|
||||
if (level.getLevel() > 1 || Settings.ALLOW_NORMAL_HOPPERS.getBoolean()) {
|
||||
event.setCancelled(true);
|
||||
ItemStack item = plugin.newHopperItem(level);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user