broken-arrow

Untitled

Dec 6th, 2021
993
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package org.brokenarrow.storage.menus;
  2.  
  3. import org.brokenarrow.storage.CustomContainersMainClass;
  4. import org.brokenarrow.storage.Settings.ChatMessages;
  5. import org.brokenarrow.storage.Settings.MainSettings;
  6. import org.brokenarrow.storage.api.ContainerRegistryAPI;
  7. import org.brokenarrow.storage.api.PreferenceSettingsRegisteryApi;
  8. import org.brokenarrow.storage.util.GuiTempletsYaml;
  9. import org.brokenarrow.storage.util.ItemUtily;
  10. import org.brokenarrow.storage.util.MetadataEnumsForGui;
  11. import org.brokenarrow.storage.util.YamlSettingsContainers;
  12. import org.brokenarrow.storage.util.effects.CreateBorderEffect;
  13. import org.brokenarrow.storage.util.effects.SpawnBorderEffects;
  14. import org.bukkit.Bukkit;
  15. import org.bukkit.Location;
  16. import org.bukkit.Material;
  17. import org.bukkit.block.Block;
  18. import org.bukkit.entity.Player;
  19. import org.bukkit.event.inventory.InventoryClickEvent;
  20. import org.bukkit.event.inventory.InventoryCloseEvent;
  21. import org.bukkit.event.inventory.InventoryType;
  22. import org.bukkit.inventory.Inventory;
  23. import org.bukkit.inventory.ItemStack;
  24. import org.bukkit.metadata.FixedMetadataValue;
  25. import org.mineacademy.fo.Common;
  26. import org.mineacademy.fo.PlayerUtil;
  27. import org.mineacademy.fo.SerializeUtil;
  28. import org.mineacademy.fo.remain.CompMaterial;
  29. import org.mineacademy.fo.remain.CompMetadata;
  30. import org.mineacademy.fo.visual.BlockVisualizer;
  31.  
  32. import java.util.Arrays;
  33. import java.util.List;
  34. import java.util.Set;
  35.  
  36. public class HopperGui extends MenuHolder {
  37.  
  38.     private final CustomContainersMainClass plugin = CustomContainersMainClass.getInstance();
  39.  
  40.     private final MetadataEnumsForGui metadataplayer = MetadataEnumsForGui.CHEST_METADATA;
  41.     private final MetadataEnumsForGui metadataGui = MetadataEnumsForGui.INVENTORY_LINKTOCONTAINER;
  42.     private final MetadataEnumsForGui metadataActivateLinkMode = MetadataEnumsForGui.AKTIVATE_LINK_TOCONTAINER;
  43.     private final MetadataEnumsForGui metadataFilterItemsGui = MetadataEnumsForGui.INVENTORY_FILTERGUI;
  44.  
  45.     private final ContainerRegistryAPI registry = ContainerRegistryAPI.getInstance();
  46.     private final MainSettings mainsettings = MainSettings.getInstance();
  47.     private final PreferenceSettingsRegisteryApi preferenceRegistery = PreferenceSettingsRegisteryApi.getInstance();
  48.  
  49.     boolean visualize = false;
  50.     private Inventory inventory;
  51.  
  52.     public HopperGui(Location location, Player player) {
  53.         super(location, player);
  54.     }
  55.  
  56.     /*@Override
  57.     public void createMenuForPlayer(Player player, Location location) {
  58.         setMenuInCache(player);
  59.         onMenuOpen(player, location);
  60.     }*/
  61.  
  62.     @Override
  63.     protected void setMenuInCache(Player player) {
  64.         if (inventory == null)
  65.             this.inventory = Bukkit.createInventory(null, GuiTempletsYaml.getGuiSize("Link_Suction_Hopper_Gui"));
  66.         Common.runLater(10, () -> player.setMetadata(this.metadataGui.toString(), new FixedMetadataValue(this.metadataGui.getPlugin(), this.metadataGui.getMetadataKey())));
  67.  
  68.     }
  69.  
  70.  
  71.     @Override
  72.     public void onMenuOpen(Player player, Location location) {
  73.         setItems();
  74.         player.openInventory(getMenuForPlayers());
  75.         PlayerUtil.updateInventoryTitle(player, GuiTempletsYaml.getGuiTitle("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui"));
  76.     }
  77.  
  78.     @Override
  79.     public Inventory getMenuForPlayers() {
  80.         return this.inventory;
  81.     }
  82.  
  83.     @Override
  84.     public void onMenuClose(InventoryCloseEvent event) {
  85.  
  86.         removeMenuDataForPlayer((Player) event.getPlayer());
  87.         if (event.getInventory().getType().equals(this.inventory.getType())) {
  88.             Arrays.stream(inventory.getContents()).forEach(itemStack -> {
  89.                 if (itemStack != null) inventory.remove(itemStack);
  90.             });
  91.             setItems();
  92.         }
  93.     }
  94.  
  95.     @Override
  96.     protected void setItems() {
  97.  
  98.         for (int i = 0; i < this.inventory.getSize(); i++) {
  99.             setItemsInSlot(i);
  100.         }
  101.     }
  102.  
  103.     @Override
  104.     public void whenBlockBreak() {
  105.         this.inventory = null;
  106.     }
  107.  
  108.     @Override
  109.     protected void setItemsInSlot(int slot) {
  110.         Location location = SerializeUtil.deserializeLocation(CompMetadata.getMetadata(createMenuplayer, metadataplayer.toString()));
  111.         String containerFileName = registry.getContainerFileName(location);
  112.         String nextUpdate = YamlSettingsContainers.getUpdate(containerFileName, registry.getCurrentUpdate(location));
  113.         String currentUpdate = registry.getCurrentUpdate(location);
  114.  
  115.         double currentBalance = plugin.getEconomyProvider().getProvider().getBalance(Bukkit.getOfflinePlayer(createMenuplayer.getUniqueId()));
  116.  
  117.  
  118.         String hasMetadata = CompMetadata.getMetadata(createMenuplayer, metadataActivateLinkMode.toString());
  119.  
  120.         if (GuiTempletsYaml.getSlot("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container").contains(slot))
  121.             if (hasMetadata == null && createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.linkcontainer"))
  122.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container", null),
  123.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container"),
  124.                         GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container"), "Guimatrial", "GuiPlaceholders"));
  125.  
  126.             else if (hasMetadata != null && createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.linkcontainer"))
  127.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container_Active", null),
  128.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container_Active"),
  129.                         GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container_Active"), "Guimatrial", "GuiPlaceholders"));
  130.  
  131.             else if (!(createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.linkcontainer")))
  132.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container_No_Permission", null),
  133.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container_No_Permission"),
  134.                         GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container_No_Permission"), "Guimatrial", "GuiPlaceholders"));
  135.  
  136.         if (GuiTempletsYaml.getSlot("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade").contains(slot))
  137.             if (createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.upgrade") && !YamlSettingsContainers.getUpdate(containerFileName, currentUpdate).equals("") && YamlSettingsContainers.getUpdate(containerFileName, currentUpdate) != null && (currentBalance >= YamlSettingsContainers.getCostForUpdate(containerFileName, nextUpdate)))
  138.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade", null),
  139.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade"),
  140.                         lores(), "Guimatrial", "GuiPlaceholders"));
  141.             else if (createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.upgrade") && (YamlSettingsContainers.getUpdate(containerFileName, currentUpdate).equals("") || YamlSettingsContainers.getUpdate(containerFileName, currentUpdate) == null))
  142.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade", null),
  143.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade"),
  144.                         lores(), "Guimatrial", "GuiPlaceholders"));
  145.             else if (createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.upgrade") && !YamlSettingsContainers.getUpdate(containerFileName, currentUpdate).equals("") && !(currentBalance >= YamlSettingsContainers.getCostForUpdate(containerFileName, nextUpdate)))
  146.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_No_Money_Upgrade", null),
  147.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_No_Money_Upgrade"),
  148.                         lores(), "Guimatrial", "GuiPlaceholders"));
  149.             else if (!(createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.upgrade")))
  150.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade_No_Permisssion", null),
  151.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade_No_Permisssion"),
  152.                         GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade_No_Permisssion")));
  153.  
  154.         if (GuiTempletsYaml.getSlot("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List").contains(slot))
  155.             if (this.createMenuplayer.hasPermission(plugin.getName() + ".link.suction.menu.whiteblacklist"))
  156.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List", null),
  157.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List"),
  158.                         GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List", languageMessages(registry.isFilterWhiteBlack(location))), "Guimatrial", "GuiPlaceholders"));
  159.             else
  160.                 this.inventory.setItem(slot, ItemUtily.createItemStack(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List_No_Permission", null),
  161.                         GuiTempletsYaml.getDisplayName("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List_No_Permission"),
  162.                         GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List_No_Permission", registry.isFilterWhiteBlack(location)), "Guimatrial", "GuiPlaceholders"));
  163.  
  164.     }
  165.  
  166.     @Override
  167.     public void clickedMenu(InventoryClickEvent event, ItemStack clicked) {
  168.         if (clicked != null && event.getSlotType() != InventoryType.SlotType.OUTSIDE) {
  169.             Location location = SerializeUtil.deserializeLocation(CompMetadata.getMetadata(createMenuplayer, metadataplayer.toString()));
  170.             String container = registry.getContainerFileName(location);
  171.             String nextUpdate = YamlSettingsContainers.getUpdate(container, registry.getCurrentUpdate(location));
  172.             String currentUpdate = registry.getCurrentUpdate(location);
  173.             List<Location> locationss = registry.getLinkContainerLinkedToLocation(location);
  174.             Player player = (Player) event.getWhoClicked();
  175.  
  176.             boolean action = event.getClick().isLeftClick();
  177.             Material clickedItem = clicked.getType();
  178.             if (CompMetadata.getMetadata(clicked, "Guimatrial") != null) {
  179.  
  180.                 if (CompMetadata.getMetadata(clicked, "Guimatrial").equals("GuiPlaceholders") && (clickedItem == CompMaterial.fromItem(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List", null)).getMaterial() ||
  181.                         clickedItem == CompMaterial.fromItem(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_White_And_Black_List_No_Permission", null)).getMaterial()))
  182.                     if (action && player.hasPermission(plugin.getName() + ".link.suction.menu.whiteblacklist"))
  183.                         try {
  184.                             player.closeInventory();
  185.                             player.setMetadata(this.metadataFilterItemsGui.toString(), new FixedMetadataValue(this.metadataFilterItemsGui.getPlugin(), this.metadataFilterItemsGui.getMetadataKey()));
  186.                             MenuHolder whiteblackmenu = plugin.getClassinstans().createObjektMenu(location, player);
  187.                             whiteblackmenu.createMenuForPlayer(player, location);
  188.  
  189.                         } catch (Exception ex) {
  190.                             ex.printStackTrace();
  191.                         }
  192.                     else if (!action && player.hasPermission(plugin.getName() + ".link.suction.menu.whiteblacklist")) {
  193.                         registry.setFilterWhiteBlack(location, !registry.isFilterWhiteBlack(location));
  194.                         setItems();
  195.                     }
  196.  
  197.                 if (!player.hasPermission(plugin.getName() + ".link.suction.menu.whiteblacklist") && MainSettings.getInstance().getSettings().isShowNeedPermissionsInConsole())
  198.                     Common.log("You has not " + plugin.getName().toLowerCase() + ".link.suction.menu.whiteblacklist permission");
  199.  
  200.                 if (CompMetadata.getMetadata(clicked, "Guimatrial").equals("GuiPlaceholders") && (clickedItem == CompMaterial.fromItem(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Upgrade", null)).getMaterial()))
  201.                     try {
  202.                         if (player.hasPermission(plugin.getName() + ".link.suction.menu.upgrade")) {
  203.                             if (plugin.getEconomyProvider().getProvider().getBalance(Bukkit.getOfflinePlayer(player.getUniqueId())) >= YamlSettingsContainers.getCostForUpdate(container, nextUpdate)) {
  204.                                 plugin.getEconomyProvider().getProvider().withdrawAmont(Bukkit.getOfflinePlayer(player.getUniqueId()), YamlSettingsContainers.getCostForUpdate(container, nextUpdate));
  205.                                 registry.setNextUppdate(location, YamlSettingsContainers.getUpdate(registry.getContainerFileName(location), currentUpdate));
  206.  
  207.                                 if (mainsettings.getSettings().isTurnOffSuctionBorder() && preferenceRegistery.isShowSuctionBorderWhenPlaceContainer(player.getUniqueId())) {
  208.                                     Set<Location> locations = CreateBorderEffect.spawnEffects(location, YamlSettingsContainers.getSuctionRangePlaceholder(registry.getContainerFileName(location), nextUpdate), 1.0, 1.0, 1.0);
  209.                                     Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> plugin.getHeavyTasks().addLoad(new SpawnBorderEffects(locations, player, location, -1, 10)));
  210.                                     //Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> Effects.visualize(location, AllYamlFilesInFolder.getLinkRange(container, nextUpdate), player));
  211.                                 }
  212.                             } else
  213.                                 ChatMessages.PLAYER_NOT_HAS_MONEY.sendMessage(player, YamlSettingsContainers.getCostForUpdate(container, nextUpdate));
  214.                         } else if (!player.hasPermission(plugin.getName() + ".link.suction.menu.upgrade") && MainSettings.getInstance().getSettings().isShowNeedPermissionsInConsole())
  215.                             Common.log("You has not " + plugin.getName().toLowerCase() + ".link.suction.upgrade permission");
  216.  
  217.                     } catch (Exception ex) {
  218.                         ex.printStackTrace();
  219.                     }
  220.  
  221.                 if (CompMetadata.getMetadata(clicked, "Guimatrial").equals("GuiPlaceholders") && (clickedItem == CompMaterial.fromItem(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container", null)).getMaterial() ||
  222.                         clickedItem == CompMaterial.fromItem(GuiTempletsYaml.getIcon("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Link_To_Container_Active", null)).getMaterial())) {
  223.                     if (action && !player.hasMetadata(metadataActivateLinkMode.toString()) && player.hasPermission(plugin.getName() + ".link.suction.menu.linkcontainer")) {
  224.                         player.setMetadata(metadataActivateLinkMode.toString(), new FixedMetadataValue(metadataActivateLinkMode.getPlugin(), action));
  225.                         if (locationss != null) {
  226.                             for (Location loc : locationss) {
  227.                                 Block blocks = loc.getBlock();
  228.                                 if (!BlockVisualizer.isVisualized(blocks))
  229.                                     Common.runLater(() -> BlockVisualizer.visualize(blocks,
  230.                                             CompMaterial.fromMaterial(Material.BONE_BLOCK), "You has now linked " + blocks.getType().name() + " on cords " +
  231.                                                     SerializeUtil.serializeLoc(loc)));
  232.                             }
  233.                             visualize = true;
  234.                             Common.runLater(30, player::closeInventory);
  235.                             if (preferenceRegistery.isTimerSettingWhenLinkHopper(player.getUniqueId())) {
  236.                                 Common.tell(player, "You has now activate linkmode for " + mainsettings.getSettings().getTimeBeforeItTurnOff() + " seconds, you can turn it off in same hopper menu you activate it.");
  237.                                 Common.runLater(mainsettings.getSettings().getTimeBeforeItTurnOff() * 20, () -> {
  238.                                     player.removeMetadata(metadataActivateLinkMode.toString(), metadataActivateLinkMode.getPlugin());
  239.                                     Common.tell(player, "Linkmode has now turn off");
  240.                                     if (locationss != null) {
  241.                                         for (Location loc : locationss) {
  242.                                             Block blocks = loc.getBlock();
  243.                                             if (BlockVisualizer.isVisualized(blocks))
  244.                                                 BlockVisualizer.stopVisualizing(blocks);
  245.                                         }
  246.                                         visualize = false;
  247.                                     }
  248.                                 });
  249.  
  250.                             }
  251.                             setItems();
  252.                         }
  253.                     } else if (!action && player.hasPermission(plugin.getName() + ".link.suction.menu.linkcontainer")) {
  254.                         player.removeMetadata(metadataActivateLinkMode.toString(), metadataActivateLinkMode.getPlugin());
  255.                         setItems();
  256.                         if (locationss != null) {
  257.                             for (Location loc : locationss) {
  258.                                 Block blocks = loc.getBlock();
  259.                                 if (BlockVisualizer.isVisualized(blocks))
  260.                                     BlockVisualizer.stopVisualizing(blocks);
  261.                             }
  262.                             visualize = false;
  263.                         }
  264.                     }
  265.                 } else if (!player.hasPermission(plugin.getName() + ".link.suction.menu.linkcontainer") && MainSettings.getInstance().getSettings().isShowNeedPermissionsInConsole())
  266.                     Common.log("You has not " + plugin.getName().toLowerCase() + ".link.suction.menu.linkcontainer permission");
  267.  
  268.             }
  269.         }
  270.         event.setCancelled(true);
  271.     }
  272.  
  273.  
  274.     @Override
  275.     protected void removeMenuDataForPlayer(Player player) {
  276.         if (player.hasMetadata(metadataGui.toString()))
  277.             player.removeMetadata(metadataGui.toString(), metadataGui.getPlugin());
  278.         System.out.println("remove metadata " + player);
  279.     }
  280.  
  281.     public String languageMessages(boolean value) {
  282.         if (value)
  283.             return ChatMessages.WHITE_LIST.languageMessages();
  284.         return ChatMessages.BLACK_LIST.languageMessages();
  285.     }
  286.  
  287.     @Override
  288.     protected List<String> lores() {
  289.         Location location = SerializeUtil.deserializeLocation(CompMetadata.getMetadata(createMenuplayer, metadataplayer.toString()));
  290.         String containerFileName = registry.getContainerFileName(location);
  291.         String nextUpdate = YamlSettingsContainers.getUpdate(containerFileName, registry.getCurrentUpdate(location));
  292.         String currentUpdate = registry.getCurrentUpdate(location);
  293.         CustomContainersMainClass plugin = CustomContainersMainClass.getInstance();
  294.         List<String> lore;
  295.         double currentBalance = plugin.getEconomyProvider().getProvider().getBalance(Bukkit.getOfflinePlayer(createMenuplayer.getUniqueId()));
  296.  
  297.         if (!YamlSettingsContainers.getUpdate(containerFileName, currentUpdate).equals("") && YamlSettingsContainers.getUpdate(containerFileName, currentUpdate) != null)
  298.             lore = GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", currentBalance >= YamlSettingsContainers.getCostForUpdate(containerFileName, nextUpdate) ? "Link_Suction_Hopper_Gui_Upgrade" : "Link_Suction_Hopper_Gui_No_Money_Upgrade",
  299.                     YamlSettingsContainers.getCostForUpdate(containerFileName, currentUpdate),
  300.                     currentUpdate,
  301.                     YamlSettingsContainers.getLinkRangePlaceholder(containerFileName, currentUpdate),
  302.                     YamlSettingsContainers.getSuctionRangePlaceholder(containerFileName, currentUpdate),
  303.                     YamlSettingsContainers.getSecondsForPickupTeleport(containerFileName, currentUpdate),
  304.                     YamlSettingsContainers.getMaxAmountContainersCanBeLinked(containerFileName, currentUpdate),
  305.                     !registry.getLinkContainerLinkedToLocation(location).isEmpty(),
  306.                     registry.getLinkContainerLinkedToLocation(location).size(),
  307.  
  308.                     YamlSettingsContainers.getCostForUpdate(containerFileName, nextUpdate),
  309.                     YamlSettingsContainers.getUpdate(containerFileName, currentUpdate),
  310.                     YamlSettingsContainers.getLinkRangePlaceholder(containerFileName, nextUpdate),
  311.                     YamlSettingsContainers.getSuctionRangePlaceholder(containerFileName, nextUpdate),
  312.                     YamlSettingsContainers.getSecondsForPickupTeleport(containerFileName, nextUpdate),
  313.                     YamlSettingsContainers.getMaxAmountContainersCanBeLinked(containerFileName, currentUpdate));
  314.         else
  315.             lore = GuiTempletsYaml.getLore("Link_Suction_Hopper_Gui", "Link_Suction_Hopper_Gui_Max_Upgrade",
  316.                     YamlSettingsContainers.getContainerType(containerFileName, currentUpdate),
  317.                     currentUpdate,
  318.                     YamlSettingsContainers.getLinkRangePlaceholder(containerFileName, currentUpdate),
  319.                     YamlSettingsContainers.getSuctionRangePlaceholder(containerFileName, currentUpdate),
  320.                     YamlSettingsContainers.getSecondsForPickupTeleport(containerFileName, currentUpdate),
  321.                     YamlSettingsContainers.getMaxAmountContainersCanBeLinked(containerFileName, currentUpdate),
  322.                     !registry.getLinkContainerLinkedToLocation(location).isEmpty(),
  323.                     registry.getLinkContainerLinkedToLocation(location).size());
  324.         return lore;
  325.     }
  326. }
  327.  
RAW Paste Data