File tree Expand file tree Collapse file tree
src/main/java/de/rexlmanu/fairychat/plugin/utility Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ public static String replaceLegacyWithTags(String input) {
9999 final String papiPlaceholder =
100100 argumentQueue .popOr ("papi tag requires an argument" ).value ();
101101
102+ boolean notSelfClosing = argumentQueue .hasNext () && argumentQueue .pop ().isFalse ();
103+
102104 // Then get PAPI to parse the placeholder for the given player.
103105 final String parsedPlaceholder =
104106 PlaceholderAPI .setPlaceholders (player , '%' + papiPlaceholder + '%' );
@@ -110,6 +112,9 @@ public static String replaceLegacyWithTags(String input) {
110112 Component component = parsePossibleLegacy (parsedPlaceholder );
111113
112114 // Finally, return the tag instance to insert the placeholder!
115+ if (notSelfClosing ) {
116+ return Tag .inserting (component );
117+ }
113118 return Tag .selfClosingInserting (component );
114119 });
115120 }
You can’t perform that action at this time.
0 commit comments