Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
Added apostrophe (') placeholder (&sq) to Message and Command Mechanics
Browse files Browse the repository at this point in the history
  • Loading branch information
Sentropic committed Dec 20, 2020
1 parent 54fc085 commit c63fdb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/js/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -1765,10 +1765,10 @@ function MechanicCommand()
this.description ='Executes a command for each of the targets.';

this.data.push(new StringValue('Command', 'command', '')
.setTooltip('The command to execute')
.setTooltip('The command to execute. {player} = caster\'s name, {target} = target\'s name, {targetUUID} = target\'s UUID (useful if targets are non players), &lc: "{", &rc: "}", &sq: "\'"')
);
this.data.push(new ListValue('Execute Type', 'type', [ 'Console', 'OP' ], 'OP')
.setTooltip('Console: executes the command from the console. OP: Only if the target is a player, will have them execute it while given a temporary OP permission (If server closes in the meantime, the permission might stay, not recommended!!). {player} = caster\'s name, {target} = target\'s name, {targetUUID} = target\'s UUID (useful if targets are non players), &lc: "{", &rc: "}"')
.setTooltip('Console: executes the command from the console. OP: Only if the target is a player, will have them execute it while given a temporary OP permission (If server closes in the meantime, the permission might stay, not recommended!!)')
);
}

Expand Down Expand Up @@ -2229,7 +2229,7 @@ function MechanicMessage()
this.description = 'Sends a message to each player target. To include numbers from Value mechanics, use the filters {<key>} where <key> is the key the value is stored under.'

this.data.push(new StringValue('Message', 'message', 'text')
.setTooltip('The message to display')
.setTooltip('The message to display. {player} = caster\'s name, {target} = target\'s name, {targetUUID} = target\'s UUID (useful if targets are non players), &lc: "{", &rc: "}", &sq: "\'"')
);
}

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/sucy/skill/dynamic/EffectComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ private static String filterSpecialChars(String string) {
builder.append('{');
i = j+3;
break;
case "sq":
builder.append(string, i, j);
builder.append('\'');
i = j+3;
break;
}
j = string.indexOf('&',i);
}
Expand Down

0 comments on commit c63fdb5

Please sign in to comment.