forked from Upstream/CommandPanels
Merge pull request #247 from jman13378/jman13378-patch-1
broadcast command tag
This commit is contained in:
commit
206a80ea34
@ -74,6 +74,21 @@ public class BasicTags implements Listener {
|
||||
plugin.tex.sendString(e.panel,e.pos,e.p,String.join(" ",e.args));
|
||||
return;
|
||||
}
|
||||
if(e.name.equalsIgnoreCase("broadcast=")) {
|
||||
e.commandTagUsed();
|
||||
Bukkit.broadcastMessage(plugin.tex.placeholders(e.panel, e.pos, e.p,String.join(" ",e.args).trim()));
|
||||
return;
|
||||
}
|
||||
if(e.name.equalsIgnoreCase("broadcast-perm=")) {
|
||||
e.commandTagUsed();
|
||||
StringBuilder message = new StringBuilder();
|
||||
for(int i = 1; i < e.args.length; i++){
|
||||
message.append(e.args[i]).append(" ");
|
||||
}
|
||||
// <perm> <message>
|
||||
Bukkit.broadcast(plugin.tex.placeholders(e.panel, e.pos, e.p,String.join(" ",message).trim()),String.valueOf(e.args[0]));
|
||||
return;
|
||||
}
|
||||
if(e.name.equalsIgnoreCase("op=")) {
|
||||
e.commandTagUsed();
|
||||
//if player uses op= it will perform command as op
|
||||
|
Loading…
Reference in New Issue
Block a user