Add forceRegisterCommand to force a command after a /register (passwords
only)
This commit is contained in:
+6
-3
@@ -35,13 +35,16 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
protected void forceCommands(Player player) {
|
||||
for (String command : Settings.forceCommands) {
|
||||
protected void forceCommands() {
|
||||
for (String command : Settings.forceRegisterCommands) {
|
||||
try {
|
||||
player.performCommand(command.replace("%p", player.getName()));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
for (String command : Settings.forceRegisterCommandsAsConsole) {
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), command.replace("%p", player.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
protected void forceLogin(Player player) {
|
||||
@@ -144,7 +147,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
}
|
||||
|
||||
// Register is now finish , we can force all commands
|
||||
forceCommands(player);
|
||||
forceCommands();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user