Only replace Action player if online, fixes #2269

This commit is contained in:
PikaMug 2024-07-31 02:28:04 -04:00
parent d1ecedebca
commit fcc1b80771

View File

@ -359,9 +359,15 @@ public class BukkitAction implements Action {
} }
} }
if (!commands.isEmpty()) { if (!commands.isEmpty()) {
for (final String s : commands) { for (String s : commands) {
plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), if (s.contains("<player>")) {
s.replace("<player>", quester.getPlayer().getName())); if (player.isOnline()) {
s = s.replace("<player>", player.getName());
} else {
continue;
}
}
plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), s);
} }
} }
if (!potionEffects.isEmpty()) { if (!potionEffects.isEmpty()) {