Closes #110, add three additional variables
Adds %player%, %uuid%, and %reason%
This commit is contained in:
parent
780c4f0b8e
commit
0aba5e1569
@ -354,6 +354,9 @@ public class PrisonerManager {
|
|||||||
//replace all of the %p% so that the commands can have a player name in them
|
//replace all of the %p% so that the commands can have a player name in them
|
||||||
for(String command : pl.getConfig().getStringList(Settings.COMMANDSONJAIL.getPath())) {
|
for(String command : pl.getConfig().getStringList(Settings.COMMANDSONJAIL.getPath())) {
|
||||||
command = command.replaceAll("%p%", player.getName());
|
command = command.replaceAll("%p%", player.getName());
|
||||||
|
command = command.replaceAll("%player%", player.getName());
|
||||||
|
command = command.replaceAll("%uuid%", player.getUniqueId().toString());
|
||||||
|
command = command.replaceAll("%reason%", prisoner.getReason());
|
||||||
pl.getServer().dispatchCommand(pl.getServer().getConsoleSender(), command);
|
pl.getServer().dispatchCommand(pl.getServer().getConsoleSender(), command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -546,6 +549,9 @@ public class PrisonerManager {
|
|||||||
//replace all of the %p% so that the commands can have a player name in them
|
//replace all of the %p% so that the commands can have a player name in them
|
||||||
for(String command : pl.getConfig().getStringList(Settings.COMMANDSONRELEASE.getPath())) {
|
for(String command : pl.getConfig().getStringList(Settings.COMMANDSONRELEASE.getPath())) {
|
||||||
command = command.replaceAll("%p%", player.getName());
|
command = command.replaceAll("%p%", player.getName());
|
||||||
|
command = command.replaceAll("%player%", player.getName());
|
||||||
|
command = command.replaceAll("%uuid%", player.getUniqueId().toString());
|
||||||
|
command = command.replaceAll("%reason%", prisoner.getReason());
|
||||||
pl.getServer().dispatchCommand(pl.getServer().getConsoleSender(), command);
|
pl.getServer().dispatchCommand(pl.getServer().getConsoleSender(), command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user