From 04bf7da6ff84904d5bfc4224e97fa608d0025b29 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Sun, 24 Oct 2021 11:43:03 +0200 Subject: [PATCH] Also remove shortcut-item in worlds where the plugin is disabled (#184) --- .../pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java index 9ed5ef1..e43a069 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java @@ -153,11 +153,10 @@ public void onSpawn(PlayerRespawnEvent event) @EventHandler(priority = EventPriority.MONITOR) public void onWorldChange(final PlayerChangedWorldEvent event) { - if(plugin.isDisabled(event.getPlayer()) != WorldBlacklistMode.None) return; Bukkit.getScheduler().runTaskLater(plugin, () -> { Player player = event.getPlayer(); if(!player.isOnline()) return; - if(player.hasPermission(Permissions.USE)) + if(player.hasPermission(Permissions.USE) && plugin.isDisabled(player) == WorldBlacklistMode.None) addItem(player); else removeItem(player);