Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Add BukkitPlayer constructor without plugin.
tbh I don't know why we even need to keep the plugin object around.
Dieser Commit ist enthalten in:
Ursprung
a80420d14b
Commit
961da1b93f
@ -52,6 +52,10 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
|||||||
private Player player;
|
private Player player;
|
||||||
private WorldEditPlugin plugin;
|
private WorldEditPlugin plugin;
|
||||||
|
|
||||||
|
public BukkitPlayer(Player player) {
|
||||||
|
this(WorldEditPlugin.getInstance(), player);
|
||||||
|
}
|
||||||
|
|
||||||
public BukkitPlayer(WorldEditPlugin plugin, Player player) {
|
public BukkitPlayer(WorldEditPlugin plugin, Player player) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -100,7 +100,7 @@ public class BukkitServerInterface implements MultiUserPlatform {
|
|||||||
return player;
|
return player;
|
||||||
} else {
|
} else {
|
||||||
org.bukkit.entity.Player bukkitPlayer = server.getPlayerExact(player.getName());
|
org.bukkit.entity.Player bukkitPlayer = server.getPlayerExact(player.getName());
|
||||||
return bukkitPlayer != null ? new BukkitPlayer(plugin, bukkitPlayer) : null;
|
return bukkitPlayer != null ? WorldEditPlugin.getInstance().wrapPlayer(bukkitPlayer) : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ public class BukkitServerInterface implements MultiUserPlatform {
|
|||||||
public Collection<Actor> getConnectedUsers() {
|
public Collection<Actor> getConnectedUsers() {
|
||||||
List<Actor> users = new ArrayList<>();
|
List<Actor> users = new ArrayList<>();
|
||||||
for (org.bukkit.entity.Player player : Bukkit.getServer().getOnlinePlayers()) {
|
for (org.bukkit.entity.Player player : Bukkit.getServer().getOnlinePlayers()) {
|
||||||
users.add(new BukkitPlayer(plugin, player));
|
users.add(WorldEditPlugin.getInstance().wrapPlayer(player));
|
||||||
}
|
}
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren