Fixed player status placeholder not working
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ public class PlayerStatusHandler extends MessageHandler {
|
||||
if(server == null) {
|
||||
return ComResponse
|
||||
.from("playerstatus")
|
||||
.id(data)
|
||||
.id(player.getUniqueId() + data)
|
||||
.with("invalid_server");
|
||||
}
|
||||
if(!player.isConnected() || player.getServerName() == null) return null;
|
||||
|
||||
@@ -142,10 +142,11 @@ public class SpigotAPI extends AjQueueSpigotAPI {
|
||||
if(p == null) throw new IllegalArgumentException("Player must be online!");
|
||||
|
||||
String channel = player == null ? "status" : "playerstatus";
|
||||
String id = player == null ? queueName : player + queueName;
|
||||
|
||||
CompletableFuture<String> future = new CompletableFuture<>();
|
||||
|
||||
responseManager.awaitResponse(queueName, channel, response -> {
|
||||
responseManager.awaitResponse(id, channel, response -> {
|
||||
String responseString = response.getResponse();
|
||||
if(responseString.equals("invalid_server")) {
|
||||
future.completeExceptionally(new IllegalArgumentException(queueName + " does not exist!"));
|
||||
|
||||
@@ -29,8 +29,8 @@ public class PlaceholderExpansion extends me.clip.placeholderapi.expansion.Place
|
||||
placeholders.add(new PositionOf(plugin));
|
||||
placeholders.add(new Queued(plugin));
|
||||
placeholders.add(new QueuedFor(plugin));
|
||||
placeholders.add(new Status(plugin));
|
||||
placeholders.add(new StatusPlayer(plugin));
|
||||
placeholders.add(new Status(plugin));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user