Closes #110, add three additional variables

Adds %player%, %uuid%, and %reason%
This commit is contained in:
graywolf336 2016-03-21 18:22:40 -05:00
parent 780c4f0b8e
commit 0aba5e1569

View File

@ -354,6 +354,9 @@ public class PrisonerManager {
//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())) {
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);
}
@ -546,6 +549,9 @@ public class PrisonerManager {
//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())) {
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);
}