From bdb436711fcf031777e69a12f621de273cb63449 Mon Sep 17 00:00:00 2001 From: NavidK0 Date: Sat, 18 Jul 2015 00:50:21 -0400 Subject: [PATCH] Added support for spaces in Player Disguises. Use the "\_" (backslash underscore) to place a space in a name. Example: /d player The\_Great\_Apple --- build.gradle | 2 +- .../libraryaddict/disguise/utilities/BaseDisguiseCommand.java | 1 + src/main/resources/plugin.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e47dddc1..8a4010e4 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion sourceCompatibility = '1.7' ext.spigotVersion = '1.8.7-R0.1-SNAPSHOT' -ext.disguisesVersion = '8.6.1' +ext.disguisesVersion = '8.6.2' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' diff --git a/src/main/java/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java b/src/main/java/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java index 84267335..8ba12058 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java @@ -369,6 +369,7 @@ public abstract class BaseDisguiseCommand implements CommandExecutor { .get(args[1].toLowerCase()))) { throw new DisguiseParseException(ChatColor.RED + "Error! You don't have permission to use that name!"); } + args[1] = args[1].replace("\\_", " "); // Construct the player disguise disguise = new PlayerDisguise(ChatColor.translateAlternateColorCodes('&', args[1])); toSkip++; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 102c7132..e9ff6d80 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: LibsDisguises main: me.libraryaddict.disguise.LibsDisguises -version: 8.6.1 +version: 8.6.2 author: libraryaddict authors: [Byteflux, Navid K.] depend: [ProtocolLib]