|
|
@ -84,9 +84,16 @@ public class OnCustomPlayerMove implements CustomPlayerMoveEventListener {
|
|
|
|
// Set player as ignored on target-LinkedBeaconTeleporter (so he wont trigger the teleport again)
|
|
|
|
// Set player as ignored on target-LinkedBeaconTeleporter (so he wont trigger the teleport again)
|
|
|
|
playerBeaconLocation.put(uuid, lbtBlockPartner);
|
|
|
|
playerBeaconLocation.put(uuid, lbtBlockPartner);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get safe-location on top of other beacon
|
|
|
|
|
|
|
|
Block safeBlock = Function.searchForMaterial(
|
|
|
|
|
|
|
|
lbtBlockPartner.block().getLocation().add(0, 1, 0),
|
|
|
|
|
|
|
|
new Vector(0, 1, 0),
|
|
|
|
|
|
|
|
Material.AIR
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// Teleport
|
|
|
|
// Teleport
|
|
|
|
e.player().teleport(
|
|
|
|
e.player().teleport(
|
|
|
|
lbtBlockPartner.block().getLocation().add(0.5, 1, 0.5)
|
|
|
|
safeBlock.getLocation().add(0.5, 0, 0.5)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|