mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-01-07 19:28:11 +01:00
Also remove shortcut-item in worlds where the plugin is disabled (#184)
This commit is contained in:
parent
ce1a5fca45
commit
04bf7da6ff
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user