Added long overdue back buttons to GUI's.

This commit is contained in:
Brianna 2020-04-10 05:20:43 -04:00
parent 7730f40ade
commit d73ad85008
3 changed files with 14 additions and 0 deletions

View File

@ -52,6 +52,10 @@ public class GUIAutoSellFilter extends Gui {
GuiUtils.mirrorFill(this, 2, 8, true, false, glass2);
GuiUtils.mirrorFill(this, 4, 7, false, false, glass1);
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
plugin.getLocale().getMessage("general.nametag.back").getMessage()),
(event) -> hopper.overview(guiManager, event.player));
// Whitelist
ItemStack indicatorItem = CompatibleMaterial.WHITE_STAINED_GLASS_PANE.getItem();
ItemMeta indicatorMeta = indicatorItem.getItemMeta();

View File

@ -1,7 +1,9 @@
package com.songoda.epichoppers.gui;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.gui.Gui;
import com.songoda.core.gui.GuiUtils;
import com.songoda.epichoppers.EpicHoppers;
import com.songoda.epichoppers.hopper.Hopper;
import com.songoda.epichoppers.hopper.levels.modules.ModuleAutoCrafting;
import com.songoda.epichoppers.settings.Settings;
@ -29,6 +31,10 @@ public class GUICrafting extends Gui {
GuiUtils.mirrorFill(this, 1, 0, false, true, glass2);
GuiUtils.mirrorFill(this, 1, 1, false, true, glass3);
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
EpicHoppers.getInstance().getLocale().getMessage("general.nametag.back").getMessage()),
(event) -> hopper.overview(guiManager, event.player));
setButton(13, module.getAutoCrafting(hopper),
(event) -> module.setAutoCrafting(hopper, player, inventory.getItem(13)));

View File

@ -56,6 +56,10 @@ public class GUIFilter extends Gui {
itm.setDisplayName(plugin.getLocale().getMessage("interface.filter.whitelist").getMessage());
it.setItemMeta(itm);
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW.getItem(),
plugin.getLocale().getMessage("general.nametag.back").getMessage()),
(event) -> hopper.overview(guiManager, event.player));
int[] whiteSlots = {0, 1, 45, 46};
for (int nu : whiteSlots) {
setItem(nu, it);