mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-08 16:44:42 +02:00
Clean up PlotPlatform a bit and make the placeholder registry injectible
This commit is contained in:
@ -220,7 +220,7 @@ import java.util.Objects;
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Objects.requireNonNull(PlotSquared.platform()).getWorldManager()
|
||||
Objects.requireNonNull(PlotSquared.platform()).worldManager()
|
||||
.handleWorldCreation(builder.worldName(), builder.generatorName());
|
||||
|
||||
if (Bukkit.getWorld(world) != null) {
|
||||
|
@ -128,7 +128,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
* @return PlotSquared player
|
||||
*/
|
||||
@Nonnull public static BukkitPlayer adapt(@Nonnull final Player player) {
|
||||
final PlayerManager<?, ?> playerManager = PlotSquared.platform().getPlayerManager();
|
||||
final PlayerManager<?, ?> playerManager = PlotSquared.platform().playerManager();
|
||||
return ((BukkitPlayerManager) playerManager).getPlayer(player);
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
} else if (world.getBlockAt(location.getX(), location.getY(), location.getZ() - 1).getType().isSolid()) {
|
||||
facing = BlockFace.SOUTH;
|
||||
}
|
||||
if (PlotSquared.platform().getServerVersion()[1] == 13) {
|
||||
if (PlotSquared.platform().serverVersion()[1] == 13) {
|
||||
block.setType(Material.valueOf("WALL_SIGN"), false);
|
||||
} else {
|
||||
block.setType(Material.valueOf("OAK_WALL_SIGN"), false);
|
||||
|
@ -38,7 +38,7 @@ import java.util.ArrayList;
|
||||
public class SetGenCB {
|
||||
|
||||
public static void setGenerator(World world) throws Exception {
|
||||
PlotSquared.platform().getSetupUtils().updateGenerators();
|
||||
PlotSquared.platform().setupUtils().updateGenerators();
|
||||
PlotSquared.get().removePlotAreas(world.getName());
|
||||
ChunkGenerator gen = world.getGenerator();
|
||||
if (gen == null) {
|
||||
|
Reference in New Issue
Block a user