From 42c8cb1354917b55d9fa00725279cc38c61b1285 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 28 Oct 2018 22:32:02 +0000 Subject: [PATCH] Use the fragment identifier instead of query parameters to convey the editor/verbose/treeview data id This fixes the issue Multicraft panels have with displaying ? characters in console. (absolute quality) --- .../luckperms/common/commands/generic/other/HolderEditor.java | 2 +- .../me/lucko/luckperms/common/commands/misc/EditorCommand.java | 2 +- .../me/lucko/luckperms/common/commands/misc/TreeCommand.java | 2 +- .../me/lucko/luckperms/common/commands/misc/VerboseCommand.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderEditor.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderEditor.java index 9914a9bd0..8795fdcff 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderEditor.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderEditor.java @@ -77,7 +77,7 @@ public class HolderEditor extends SubCommand { } // form a url for the editor - String url = plugin.getConfiguration().get(ConfigKeys.WEB_EDITOR_URL_PATTERN) + "?" + pasteId; + String url = plugin.getConfiguration().get(ConfigKeys.WEB_EDITOR_URL_PATTERN) + "#" + pasteId; Message.EDITOR_URL.send(sender); diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/EditorCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/misc/EditorCommand.java index e05decff0..9bd2e3ab8 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/EditorCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/misc/EditorCommand.java @@ -114,7 +114,7 @@ public class EditorCommand extends SingleCommand { } // form a url for the editor - String url = plugin.getConfiguration().get(ConfigKeys.WEB_EDITOR_URL_PATTERN) + "?" + pasteId; + String url = plugin.getConfiguration().get(ConfigKeys.WEB_EDITOR_URL_PATTERN) + "#" + pasteId; Message.EDITOR_URL.send(sender); diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/TreeCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/misc/TreeCommand.java index 97f77f178..04361aab2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/TreeCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/misc/TreeCommand.java @@ -92,7 +92,7 @@ public class TreeCommand extends SingleCommand { Message.TREE_UPLOAD_START.send(sender); PermissionCache permissionData = user == null ? null : user.getCachedData().getPermissionData(plugin.getContextForUser(user).orElse(plugin.getContextManager().getStaticContexts())); String id = view.uploadPasteData(sender, user, permissionData); - String url = plugin.getConfiguration().get(ConfigKeys.TREE_VIEWER_URL_PATTERN) + "?" + id; + String url = plugin.getConfiguration().get(ConfigKeys.TREE_VIEWER_URL_PATTERN) + "#" + id; Message.TREE_URL.send(sender); diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/VerboseCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/misc/VerboseCommand.java index 8d2b1569a..d1d9c5b7e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/VerboseCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/misc/VerboseCommand.java @@ -114,7 +114,7 @@ public class VerboseCommand extends SingleCommand { } else { Message.VERBOSE_UPLOAD_START.send(sender); String id = listener.uploadPasteData(); - String url = plugin.getConfiguration().get(ConfigKeys.VERBOSE_VIEWER_URL_PATTERN) + "?" + id; + String url = plugin.getConfiguration().get(ConfigKeys.VERBOSE_VIEWER_URL_PATTERN) + "#" + id; Message.VERBOSE_RESULTS_URL.send(sender);