diff --git a/core/src/main/java/me/pikamug/quests/actions/BukkitAction.java b/core/src/main/java/me/pikamug/quests/actions/BukkitAction.java index c766295cc..2fda94933 100644 --- a/core/src/main/java/me/pikamug/quests/actions/BukkitAction.java +++ b/core/src/main/java/me/pikamug/quests/actions/BukkitAction.java @@ -359,9 +359,15 @@ public class BukkitAction implements Action { } } if (!commands.isEmpty()) { - for (final String s : commands) { - plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), - s.replace("", quester.getPlayer().getName())); + for (String s : commands) { + if (s.contains("")) { + if (player.isOnline()) { + s = s.replace("", player.getName()); + } else { + continue; + } + } + plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), s); } } if (!potionEffects.isEmpty()) {