mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
A player is not always present when the InteractBlockEvent is fired anymore
This commit is contained in:
parent
205e2d212e
commit
a50e337224
@ -146,6 +146,10 @@ public class SpongeWorldEdit {
|
||||
|
||||
WorldEdit we = WorldEdit.getInstance();
|
||||
Optional<Player> optPlayer = event.getCause().get(NamedCause.SOURCE, Player.class);
|
||||
if (!optPlayer.isPresent()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SpongePlayer player = wrapPlayer(optPlayer.get());
|
||||
com.sk89q.worldedit.world.World world = player.getWorld();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user