mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-04 17:50:01 +01:00
version 4.6.16b
This commit is contained in:
parent
e147c21fec
commit
ce27044153
18
pom.xml
18
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicHoppers</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>4.6.16</version>
|
||||
<version>4.6.16b</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>EpicHoppers-${project.version}</finalName>
|
||||
@ -80,10 +80,6 @@
|
||||
</plugins>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>private</id>
|
||||
<url>https://repo.songoda.com/repository/private/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<url>https://repo.songoda.com/repository/public/</url>
|
||||
@ -93,7 +89,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.16.1</version>
|
||||
<version>1.16.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
@ -106,12 +102,6 @@
|
||||
<version>LATEST</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.arcaniax</groupId>
|
||||
<artifactId>liquidtanks</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>fabledskyblock</artifactId>
|
||||
@ -137,8 +127,8 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bgsoftware</groupId>
|
||||
<artifactId>WildStacker</artifactId>
|
||||
<version>b20</version>
|
||||
<artifactId>wildstacker</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -74,7 +74,6 @@ public class EpicHoppers extends SongodaPlugin {
|
||||
private DatabaseConnector databaseConnector;
|
||||
private DataManager dataManager;
|
||||
|
||||
private boolean liquidtanks = false;
|
||||
private boolean epicfarming = false;
|
||||
|
||||
public static EpicHoppers getInstance() {
|
||||
@ -144,9 +143,6 @@ public class EpicHoppers extends SongodaPlugin {
|
||||
pluginManager.registerEvents(new InteractListeners(this), this);
|
||||
pluginManager.registerEvents(new InventoryListeners(), this);
|
||||
|
||||
// Check for liquid tanks
|
||||
if (pluginManager.isPluginEnabled("LiquidTanks")) liquidtanks = true;
|
||||
|
||||
// Check for epicfarming
|
||||
if (pluginManager.isPluginEnabled("EpicFarming")) epicfarming = true;
|
||||
|
||||
@ -298,10 +294,6 @@ public class EpicHoppers extends SongodaPlugin {
|
||||
return databaseConnector;
|
||||
}
|
||||
|
||||
public boolean isLiquidtanks() {
|
||||
return liquidtanks;
|
||||
}
|
||||
|
||||
public boolean isEpicFarming() {
|
||||
return epicfarming;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.epichoppers.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.gui.Gui;
|
||||
import com.songoda.core.gui.CustomizableGui;
|
||||
import com.songoda.core.gui.GuiUtils;
|
||||
import com.songoda.core.utils.TextUtils;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
@ -18,7 +18,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GUIAutoSellFilter extends Gui {
|
||||
public class GUIAutoSellFilter extends CustomizableGui {
|
||||
|
||||
private final EpicHoppers plugin;
|
||||
private final Hopper hopper;
|
||||
@ -27,6 +27,7 @@ public class GUIAutoSellFilter extends Gui {
|
||||
private final int[] blackListSlots = {12, 13, 14, 21, 22, 23, 30, 31, 32, 39, 40, 41};
|
||||
|
||||
public GUIAutoSellFilter(EpicHoppers plugin, Hopper hopper) {
|
||||
super(plugin, "autosell");
|
||||
this.plugin = plugin;
|
||||
this.hopper = hopper;
|
||||
|
||||
@ -43,17 +44,17 @@ public class GUIAutoSellFilter extends Gui {
|
||||
ItemStack glass1 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_1.getMaterial());
|
||||
ItemStack glass2 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_2.getMaterial());
|
||||
|
||||
GuiUtils.mirrorFill(this, 0, 6, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 7, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 8, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 1, 6, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 1, 8, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 2, 6, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 2, 7, true, false, glass1);
|
||||
GuiUtils.mirrorFill(this, 2, 8, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 4, 7, false, false, glass1);
|
||||
mirrorFill("mirrorfill_1", 0, 6, true, false, glass2);
|
||||
mirrorFill("mirrorfill_2", 0, 7, true, false, glass2);
|
||||
mirrorFill("mirrorfill_3", 0, 8, true, false, glass2);
|
||||
mirrorFill("mirrorfill_4", 1, 6, true, false, glass2);
|
||||
mirrorFill("mirrorfill_5", 1, 8, true, false, glass2);
|
||||
mirrorFill("mirrorfill_6", 2, 6, true, false, glass2);
|
||||
mirrorFill("mirrorfill_7", 2, 7, true, false, glass1);
|
||||
mirrorFill("mirrorfill_8", 2, 8, true, false, glass2);
|
||||
mirrorFill("mirrorfill_9", 4, 7, false, false, glass1);
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
|
||||
setButton("back", 8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
|
||||
plugin.getLocale().getMessage("general.nametag.back").getMessage()),
|
||||
(event) -> {
|
||||
hopper.overview(guiManager, event.player);
|
||||
@ -68,7 +69,7 @@ public class GUIAutoSellFilter extends Gui {
|
||||
|
||||
int[] whiteSlots = {0, 1, 2, 45, 46, 47};
|
||||
for (int nu : whiteSlots) {
|
||||
setItem(nu, indicatorItem);
|
||||
setItem("whitelist", nu, indicatorItem);
|
||||
}
|
||||
|
||||
int num = 0;
|
||||
@ -86,7 +87,7 @@ public class GUIAutoSellFilter extends Gui {
|
||||
|
||||
int[] blackSlots = {3, 4, 5, 48, 49, 50};
|
||||
for (int nu : blackSlots) {
|
||||
setItem(nu, indicatorItem);
|
||||
setItem("blacklist", nu, indicatorItem);
|
||||
}
|
||||
|
||||
num = 0;
|
||||
@ -111,7 +112,7 @@ public class GUIAutoSellFilter extends Gui {
|
||||
indicatorMeta.setLore(loreInfo);
|
||||
indicatorItem.setItemMeta(indicatorMeta);
|
||||
|
||||
setItem(16, indicatorItem);
|
||||
setItem("info", 16, indicatorItem);
|
||||
|
||||
setUnlockedRange(9, 14);
|
||||
setUnlockedRange(18, 23);
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.epichoppers.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.gui.Gui;
|
||||
import com.songoda.core.gui.CustomizableGui;
|
||||
import com.songoda.core.gui.GuiUtils;
|
||||
import com.songoda.core.utils.TextUtils;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
@ -12,9 +12,10 @@ import com.songoda.epichoppers.utils.Methods;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class GUICrafting extends Gui {
|
||||
public class GUICrafting extends CustomizableGui {
|
||||
|
||||
public GUICrafting(ModuleAutoCrafting module, Hopper hopper, Player player) {
|
||||
super(EpicHoppers.getInstance(), "crafting");
|
||||
setRows(3);
|
||||
setTitle(Methods.formatName(hopper.getLevel().getLevel()) + TextUtils.formatText(" &8-&f Crafting"));
|
||||
setOnClose((event) -> setItem(module, hopper, player));
|
||||
@ -26,13 +27,13 @@ public class GUICrafting extends Gui {
|
||||
|
||||
setDefaultItem(glass1);
|
||||
|
||||
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
|
||||
GuiUtils.mirrorFill(this, 1, 0, false, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 1, 1, false, true, glass3);
|
||||
mirrorFill("mirrorfill_1", 0, 0, true, true, glass2);
|
||||
mirrorFill("mirrorfill_2", 0, 1, true, true, glass2);
|
||||
mirrorFill("mirrorfill_3", 0, 2, true, true, glass3);
|
||||
mirrorFill("mirrorfill_4", 1, 0, false, true, glass2);
|
||||
mirrorFill("mirrorfill_5", 1, 1, false, true, glass3);
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
|
||||
setButton("back", 8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
|
||||
EpicHoppers.getInstance().getLocale().getMessage("general.nametag.back").getMessage()),
|
||||
(event) -> {
|
||||
hopper.overview(guiManager, event.player);
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.epichoppers.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.gui.Gui;
|
||||
import com.songoda.core.gui.CustomizableGui;
|
||||
import com.songoda.core.gui.GuiUtils;
|
||||
import com.songoda.core.utils.TextUtils;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
@ -21,13 +21,14 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GUIFilter extends Gui {
|
||||
public class GUIFilter extends CustomizableGui {
|
||||
|
||||
private final EpicHoppers plugin;
|
||||
|
||||
private final Hopper hopper;
|
||||
|
||||
public GUIFilter(EpicHoppers plugin, Hopper hopper, Player player) {
|
||||
super(plugin, "filter");
|
||||
this.plugin = plugin;
|
||||
this.hopper = hopper;
|
||||
|
||||
@ -43,21 +44,21 @@ public class GUIFilter extends Gui {
|
||||
ItemStack glass1 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_1.getMaterial());
|
||||
ItemStack glass2 = GuiUtils.getBorderItem(Settings.GLASS_TYPE_2.getMaterial());
|
||||
|
||||
GuiUtils.mirrorFill(this, 0, 6, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 7, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 8, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 1, 6, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 1, 8, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 2, 6, true, false, glass2);
|
||||
GuiUtils.mirrorFill(this, 2, 7, true, false, glass1);
|
||||
GuiUtils.mirrorFill(this, 2, 8, true, false, glass2);
|
||||
mirrorFill("mirrorfill_1", 0, 6, true, false, glass2);
|
||||
mirrorFill("mirrorfill_2", 0, 7, true, false, glass2);
|
||||
mirrorFill("mirrorfill_3", 0, 8, true, false, glass2);
|
||||
mirrorFill("mirrorfill_4", 1, 6, true, false, glass2);
|
||||
mirrorFill("mirrorfill_5", 1, 8, true, false, glass2);
|
||||
mirrorFill("mirrorfill_6", 2, 6, true, false, glass2);
|
||||
mirrorFill("mirrorfill_7", 2, 7, true, false, glass1);
|
||||
mirrorFill("mirrorfill_8", 2, 8, true, false, glass2);
|
||||
|
||||
ItemStack it = CompatibleMaterial.WHITE_STAINED_GLASS_PANE.getItem();
|
||||
ItemMeta itm = it.getItemMeta();
|
||||
itm.setDisplayName(plugin.getLocale().getMessage("interface.filter.whitelist").getMessage());
|
||||
it.setItemMeta(itm);
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
|
||||
setButton("back", 8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
|
||||
plugin.getLocale().getMessage("general.nametag.back").getMessage()),
|
||||
(event) -> {
|
||||
hopper.overview(guiManager, event.player);
|
||||
@ -84,7 +85,7 @@ public class GUIFilter extends Gui {
|
||||
|
||||
int[] blackSlots = {2, 3, 47, 48};
|
||||
for (int nu : blackSlots) {
|
||||
setItem(nu, it);
|
||||
setItem("blacklist", nu, it);
|
||||
}
|
||||
|
||||
int[] ablack = {11, 12, 20, 21, 29, 30, 38, 39};
|
||||
@ -102,7 +103,7 @@ public class GUIFilter extends Gui {
|
||||
|
||||
int[] avoid = {4, 5, 49, 50};
|
||||
for (int nu : avoid) {
|
||||
setItem(nu, it);
|
||||
setItem("void", nu, it);
|
||||
}
|
||||
|
||||
int[] voidSlots = {13, 14, 22, 23, 31, 32, 40, 41};
|
||||
@ -124,7 +125,7 @@ public class GUIFilter extends Gui {
|
||||
itemmetaInfo.setLore(loreInfo);
|
||||
itemInfo.setItemMeta(itemmetaInfo);
|
||||
|
||||
setItem(16, itemInfo);
|
||||
setItem("info", 16, itemInfo);
|
||||
|
||||
|
||||
ItemStack hook = new ItemStack(Material.TRIPWIRE_HOOK, 1);
|
||||
@ -139,7 +140,7 @@ public class GUIFilter extends Gui {
|
||||
}
|
||||
hookmeta.setLore(lorehook);
|
||||
hook.setItemMeta(hookmeta);
|
||||
setButton(43, hook,
|
||||
setButton("reject", 43, hook,
|
||||
(event) -> {
|
||||
if (event.clickType == ClickType.RIGHT) {
|
||||
plugin.getLocale().getMessage("event.hopper.desync").sendPrefixedMessage(player);
|
||||
|
@ -2,7 +2,7 @@ package com.songoda.epichoppers.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.gui.Gui;
|
||||
import com.songoda.core.gui.CustomizableGui;
|
||||
import com.songoda.core.gui.GuiUtils;
|
||||
import com.songoda.core.utils.TextUtils;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
@ -28,7 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class GUIOverview extends Gui {
|
||||
public class GUIOverview extends CustomizableGui {
|
||||
|
||||
private final EpicHoppers plugin;
|
||||
private final Hopper hopper;
|
||||
@ -37,6 +37,7 @@ public class GUIOverview extends Gui {
|
||||
private int task;
|
||||
|
||||
public GUIOverview(EpicHoppers plugin, Hopper hopper, Player player) {
|
||||
super(plugin, "overview");
|
||||
this.plugin = plugin;
|
||||
this.hopper = hopper;
|
||||
this.player = player;
|
||||
@ -55,11 +56,11 @@ public class GUIOverview extends Gui {
|
||||
|
||||
setDefaultItem(glass1);
|
||||
|
||||
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
|
||||
GuiUtils.mirrorFill(this, 1, 0, false, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 1, 1, false, true, glass3);
|
||||
mirrorFill("mirrorfill_1", 0, 0, true, true, glass2);
|
||||
mirrorFill("mirrorfill_2", 0, 1, true, true, glass2);
|
||||
mirrorFill("mirrorfill_3", 0, 2, true, true, glass3);
|
||||
mirrorFill("mirrorfill_4", 1, 0, false, true, glass2);
|
||||
mirrorFill("mirrorfill_5", 1, 1, false, true, glass3);
|
||||
|
||||
plugin.getPlayerDataManager().getPlayerData(player).setLastHopper(hopper);
|
||||
|
||||
@ -164,7 +165,7 @@ public class GUIOverview extends Gui {
|
||||
int slot = layout[ii];
|
||||
|
||||
if (ii == 0) {
|
||||
setButton(slot, hook,
|
||||
setButton("sync", slot, hook,
|
||||
(event) -> {
|
||||
if (hopper.getLastPlayerOpened() != null && !hopper.getLastPlayerOpened().equals(player.getUniqueId())) {
|
||||
plugin.getLocale().getMessage("event.hopper.syncdidnotplace").sendPrefixedMessage(player);
|
||||
@ -190,7 +191,7 @@ public class GUIOverview extends Gui {
|
||||
player.closeInventory();
|
||||
});
|
||||
} else if (canTeleport) {
|
||||
setButton(slot, perl,
|
||||
setButton("teleport", slot, perl,
|
||||
(event) -> {
|
||||
if (event.clickType == ClickType.LEFT) {
|
||||
if (hopper.getLinkedBlocks() != null) {
|
||||
@ -211,14 +212,13 @@ public class GUIOverview extends Gui {
|
||||
});
|
||||
canTeleport = false;
|
||||
} else if (canFilter) {
|
||||
setButton(slot, filter,
|
||||
(event) -> guiManager.showGUI(player, new GUIFilter(plugin, hopper, player)));
|
||||
setButton("filter", slot, filter, (event) -> guiManager.showGUI(player, new GUIFilter(plugin, hopper, player)));
|
||||
canFilter = false;
|
||||
} else {
|
||||
if (modules.isEmpty()) break;
|
||||
Module module = modules.get(0);
|
||||
modules.remove(module);
|
||||
setButton(slot, module.getGUIButton(hopper),
|
||||
setButton(module.getName().toLowerCase().replace(" ", "_"), slot, module.getGUIButton(hopper),
|
||||
(event) -> module.runButtonPress(player, hopper, event.clickType));
|
||||
}
|
||||
}
|
||||
@ -227,7 +227,7 @@ public class GUIOverview extends Gui {
|
||||
if (Settings.UPGRADE_WITH_XP.getBoolean()
|
||||
&& level.getCostExperience() != -1
|
||||
&& player.hasPermission("EpicHoppers.Upgrade.XP")) {
|
||||
setButton(1, 2, GuiUtils.createButtonItem(
|
||||
setButton("upgrade_xp", 1, 2, GuiUtils.createButtonItem(
|
||||
Settings.XP_ICON.getMaterial(CompatibleMaterial.EXPERIENCE_BOTTLE),
|
||||
plugin.getLocale().getMessage("interface.hopper.upgradewithxp").getMessage(),
|
||||
nextLevel != null
|
||||
@ -242,7 +242,7 @@ public class GUIOverview extends Gui {
|
||||
if (Settings.UPGRADE_WITH_ECONOMY.getBoolean()
|
||||
&& level.getCostEconomy() != -1
|
||||
&& player.hasPermission("EpicHoppers.Upgrade.ECO")) {
|
||||
setButton(1, 6, GuiUtils.createButtonItem(
|
||||
setButton("upgrade_economy", 1, 6, GuiUtils.createButtonItem(
|
||||
Settings.ECO_ICON.getMaterial(CompatibleMaterial.SUNFLOWER),
|
||||
plugin.getLocale().getMessage("interface.hopper.upgradewitheconomy").getMessage(),
|
||||
nextLevel != null
|
||||
@ -256,7 +256,7 @@ public class GUIOverview extends Gui {
|
||||
}
|
||||
}
|
||||
|
||||
setItem(13, item);
|
||||
setItem("hopper", 13, item);
|
||||
|
||||
hopper.setLastPlayerOpened(player.getUniqueId());
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.songoda.epichoppers.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.gui.Gui;
|
||||
import com.songoda.core.gui.CustomizableGui;
|
||||
import com.songoda.core.gui.GuiUtils;
|
||||
import com.songoda.core.utils.TextUtils;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
@ -16,7 +16,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class GUISmeltable extends Gui {
|
||||
public class GUISmeltable extends CustomizableGui {
|
||||
|
||||
private final EpicHoppers plugin;
|
||||
private final Hopper hopper;
|
||||
@ -27,6 +27,7 @@ public class GUISmeltable extends Gui {
|
||||
.filter(m -> m.getBurnResult() != null).collect(Collectors.toList());
|
||||
|
||||
public GUISmeltable(ModuleAutoSmelter moduleAutoSmelter, EpicHoppers plugin, Hopper hopper) {
|
||||
super(plugin, "smeltable");
|
||||
this.plugin = plugin;
|
||||
this.hopper = hopper;
|
||||
this.moduleAutoSmelter = moduleAutoSmelter;
|
||||
@ -49,10 +50,10 @@ public class GUISmeltable extends Gui {
|
||||
|
||||
setDefaultItem(glass1);
|
||||
|
||||
GuiUtils.mirrorFill(this, 0, 0, true, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 1, true, true, glass2);
|
||||
GuiUtils.mirrorFill(this, 0, 2, true, true, glass3);
|
||||
GuiUtils.mirrorFill(this, 1, 0, true, true, glass2);
|
||||
mirrorFill("mirrorfill_1", 0, 0, true, true, glass2);
|
||||
mirrorFill("mirrorfill_2", 0, 1, true, true, glass2);
|
||||
mirrorFill("mirrorfill_3", 0, 2, true, true, glass3);
|
||||
mirrorFill("mirrorfill_4", 1, 0, true, true, glass2);
|
||||
|
||||
int smeltableIndex = page == 1 ? 0 : 32 * (page - 1);
|
||||
|
||||
@ -71,7 +72,7 @@ public class GUISmeltable extends Gui {
|
||||
|
||||
clearActions(51);
|
||||
if (page < maxPages) {
|
||||
setButton(51, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
|
||||
setButton("next", 51, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
|
||||
plugin.getLocale().getMessage("general.nametag.next").getMessage()),
|
||||
(event) -> {
|
||||
page++;
|
||||
@ -81,7 +82,7 @@ public class GUISmeltable extends Gui {
|
||||
|
||||
clearActions(47);
|
||||
if (page > 1) {
|
||||
setButton(47, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
|
||||
setButton("back", 47, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
|
||||
plugin.getLocale().getMessage("general.nametag.back").getMessage()),
|
||||
(event) -> {
|
||||
page--;
|
||||
@ -89,7 +90,7 @@ public class GUISmeltable extends Gui {
|
||||
});
|
||||
}
|
||||
|
||||
setButton(49, GuiUtils.createButtonItem(CompatibleMaterial.OAK_DOOR,
|
||||
setButton("exit", 49, GuiUtils.createButtonItem(CompatibleMaterial.OAK_DOOR,
|
||||
plugin.getLocale().getMessage("general.nametag.exit").getMessage()),
|
||||
(event) -> hopper.overview(plugin.getGuiManager(), event.player));
|
||||
}
|
||||
|
@ -36,9 +36,6 @@ public class BlockListeners implements Listener {
|
||||
if (e.getBlock().getType() != Material.HOPPER)
|
||||
return;
|
||||
|
||||
if (plugin.isLiquidtanks() && net.arcaniax.liquidtanks.object.LiquidTankAPI.isLiquidTank(e.getBlock().getLocation()))
|
||||
return;
|
||||
|
||||
int amt = count(e.getBlock().getChunk());
|
||||
|
||||
int max = maxHoppers(player);
|
||||
@ -93,9 +90,6 @@ public class BlockListeners implements Listener {
|
||||
|
||||
if (event.getBlock().getType() != Material.HOPPER) return;
|
||||
|
||||
if (plugin.isLiquidtanks() && net.arcaniax.liquidtanks.object.LiquidTankAPI.isLiquidTank(block.getLocation()))
|
||||
return;
|
||||
|
||||
if (Settings.ALLOW_NORMAL_HOPPERS.getBoolean() && !plugin.getHopperManager().isHopper(block.getLocation()))
|
||||
return;
|
||||
|
||||
|
@ -64,10 +64,6 @@ public class HopperListeners implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't touch liquid tank hoppers
|
||||
if (instance.isLiquidtanks() && net.arcaniax.liquidtanks.object.LiquidTankAPI.isLiquidTank(destinationLocation))
|
||||
return;
|
||||
|
||||
// Special cases when a hopper is picking up items
|
||||
if (destination.getHolder() instanceof org.bukkit.block.Hopper) {
|
||||
if (destinationLocation != null && Settings.ALLOW_NORMAL_HOPPERS.getBoolean() && !instance.getHopperManager().isHopper(destinationLocation))
|
||||
|
@ -78,9 +78,6 @@ public class InteractListeners implements Listener {
|
||||
|
||||
if (playerData.getSyncType() == null) {
|
||||
if (event.getClickedBlock().getType() == Material.HOPPER) {
|
||||
if (instance.isLiquidtanks() && net.arcaniax.liquidtanks.object.LiquidTankAPI.isLiquidTank(event.getClickedBlock().getLocation()))
|
||||
return;
|
||||
|
||||
if (Settings.ALLOW_NORMAL_HOPPERS.getBoolean() && !instance.getHopperManager().isHopper(event.getClickedBlock().getLocation()))
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user