mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-01 14:07:56 +01:00
Invalidate context cache on Bukkit PlayerJoinEvent
The players world is first defined just before this event, so we need to invalidate here as well as on world change
This commit is contained in:
parent
997e3c7ef7
commit
cb5f403043
@ -48,6 +48,7 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||
import org.bukkit.event.player.PlayerGameModeChangeEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class BukkitPlayerCalculator implements ContextCalculator<Player>, Listener {
|
||||
@ -113,6 +114,11 @@ public class BukkitPlayerCalculator implements ContextCalculator<Player>, Listen
|
||||
this.plugin.getContextManager().signalContextUpdate(e.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerJoinWorld(PlayerJoinEvent e) {
|
||||
this.plugin.getContextManager().signalContextUpdate(e.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onGameModeChange(PlayerGameModeChangeEvent e) {
|
||||
this.plugin.getContextManager().signalContextUpdate(e.getPlayer());
|
||||
|
Loading…
Reference in New Issue
Block a user