9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2026-01-04 15:31:38 +00:00

Add missing placeholders

This commit is contained in:
SamB440
2020-06-28 17:30:08 +01:00
parent 318e17b820
commit fd5e7adce3

View File

@@ -170,7 +170,8 @@ public class DiscoveryGUI extends RPGRegionsGUI {
gui.update();
player.closeInventory();
String command = plugin.getConfig().getString("settings.server.gui.exit.command");
if (!command.isEmpty()) player.performCommand(command);
if (!command.isEmpty()) player.performCommand(command
.replace("%player%", player.getName()));
}), 0, 0);
gui.addPane(exit);
@@ -249,7 +250,11 @@ public class DiscoveryGUI extends RPGRegionsGUI {
}
if (!configuredRegion.getIconCommands().isEmpty()) {
configuredRegion.getIconCommands().forEach(iconCommand -> player.performCommand(iconCommand.replace("%region%", configuredRegion.getId())));
configuredRegion.getIconCommands().forEach(iconCommand -> {
player.performCommand(iconCommand
.replace("%region%", configuredRegion.getId())
.replace("%player%", player.getName()));
});
}
event.setCancelled(true);
}));