added sending now title
This commit is contained in:
@@ -247,6 +247,8 @@ public class QueueMain extends AjQueueAPI {
|
|||||||
|
|
||||||
d.put("title.title", "");
|
d.put("title.title", "");
|
||||||
d.put("title.subtitle", "<gold>You are <green>#{POS} <gold>in the queue!");
|
d.put("title.subtitle", "<gold>You are <green>#{POS} <gold>in the queue!");
|
||||||
|
d.put("title.sending-now.title", "");
|
||||||
|
d.put("title.sending-now.subtitle", "<green>Sending you to <white>{SERVER} <green>now..");
|
||||||
|
|
||||||
d.put("commands.leave.more-args", "&cPlease specify which queue you want to leave! &7You are in these queues: {QUEUES}");
|
d.put("commands.leave.more-args", "&cPlease specify which queue you want to leave! &7You are in these queues: {QUEUES}");
|
||||||
d.put("commands.leave.queues-list-format", "&f{NAME}&7, ");
|
d.put("commands.leave.queues-list-format", "&f{NAME}&7, ");
|
||||||
|
|||||||
@@ -616,6 +616,19 @@ public class QueueManagerImpl implements QueueManager {
|
|||||||
}
|
}
|
||||||
if(System.currentTimeMillis() - sendingNowAntiSpam.get(nextPlayer) >= 5000) {
|
if(System.currentTimeMillis() - sendingNowAntiSpam.get(nextPlayer) >= 5000) {
|
||||||
nextPlayer.sendMessage(msgs.getComponent("status.sending-now", "SERVER:"+server.getAlias()));
|
nextPlayer.sendMessage(msgs.getComponent("status.sending-now", "SERVER:"+server.getAlias()));
|
||||||
|
if(main.getConfig().getBoolean("send-title")) {
|
||||||
|
nextPlayer.showTitle(Title.title(
|
||||||
|
main.getMessages().getComponent(
|
||||||
|
"title.sending-now.title",
|
||||||
|
"SERVER:"+server.getAlias()
|
||||||
|
),
|
||||||
|
main.getMessages().getComponent(
|
||||||
|
"title.sending-now.subtitle",
|
||||||
|
"SERVER:"+server.getAlias()
|
||||||
|
),
|
||||||
|
Title.Times.of(Duration.ZERO, Duration.ofSeconds(2L), Duration.ZERO)
|
||||||
|
));
|
||||||
|
}
|
||||||
sendingNowAntiSpam.put(nextPlayer, System.currentTimeMillis());
|
sendingNowAntiSpam.put(nextPlayer, System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user