allow {PRIORITY} placeholder in priority messages
This commit is contained in:
@@ -152,7 +152,7 @@ public class QueueManagerImpl implements QueueManager {
|
|||||||
String level = parts[0];
|
String level = parts[0];
|
||||||
String messageRaw = parts[1];
|
String messageRaw = parts[1];
|
||||||
if((level.equals("*") && queuePlayer.getPriority() > 0) || level.equals(queuePlayer.getPriority()+"")) {
|
if((level.equals("*") && queuePlayer.getPriority() > 0) || level.equals(queuePlayer.getPriority()+"")) {
|
||||||
player.sendMessage(main.getMessages().toComponent(messageRaw));
|
player.sendMessage(main.getMessages().toComponent(messageRaw.replaceAll("\\{PRIORITY}", queuePlayer.getPriority()+"")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,5 +188,5 @@ enable-priority-messages: false
|
|||||||
# The format is <priority>:<message>
|
# The format is <priority>:<message>
|
||||||
# Example: 1:You have a priority of 1!
|
# Example: 1:You have a priority of 1!
|
||||||
priority-messages:
|
priority-messages:
|
||||||
- "*:<green>Joining the queue with priority!"
|
- "*:<green>Joining the queue with a priority of {PRIORITY}!"
|
||||||
- "100:<yellow>Wow! You have a priority of 100!"
|
- "100:<yellow>Wow! You have a priority of 100!"
|
||||||
Reference in New Issue
Block a user