Skip to content

Commit

Permalink
use new core context tracking improvement, also cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Feb 15, 2020
1 parent 7ecd8ef commit 42af3ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -479,7 +479,7 @@ public void run() {
public void run() {
if (!StrongWarning.recentWarnings.isEmpty()) {
StringBuilder warnText = new StringBuilder();
warnText.append(ChatColor.YELLOW).append("[Denizen]").append(ChatColor.RED).append("Recent strong system warnings, scripters need to address ASAP (check earlier console logs for details):");
warnText.append(ChatColor.YELLOW).append("[Denizen] ").append(ChatColor.RED).append("Recent strong system warnings, scripters need to address ASAP (check earlier console logs for details):");
for (StrongWarning warning : StrongWarning.recentWarnings) {
warnText.append("\n- ").append(warning.message);
}
Expand Down
Expand Up @@ -192,7 +192,7 @@ public boolean handleCustomArgs(ScriptEntry scriptEntry, Argument arg, boolean i
// Fill player/off-line player
if (arg.matchesPrefix("player") && !if_ignore) {
Debug.echoDebug(scriptEntry, "...replacing the linked player with " + arg.getValue());
String value = TagManager.tag(arg.getValue(), new BukkitTagContext(scriptEntry));
String value = TagManager.tag(arg.getValue(), scriptEntry.getContext());
PlayerTag player = PlayerTag.valueOf(value);
if (player == null || !player.isValid()) {
Debug.echoError(scriptEntry.getResidingQueue(), value + " is an invalid player!");
Expand All @@ -204,7 +204,7 @@ public boolean handleCustomArgs(ScriptEntry scriptEntry, Argument arg, boolean i
// Fill NPC argument
else if (arg.matchesPrefix("npc") && !if_ignore) {
Debug.echoDebug(scriptEntry, "...replacing the linked NPC with " + arg.getValue());
String value = TagManager.tag(arg.getValue(), new BukkitTagContext(scriptEntry));
String value = TagManager.tag(arg.getValue(), scriptEntry.getContext());
NPCTag npc = NPCTag.valueOf(value);
if (npc == null || !npc.isValid()) {
Debug.echoError(scriptEntry.getResidingQueue(), value + " is an invalid NPC!");
Expand Down

0 comments on commit 42af3ef

Please sign in to comment.