Clean up PlotPlatform a bit and make the placeholder registry injectible

This commit is contained in:
Alexander Söderberg
2020-12-05 18:41:25 +01:00
parent 60b5f5fe48
commit c8ad936d26
64 changed files with 266 additions and 261 deletions

View File

@ -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);