added inqueue placeholder
This commit is contained in:
@@ -99,6 +99,18 @@ public class Main extends JavaPlugin implements PluginMessageListener,Listener {
|
||||
phs.put("of", data);
|
||||
placeholders.responseCache.put(p, phs);
|
||||
}
|
||||
if(subchannel.equals("inqueue") && papi) {
|
||||
String playername = in.readUTF();
|
||||
Player p = Bukkit.getPlayer(playername);
|
||||
if(p == null) return;
|
||||
if(!p.isOnline()) return;
|
||||
|
||||
String data = in.readUTF();
|
||||
HashMap<String, String> phs = placeholders.responseCache.get(p);
|
||||
if(phs == null) phs = new HashMap<>();
|
||||
phs.put("inqueue", data);
|
||||
placeholders.responseCache.put(p, phs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -171,6 +171,9 @@ public class Placeholders extends PlaceholderExpansion {
|
||||
if(identifier.equalsIgnoreCase("position") || identifier.equalsIgnoreCase("of")) {
|
||||
return "None";
|
||||
}
|
||||
if(identifier.equalsIgnoreCase("inqueue")) {
|
||||
return "false";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +193,10 @@ public class Placeholders extends PlaceholderExpansion {
|
||||
plugin.sendMessage(player, "positionof", "");
|
||||
return null;
|
||||
}
|
||||
if(identifier.equalsIgnoreCase("inqueue")) {
|
||||
plugin.sendMessage(player, "inqueue", "");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user