npe fix
This commit is contained in:
parent
c4bbeb2535
commit
6638562866
@ -4,6 +4,7 @@ import java.io.File;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
@ -91,8 +92,8 @@ public class SafeLog extends MiniPlugin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerQuit(PlayerQuitEvent event)
|
||||
{
|
||||
event.setQuitMessage(F.sys("Quit", event.getPlayer().getName()));
|
||||
@ -100,9 +101,11 @@ public class SafeLog extends MiniPlugin
|
||||
onPlayerQuit(event.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerKicked(PlayerKickEvent event)
|
||||
{
|
||||
if (event.isCancelled()) return;
|
||||
|
||||
event.setLeaveMessage(F.sys("Quit", event.getPlayer().getName()));
|
||||
|
||||
onPlayerQuit(event.getPlayer());
|
||||
|
Loading…
Reference in New Issue
Block a user