Copy prefixes and suffixes during migration processes

This commit is contained in:
Luck
2016-08-23 12:36:20 +01:00
Unverified
parent f7fa08d5e9
commit 9cd4e01d8e
6 changed files with 111 additions and 10 deletions
@@ -36,6 +36,8 @@ import java.util.Collections;
import java.util.Map;
import java.util.regex.Pattern;
import static me.lucko.luckperms.utils.ArgumentChecker.escapeCharacters;
/**
* Provides the Vault Chat service through the use of normal permission nodes.
*
@@ -50,7 +52,7 @@ import java.util.regex.Pattern;
* Permission Nodes = meta.node.value
*
* Node that special characters used within LuckPerms are escaped:
* See {@link #escapeCharacters(String)}
* See {@link me.lucko.luckperms.utils.ArgumentChecker#escapeCharacters(String)}
*
* Registered on normal priority so other plugins can override.
*/
@@ -75,14 +77,6 @@ class VaultChatHook extends Chat {
return perms.isEnabled();
}
private static String escapeCharacters(String s) {
s = s.replace(".", "{SEP}");
s = s.replace("/", "{FSEP}");
s = s.replace("$", "{DSEP}");
return s;
}
private void saveMeta(PermissionHolder holder, String world, String node, String value) {
if (holder == null) return;
if (node.equals("")) return;