|
22 | 22 |
|
23 | 23 | import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
24 | 24 | import com.loohp.multichatdiscordsrvaddon.config.Config;
|
25 |
| -import com.loohp.multichatdiscordsrvaddon.objectholders.BuiltInPlaceholder; |
26 |
| -import com.loohp.multichatdiscordsrvaddon.objectholders.ICMaterial; |
27 |
| -import com.loohp.multichatdiscordsrvaddon.objectholders.ICPlaceholder; |
28 |
| -import com.loohp.multichatdiscordsrvaddon.objectholders.ValuePairs; |
| 25 | +import com.loohp.multichatdiscordsrvaddon.objectholders.*; |
29 | 26 | import com.loohp.multichatdiscordsrvaddon.utils.MCVersion;
|
30 | 27 | import com.loohp.multichatdiscordsrvaddon.utils.VersionManager;
|
31 | 28 | import com.loohp.multichatdiscordsrvaddon.utils.*;
|
|
34 | 31 | import net.kyori.adventure.text.minimessage.MiniMessage;
|
35 | 32 | import org.bukkit.Material;
|
36 | 33 | import org.bukkit.OfflinePlayer;
|
| 34 | +import org.bukkit.inventory.Inventory; |
37 | 35 | import org.bukkit.inventory.ItemStack;
|
38 | 36 | import org.bukkit.inventory.meta.ItemMeta;
|
39 | 37 | import org.bukkit.plugin.Plugin;
|
@@ -280,13 +278,22 @@ public class InteractiveChatDiscordSrvAddon extends JavaPlugin implements Listen
|
280 | 278 | public boolean useTooltipOnTab = true;
|
281 | 279 | public String tabTooltip = "";
|
282 | 280 | public long universalCooldown = 0;
|
283 |
| - |
284 | 281 | public static ICPlaceholder itemPlaceholder = null;
|
285 | 282 | public static ICPlaceholder inventoryPlaceholder = null;
|
286 | 283 | public static ICPlaceholder enderChestPlaceholder = null;
|
287 |
| - |
| 284 | + public ItemStack invFrame1 = null; |
| 285 | + public ItemStack invFrame2 = null; |
288 | 286 | public static Map<UUID, ICPlaceholder> placeholderList = new LinkedHashMap<>();
|
289 | 287 |
|
| 288 | + public ConcurrentCacheHashMap<String, Inventory> itemDisplay = new ConcurrentCacheHashMap<>(itemDisplayTimeout, 60000); |
| 289 | + public ConcurrentCacheHashMap<String, Inventory> inventoryDisplay = new ConcurrentCacheHashMap<>(itemDisplayTimeout, 60000); |
| 290 | + public ConcurrentCacheHashMap<String, Inventory> inventoryDisplay1Upper = new ConcurrentCacheHashMap<>(itemDisplayTimeout, 60000); |
| 291 | + public ConcurrentCacheHashMap<String, Inventory> inventoryDisplay1Lower = new ConcurrentCacheHashMap<>(itemDisplayTimeout, 60000); |
| 292 | + public ConcurrentCacheHashMap<String, Inventory> enderDisplay = new ConcurrentCacheHashMap<>(itemDisplayTimeout, 60000); |
| 293 | + public ConcurrentCacheHashMap<String, ItemStack> mapDisplay = new ConcurrentCacheHashMap<>(itemDisplayTimeout, 60000); |
| 294 | + public Set<Inventory> upperSharedInventory = Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<>())); |
| 295 | + public Set<Inventory> lowerSharedInventory = Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<>())); |
| 296 | + |
290 | 297 | private ResourceManager resourceManager;
|
291 | 298 | public ModelRenderer modelRenderer;
|
292 | 299 | public ExecutorService mediaReadingService;
|
@@ -684,6 +691,9 @@ public void reloadConfig() {
|
684 | 691 | placeholderList.put(enderChestPlaceholder.getInternalId(), enderChestPlaceholder);
|
685 | 692 | }
|
686 | 693 |
|
| 694 | + invFrame1 = new ItemStack(Material.valueOf(getConfig().getString("InventoryImage.Inventory.Frame.Primary")), 1); |
| 695 | + invFrame2 = new ItemStack(Material.valueOf(getConfig().getString("InventoryImage.Inventory.Frame.Secondary")), 1); |
| 696 | + |
687 | 697 | universalCooldown = config.getConfiguration().getLong("Settings.UniversalCooldown") * 1000;
|
688 | 698 |
|
689 | 699 | FontTextureResource.setCacheTime(cacheTimeout);
|
|
0 commit comments