mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 02:25:42 +01:00
Only replace Action player if online, fixes #2269
This commit is contained in:
parent
d1ecedebca
commit
fcc1b80771
@ -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()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user