Add Paper Plugin support, Pl3xMap hook (#332)

This commit is contained in:
William authored and GitHub committed 2023-03-30 10:35:50 +01:00
1 parent 17af935379
commit bc421ae3d8
23 files changed
+770 -198

No files matched your search

@@ -61,7 +61,7 @@ public final class NormalDistributionEngine extends RandomTeleportEngine {
* @return A generated location
*/
private CompletableFuture<Optional<Location>> generateSafeLocation(@NotNull World world) {
return plugin.resolveSafeGroundLocation(generateLocation(
return plugin.findSafeGroundLocation(generateLocation(
getCenterPoint(world), mean, standardDeviation, spawnRadius, radius));
}
@@ -40,7 +40,7 @@ public abstract class RandomTeleportEngine {
*/
@NotNull
protected Position getCenterPoint(@NotNull World world) {
return plugin.getLocalCachedSpawn()
return plugin.getServerSpawn()
.map(s -> s.getPosition(plugin.getServerName()))
.orElse(Position.at(0d, 128d, 0d, 0f, 0f,
world, plugin.getServerName()));