mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-23 10:45:46 +01:00
Merge branch 'development'
This commit is contained in:
commit
905554fbc1
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicHoppers</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>4.4.3</version>
|
||||
<version>4.4.4</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>EpicHoppers-${project.version}</finalName>
|
||||
|
@ -39,7 +39,7 @@ public class HopperListeners implements Listener {
|
||||
Location sourceLocation = source.getHolder() instanceof BlockState ? ((BlockState) source.getHolder()).getLocation() : null;
|
||||
Location destinationLocation = destination.getHolder() instanceof BlockState ? ((BlockState) destination.getHolder()).getLocation() : null;
|
||||
|
||||
if (Settings.ALLOW_NORMAL_HOPPERS.getBoolean() && !instance.getHopperManager().isHopper(sourceLocation))
|
||||
if (sourceLocation != null && Settings.ALLOW_NORMAL_HOPPERS.getBoolean() && !instance.getHopperManager().isHopper(sourceLocation))
|
||||
return;
|
||||
|
||||
// Hopper minecarts should be able to take care of themselves
|
||||
@ -69,7 +69,7 @@ public class HopperListeners implements Listener {
|
||||
|
||||
// Special cases when a hopper is picking up items
|
||||
if (destination.getHolder() instanceof org.bukkit.block.Hopper) {
|
||||
if (Settings.ALLOW_NORMAL_HOPPERS.getBoolean() && !instance.getHopperManager().isHopper(destinationLocation))
|
||||
if (destinationLocation != null && Settings.ALLOW_NORMAL_HOPPERS.getBoolean() && !instance.getHopperManager().isHopper(destinationLocation))
|
||||
return;
|
||||
// minecraft 1.8 doesn't have a method to get the hopper's location from the inventory, so we use the holder instead
|
||||
Hopper toHopper = instance.getHopperManager().getHopper(destinationLocation);
|
||||
|
@ -4,6 +4,7 @@ import com.songoda.core.configuration.Config;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
import com.songoda.epichoppers.boost.BoostData;
|
||||
import com.songoda.epichoppers.hopper.Hopper;
|
||||
import com.songoda.epichoppers.settings.Settings;
|
||||
import com.songoda.epichoppers.utils.Methods;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -34,6 +35,7 @@ public abstract class Storage {
|
||||
if (hopper.getLevel() == null
|
||||
|| hopper.getLocation() == null
|
||||
|| hopper.getLevel() == instance.getLevelManager().getLowestLevel()
|
||||
&& !Settings.ALLOW_NORMAL_HOPPERS.getBoolean()
|
||||
&& (hopper.getLinkedBlocks() == null || hopper.getLinkedBlocks().isEmpty()))
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user