geforkt von Mirrors/FastAsyncWorldEdit
Check for the root cause instead of the source when handling the InteractBlockEvent
Dieser Commit ist enthalten in:
Ursprung
96798bbb90
Commit
2fd5c2f887
@ -149,12 +149,12 @@ public class SpongeWorldEdit {
|
||||
if (!platform.isHookingEvents()) return; // We have to be told to catch these events
|
||||
|
||||
WorldEdit we = WorldEdit.getInstance();
|
||||
Optional<Player> optPlayer = event.getCause().get(NamedCause.SOURCE, Player.class);
|
||||
if (!optPlayer.isPresent()) {
|
||||
Object rootObj = event.getCause().root();
|
||||
if (!(rootObj instanceof Player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SpongePlayer player = wrapPlayer(optPlayer.get());
|
||||
SpongePlayer player = wrapPlayer((Player) rootObj);
|
||||
com.sk89q.worldedit.world.World world = player.getWorld();
|
||||
|
||||
BlockSnapshot targetBlock = event.getTargetBlock();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren