mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Seems to work for 1.7.2 (which doesn't have UUIDs)
This commit is contained in:
parent
7b203261a3
commit
760041607e
@ -52,6 +52,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
@ -74,7 +75,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class PlotMain extends JavaPlugin {
|
||||
|
||||
private static PlotMain main = null;
|
||||
/**
|
||||
* Permission that allows for "everything"
|
||||
*/
|
||||
@ -681,7 +682,7 @@ public class PlotMain extends JavaPlugin {
|
||||
* @return (this class)
|
||||
*/
|
||||
public static PlotMain getMain() {
|
||||
return JavaPlugin.getPlugin(PlotMain.class);
|
||||
return PlotMain.main;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -718,7 +719,7 @@ public class PlotMain extends JavaPlugin {
|
||||
return 0;
|
||||
}
|
||||
OfflinePlayer player;
|
||||
if (((player = Bukkit.getOfflinePlayer(uuid)) == null) || !player.hasPlayedBefore()) {
|
||||
if (((player = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid)) == null) || !player.hasPlayedBefore()) {
|
||||
return 0;
|
||||
}
|
||||
return player.getLastPlayed();
|
||||
@ -1388,6 +1389,7 @@ public class PlotMain extends JavaPlugin {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
final public void onEnable() {
|
||||
PlotMain.main = this;
|
||||
// Setup the logger mechanics
|
||||
setupLogger();
|
||||
// Setup translations
|
||||
|
@ -124,7 +124,7 @@ public class PlotAPI {
|
||||
* @see com.intellectualcrafters.plot.PlotMain
|
||||
*/
|
||||
public PlotAPI(@NotNull final JavaPlugin plugin) {
|
||||
this.plotMain = JavaPlugin.getPlugin(PlotMain.class);
|
||||
this.plotMain = PlotMain.getMain();
|
||||
if (plotMain == null) {
|
||||
throw new PlotSquaredException(PlotSquaredException.PlotError.PLOTMAIN_NULL, "Failed to fetch the plotmain instance, Plot API for " + plugin.getName() + " will be disabled");
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ import com.intellectualcrafters.plot.database.SQLManager;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.StringComparison;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@ -36,7 +38,7 @@ public class Database extends SubCommand {
|
||||
if (uuid == null) {
|
||||
PlotMain.sendConsoleSenderMessage(msg);
|
||||
} else {
|
||||
Player p = Bukkit.getPlayer(uuid);
|
||||
Player p = UUIDHandler.uuidWrapper.getPlayer(uuid);
|
||||
if (p != null && p.isOnline())
|
||||
return PlayerFunctions.sendMessage(p, msg);
|
||||
else
|
||||
@ -46,7 +48,7 @@ public class Database extends SubCommand {
|
||||
}
|
||||
|
||||
public static void insertPlots(final SQLManager manager, final UUID requester, final Connection c) {
|
||||
Plugin p = PlotMain.getPlugin(PlotMain.class);
|
||||
Plugin p = PlotMain.getMain();
|
||||
final java.util.Set<Plot> plots = PlotMain.getPlots();
|
||||
p.getServer().getScheduler().runTaskAsynchronously(p, new Runnable() {
|
||||
@Override
|
||||
@ -100,7 +102,7 @@ public class Database extends SubCommand {
|
||||
Connection n;
|
||||
try {
|
||||
n = new MySQL(
|
||||
PlotMain.getPlugin(PlotMain.class),
|
||||
PlotMain.getMain(),
|
||||
host,
|
||||
port,
|
||||
database,
|
||||
|
@ -30,6 +30,7 @@ import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
@ -70,13 +71,18 @@ public class Denied extends SubCommand {
|
||||
PlayerFunctions.sendMessage(plr, C.ALREADY_OWNER);
|
||||
return false;
|
||||
}
|
||||
OfflinePlayer player = null;
|
||||
if (plot.trusted.contains(uuid)) {
|
||||
plot.trusted.remove(uuid);
|
||||
DBFunc.removeTrusted(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(uuid));
|
||||
player = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
DBFunc.removeTrusted(plr.getWorld().getName(), plot, player);
|
||||
}
|
||||
if (plot.helpers.contains(uuid)) {
|
||||
plot.helpers.remove(uuid);
|
||||
DBFunc.removeHelper(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(uuid));
|
||||
if (player == null) {
|
||||
player = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
}
|
||||
DBFunc.removeHelper(plr.getWorld().getName(), plot, player);
|
||||
}
|
||||
plot.addDenied(uuid);
|
||||
DBFunc.setDenied(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(args[1]));
|
||||
@ -86,11 +92,12 @@ public class Denied extends SubCommand {
|
||||
PlayerFunctions.sendMessage(plr, C.ALREADY_ADDED);
|
||||
return false;
|
||||
}
|
||||
if (!uuid.equals(DBFunc.everyone) && (Bukkit.getPlayer(uuid) != null) && Bukkit.getPlayer(uuid).isOnline()) {
|
||||
final Plot pl = PlayerFunctions.getCurrentPlot(Bukkit.getPlayer((uuid)));
|
||||
Player player = UUIDHandler.uuidWrapper.getPlayer(uuid);
|
||||
if (!uuid.equals(DBFunc.everyone) && (player != null) && player.isOnline()) {
|
||||
final Plot pl = PlayerFunctions.getCurrentPlot(player);
|
||||
if ((pl != null) && pl.id.equals(plot.id)) {
|
||||
PlayerFunctions.sendMessage(Bukkit.getPlayer(uuid), C.YOU_BE_DENIED);
|
||||
Bukkit.getPlayer(uuid).teleport(Bukkit.getPlayer(uuid).getWorld().getSpawnLocation());
|
||||
PlayerFunctions.sendMessage(player, C.YOU_BE_DENIED);
|
||||
player.teleport(player.getWorld().getSpawnLocation());
|
||||
}
|
||||
}
|
||||
PlayerFunctions.sendMessage(plr, C.DENIED_ADDED);
|
||||
|
@ -30,6 +30,7 @@ import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
@ -68,13 +69,18 @@ public class Helpers extends SubCommand {
|
||||
PlayerFunctions.sendMessage(plr, C.ALREADY_OWNER);
|
||||
return false;
|
||||
}
|
||||
OfflinePlayer player = null;
|
||||
if (plot.trusted.contains(uuid)) {
|
||||
plot.trusted.remove(uuid);
|
||||
DBFunc.removeTrusted(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(uuid));
|
||||
player = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
DBFunc.removeTrusted(plr.getWorld().getName(), plot, player);
|
||||
}
|
||||
if (plot.denied.contains(uuid)) {
|
||||
plot.denied.remove(uuid);
|
||||
DBFunc.removeDenied(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(uuid));
|
||||
if (player == null) {
|
||||
player = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
}
|
||||
DBFunc.removeDenied(plr.getWorld().getName(), plot, player);
|
||||
}
|
||||
plot.addHelper(uuid);
|
||||
DBFunc.setHelper(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(args[1]));
|
||||
|
@ -115,7 +115,7 @@ public class Info extends SubCommand {
|
||||
|
||||
String owner = "none";
|
||||
if (plot.owner != null) {
|
||||
owner = Bukkit.getOfflinePlayer(plot.owner).getName();
|
||||
owner = UUIDHandler.uuidWrapper.getOfflinePlayer(plot.owner).getName();
|
||||
}
|
||||
if (owner == null) {
|
||||
owner = plot.owner.toString();
|
||||
@ -179,7 +179,7 @@ public class Info extends SubCommand {
|
||||
|
||||
String owner = "none";
|
||||
if (plot.owner != null) {
|
||||
owner = Bukkit.getOfflinePlayer(plot.owner).getName();
|
||||
owner = UUIDHandler.uuidWrapper.getOfflinePlayer(plot.owner).getName();
|
||||
}
|
||||
if (owner == null) {
|
||||
owner = plot.owner.toString();
|
||||
|
@ -30,6 +30,7 @@ import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
@ -69,13 +70,18 @@ public class Trusted extends SubCommand {
|
||||
PlayerFunctions.sendMessage(plr, C.ALREADY_OWNER);
|
||||
return false;
|
||||
}
|
||||
OfflinePlayer player = null;
|
||||
if (plot.helpers.contains(uuid)) {
|
||||
plot.helpers.remove(uuid);
|
||||
DBFunc.removeHelper(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(uuid));
|
||||
player = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
DBFunc.removeHelper(plr.getWorld().getName(), plot, player);
|
||||
}
|
||||
if (plot.denied.contains(uuid)) {
|
||||
plot.denied.remove(uuid);
|
||||
DBFunc.removeDenied(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(uuid));
|
||||
if (player == null) {
|
||||
player = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
}
|
||||
DBFunc.removeDenied(plr.getWorld().getName(), plot, player);
|
||||
}
|
||||
plot.addTrusted(uuid);
|
||||
DBFunc.setTrusted(plr.getWorld().getName(), plot, Bukkit.getOfflinePlayer(args[1]));
|
||||
|
@ -91,7 +91,7 @@ public class plugin extends SubCommand {
|
||||
|
||||
@Override
|
||||
public boolean execute(final Player plr, final String... args) {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(JavaPlugin.getPlugin(PlotMain.class), new Runnable() {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(PlotMain.getMain(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final ArrayList<String> strings = new ArrayList<String>() {
|
||||
|
@ -439,7 +439,7 @@ public enum C {
|
||||
manager = new TranslationManager();
|
||||
}
|
||||
if (defaultFile == null) {
|
||||
defaultFile = new YamlTranslationFile(BukkitTranslation.getParent(PlotMain.getPlugin(PlotMain.class)), lang, "PlotSquared", manager)
|
||||
defaultFile = new YamlTranslationFile(BukkitTranslation.getParent(PlotMain.getMain()), lang, "PlotSquared", manager)
|
||||
.read();
|
||||
}
|
||||
// register everything in this class
|
||||
|
@ -177,7 +177,8 @@ public class PlotPlusListener extends PlotListener implements Listener {
|
||||
}
|
||||
if (booleanFlag(plot, "notify-enter")) {
|
||||
if (plot.hasOwner()) {
|
||||
final Player player = Bukkit.getPlayer(plot.getOwner());
|
||||
|
||||
final Player player = UUIDHandler.uuidWrapper.getPlayer(plot.getOwner());
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
@ -216,7 +217,7 @@ public class PlotPlusListener extends PlotListener implements Listener {
|
||||
}
|
||||
if (booleanFlag(plot, "notify-leave")) {
|
||||
if (plot.hasOwner()) {
|
||||
final Player player = Bukkit.getPlayer(plot.getOwner());
|
||||
final Player player = UUIDHandler.uuidWrapper.getPlayer(plot.getOwner());
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.util.PWE;
|
||||
import com.intellectualcrafters.plot.util.PlayerFunctions;
|
||||
import com.intellectualcrafters.plot.util.PlotHelper;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.bukkit.selections.Selection;
|
||||
@ -77,7 +78,7 @@ public class WorldEditListener implements Listener {
|
||||
if ((plot == null) || (plot.owner == null)) {
|
||||
return;
|
||||
}
|
||||
final Player player = Bukkit.getPlayer(plot.owner);
|
||||
final Player player = UUIDHandler.uuidWrapper.getPlayer(plot.owner);
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -76,10 +76,10 @@ public class WorldGuardListener implements Listener {
|
||||
// requester.setOp(true);
|
||||
|
||||
// 10 ticks should be enough
|
||||
final PermissionAttachment add = requester.addAttachment(JavaPlugin.getPlugin(PlotMain.class), 10);
|
||||
final PermissionAttachment add = requester.addAttachment(PlotMain.getMain(), 10);
|
||||
add.setPermission("worldguard.region.addowner.own.*", true);
|
||||
|
||||
final PermissionAttachment remove = requester.addAttachment(JavaPlugin.getPlugin(PlotMain.class), 10);
|
||||
final PermissionAttachment remove = requester.addAttachment(PlotMain.getMain(), 10);
|
||||
remove.setPermission("worldguard.region.removeowner.own.*", true);
|
||||
|
||||
try {
|
||||
|
@ -214,7 +214,7 @@ public class Plot implements Cloneable {
|
||||
* @return true if the player is added as a helper or is the owner
|
||||
*/
|
||||
public boolean hasRights(final Player player) {
|
||||
return PlotMain.hasPermission(player, "plots.admin") || ((this.helpers != null) && this.helpers.contains(DBFunc.everyone)) || ((this.helpers != null) && this.helpers.contains(UUIDHandler.getUUID(player))) || ((this.owner != null) && this.owner.equals(UUIDHandler.getUUID(player))) || ((this.owner != null) && (this.trusted != null) && (Bukkit.getPlayer(this.owner) != null) && (this.trusted.contains(UUIDHandler.getUUID(player)) || this.trusted.contains(DBFunc.everyone)));
|
||||
return PlotMain.hasPermission(player, "plots.admin") || ((this.helpers != null) && this.helpers.contains(DBFunc.everyone)) || ((this.helpers != null) && this.helpers.contains(UUIDHandler.getUUID(player))) || ((this.owner != null) && this.owner.equals(UUIDHandler.getUUID(player))) || ((this.owner != null) && (this.trusted != null) && (UUIDHandler.uuidWrapper.getPlayer(this.owner) != null) && (this.trusted.contains(UUIDHandler.getUUID(player)) || this.trusted.contains(DBFunc.everyone)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,7 @@ package com.intellectualcrafters.plot.util;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -17,4 +18,14 @@ public class DefaultUUIDWrapper extends UUIDWrapper {
|
||||
return player.getUniqueId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OfflinePlayer getOfflinePlayer(UUID uuid) {
|
||||
return Bukkit.getOfflinePlayer(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Player getPlayer(UUID uuid) {
|
||||
return Bukkit.getPlayer(uuid);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,10 +2,13 @@ package com.intellectualcrafters.plot.util;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.intellectualcrafters.plot.object.StringWrapper;
|
||||
|
||||
public class OfflineUUIDWrapper extends UUIDWrapper {
|
||||
|
||||
@ -19,4 +22,33 @@ public class OfflineUUIDWrapper extends UUIDWrapper {
|
||||
return UUID.nameUUIDFromBytes(("OfflinePlayer:" + player.getName()).getBytes(Charsets.UTF_8));
|
||||
}
|
||||
|
||||
@Override
|
||||
public OfflinePlayer getOfflinePlayer(UUID uuid) {
|
||||
BiMap<UUID, StringWrapper> map = UUIDHandler.getUuidMap().inverse();
|
||||
String name = map.get(uuid).value;
|
||||
if (name != null) {
|
||||
return Bukkit.getOfflinePlayer(name);
|
||||
}
|
||||
else {
|
||||
for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
|
||||
if (getUUID(player).equals(uuid)) {
|
||||
return player;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Bukkit.getOfflinePlayer(uuid.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Player getPlayer(UUID uuid) {
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
if (getUUID(player).equals(uuid)) {
|
||||
return player;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class PlayerFunctions {
|
||||
* @return
|
||||
*/
|
||||
public static boolean hasExpired(final Plot plot) {
|
||||
final OfflinePlayer player = Bukkit.getOfflinePlayer(plot.owner);
|
||||
final OfflinePlayer player = UUIDHandler.uuidWrapper.getOfflinePlayer(plot.owner);
|
||||
final long lp = player.getLastPlayed();
|
||||
final long cu = System.currentTimeMillis();
|
||||
return (lp - cu) > 30l;
|
||||
|
@ -273,7 +273,7 @@ public class PlotHelper {
|
||||
if (uuid == null) {
|
||||
return "unknown";
|
||||
}
|
||||
final OfflinePlayer plr = Bukkit.getOfflinePlayer(uuid);
|
||||
final OfflinePlayer plr = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
if (plr == null) {
|
||||
return "unknown";
|
||||
}
|
||||
|
@ -122,14 +122,14 @@ public class SchematicHandler {
|
||||
*/
|
||||
public static Schematic getSchematic(final String name) {
|
||||
{
|
||||
final File parent = new File(JavaPlugin.getPlugin(PlotMain.class).getDataFolder() + File.separator + "schematics");
|
||||
final File parent = new File(PlotMain.getMain().getDataFolder() + File.separator + "schematics");
|
||||
if (!parent.exists()) {
|
||||
if (!parent.mkdir()) {
|
||||
throw new RuntimeException("Could not create schematic parent directory");
|
||||
}
|
||||
}
|
||||
}
|
||||
final File file = new File(JavaPlugin.getPlugin(PlotMain.class).getDataFolder() + File.separator + "schematics" + File.separator + name + ".schematic");
|
||||
final File file = new File(PlotMain.getMain().getDataFolder() + File.separator + "schematics" + File.separator + name + ".schematic");
|
||||
if (!file.exists()) {
|
||||
PlotMain.sendConsoleSenderMessage(file.toString() + " doesn't exist");
|
||||
return null;
|
||||
|
@ -194,7 +194,7 @@ public class UUIDHandler {
|
||||
if ((name = getNameOfflinePlayer(uuid)) != null) {
|
||||
return name;
|
||||
}
|
||||
if (online) {
|
||||
if (online && !Settings.OFFLINE_MODE) {
|
||||
if (!Settings.CUSTOM_API) {
|
||||
try {
|
||||
final NameFetcher fetcher = new NameFetcher(Arrays.asList(uuid));
|
||||
@ -251,7 +251,7 @@ public class UUIDHandler {
|
||||
* @return String - name
|
||||
*/
|
||||
private static String getNameOnlinePlayer(final UUID uuid) {
|
||||
final Player player = Bukkit.getPlayer(uuid);
|
||||
final Player player = uuidWrapper.getPlayer(uuid);
|
||||
if ((player == null) || !player.isOnline()) {
|
||||
return null;
|
||||
}
|
||||
@ -260,12 +260,14 @@ public class UUIDHandler {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param uuid to use as key
|
||||
* @return String - name
|
||||
*/
|
||||
private static String getNameOfflinePlayer(final UUID uuid) {
|
||||
final OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
|
||||
final OfflinePlayer player = uuidWrapper.getOfflinePlayer(uuid);
|
||||
if ((player == null) || !player.hasPlayedBefore()) {
|
||||
return null;
|
||||
}
|
||||
|
@ -9,4 +9,8 @@ public abstract class UUIDWrapper {
|
||||
public abstract UUID getUUID(Player player);
|
||||
|
||||
public abstract UUID getUUID(OfflinePlayer player);
|
||||
|
||||
public abstract OfflinePlayer getOfflinePlayer(UUID uuid);
|
||||
|
||||
public abstract Player getPlayer(UUID uuid);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class PlotUUIDSaver implements UUIDSaver {
|
||||
|
||||
@Override
|
||||
public void globalPopulate() {
|
||||
JavaPlugin.getPlugin(PlotMain.class).getServer().getScheduler().runTaskAsynchronously(JavaPlugin.getPlugin(PlotMain.class), new Runnable() {
|
||||
Bukkit.getServer().getScheduler().runTaskAsynchronously(PlotMain.getMain(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final OfflinePlayer[] offlinePlayers = Bukkit.getOfflinePlayers();
|
||||
|
Loading…
Reference in New Issue
Block a user