fix queuedfor placeholder
This commit is contained in:
@@ -262,7 +262,10 @@ public class Main extends Plugin implements Listener {
|
|||||||
BungeeUtils.sendCustomData(player, "inqueue", (server != null)+"");
|
BungeeUtils.sendCustomData(player, "inqueue", (server != null)+"");
|
||||||
}
|
}
|
||||||
if(subchannel.equals("queuedfor")) {
|
if(subchannel.equals("queuedfor")) {
|
||||||
BungeeUtils.sendCustomData(player, "queuedfor", player.getName(), in.readUTF());
|
String srv = in.readUTF();
|
||||||
|
Server server = man.findServer(srv);
|
||||||
|
if(server == null) return;
|
||||||
|
BungeeUtils.sendCustomData(player, "queuedfor", player.getName(), srv, server.getQueue().size()+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class Main extends JavaPlugin implements PluginMessageListener,Listener {
|
|||||||
if(p == null) return;
|
if(p == null) return;
|
||||||
if(!p.isOnline()) return;
|
if(!p.isOnline()) return;
|
||||||
|
|
||||||
int number = in.readInt();
|
int number = Integer.valueOf(in.readUTF());
|
||||||
HashMap<String, String> phs = placeholders.responseCache.get(p);
|
HashMap<String, String> phs = placeholders.responseCache.get(p);
|
||||||
if(phs == null) phs = new HashMap<>();
|
if(phs == null) phs = new HashMap<>();
|
||||||
phs.put("queuedfor_"+queuename, number+"");
|
phs.put("queuedfor_"+queuename, number+"");
|
||||||
|
|||||||
Reference in New Issue
Block a user