Fixed a possible nullability bug in EnterExitListener

This commit is contained in:
Florian CUNY 2020-01-11 11:53:50 +01:00
parent c307f9b844
commit ffa873be68
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ public class EnterExitListener extends FlagListener {
private void handleEnterExit(@NonNull User user, @NonNull Location from, @NonNull Location to) {
// Only process if there is a change in X or Z coords
if (from.getWorld().equals(to.getWorld()) && from.toVector().multiply(XZ).equals(to.toVector().multiply(XZ))) {
if (from.getWorld() != null && from.getWorld().equals(to.getWorld())
&& from.toVector().multiply(XZ).equals(to.toVector().multiply(XZ))) {
return;
}