mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-04 13:54:35 +01:00
Stop distributing unwanted classes in API
This commit is contained in:
parent
f26dec5adc
commit
297a04dac5
211
plugin/pom.xml
211
plugin/pom.xml
@ -12,7 +12,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>LibsDisguises</artifactId>
|
||||
<version>10.0.44-SNAPSHOT</version>
|
||||
<version>${libsdisguises.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
@ -20,100 +20,22 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<defaultGoal>exec:java clean install</defaultGoal>
|
||||
<finalName>LibsDisguises</finalName>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>plugin.yml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.basedir}</directory>
|
||||
<includes>
|
||||
<include>README.md</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<outputDirectory>../target</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<id>my-execution</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<includePluginDependencies>true</includePluginDependencies>
|
||||
<mainClass>me.libraryaddict.disguise.utilities.watchers.CompileMethods</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>LibsDisguises:*</artifact>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>META-INF/**/v*/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>LibsDisguises:*</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>minimessage</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>shared</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
@ -145,108 +67,7 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!--NMS Packages-->
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>minimessage</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>shared</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_17_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_18_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_18_R2</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_19_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_19_R2</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_19_R3</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R2</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R3</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R4</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_21_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- Libraries -->
|
||||
<dependency>
|
||||
<groupId>it.unimi.dsi</groupId>
|
||||
|
@ -42,7 +42,6 @@ import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||
import me.libraryaddict.disguise.utilities.sounds.SoundManager;
|
||||
import me.libraryaddict.disguise.utilities.updates.PacketEventsUpdater;
|
||||
import me.libraryaddict.disguise.utilities.updates.UpdateChecker;
|
||||
import me.libraryaddict.disguise.utilities.watchers.CompileMethods;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
@ -350,7 +349,7 @@ public class LibsDisguises extends JavaPlugin {
|
||||
buildNumber = StringUtils.stripToNull(pluginYml.getString("build-number"));
|
||||
buildDate = StringUtils.stripToNull(pluginYml.getString("build-date"));
|
||||
|
||||
int fileCount = ReflectionManager.getJarFileCount(getFile(), CompileMethods.ignoredDirectories());
|
||||
int fileCount = ReflectionManager.getJarFileCount(getFile(), LibsPremium.ignoredDirectories());
|
||||
int expected = pluginYml.getInt("file-count", fileCount);
|
||||
|
||||
if (fileCount != expected) {
|
||||
|
@ -359,8 +359,16 @@ public enum DisguiseType {
|
||||
|
||||
NmsRemovedIn removed = DisguiseType.class.getField(name()).getAnnotation(NmsRemovedIn.class);
|
||||
|
||||
if (LibsDisguises.getInstance() != null && removed != null && removed.value().isSupported()) {
|
||||
return;
|
||||
if (removed != null) {
|
||||
NmsVersion version = removed.value();
|
||||
|
||||
// If not supported in this MC version
|
||||
if (LibsDisguises.getInstance() != null && version.isSupported()) {
|
||||
return;
|
||||
// Otherwise, if it is 'removed' then we should be running latest MC, so it'll be removed in this version.
|
||||
} else if (LibsDisguises.getInstance() == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// We have different resolution strategies here
|
||||
@ -378,7 +386,8 @@ public enum DisguiseType {
|
||||
// Finally, try via enum name
|
||||
if (getEntityType() == null) {
|
||||
try {
|
||||
setEntityType(ReflectionManager.fromEnum(EntityType.class, name()));
|
||||
setEntityType(
|
||||
EntityType.class.isEnum() ? EntityType.valueOf(name()) : ReflectionManager.fromEnum(EntityType.class, name()));
|
||||
} catch (Throwable ex) {
|
||||
if (LibsDisguises.getInstance() == null) {
|
||||
return;
|
||||
|
@ -97,7 +97,8 @@ import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||
import me.libraryaddict.disguise.utilities.reflection.WatcherValue;
|
||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||
import me.libraryaddict.disguise.utilities.updates.PacketEventsUpdater;
|
||||
import me.libraryaddict.disguise.utilities.watchers.CompileMethods;
|
||||
import me.libraryaddict.disguise.utilities.watchers.CompileMethodsIntfer;
|
||||
import me.libraryaddict.disguise.utilities.watchers.DisguiseMethods;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import net.md_5.bungee.chat.ComponentSerializer;
|
||||
@ -1719,11 +1720,10 @@ public class DisguiseUtilities {
|
||||
}
|
||||
|
||||
try {
|
||||
Method m = CompileMethods.class.getMethod("main", String[].class);
|
||||
Method m = DisguiseMethods.class.getMethod("parseType", String.class);
|
||||
|
||||
if ((!m.isAnnotationPresent(CompileMethods.CompileMethodsIntfer.class) ||
|
||||
m.getAnnotation(CompileMethods.CompileMethodsIntfer.class).user().matches("\\d+")) &&
|
||||
!DisguiseConfig.doOutput(true, false).isEmpty()) {
|
||||
if ((!m.isAnnotationPresent(CompileMethodsIntfer.class) ||
|
||||
m.getAnnotation(CompileMethodsIntfer.class).user().matches("\\d+")) && !DisguiseConfig.doOutput(true, false).isEmpty()) {
|
||||
DisguiseConfig.setViewDisguises(false);
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
|
@ -345,4 +345,9 @@ public class LibsPremium {
|
||||
LibsDisguises.getInstance().getLogger().info("Premium enabled, thank you for supporting Lib's Disguises!" + (!prem ? "!" : ""));
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] ignoredDirectories() {
|
||||
return new String[]{"META-INF/", "libsdisg/", "me/libraryaddict/disguise/utilities/reflection/v",
|
||||
"me/libraryaddict/disguise/utilities/reflection/ReflectionManagerAbstract.class", "fernflower_", "net/kyori/adventure/"};
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public class ParamInfoEnum<T> extends ParamInfo<T> {
|
||||
public ParamInfoEnum(Class<T> paramClass, String name, String description) {
|
||||
super(paramClass, name, name, description, paramClass.isEnum() ? paramClass.getEnumConstants() :
|
||||
(T[]) (Bukkit.getServer() == null ? Array.newInstance(paramClass, 0) :
|
||||
Bukkit.getRegistry((Class<Keyed>) paramClass).stream().toArray()));
|
||||
Bukkit.getRegistry((Class<Keyed>) paramClass).stream().toArray((i) -> (T[]) Array.newInstance(paramClass, i))));
|
||||
}
|
||||
|
||||
public ParamInfoEnum(Class paramClass, String name, String valueType, String description, T[] possibleValues) {
|
||||
|
@ -113,6 +113,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.AccessibleObject;
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@ -2539,7 +2540,7 @@ public class ReflectionManager {
|
||||
return clss.getEnumConstants();
|
||||
}
|
||||
|
||||
return (T[]) Bukkit.getRegistry((Class<Keyed>) clss).stream().toArray();
|
||||
return (T[]) Bukkit.getRegistry((Class<Keyed>) clss).stream().toArray((i) -> (T[]) Array.newInstance(clss, i));
|
||||
}
|
||||
|
||||
public static <T> T randomEnum(Class<T> clss) {
|
||||
|
@ -0,0 +1,9 @@
|
||||
package me.libraryaddict.disguise.utilities.watchers;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface CompileMethodsIntfer {
|
||||
String user() default "%%__USER__%%";
|
||||
}
|
3
pom.xml
3
pom.xml
@ -13,9 +13,12 @@
|
||||
<module>nms</module>
|
||||
<module>minimessage</module>
|
||||
<module>plugin</module>
|
||||
<module>shaded</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<libsdisguises.version>10.0.44-SNAPSHOT</libsdisguises.version>
|
||||
|
||||
<build.number>unknown</build.number>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
<maven.build.timestamp.format>dd/MM/yyyy HH:mm</maven.build.timestamp.format>
|
||||
|
272
shaded/pom.xml
Normal file
272
shaded/pom.xml
Normal file
@ -0,0 +1,272 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>shaded</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<defaultGoal>exec:java clean install</defaultGoal>
|
||||
<finalName>LibsDisguises</finalName>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>plugin.yml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.basedir}</directory>
|
||||
<includes>
|
||||
<include>README.md</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<outputDirectory>../target</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<id>my-execution</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<includePluginDependencies>true</includePluginDependencies>
|
||||
<mainClass>me.libraryaddict.disguise.utilities.watchers.CompileMethods</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>LibsDisguises:*</artifact>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>META-INF/**/v*/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>LibsDisguises:*</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>minimessage</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>shared</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>LibsDisguises</artifactId>
|
||||
<version>${libsdisguises.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_17_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_18_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_18_R2</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_19_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_19_R2</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_19_R3</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R2</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R3</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_20_R4</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>LibsDisguises</groupId>
|
||||
<artifactId>v1_21_R1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<classifier>remapped-spigot</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Libraries -->
|
||||
<dependency>
|
||||
<groupId>it.unimi.dsi</groupId>
|
||||
<artifactId>fastutil</artifactId>
|
||||
<version>8.5.12</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mojang</groupId>
|
||||
<artifactId>authlib</artifactId>
|
||||
<version>5.0.51</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mojang</groupId>
|
||||
<artifactId>datafixerupper</artifactId>
|
||||
<version>5.0.28</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mojang</groupId>
|
||||
<artifactId>brigadier</artifactId>
|
||||
<version>1.0.18</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-buffer</artifactId>
|
||||
<version>4.1.90.Final</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec</artifactId>
|
||||
<version>4.1.90.Final</version>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
<optional>true</optional>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -21,8 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@ -35,31 +33,22 @@ import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
public class CompileMethods {
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface CompileMethodsIntfer {
|
||||
String user() default "%%__USER__%%";
|
||||
}
|
||||
|
||||
@CompileMethodsIntfer(user = "%%__USER__%%")
|
||||
public static void main(String[] args) {
|
||||
doMethods();
|
||||
doSounds();
|
||||
doFileCount();
|
||||
}
|
||||
|
||||
public static String[] ignoredDirectories() {
|
||||
return new String[]{"META-INF/", "libsdisg/", "me/libraryaddict/disguise/utilities/reflection/v",
|
||||
"me/libraryaddict/disguise/utilities/reflection/ReflectionManagerAbstract.class", "fernflower_", "net/kyori/adventure/"};
|
||||
}
|
||||
|
||||
private static void doFileCount() {
|
||||
File classesFolder = new File("plugin/target/classes");
|
||||
int totalCount = 0;
|
||||
|
||||
int count = getFileCount(classesFolder);
|
||||
for (String folder : new String[]{"plugin/target/classes", "shaded/target/classes"}) {
|
||||
totalCount += getFileCount(new File(folder));
|
||||
}
|
||||
|
||||
try {
|
||||
Files.write(new File(classesFolder, "plugin.yml").toPath(), ("\nfile-count: " + count).getBytes(StandardCharsets.UTF_8),
|
||||
StandardOpenOption.APPEND);
|
||||
Files.write(new File(new File("shaded/target/classes"), "plugin.yml").toPath(),
|
||||
("\nfile-count: " + totalCount).getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -88,7 +77,7 @@ public class CompileMethods {
|
||||
list.add(sound.toString());
|
||||
}
|
||||
|
||||
File soundsFile = new File("plugin/target/classes/SOUND_MAPPINGS.txt");
|
||||
File soundsFile = new File("shaded/target/classes/SOUND_MAPPINGS.txt");
|
||||
|
||||
try (FileOutputStream fos = new FileOutputStream(soundsFile)) {
|
||||
fos.write(String.join("\n", list).getBytes(StandardCharsets.UTF_8));
|
||||
@ -144,6 +133,10 @@ public class CompileMethods {
|
||||
ArrayList<Class> sorted = new ArrayList<>();
|
||||
|
||||
for (Class c : classes) {
|
||||
if (c.getName().contains("$")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
addClass(sorted, c);
|
||||
}
|
||||
|
||||
@ -267,7 +260,7 @@ public class CompileMethods {
|
||||
|
||||
String gson = new Gson().toJson(methods);
|
||||
|
||||
File methodsFile = new File("plugin/target/classes/METHOD_MAPPINGS.txt");
|
||||
File methodsFile = new File("shaded/target/classes/METHOD_MAPPINGS.txt");
|
||||
|
||||
try (FileOutputStream fos = new FileOutputStream(methodsFile)) {
|
||||
fos.write(gson.getBytes(StandardCharsets.UTF_8));
|
@ -1,206 +1,206 @@
|
||||
name: LibsDisguises
|
||||
main: me.libraryaddict.disguise.LibsDisguises
|
||||
description: A disguise plugin with various disguises.
|
||||
version: ${project.version}
|
||||
build-date: ${timestamp}
|
||||
build-number: ${build.number}
|
||||
author: libraryaddict
|
||||
authors: [ Byteflux, Navid K. ]
|
||||
softdepend: [ packetevents ]
|
||||
api-version: '1.13'
|
||||
commands:
|
||||
libsdisguises:
|
||||
aliases: [ libsdisg, ld ]
|
||||
description: Main command for libsdisguises.
|
||||
disguise:
|
||||
aliases: [ d, dis, disg ]
|
||||
permission: libsdisguises.seecmd.disguise
|
||||
description: Disguise yourself as an entity.
|
||||
disguiseentity:
|
||||
aliases: [ dentity, disentity, disgentity ]
|
||||
permission: libsdisguises.seecmd.disguiseentity
|
||||
description: Disguise an entity as another entity.
|
||||
disguisehelp:
|
||||
aliases: [ dhelp, dishelp, disghelp ]
|
||||
permission: libsdisguises.seecmd.disguisehelp
|
||||
description: Help command for LibsDisguises.
|
||||
disguiseplayer:
|
||||
aliases: [ dplayer, displayer, disgplayer, disguiseuuid, disguuid, duuid ]
|
||||
permission: libsdisguises.seecmd.disguiseplayer
|
||||
description: Disguise another player as an entity.
|
||||
disguiseradius:
|
||||
aliases: [ disradius, dradius, disgradius ]
|
||||
permission: libsdisguises.seecmd.disguiseradius
|
||||
description: Disguise all entities within a radius as an entity.
|
||||
undisguise:
|
||||
aliases: [ und, undis, undisg ]
|
||||
permission: libsdisguises.seecmd.undisguise
|
||||
description: Undisguise yourself.
|
||||
undisguiseentity:
|
||||
aliases: [ undisentity, undentity, undisgentity ]
|
||||
permission: libsdisguises.seecmd.undisguiseentity
|
||||
description: Undisguise an entity.
|
||||
undisguiseplayer:
|
||||
aliases: [ undisplayer, undplayer, undisgplayer, undisguiseuuid, unduuid, undisguuid ]
|
||||
permission: libsdisguises.seecmd.undisguiseplayer
|
||||
description: Undisguise a player.
|
||||
undisguiseradius:
|
||||
aliases: [ undisradius, undradius, undisgradius ]
|
||||
permission: libsdisguises.seecmd.undisguiseradius
|
||||
description: Undisguise all entities within a radius.
|
||||
disguiseclone:
|
||||
aliases: [ disguisec, disc, disclone, dclone, clonedisguise, clonedis, cdisguise, cdis, clonedisg, disgclone ]
|
||||
permission: libsdisguises.seecmd.disguiseclone
|
||||
description: Copy a disguise (or entity) and use it later.
|
||||
disguiseviewself:
|
||||
aliases: [ dviewself, dvs, disguisevs, disvs, vsd, viewselfdisguise, viewselfd, selfdisguise, selfdisg, selfd, toggleselfdisguise, seeselfdisguise ]
|
||||
permission: libsdisguises.seecmd.viewself
|
||||
description: Toggle seeing your own disguise on or off.
|
||||
disguiseviewbar:
|
||||
aliases: [ dviewbar, dvb, disguisevb, disvb, viewdisguisebar, viewbardisguise, bardisguise, bardisg, bard,
|
||||
notifybar, viewnotifybar, disguisenotifybar, disgnotifybar, dnotifybar ]
|
||||
permission: libsdisguises.seecmd.viewself
|
||||
description: Toggle seeing your own disguise on or off.
|
||||
disguisemodify:
|
||||
aliases: [ dmodify, dmod, disgmodify, modifydisguise, moddisguise, mdisguise ]
|
||||
permission: libsdisguises.seecmd.disguisemodify
|
||||
description: Modify your own disguise
|
||||
disguisemodifyplayer:
|
||||
aliases: [ dmodifyplayer, dmodplayer, disgmodifyplayer, dismodplayer, disgmodplayer, modifydisguiseplayer,
|
||||
moddisguiseplayer, mdisguiseplayer, mdisgplayer, dmodifyuuid, dmoduuid, disgmodifyuuid, dismoduuid, disgmoduuid, modifydisguiseuuid,
|
||||
moddisguiseuuid, mdisguiseuuid, mdisguuid ]
|
||||
permission: libsdisguises.seecmd.disguisemodifyplayer
|
||||
description: Modify the disguise of a player
|
||||
disguisemodifyradius:
|
||||
aliases: [ dmodifyradius, dmodradius, disgmodradius, dismodradius, modifydisguiseradius, modifydisgradius,
|
||||
moddisguiseradius, mdisguiseradius, moddisgradius ]
|
||||
permission: libsdisguises.seecmd.disguisemodifyradius
|
||||
description: Modify disguises in a radius
|
||||
disguisemodifyentity:
|
||||
aliases: [ dmodifyentity, dmodentity, disgmodentity, dismodentity, modifydisguiseentity, modifydisgentity,
|
||||
modifydentity, moddisguiseentity, moddisgentity, mdisguiseentity, mdisgentity ]
|
||||
permission: libsdisguises.seecmd.disguisemodifyentity
|
||||
description: Modify a disguise by right clicking them
|
||||
copydisguise:
|
||||
aliases: [ disguisecopy, disgcopy, dcopy, copydisg, copyd, parsedisguise, disguiseparse ]
|
||||
permission: libsdisguises.seecmd.copydisguise
|
||||
description: Output a disguise to a usable string
|
||||
grabskin:
|
||||
aliases: [ uploadskin, skin, saveskin, cacheskin, downloadskin, skincache ]
|
||||
permission: libsdisguises.seecmd.grabskin
|
||||
description: Grab a skin from file, url or player name/uuid
|
||||
savedisguise:
|
||||
aliases: [ customdisguise, savedisg, customdisg, createdisguise, createdisg ]
|
||||
permission: libsdisguises.seecmd.savedisguise
|
||||
description: Save a custom disguise to disguises.yml
|
||||
grabhead:
|
||||
aliases: [ grabskull, playerhead, savehead, gethead ]
|
||||
permission: libsdisguises.seecmd.grabhead
|
||||
description: Grab the head item of a skin, url or player
|
||||
|
||||
permissions:
|
||||
libsdisguises.reload:
|
||||
description: Allows the user to reload LibsDisguises.
|
||||
libsdisguises.update:
|
||||
description: Allows the user to update Libs Disguises
|
||||
libsdisguises.count:
|
||||
description: Allows the user to see how many disguises are active
|
||||
libsdisguises.mods:
|
||||
description: Allows the user to see mods in use.
|
||||
libsdisguises.seethrough:
|
||||
description: Allows player to see through disguises.
|
||||
default: false
|
||||
libsdisguises.hidename:
|
||||
description: Allows player to ignore name being forced above disguise
|
||||
default: false
|
||||
libsdisguises.pve:
|
||||
description: Allows player to ignore pve restrictions.
|
||||
default: false
|
||||
libsdisguises.pvp:
|
||||
description: Allows player to ignore pvp restrictions.
|
||||
default: false
|
||||
libsdisguises.permtest:
|
||||
description: Allows player to test permissions
|
||||
libsdisguises.metainfo:
|
||||
description: Allows player to get meta info
|
||||
libsdisguises.json:
|
||||
description: Allows player to parse held item to json
|
||||
libsdisguises.scoreboardtest:
|
||||
description: Test if the scoreboard is valid, this is a simple test.
|
||||
libsdisguises.config:
|
||||
description: Allows player to check Lib's Disguises config for values
|
||||
libsdisguises.debug:
|
||||
description: Allows a server admin to test a player disguise for scoreboard issues
|
||||
libsdisguises.noactionbar:
|
||||
description: Hides the action bar even if enabled in config
|
||||
default: false
|
||||
libsdisguises.multiname:
|
||||
description: Allows the command user to set names on different heights
|
||||
libsdisguises.grabhead:
|
||||
description: Allows the command user to use /grabhead
|
||||
libsdisguises.ratelimitbypass:
|
||||
description: Allows a living player to bypass the 500ms rate limit on disguise commands, used to prevent crashes
|
||||
libsdisguises.seecmd:
|
||||
description: See all commands in tab-completion
|
||||
default: true
|
||||
children:
|
||||
libsdisguises.seecmd.disguise: true
|
||||
libsdisguises.seecmd.disguiseentity: true
|
||||
libsdisguises.seecmd.disguisehelp: true
|
||||
libsdisguises.seecmd.disguiseplayer: true
|
||||
libsdisguises.seecmd.disguiseradius: true
|
||||
libsdisguises.seecmd.undisguise: true
|
||||
libsdisguises.seecmd.undisguiseentity: true
|
||||
libsdisguises.seecmd.undisguiseplayer: true
|
||||
libsdisguises.seecmd.undisguiseradius: true
|
||||
libsdisguises.seecmd.disguiseclone: true
|
||||
libsdisguises.seecmd.disguiseviewself: true
|
||||
libsdisguises.seecmd.disguiseviewbar: true
|
||||
libsdisguises.seecmd.disguisemodify: true
|
||||
libsdisguises.seecmd.disguisemodifyplayer: true
|
||||
libsdisguises.seecmd.disguisemodifyradius: true
|
||||
libsdisguises.seecmd.disguisemodifyentity: true
|
||||
libsdisguises.seecmd.copydisguise: true
|
||||
libsdisguises.seecmd.grabskin: true
|
||||
libsdisguises.seecmd.savedisguise: true
|
||||
libsdisguises.seecmd.grabhead: true
|
||||
libsdisguises.seecmd.disguiseviewself:
|
||||
description: See the /disguiseviewself command in tab-completion
|
||||
libsdisguises.seecmd.disguiseviewbar:
|
||||
description: See the /disguiseviewbar command in tab-completion
|
||||
libsdisguises.seecmd.disguise:
|
||||
description: See the /disguise command in tab-completion
|
||||
libsdisguises.seecmd.disguiseentity:
|
||||
description: See the /disguiseentity command in tab-completion
|
||||
libsdisguises.seecmd.disguisehelp:
|
||||
description: See the /disguisehelp command in tab-completion
|
||||
libsdisguises.seecmd.disguiseplayer:
|
||||
description: See the /disguiseplayer command in tab-completion
|
||||
libsdisguises.seecmd.disguiseradius:
|
||||
description: See the /disguiseradius command in tab-completion
|
||||
libsdisguises.seecmd.undisguise:
|
||||
description: See the /undisguise command in tab-completion
|
||||
libsdisguises.seecmd.undisguiseentity:
|
||||
description: See the /undisguiseentity command in tab-completion
|
||||
libsdisguises.seecmd.undisguiseplayer:
|
||||
description: See the /undisguiseplayer command in tab-completion
|
||||
libsdisguises.seecmd.undisguiseradius:
|
||||
description: See the /undisguiseradius command in tab-completion
|
||||
libsdisguises.seecmd.disguiseclone:
|
||||
description: See the /disguiseclone command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodify:
|
||||
description: See the /disguisemodify command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodifyplayer:
|
||||
description: See the /disguisemodifyplayer command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodifyradius:
|
||||
description: See the /disguisemodifyradius command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodifyentity:
|
||||
description: See the /disguisemodifyentity command in tab-completion
|
||||
libsdisguises.seecmd.copydisguise:
|
||||
description: See the /copydisguise command in tab-completion
|
||||
libsdisguises.seecmd.grabskin:
|
||||
description: See the /grabskin command in tab-completion
|
||||
libsdisguises.seecmd.savedisguise:
|
||||
description: See the /savedisguise command in tab-completion
|
||||
libsdisguises.seecmd.grabhead:
|
||||
description: See the /grabhead command in tab-completion
|
||||
name: LibsDisguises
|
||||
main: me.libraryaddict.disguise.LibsDisguises
|
||||
description: A disguise plugin with various disguises.
|
||||
version: ${project.version}
|
||||
build-date: ${timestamp}
|
||||
build-number: ${build.number}
|
||||
author: libraryaddict
|
||||
authors: [ Byteflux, Navid K. ]
|
||||
softdepend: [ packetevents ]
|
||||
api-version: '1.13'
|
||||
commands:
|
||||
libsdisguises:
|
||||
aliases: [ libsdisg, ld ]
|
||||
description: Main command for libsdisguises.
|
||||
disguise:
|
||||
aliases: [ d, dis, disg ]
|
||||
permission: libsdisguises.seecmd.disguise
|
||||
description: Disguise yourself as an entity.
|
||||
disguiseentity:
|
||||
aliases: [ dentity, disentity, disgentity ]
|
||||
permission: libsdisguises.seecmd.disguiseentity
|
||||
description: Disguise an entity as another entity.
|
||||
disguisehelp:
|
||||
aliases: [ dhelp, dishelp, disghelp ]
|
||||
permission: libsdisguises.seecmd.disguisehelp
|
||||
description: Help command for LibsDisguises.
|
||||
disguiseplayer:
|
||||
aliases: [ dplayer, displayer, disgplayer, disguiseuuid, disguuid, duuid ]
|
||||
permission: libsdisguises.seecmd.disguiseplayer
|
||||
description: Disguise another player as an entity.
|
||||
disguiseradius:
|
||||
aliases: [ disradius, dradius, disgradius ]
|
||||
permission: libsdisguises.seecmd.disguiseradius
|
||||
description: Disguise all entities within a radius as an entity.
|
||||
undisguise:
|
||||
aliases: [ und, undis, undisg ]
|
||||
permission: libsdisguises.seecmd.undisguise
|
||||
description: Undisguise yourself.
|
||||
undisguiseentity:
|
||||
aliases: [ undisentity, undentity, undisgentity ]
|
||||
permission: libsdisguises.seecmd.undisguiseentity
|
||||
description: Undisguise an entity.
|
||||
undisguiseplayer:
|
||||
aliases: [ undisplayer, undplayer, undisgplayer, undisguiseuuid, unduuid, undisguuid ]
|
||||
permission: libsdisguises.seecmd.undisguiseplayer
|
||||
description: Undisguise a player.
|
||||
undisguiseradius:
|
||||
aliases: [ undisradius, undradius, undisgradius ]
|
||||
permission: libsdisguises.seecmd.undisguiseradius
|
||||
description: Undisguise all entities within a radius.
|
||||
disguiseclone:
|
||||
aliases: [ disguisec, disc, disclone, dclone, clonedisguise, clonedis, cdisguise, cdis, clonedisg, disgclone ]
|
||||
permission: libsdisguises.seecmd.disguiseclone
|
||||
description: Copy a disguise (or entity) and use it later.
|
||||
disguiseviewself:
|
||||
aliases: [ dviewself, dvs, disguisevs, disvs, vsd, viewselfdisguise, viewselfd, selfdisguise, selfdisg, selfd, toggleselfdisguise, seeselfdisguise ]
|
||||
permission: libsdisguises.seecmd.viewself
|
||||
description: Toggle seeing your own disguise on or off.
|
||||
disguiseviewbar:
|
||||
aliases: [ dviewbar, dvb, disguisevb, disvb, viewdisguisebar, viewbardisguise, bardisguise, bardisg, bard,
|
||||
notifybar, viewnotifybar, disguisenotifybar, disgnotifybar, dnotifybar ]
|
||||
permission: libsdisguises.seecmd.viewself
|
||||
description: Toggle seeing your own disguise on or off.
|
||||
disguisemodify:
|
||||
aliases: [ dmodify, dmod, disgmodify, modifydisguise, moddisguise, mdisguise ]
|
||||
permission: libsdisguises.seecmd.disguisemodify
|
||||
description: Modify your own disguise
|
||||
disguisemodifyplayer:
|
||||
aliases: [ dmodifyplayer, dmodplayer, disgmodifyplayer, dismodplayer, disgmodplayer, modifydisguiseplayer,
|
||||
moddisguiseplayer, mdisguiseplayer, mdisgplayer, dmodifyuuid, dmoduuid, disgmodifyuuid, dismoduuid, disgmoduuid, modifydisguiseuuid,
|
||||
moddisguiseuuid, mdisguiseuuid, mdisguuid ]
|
||||
permission: libsdisguises.seecmd.disguisemodifyplayer
|
||||
description: Modify the disguise of a player
|
||||
disguisemodifyradius:
|
||||
aliases: [ dmodifyradius, dmodradius, disgmodradius, dismodradius, modifydisguiseradius, modifydisgradius,
|
||||
moddisguiseradius, mdisguiseradius, moddisgradius ]
|
||||
permission: libsdisguises.seecmd.disguisemodifyradius
|
||||
description: Modify disguises in a radius
|
||||
disguisemodifyentity:
|
||||
aliases: [ dmodifyentity, dmodentity, disgmodentity, dismodentity, modifydisguiseentity, modifydisgentity,
|
||||
modifydentity, moddisguiseentity, moddisgentity, mdisguiseentity, mdisgentity ]
|
||||
permission: libsdisguises.seecmd.disguisemodifyentity
|
||||
description: Modify a disguise by right clicking them
|
||||
copydisguise:
|
||||
aliases: [ disguisecopy, disgcopy, dcopy, copydisg, copyd, parsedisguise, disguiseparse ]
|
||||
permission: libsdisguises.seecmd.copydisguise
|
||||
description: Output a disguise to a usable string
|
||||
grabskin:
|
||||
aliases: [ uploadskin, skin, saveskin, cacheskin, downloadskin, skincache ]
|
||||
permission: libsdisguises.seecmd.grabskin
|
||||
description: Grab a skin from file, url or player name/uuid
|
||||
savedisguise:
|
||||
aliases: [ customdisguise, savedisg, customdisg, createdisguise, createdisg ]
|
||||
permission: libsdisguises.seecmd.savedisguise
|
||||
description: Save a custom disguise to disguises.yml
|
||||
grabhead:
|
||||
aliases: [ grabskull, playerhead, savehead, gethead ]
|
||||
permission: libsdisguises.seecmd.grabhead
|
||||
description: Grab the head item of a skin, url or player
|
||||
|
||||
permissions:
|
||||
libsdisguises.reload:
|
||||
description: Allows the user to reload LibsDisguises.
|
||||
libsdisguises.update:
|
||||
description: Allows the user to update Libs Disguises
|
||||
libsdisguises.count:
|
||||
description: Allows the user to see how many disguises are active
|
||||
libsdisguises.mods:
|
||||
description: Allows the user to see mods in use.
|
||||
libsdisguises.seethrough:
|
||||
description: Allows player to see through disguises.
|
||||
default: false
|
||||
libsdisguises.hidename:
|
||||
description: Allows player to ignore name being forced above disguise
|
||||
default: false
|
||||
libsdisguises.pve:
|
||||
description: Allows player to ignore pve restrictions.
|
||||
default: false
|
||||
libsdisguises.pvp:
|
||||
description: Allows player to ignore pvp restrictions.
|
||||
default: false
|
||||
libsdisguises.permtest:
|
||||
description: Allows player to test permissions
|
||||
libsdisguises.metainfo:
|
||||
description: Allows player to get meta info
|
||||
libsdisguises.json:
|
||||
description: Allows player to parse held item to json
|
||||
libsdisguises.scoreboardtest:
|
||||
description: Test if the scoreboard is valid, this is a simple test.
|
||||
libsdisguises.config:
|
||||
description: Allows player to check Lib's Disguises config for values
|
||||
libsdisguises.debug:
|
||||
description: Allows a server admin to test a player disguise for scoreboard issues
|
||||
libsdisguises.noactionbar:
|
||||
description: Hides the action bar even if enabled in config
|
||||
default: false
|
||||
libsdisguises.multiname:
|
||||
description: Allows the command user to set names on different heights
|
||||
libsdisguises.grabhead:
|
||||
description: Allows the command user to use /grabhead
|
||||
libsdisguises.ratelimitbypass:
|
||||
description: Allows a living player to bypass the 500ms rate limit on disguise commands, used to prevent crashes
|
||||
libsdisguises.seecmd:
|
||||
description: See all commands in tab-completion
|
||||
default: true
|
||||
children:
|
||||
libsdisguises.seecmd.disguise: true
|
||||
libsdisguises.seecmd.disguiseentity: true
|
||||
libsdisguises.seecmd.disguisehelp: true
|
||||
libsdisguises.seecmd.disguiseplayer: true
|
||||
libsdisguises.seecmd.disguiseradius: true
|
||||
libsdisguises.seecmd.undisguise: true
|
||||
libsdisguises.seecmd.undisguiseentity: true
|
||||
libsdisguises.seecmd.undisguiseplayer: true
|
||||
libsdisguises.seecmd.undisguiseradius: true
|
||||
libsdisguises.seecmd.disguiseclone: true
|
||||
libsdisguises.seecmd.disguiseviewself: true
|
||||
libsdisguises.seecmd.disguiseviewbar: true
|
||||
libsdisguises.seecmd.disguisemodify: true
|
||||
libsdisguises.seecmd.disguisemodifyplayer: true
|
||||
libsdisguises.seecmd.disguisemodifyradius: true
|
||||
libsdisguises.seecmd.disguisemodifyentity: true
|
||||
libsdisguises.seecmd.copydisguise: true
|
||||
libsdisguises.seecmd.grabskin: true
|
||||
libsdisguises.seecmd.savedisguise: true
|
||||
libsdisguises.seecmd.grabhead: true
|
||||
libsdisguises.seecmd.disguiseviewself:
|
||||
description: See the /disguiseviewself command in tab-completion
|
||||
libsdisguises.seecmd.disguiseviewbar:
|
||||
description: See the /disguiseviewbar command in tab-completion
|
||||
libsdisguises.seecmd.disguise:
|
||||
description: See the /disguise command in tab-completion
|
||||
libsdisguises.seecmd.disguiseentity:
|
||||
description: See the /disguiseentity command in tab-completion
|
||||
libsdisguises.seecmd.disguisehelp:
|
||||
description: See the /disguisehelp command in tab-completion
|
||||
libsdisguises.seecmd.disguiseplayer:
|
||||
description: See the /disguiseplayer command in tab-completion
|
||||
libsdisguises.seecmd.disguiseradius:
|
||||
description: See the /disguiseradius command in tab-completion
|
||||
libsdisguises.seecmd.undisguise:
|
||||
description: See the /undisguise command in tab-completion
|
||||
libsdisguises.seecmd.undisguiseentity:
|
||||
description: See the /undisguiseentity command in tab-completion
|
||||
libsdisguises.seecmd.undisguiseplayer:
|
||||
description: See the /undisguiseplayer command in tab-completion
|
||||
libsdisguises.seecmd.undisguiseradius:
|
||||
description: See the /undisguiseradius command in tab-completion
|
||||
libsdisguises.seecmd.disguiseclone:
|
||||
description: See the /disguiseclone command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodify:
|
||||
description: See the /disguisemodify command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodifyplayer:
|
||||
description: See the /disguisemodifyplayer command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodifyradius:
|
||||
description: See the /disguisemodifyradius command in tab-completion
|
||||
libsdisguises.seecmd.disguisemodifyentity:
|
||||
description: See the /disguisemodifyentity command in tab-completion
|
||||
libsdisguises.seecmd.copydisguise:
|
||||
description: See the /copydisguise command in tab-completion
|
||||
libsdisguises.seecmd.grabskin:
|
||||
description: See the /grabskin command in tab-completion
|
||||
libsdisguises.seecmd.savedisguise:
|
||||
description: See the /savedisguise command in tab-completion
|
||||
libsdisguises.seecmd.grabhead:
|
||||
description: See the /grabhead command in tab-completion
|
@ -18,7 +18,8 @@ public class DisguiseTypesTest {
|
||||
|
||||
DisguiseType disguiseType = DisguiseType.getType(entityType);
|
||||
|
||||
Assertions.assertSame(entityType.name(), disguiseType.getEntityType().name(),
|
||||
Assertions.assertSame(entityType.name(),
|
||||
disguiseType.getEntityType() == null ? disguiseType.name() : disguiseType.getEntityType().name(),
|
||||
entityType.name() + " (" + entityType.getName() + ") has no DisguiseType registered!");
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ public class DisguisePermissionsTest {
|
||||
DisguiseConfig.getCustomDisguises().put(new DisguisePerm(DisguiseType.BEE, "babybee"), "bee setbaby");
|
||||
|
||||
DisguisePermissions permissions =
|
||||
createPermissions("disguise", false, "libsdisguises.disguise.bee.-*", "libsdisguises.disguise.babybee.nooptions");
|
||||
createPermissions("me/libraryaddict/disguise/utilities/watchers", false, "libsdisguises.disguise.bee.-*", "libsdisguises.disguise.babybee.nooptions");
|
||||
|
||||
Assert.assertNotNull("The custom disguise babybee should exist", DisguiseParser.getDisguisePerm("babybee"));
|
||||
|
Loading…
Reference in New Issue
Block a user