mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
fix #550
This commit is contained in:
parent
61fd8c0de5
commit
aeccce24a9
@ -143,10 +143,11 @@ public class AsyncPlayer extends PlayerProxy {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void floatAt(int x, int y, int z, boolean alwaysGlass) {
|
public void floatAt(int x, int y, int z, boolean alwaysGlass) {
|
||||||
|
if (alwaysGlass || !isAllowedToFly()) {
|
||||||
RuntimeException caught = null;
|
RuntimeException caught = null;
|
||||||
try {
|
try {
|
||||||
EditSession edit = new EditSessionBuilder(WorldWrapper.unwrap(getWorld()))
|
EditSession edit =
|
||||||
.player(unwrap(getBasePlayer())).build();
|
new EditSessionBuilder(WorldWrapper.unwrap(getWorld())).player(unwrap(getBasePlayer())).build();
|
||||||
edit.setBlock(BlockVector3.at(x, y - 1, z), BlockTypes.GLASS);
|
edit.setBlock(BlockVector3.at(x, y - 1, z), BlockTypes.GLASS);
|
||||||
edit.flushQueue();
|
edit.flushQueue();
|
||||||
LocalSession session = Fawe.get().getWorldEdit().getSessionManager().get(this);
|
LocalSession session = Fawe.get().getWorldEdit().getSessionManager().get(this);
|
||||||
@ -156,10 +157,13 @@ public class AsyncPlayer extends PlayerProxy {
|
|||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
caught = e;
|
caught = e;
|
||||||
}
|
}
|
||||||
setPosition(Vector3.at(x + 0.5, y, z + 0.5));
|
|
||||||
if (caught != null) {
|
if (caught != null) {
|
||||||
throw caught;
|
throw caught;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
setFlying(true);
|
||||||
|
}
|
||||||
|
trySetPosition(Vector3.at(x + 0.5, y, z + 0.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user