diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5cfe089..de3e041 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -7,12 +7,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 17 - uses: actions/setup-java@v2 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: distribution: temurin - java-version: 17 + java-version: 21 cache: gradle - name: Build with Gradle run: chmod a+x gradlew && ./gradlew build --no-daemon \ No newline at end of file diff --git a/.idea/codeStyles/Plexus_Code_Style.xml b/.idea/codeStyles/Plexus_Code_Style.xml new file mode 100644 index 0000000..a7db3e4 --- /dev/null +++ b/.idea/codeStyles/Plexus_Code_Style.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..df773a2 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a6199f6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +For those who are wanting to contribute, we fully encourage doing so. There are a few rules we require following when contributing however. + +## Steps +1. Make an issue and get feedback. It's important to know if your idea will be accepted before writing any code. +- If it is a feature request, describe the feature and be extremely specific. +- If it is a bug report, ensure you include how to reproduce the bug and the expected outcome +- If it is an enhancement, describe your proposed changes. Ensure you are extremely specific. +2. Fork this project +3. Create a new branch that describes the new feature, enhancement, or bug fix. For example, this is good: `feature/add-xyz`. This is bad: `fix-this-lol`. +4. Write the code that addresses your change. +- Keep in mind that it **must** be formatted correctly. If you are using IntelliJ, there is a `codeStyle.xml` file that tells IntelliJ how to format your code. Check this link for information on how to use the file: https://www.jetbrains.com/help/idea/configuring-code-style.html#import-export-schemes +- If you are not using IntelliJ, that is fine. We use the Plexus Code Style (which is almost the same as Allman) so please format your code accordingly. +6. Push your changes to your new branch and make a PR based off of that branch. + +## Requirements for a PR +- The issue must be marked as approved +- It must only address each specific issue. Don't make one PR for multiple issues. +- Your PR must compile and work. If it does not compile or work, your PR will most likely be rejected. + +## Code requirements +- Most importantly, your code must be efficient. Your pull request may be rejected if your code is deemed inefficient or sloppy. +- Do not repeat yourself. Create functions as needed if you're using large blocks of code over and over again. +- Do not use an excessive amount of commits when making your PR. It makes the master branch look messy. +- Your code must be consistent with Plex's codebase. If a function already exists, use it. \ No newline at end of file diff --git a/README.md b/README.md index 3f1635b..db367d2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Module-LibsDisguises +# Module-LibsDisguises [![Build Status](https://ci.plex.us.org/job/Module-LibsDisguises/badge/icon)](https://ci.plex.us.org/job/Module-LibsDisguises/) LibsDisguises module for Plex diff --git a/build.gradle b/build.gradle deleted file mode 100644 index ddde6df..0000000 --- a/build.gradle +++ /dev/null @@ -1,50 +0,0 @@ -plugins { - id "java" - id "maven-publish" -} - -repositories { - maven { - url = uri("https://papermc.io/repo/repository/maven-public/") - } - - maven { - url = uri("https://nexus.telesphoreo.me/repository/plex") - } - - mavenCentral() -} - -dependencies { - compileOnly "org.projectlombok:lombok:1.18.22" - annotationProcessor "org.projectlombok:lombok:1.18.22" - compileOnly "io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT" - compileOnly "dev.plex:Plex:0.8" - implementation "LibsDisguises:LibsDisguises:10.0.27" -} - -group = "dev.plex" -version = "1.0" -description = "LibsDisguises" - -java { - toolchain.languageVersion.set(JavaLanguageVersion.of(17)) -} - -publishing { - publications { - maven(MavenPublication) { - from(components.java) - } - } -} - -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" -} - -tasks { - javadoc { - options.memberLevel = JavadocMemberLevel.PRIVATE - } -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..198c26e --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,71 @@ +plugins { + java + `maven-publish` +} + +repositories { + maven { + url = uri("https://repo.papermc.io/repository/maven-public/") + } + + maven { + url = uri("https://nexus.telesphoreo.me/repository/plex/") + } + + maven { + url = uri("https://repo.md-5.net/content/groups/public/") + } + + maven { + url = uri("https://repo.dmulloy2.net/repository/public/") + } + + maven { + url = uri("https://repo.codemc.io/repository/maven-releases/") + } + + mavenCentral() +} + +dependencies { + compileOnly("org.projectlombok:lombok:1.18.38") + annotationProcessor("org.projectlombok:lombok:1.18.38") + compileOnly("io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT") + compileOnly("dev.plex:server:1.5") + implementation("me.libraryaddict.disguises:libsdisguises:11.0.6") + compileOnly("com.github.retrooper:packetevents-spigot:2.8.0") + +} + +group = "dev.plex" +version = "1.5" +description = "Module-LibsDisguises" + +java { + toolchain.languageVersion.set(JavaLanguageVersion.of(21)) +} + +publishing { + publications { + create("maven") { + from(components["java"]) + } + } +} + +tasks.getByName("jar") { + archiveBaseName.set("Module-LibsDisguises") + archiveVersion.set("") +} + +tasks { + compileJava { + options.encoding = Charsets.UTF_8.name() + } + javadoc { + options.encoding = Charsets.UTF_8.name() + } + processResources { + filteringCharset = Charsets.UTF_8.name() + } +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927..a4b76b9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 00e33ed..d4081da 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..f5feea6 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +82,12 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +134,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +217,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f..9b42019 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index e07581b..0000000 --- a/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'Module-LibsDisguises' - diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..afee02a --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,2 @@ +rootProject.name = "Module-LibsDisguises" + diff --git a/src/main/java/dev/plex/LibsDisguises.java b/src/main/java/dev/plex/LibsDisguises.java index 7aa2670..2bcc0f0 100644 --- a/src/main/java/dev/plex/LibsDisguises.java +++ b/src/main/java/dev/plex/LibsDisguises.java @@ -4,14 +4,22 @@ import dev.plex.command.DisguiseToggleCMD; import dev.plex.command.UndisguiseAllCMD; import dev.plex.listener.DisguiseListener; import dev.plex.module.PlexModule; +import dev.plex.util.PlexLog; +import org.bukkit.Bukkit; public class LibsDisguises extends PlexModule { public static boolean enabled = true; DisguiseListener disguiseListener; + @Override public void enable() { + if (!Bukkit.getPluginManager().isPluginEnabled("LibsDisguises")) + { + PlexLog.error("The Plex-LibsDisguises module requires the LibsDisguises plugin to work."); + return; + } registerCommand(new DisguiseToggleCMD()); registerCommand(new UndisguiseAllCMD()); registerListener(new DisguiseListener()); diff --git a/src/main/java/dev/plex/command/DisguiseToggleCMD.java b/src/main/java/dev/plex/command/DisguiseToggleCMD.java index af10e75..2685e26 100644 --- a/src/main/java/dev/plex/command/DisguiseToggleCMD.java +++ b/src/main/java/dev/plex/command/DisguiseToggleCMD.java @@ -4,7 +4,8 @@ import dev.plex.LibsDisguises; import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandPermissions; import dev.plex.listener.UndisguiseEvent; -import dev.plex.rank.enums.Rank; +import java.util.Collections; +import java.util.List; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.Bukkit; @@ -14,7 +15,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @CommandParameters(name = "disguisetoggle", description = "Toggle LibsDisguises", aliases = "dtoggle") -@CommandPermissions(level = Rank.ADMIN, permission = "plex.libsdisguises.disguisetoggle") +@CommandPermissions(permission = "plex.libsdisguises.disguisetoggle") public class DisguiseToggleCMD extends PlexCommand { @Override @@ -28,4 +29,10 @@ public class DisguiseToggleCMD extends PlexCommand Bukkit.broadcast(Component.text(commandSender.getName() + " - " + (LibsDisguises.enabled ? "Enabling LibsDisguises" : "Disabling LibsDisguises")).color((LibsDisguises.enabled ? NamedTextColor.AQUA : NamedTextColor.RED))); return null; } + + @Override + public @NotNull List smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException + { + return Collections.emptyList(); + } } diff --git a/src/main/java/dev/plex/command/UndisguiseAllCMD.java b/src/main/java/dev/plex/command/UndisguiseAllCMD.java index 4ca1fbf..6872d2a 100644 --- a/src/main/java/dev/plex/command/UndisguiseAllCMD.java +++ b/src/main/java/dev/plex/command/UndisguiseAllCMD.java @@ -3,7 +3,8 @@ package dev.plex.command; import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandPermissions; import dev.plex.listener.UndisguiseEvent; -import dev.plex.rank.enums.Rank; +import java.util.Collections; +import java.util.List; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.Bukkit; @@ -13,7 +14,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @CommandParameters(name = "undisguiseall", usage = "/ [-a]", description = "Undisguise all players", aliases = "undisall,uall") -@CommandPermissions(level = Rank.ADMIN, permission = "plex.libsdisguises.undisguiseall") +@CommandPermissions(permission = "plex.libsdisguises.undisguiseall") public class UndisguiseAllCMD extends PlexCommand { @Override @@ -33,4 +34,18 @@ public class UndisguiseAllCMD extends PlexCommand } return usage(); } + + @Override + public @NotNull List smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException + { + if (silentCheckPermission(sender, this.getPermission())) + { + if (args.length == 1) + { + return Collections.singletonList("-a"); + } + return Collections.emptyList(); + } + return Collections.emptyList(); + } } diff --git a/src/main/java/dev/plex/listener/DisguiseListener.java b/src/main/java/dev/plex/listener/DisguiseListener.java index 42a6abe..e3fa9b0 100644 --- a/src/main/java/dev/plex/listener/DisguiseListener.java +++ b/src/main/java/dev/plex/listener/DisguiseListener.java @@ -7,8 +7,18 @@ import dev.plex.util.PlexLog; import java.util.ArrayList; import java.util.List; import me.libraryaddict.disguise.DisguiseAPI; +import me.libraryaddict.disguise.disguisetypes.DisguiseType; +import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; +import me.libraryaddict.disguise.disguisetypes.watchers.AreaEffectCloudWatcher; +import me.libraryaddict.disguise.disguisetypes.watchers.EnderDragonWatcher; +import me.libraryaddict.disguise.disguisetypes.watchers.PhantomWatcher; +import me.libraryaddict.disguise.disguisetypes.watchers.SlimeWatcher; +import me.libraryaddict.disguise.disguisetypes.watchers.WitherWatcher; +import me.libraryaddict.disguise.events.DisguiseEvent; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.PluginCommandYamlParser; @@ -20,6 +30,91 @@ import org.bukkit.plugin.Plugin; public class DisguiseListener extends PlexListener { + private static float safeYMod(float f) + { + return Math.max(-256f, Math.min(256f, f)); + } + + @EventHandler + public void onDisguiseEvent(DisguiseEvent event) + { + event.setCancelled(true); + PlexPlayer plexPlayer = null; + if (event.getCommandSender() instanceof Player player) + { + plexPlayer = DataUtils.getPlayer(player.getUniqueId()); + } + if (event.getDisguise().getType() == DisguiseType.FISHING_HOOK) + { + event.getCommandSender().sendMessage(Component.text("You cannot use Fishing Hook disguises").color(NamedTextColor.RED)); + return; + } + String name = event.getDisguise().getWatcher().getCustomName(); + if (name != null) + { + int noColorLen = PlainTextComponentSerializer.plainText().serialize(LegacyComponentSerializer.legacySection().deserialize(name)).length(); + // each color code counts as one char rather than two, for flexibility + if (((name.length() - noColorLen) / 2) + noColorLen > 32) + { + event.getCommandSender().sendMessage(Component.text("Your disguise name is too long").color(NamedTextColor.RED)); + return; + } + } + if (event.getDisguise().getWatcher() instanceof EnderDragonWatcher watcher && watcher.getPhase() == 7) + { + watcher.setPhase(6); + } + if (event.getDisguise().getWatcher() instanceof WitherWatcher watcher && watcher.getInvulnerability() > 2048) + { + watcher.setInvulnerability(2048); + } + if (event.getDisguise().isPlayerDisguise() && plexPlayer != null && !plexPlayer.getPlayer().hasPermission("plex.libsdisguises.player")) + { + PlayerDisguise playerDisguise = (PlayerDisguise)event.getDisguise(); + String targetName = playerDisguise.getName(); + String origName = event.getDisguised().getName(); + playerDisguise.setName(origName); + playerDisguise.setNameVisible(true); + playerDisguise.getWatcher().setNameYModifier(0); + playerDisguise.setSkin(targetName); + playerDisguise.setDisplayedInTab(false); + playerDisguise.setTablistName(origName); + } + if (event.getDisguise().isHidePlayer()) + { + event.getDisguise().setHidePlayer(false); + } + if (event.getDisguise().getWatcher() instanceof AreaEffectCloudWatcher watcher) + { + if (watcher.getRadius() > 5) + { + watcher.setRadius(5); + } + else if (watcher.getRadius() < 0) + { + watcher.setRadius(0); + } + } + event.getDisguise().getWatcher().setNameYModifier(safeYMod(event.getDisguise().getWatcher().getNameYModifier())); + event.getDisguise().getWatcher().setYModifier(safeYMod(event.getDisguise().getWatcher().getYModifier())); + if (event.getDisguise().getWatcher() instanceof SlimeWatcher watcher && watcher.getSize() > 10) + { + watcher.setSize(10); + } + if (event.getDisguise().getWatcher() instanceof PhantomWatcher watcher) + { + if (watcher.getSize() > 20) + { + watcher.setSize(20); + } + else if (watcher.getSize() < -36) + { + watcher.setSize(-36); + } + } + event.setCancelled(false); + } + final List commands = new ArrayList<>(); @EventHandler @@ -34,19 +129,9 @@ public class DisguiseListener extends PlexListener else { PlexPlayer plexPlayer = DataUtils.getPlayer(player.getUniqueId()); - if (plugin.getSystem().equalsIgnoreCase("ranks")) + if (!player.hasPermission("plex.libsdisguises.bypass")) { - if (!plugin.getRankManager().isAdmin(plexPlayer)) - { - DisguiseAPI.undisguiseToAll(player); - } - } - else if (plugin.getSystem().equalsIgnoreCase("permissions")) - { - if (!player.hasPermission("plex.libsdisguises.bypass")) - { - DisguiseAPI.undisguiseToAll(player); - } + DisguiseAPI.undisguiseToAll(player); } } } diff --git a/src/main/resources/module.yml b/src/main/resources/module.yml index 1b2d7c5..ce33067 100644 --- a/src/main/resources/module.yml +++ b/src/main/resources/module.yml @@ -1,4 +1,4 @@ -name: LibsDisguises +name: Module-LibsDisguises main: dev.plex.LibsDisguises description: Control LibsDisguises with Plex -version: 1.0 \ No newline at end of file +version: 1.5 \ No newline at end of file