mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 14:44:43 +02:00
Merge remote-tracking branch 'origin/v6' into feature/v6/json
# Conflicts: # Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java # Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java # Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitOfflinePlayer.java # Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java # Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitLocalQueue.java # Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEconHandler.java # Core/pom.xml # Core/src/main/java/com/plotsquared/core/PlotAPI.java # Core/src/main/java/com/plotsquared/core/PlotPlatform.java # Core/src/main/java/com/plotsquared/core/PlotSquared.java # Core/src/main/java/com/plotsquared/core/command/Area.java # Core/src/main/java/com/plotsquared/core/command/Auto.java # Core/src/main/java/com/plotsquared/core/command/Claim.java # Core/src/main/java/com/plotsquared/core/command/CmdConfirm.java # Core/src/main/java/com/plotsquared/core/command/Command.java # Core/src/main/java/com/plotsquared/core/command/CommandCaller.java # Core/src/main/java/com/plotsquared/core/command/DebugExec.java # Core/src/main/java/com/plotsquared/core/command/Grant.java # Core/src/main/java/com/plotsquared/core/command/Inbox.java # Core/src/main/java/com/plotsquared/core/command/Load.java # Core/src/main/java/com/plotsquared/core/command/Save.java # Core/src/main/java/com/plotsquared/core/command/Setup.java # Core/src/main/java/com/plotsquared/core/listener/PlotListener.java # Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java # Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java # Core/src/main/java/com/plotsquared/core/plot/Plot.java # Core/src/main/java/com/plotsquared/core/plot/comment/CommentManager.java # Core/src/main/java/com/plotsquared/core/util/BlockUtil.java # Core/src/main/java/com/plotsquared/core/util/Permissions.java
This commit is contained in:
@ -59,7 +59,6 @@ import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.Block;
|
||||
@ -107,7 +106,6 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.IntConsumer;
|
||||
import java.util.stream.Stream;
|
||||
@ -127,24 +125,6 @@ import java.util.stream.Stream;
|
||||
super(regionManager);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a {@link PlotPlayer} from an {@link OfflinePlayer}. If the player is
|
||||
* online, it returns a complete player. If the player is offline, it creates
|
||||
* a fake player
|
||||
*
|
||||
* @param op Offline player
|
||||
* @return Plot player instance
|
||||
*/
|
||||
@Nonnull public static PlotPlayer<Player> adapt(@Nonnull final OfflinePlayer op) {
|
||||
if (op.isOnline()) {
|
||||
return adapt(Objects.requireNonNull(op.getPlayer()));
|
||||
}
|
||||
final Player player = OfflinePlayerUtil.loadPlayer(op);
|
||||
player.loadData();
|
||||
return new BukkitPlayer(PlotSquared.get().getPlotAreaManager(),
|
||||
PlotSquared.get().getEventDispatcher(), player, true, PlotSquared.platform().getEconHandler());
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn a Bukkit {@link Player} into a PlotSquared {@link PlotPlayer}
|
||||
*
|
||||
@ -225,18 +205,6 @@ import java.util.stream.Stream;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the PlotPlayer for a UUID. The PlotPlayer is usually cached and
|
||||
* will provide useful functions relating to players.
|
||||
*
|
||||
* @param uuid the uuid to wrap
|
||||
* @return a {@code PlotPlayer}
|
||||
* @see PlotPlayer#wrap(Object)
|
||||
*/
|
||||
@Override @Nonnull public PlotPlayer<?> getPlayer(@Nonnull final UUID uuid) {
|
||||
return PlotPlayer.wrap(Bukkit.getOfflinePlayer(uuid));
|
||||
}
|
||||
|
||||
@Override public boolean isBlockSame(@Nonnull final BlockState block1,
|
||||
@Nonnull final BlockState block2) {
|
||||
if (block1.equals(block2)) {
|
||||
|
Reference in New Issue
Block a user