mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 22:54:43 +02:00
More annotation work
This commit is contained in:
Bukkit/src/main/java/com/plotsquared/bukkit
Core/src/main/java/com/plotsquared/core
PlotAPI.javaPlotPlatform.javaPlotSquared.java
command
configuration
generator
location
player
plot
setup
synchronization
util
uuid
@ -125,7 +125,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
* @param player Bukkit player
|
||||
* @return PlotSquared player
|
||||
*/
|
||||
public @NonNull static BukkitPlayer adapt(final @NonNull Player player) {
|
||||
public static @NonNull BukkitPlayer adapt(final @NonNull Player player) {
|
||||
final PlayerManager<?, ?> playerManager = PlotSquared.platform().playerManager();
|
||||
return ((BukkitPlayerManager) playerManager).getPlayer(player);
|
||||
}
|
||||
@ -137,7 +137,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
* @param location Bukkit location
|
||||
* @return PlotSquared location
|
||||
*/
|
||||
public @NonNull static Location adapt(final org.bukkit.@NonNull Location location) {
|
||||
public static @NonNull Location adapt(final org.bukkit.@NonNull Location location) {
|
||||
return Location
|
||||
.at(com.plotsquared.bukkit.util.BukkitWorld.of(location.getWorld()),
|
||||
MathMan.roundInt(location.getX()),
|
||||
@ -153,7 +153,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
* @param location Bukkit location
|
||||
* @return PlotSquared location
|
||||
*/
|
||||
public @NonNull static Location adaptComplete(final org.bukkit.@NonNull Location location) {
|
||||
public static @NonNull Location adaptComplete(final org.bukkit.@NonNull Location location) {
|
||||
return Location
|
||||
.at(com.plotsquared.bukkit.util.BukkitWorld.of(location.getWorld()),
|
||||
MathMan.roundInt(location.getX()),
|
||||
@ -186,7 +186,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
* @param string World name
|
||||
* @return World if it exists, or {@code null}
|
||||
*/
|
||||
public @Nullable static World getWorld(final @NonNull String string) {
|
||||
public static @Nullable World getWorld(final @NonNull String string) {
|
||||
return Bukkit.getWorld(string);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class BukkitWorld implements World<org.bukkit.World> {
|
||||
* @param worldName World name
|
||||
* @return World instance
|
||||
*/
|
||||
public @NonNull static BukkitWorld of(final @NonNull String worldName) {
|
||||
public static @NonNull BukkitWorld of(final @NonNull String worldName) {
|
||||
final org.bukkit.World bukkitWorld = Bukkit.getWorld(worldName);
|
||||
if (bukkitWorld == null) {
|
||||
throw new IllegalArgumentException(String.format("There is no world with the name '%s'", worldName));
|
||||
@ -63,7 +63,7 @@ public class BukkitWorld implements World<org.bukkit.World> {
|
||||
* @param world Bukkit world
|
||||
* @return World instance
|
||||
*/
|
||||
public @NonNull static BukkitWorld of(final org.bukkit.World world) {
|
||||
public static @NonNull BukkitWorld of(final org.bukkit.World world) {
|
||||
BukkitWorld bukkitWorld = worldMap.get(world.getName());
|
||||
if (bukkitWorld != null && bukkitWorld.getPlatformWorld().equals(world)) {
|
||||
return bukkitWorld;
|
||||
|
Reference in New Issue
Block a user