mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +00:00
Added wardrobe (Despawning and entity skin not functional)
This commit is contained in:
4
.idea/compiler.xml
generated
4
.idea/compiler.xml
generated
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="16" />
|
||||
<bytecodeTargetLevel target="16">
|
||||
<module name="common" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/encodings.xml
generated
Normal file
7
.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/common/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
3
.idea/gradle.xml
generated
3
.idea/gradle.xml
generated
@@ -12,7 +12,10 @@
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/1.17" />
|
||||
<option value="$PROJECT_DIR$/1.18" />
|
||||
<option value="$PROJECT_DIR$/common" />
|
||||
<option value="$PROJECT_DIR$/nms" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
|
||||
119
.idea/jarRepositories.xml
generated
119
.idea/jarRepositories.xml
generated
@@ -1,60 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven4" />
|
||||
<option name="name" value="maven4" />
|
||||
<option name="url" value="https://repo.extendedclip.com/content/repositories/placeholderapi/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://papermc.io/repo/repository/maven-public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven6" />
|
||||
<option name="name" value="maven6" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven2" />
|
||||
<option name="name" value="maven2" />
|
||||
<option name="url" value="https://repo.mattstudios.me/artifactory/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven5" />
|
||||
<option name="name" value="maven5" />
|
||||
<option name="url" value="https://repo.leonardobishop.com/releases/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenLocal" />
|
||||
<option name="name" value="MavenLocal" />
|
||||
<option name="url" value="file:/$MAVEN_REPOSITORY$/" />
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven7" />
|
||||
<option name="name" value="maven7" />
|
||||
<option name="url" value="https://repo.dmulloy2.net/repository/public/" />
|
||||
<option name="url" value="https://oss.sonatype.org/content/repositories/snapshots/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="paperweightDecompilerRepository" />
|
||||
<option name="name" value="paperweightDecompilerRepository" />
|
||||
<option name="url" value="https://files.minecraftforge.net/maven/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="sonatype" />
|
||||
<option name="name" value="sonatype" />
|
||||
<option name="url" value="https://oss.sonatype.org/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="paperweightParamMappingsRepository" />
|
||||
<option name="name" value="paperweightParamMappingsRepository" />
|
||||
<option name="url" value="https://maven.fabricmc.net/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven6" />
|
||||
<option name="name" value="maven6" />
|
||||
<option name="url" value="https://mvnrepository.com/artifact/com.zaxxer/HikariCP" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven7" />
|
||||
@@ -67,9 +52,39 @@
|
||||
<option name="url" value="https://maven.pkg.github.com/LoneDev6/API-ItemsAdder" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven7" />
|
||||
<option name="name" value="maven7" />
|
||||
<option name="url" value="https://oss.sonatype.org/content/repositories/snapshots/" />
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://papermc.io/repo/repository/maven-public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven5" />
|
||||
<option name="name" value="maven5" />
|
||||
<option name="url" value="https://repo.leonardobishop.com/releases/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven6" />
|
||||
<option name="name" value="maven6" />
|
||||
<option name="url" value="https://mvnrepository.com/artifact/com.zaxxer/HikariCP" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven8" />
|
||||
<option name="name" value="maven8" />
|
||||
<option name="url" value="https://oss.sonatype.org/content/repositories/snapshots" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven4" />
|
||||
<option name="name" value="maven4" />
|
||||
<option name="url" value="https://repo.extendedclip.com/content/repositories/placeholderapi/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenLocal" />
|
||||
<option name="name" value="MavenLocal" />
|
||||
<option name="url" value="file:/$MAVEN_REPOSITORY$/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven11" />
|
||||
@@ -77,19 +92,19 @@
|
||||
<option name="url" value="https://libraries.minecraft.net/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="paperweightDecompilerRepository" />
|
||||
<option name="name" value="paperweightDecompilerRepository" />
|
||||
<option name="url" value="https://files.minecraftforge.net/maven/" />
|
||||
<option name="id" value="maven7" />
|
||||
<option name="name" value="maven7" />
|
||||
<option name="url" value="https://repo.dmulloy2.net/repository/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="paperweightParamMappingsRepository" />
|
||||
<option name="name" value="paperweightParamMappingsRepository" />
|
||||
<option name="url" value="https://maven.fabricmc.net/" />
|
||||
<option name="id" value="spigotmc-repo" />
|
||||
<option name="name" value="spigotmc-repo" />
|
||||
<option name="url" value="https://hub.spigotmc.org/nexus/content/repositories/snapshots/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven8" />
|
||||
<option name="name" value="maven8" />
|
||||
<option name="url" value="https://oss.sonatype.org/content/repositories/snapshots" />
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/kotlinScripting.xml
generated
Normal file
6
.idea/kotlinScripting.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinScriptingSettings">
|
||||
<option name="suppressDefinitionsCheck" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
16
.idea/modules/1.17/HMCCosmetics.1.17.main.iml
generated
Normal file
16
.idea/modules/1.17/HMCCosmetics.1.17.main.iml
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
<platformType>MCP</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="McpModuleSettings">
|
||||
<option name="srgType" value="SRG" />
|
||||
</component>
|
||||
</module>
|
||||
12
.idea/modules/1.17/HMCCosmetics.1.17.test.iml
generated
Normal file
12
.idea/modules/1.17/HMCCosmetics.1.17.test.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>ADVENTURE</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
||||
16
.idea/modules/1.18/HMCCosmetics.1.18.main.iml
generated
Normal file
16
.idea/modules/1.18/HMCCosmetics.1.18.main.iml
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
<platformType>MCP</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="McpModuleSettings">
|
||||
<option name="srgType" value="SRG" />
|
||||
</component>
|
||||
</module>
|
||||
12
.idea/modules/1.18/HMCCosmetics.1.18.test.iml
generated
Normal file
12
.idea/modules/1.18/HMCCosmetics.1.18.test.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>ADVENTURE</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
||||
10
.idea/modules/HMCCosmetics.test.iml
generated
10
.idea/modules/HMCCosmetics.test.iml
generated
@@ -1,12 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>ADVENTURE</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="TestModuleProperties" production-module="HMCCosmetics.main" />
|
||||
</module>
|
||||
10
.idea/modules/common/HMCCosmetics.common.test.iml
generated
10
.idea/modules/common/HMCCosmetics.common.test.iml
generated
@@ -1,4 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="TestModuleProperties" production-module="HMCCosmetics.common.main" />
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>ADVENTURE</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
||||
16
.idea/modules/nms/HMCCosmetics.nms.main.iml
generated
Normal file
16
.idea/modules/nms/HMCCosmetics.nms.main.iml
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
<platformType>MCP</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="McpModuleSettings">
|
||||
<option name="srgType" value="SRG" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.fisher2911.hmccosmetics.playerpackets;
|
||||
package io.github.fisher2911.nms;
|
||||
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
@@ -8,6 +8,7 @@ import com.comphenix.protocol.wrappers.PlayerInfoData;
|
||||
import com.comphenix.protocol.wrappers.WrappedChatComponent;
|
||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import io.github.fisher2911.nms.playerpackets.PlayerPackets;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer;
|
||||
@@ -15,20 +16,32 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public class PlayerPackets_1_17_R1 implements PlayerPackets {
|
||||
|
||||
public PacketContainer[] getSpawnPacket(final Location location, final Player player, final UUID uuid, final int entityId) {
|
||||
@Override
|
||||
public PacketContainer getSpawnPacket(final Location location, UUID uuid, final int entityId) {
|
||||
final PacketContainer spawnPacket = new PacketContainer(PacketType.Play.Server.NAMED_ENTITY_SPAWN);
|
||||
spawnPacket.getUUIDs().write(0, uuid);
|
||||
spawnPacket.getIntegers().write(0, entityId);
|
||||
spawnPacket.getDoubles().
|
||||
write(0, location.getX()).
|
||||
write(1, location.getY()).
|
||||
write(2, location.getZ());
|
||||
|
||||
return spawnPacket;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketContainer getPlayerInfoPacket(final Player player, final UUID uuid) {
|
||||
final GameProfile profile = this.getCopyProfile(player, uuid);
|
||||
final PacketContainer playerInfoPacket = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
|
||||
final StructureModifier<EnumWrappers.PlayerInfoAction> action = playerInfoPacket.getPlayerInfoAction();
|
||||
final StructureModifier<List<PlayerInfoData>> infoData = playerInfoPacket.getPlayerInfoDataLists();
|
||||
|
||||
final List<PlayerInfoData> playerInfoData = new ArrayList<>();
|
||||
|
||||
final GameProfile profile = this.getCopyProfile(player, uuid);
|
||||
|
||||
playerInfoData.add(new PlayerInfoData(WrappedGameProfile
|
||||
.fromHandle(profile),
|
||||
0,
|
||||
@@ -38,20 +51,12 @@ public class PlayerPackets_1_17_R1 implements PlayerPackets {
|
||||
action.write(0, EnumWrappers.PlayerInfoAction.ADD_PLAYER);
|
||||
infoData.write(0, playerInfoData);
|
||||
|
||||
final PacketContainer spawnPacket = new PacketContainer(PacketType.Play.Server.NAMED_ENTITY_SPAWN);
|
||||
spawnPacket.getUUIDs().write(0, uuid);
|
||||
spawnPacket.getIntegers().write(0, entityId);
|
||||
spawnPacket.getDoubles().
|
||||
write(0, location.getX()).
|
||||
write(1, location.getY()).
|
||||
write(2, location.getZ());
|
||||
|
||||
return new PacketContainer[]{playerInfoPacket, spawnPacket};
|
||||
return playerInfoPacket;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketContainer getRemovePacket(final Player player, final UUID uuid, final int entityId) {
|
||||
final PacketContainer playerPacket = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
|
||||
playerPacket.getIntegers().write(0, entityId);
|
||||
final StructureModifier<EnumWrappers.PlayerInfoAction> action = playerPacket.getPlayerInfoAction();
|
||||
final StructureModifier<List<PlayerInfoData>> infoData = playerPacket.getPlayerInfoDataLists();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.fisher2911.hmccosmetics.playerpackets;
|
||||
package io.github.fisher2911.nms;
|
||||
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
@@ -8,10 +8,10 @@ import com.comphenix.protocol.wrappers.PlayerInfoData;
|
||||
import com.comphenix.protocol.wrappers.WrappedChatComponent;
|
||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import io.github.fisher2911.nms.playerpackets.PlayerPackets;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
//import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -20,15 +20,28 @@ import java.util.UUID;
|
||||
|
||||
public class PlayerPackets_1_18_R1 implements PlayerPackets {
|
||||
|
||||
public PacketContainer[] getSpawnPacket(final Location location, final Player player, final UUID uuid, final int entityId) {
|
||||
@Override
|
||||
public PacketContainer getSpawnPacket(final Location location, UUID uuid, final int entityId) {
|
||||
final PacketContainer spawnPacket = new PacketContainer(PacketType.Play.Server.NAMED_ENTITY_SPAWN);
|
||||
spawnPacket.getUUIDs().write(0, uuid);
|
||||
spawnPacket.getIntegers().write(0, entityId);
|
||||
spawnPacket.getDoubles().
|
||||
write(0, location.getX()).
|
||||
write(1, location.getY()).
|
||||
write(2, location.getZ());
|
||||
|
||||
return spawnPacket;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketContainer getPlayerInfoPacket(final Player player, final UUID uuid) {
|
||||
final GameProfile profile = this.getCopyProfile(player, uuid);
|
||||
final PacketContainer playerInfoPacket = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
|
||||
final StructureModifier<EnumWrappers.PlayerInfoAction> action = playerInfoPacket.getPlayerInfoAction();
|
||||
final StructureModifier<List<PlayerInfoData>> infoData = playerInfoPacket.getPlayerInfoDataLists();
|
||||
|
||||
final List<PlayerInfoData> playerInfoData = new ArrayList<>();
|
||||
|
||||
final GameProfile profile = this.getCopyProfile(player, uuid);
|
||||
|
||||
playerInfoData.add(new PlayerInfoData(WrappedGameProfile
|
||||
.fromHandle(profile),
|
||||
0,
|
||||
@@ -38,20 +51,12 @@ public class PlayerPackets_1_18_R1 implements PlayerPackets {
|
||||
action.write(0, EnumWrappers.PlayerInfoAction.ADD_PLAYER);
|
||||
infoData.write(0, playerInfoData);
|
||||
|
||||
final PacketContainer spawnPacket = new PacketContainer(PacketType.Play.Server.NAMED_ENTITY_SPAWN);
|
||||
spawnPacket.getUUIDs().write(0, uuid);
|
||||
spawnPacket.getIntegers().write(0, entityId);
|
||||
spawnPacket.getDoubles().
|
||||
write(0, location.getX()).
|
||||
write(1, location.getY()).
|
||||
write(2, location.getZ());
|
||||
|
||||
return new PacketContainer[]{playerInfoPacket, spawnPacket};
|
||||
return playerInfoPacket;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketContainer getRemovePacket(final Player player, final UUID uuid, final int entityId) {
|
||||
final PacketContainer playerPacket = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
|
||||
playerPacket.getIntegers().write(0, entityId);
|
||||
final StructureModifier<EnumWrappers.PlayerInfoAction> action = playerPacket.getPlayerInfoAction();
|
||||
final StructureModifier<List<PlayerInfoData>> infoData = playerPacket.getPlayerInfoDataLists();
|
||||
|
||||
@@ -77,8 +82,10 @@ public class PlayerPackets_1_18_R1 implements PlayerPackets {
|
||||
uuid,
|
||||
player.getDisplayName());
|
||||
|
||||
System.out.println("Printing Profile Data");
|
||||
for (final var entry : playerProfile.getProperties().entries()) {
|
||||
profile.getProperties().put(entry.getKey(), entry.getValue());
|
||||
System.out.println(entry.getKey() + " : " + entry.getValue());
|
||||
}
|
||||
|
||||
return profile;
|
||||
214
build.gradle.kts
214
build.gradle.kts
@@ -1,110 +1,112 @@
|
||||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
||||
|
||||
//import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
||||
//
|
||||
plugins {
|
||||
id("java")
|
||||
id("com.github.johnrengelman.shadow") version "7.1.1"
|
||||
id("net.minecrell.plugin-yml.bukkit") version "0.5.1"
|
||||
}
|
||||
|
||||
group = "io.github.fisher2911"
|
||||
version = "1.7.1"
|
||||
description = "Intuitive, easy-to-use cosmetics plugin, designed for servers using resource packs.\n"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven("https://repo.mattstudios.me/artifactory/public/")
|
||||
maven("https://jitpack.io")
|
||||
maven("https://repo.dmulloy2.net/repository/public/")
|
||||
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
||||
maven("https://mvnrepository.com/artifact/com.zaxxer/HikariCP")
|
||||
maven("https://repo.jeff-media.de/maven2/")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.mojang:authlib:1.5.25")
|
||||
compileOnly("org.spigotmc:spigot:1.17-R0.1-SNAPSHOT")
|
||||
compileOnly("org.jetbrains:annotations:22.0.0")
|
||||
compileOnly("com.comphenix.protocol:ProtocolLib:4.7.0")
|
||||
compileOnly("me.clip:placeholderapi:2.11.1")
|
||||
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:2.5.4")
|
||||
implementation("net.kyori:adventure-api:4.9.3")
|
||||
implementation("net.kyori:adventure-text-minimessage:4.10.0-SNAPSHOT")
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.0.1")
|
||||
implementation("dev.triumphteam:triumph-gui:3.1.1")
|
||||
implementation("me.mattstudios.utils:matt-framework:1.4.6")
|
||||
implementation("org.spongepowered:configurate-yaml:4.1.2")
|
||||
implementation("org.bstats:bstats-bukkit:2.2.1")
|
||||
implementation("com.zaxxer:HikariCP:5.0.0")
|
||||
implementation("com.j256.ormlite:ormlite-jdbc:6.1")
|
||||
implementation("com.j256.ormlite:ormlite-core:6.1")
|
||||
}
|
||||
|
||||
tasks {
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(16)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
relocate("dev.triumphteam.gui", "io.github.fisher2911.hmccosmetics.gui")
|
||||
relocate("me.mattstudios.mf", "io.github.fisher2911.hmccosmetics.mf")
|
||||
relocate("net.kyori.adventure.text.minimessage", "io.github.fisher2911.hmccosmetics.adventure.minimessage")
|
||||
relocate("net.kyori.adventure.platform", "io.github.fisher2911.hmccosmetics.adventure.platform")
|
||||
relocate("org.spongepowered.configurate", "io.github.fisher2911.hmccosmetics.configurate")
|
||||
relocate("org.bstats", "io.github.fisher2911.hmccosmetics.bstats")
|
||||
relocate("com.zaxxer.hikaricp", "io.github.fisher2911.hmccosmetics.hikaricp")
|
||||
relocate("com.j256.ormlite", "io.github.fisher2911.hmccosmetics.ormlite")
|
||||
archiveFileName.set("HMCCosmetics.jar")
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(16))
|
||||
}
|
||||
|
||||
bukkit {
|
||||
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
|
||||
main = "io.github.fisher2911.hmccosmetics.HMCCosmetics"
|
||||
apiVersion = "1.17"
|
||||
name = "HMCCosmetics"
|
||||
authors = listOf("MasterOfTheFish")
|
||||
softDepend = listOf("Multiverse", "PlaceholderAPI", "Oraxen", "ItemsAdder")
|
||||
depend = listOf("ProtocolLib")
|
||||
permissions {
|
||||
register("hmccosmetics.cmd.default") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to execute the default command."
|
||||
}
|
||||
register("hmccosmetics.cmd.dye") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to dye armor."
|
||||
}
|
||||
register("hmccosmetics.cmd.reload") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to use the reload command."
|
||||
}
|
||||
register("hmccosmetics.cmd.set") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to set other users' cosmetics."
|
||||
}
|
||||
register("hmccosmetics.cmd.wardrobe") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to view the wardrobe"
|
||||
}
|
||||
}
|
||||
}
|
||||
// id("com.github.johnrengelman.shadow") version "7.1.1"
|
||||
// id("net.minecrell.plugin-yml.bukkit") version "0.5.1"
|
||||
//}
|
||||
//
|
||||
//group = "io.github.fisher2911"
|
||||
//version = "1.7.1"
|
||||
//description = "Intuitive, easy-to-use cosmetics plugin, designed for servers using resource packs.\n"
|
||||
//
|
||||
//repositories {
|
||||
// mavenCentral()
|
||||
// maven("https://papermc.io/repo/repository/maven-public/")
|
||||
// maven("https://repo.mattstudios.me/artifactory/public/")
|
||||
// maven("https://jitpack.io")
|
||||
// maven("https://repo.dmulloy2.net/repository/public/")
|
||||
// maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
||||
// maven("https://mvnrepository.com/artifact/com.zaxxer/HikariCP")
|
||||
// maven("https://repo.jeff-media.de/maven2/")
|
||||
// maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
//}
|
||||
//
|
||||
//dependencies {
|
||||
// compileOnly("com.mojang:authlib:1.5.25")
|
||||
// compileOnly("org.spigotmc:spigot:1.17-R0.1-SNAPSHOT")
|
||||
// compileOnly("org.jetbrains:annotations:22.0.0")
|
||||
// compileOnly("com.comphenix.protocol:ProtocolLib:4.7.0")
|
||||
// compileOnly("me.clip:placeholderapi:2.11.1")
|
||||
// compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
||||
// compileOnly("com.github.LoneDev6:API-ItemsAdder:2.5.4")
|
||||
// implementation("net.kyori:adventure-api:4.9.3")
|
||||
// implementation("net.kyori:adventure-text-minimessage:4.10.0-SNAPSHOT")
|
||||
// implementation("net.kyori:adventure-platform-bukkit:4.0.1")
|
||||
// implementation("dev.triumphteam:triumph-gui:3.1.1")
|
||||
// implementation("me.mattstudios.utils:matt-framework:1.4.6")
|
||||
// implementation("org.spongepowered:configurate-yaml:4.1.2")
|
||||
// implementation("org.bstats:bstats-bukkit:2.2.1")
|
||||
// implementation("com.zaxxer:HikariCP:5.0.0")
|
||||
// implementation("com.j256.ormlite:ormlite-jdbc:6.1")
|
||||
// implementation("com.j256.ormlite:ormlite-core:6.1")
|
||||
//}
|
||||
//
|
||||
//tasks {
|
||||
// build {
|
||||
// dependsOn(shadowJar)
|
||||
// }
|
||||
//
|
||||
// compileJava {
|
||||
// options.encoding = Charsets.UTF_8.name()
|
||||
// options.release.set(16)
|
||||
// }
|
||||
//
|
||||
// shadowJar {
|
||||
// relocate("dev.triumphteam.gui", "io.github.fisher2911.hmccosmetics.gui")
|
||||
// relocate("me.mattstudios.mf", "io.github.fisher2911.hmccosmetics.mf")
|
||||
// relocate("net.kyori.adventure.text.minimessage", "io.github.fisher2911.hmccosmetics.adventure.minimessage")
|
||||
// relocate("net.kyori.adventure.platform", "io.github.fisher2911.hmccosmetics.adventure.platform")
|
||||
// relocate("org.spongepowered.configurate", "io.github.fisher2911.hmccosmetics.configurate")
|
||||
// relocate("org.bstats", "io.github.fisher2911.hmccosmetics.bstats")
|
||||
// relocate("com.zaxxer.hikaricp", "io.github.fisher2911.hmccosmetics.hikaricp")
|
||||
// relocate("com.j256.ormlite", "io.github.fisher2911.hmccosmetics.ormlite")
|
||||
// archiveFileName.set("HMCCosmetics.jar")
|
||||
// }
|
||||
//
|
||||
// javadoc {
|
||||
// options.encoding = Charsets.UTF_8.name()
|
||||
// }
|
||||
//
|
||||
// processResources {
|
||||
// filteringCharset = Charsets.UTF_8.name()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//java {
|
||||
// toolchain.languageVersion.set(JavaLanguageVersion.of(16))
|
||||
//}
|
||||
//
|
||||
//bukkit {
|
||||
// load = BukkitPluginDescription.PluginLoadOrder.STARTUP
|
||||
// main = "io.github.fisher2911.hmccosmetics.HMCCosmetics"
|
||||
// apiVersion = "1.17"
|
||||
// name = "HMCCosmetics"
|
||||
// authors = listOf("MasterOfTheFish")
|
||||
// softDepend = listOf("Multiverse", "PlaceholderAPI", "Oraxen", "ItemsAdder")
|
||||
// depend = listOf("ProtocolLib")
|
||||
// permissions {
|
||||
// register("hmccosmetics.cmd.default") {
|
||||
// default = BukkitPluginDescription.Permission.Default.OP
|
||||
// description = "Permission to execute the default command."
|
||||
// }
|
||||
// register("hmccosmetics.cmd.dye") {
|
||||
// default = BukkitPluginDescription.Permission.Default.OP
|
||||
// description = "Permission to dye armor."
|
||||
// }
|
||||
// register("hmccosmetics.cmd.reload") {
|
||||
// default = BukkitPluginDescription.Permission.Default.OP
|
||||
// description = "Permission to use the reload command."
|
||||
// }
|
||||
// register("hmccosmetics.cmd.set") {
|
||||
// default = BukkitPluginDescription.Permission.Default.OP
|
||||
// description = "Permission to set other users' cosmetics."
|
||||
// }
|
||||
// register("hmccosmetics.cmd.wardrobe") {
|
||||
// default = BukkitPluginDescription.Permission.Default.OP
|
||||
// description = "Permission to view the wardrobe"
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
114
common/build.gradle.kts
Normal file
114
common/build.gradle.kts
Normal file
@@ -0,0 +1,114 @@
|
||||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
||||
|
||||
plugins {
|
||||
id("java")
|
||||
id("com.github.johnrengelman.shadow") version "7.1.1"
|
||||
id("net.minecrell.plugin-yml.bukkit") version "0.5.1"
|
||||
}
|
||||
|
||||
group = "io.github.fisher2911"
|
||||
version = "1.7.1"
|
||||
description = "Intuitive, easy-to-use cosmetics plugin, designed for servers using resource packs.\n"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
maven("https://repo.mattstudios.me/artifactory/public/")
|
||||
maven("https://jitpack.io")
|
||||
maven("https://repo.dmulloy2.net/repository/public/")
|
||||
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
||||
maven("https://mvnrepository.com/artifact/com.zaxxer/HikariCP")
|
||||
maven("https://repo.jeff-media.de/maven2/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":1.17"))
|
||||
implementation(project(":1.18"))
|
||||
implementation(project(":nms"))
|
||||
compileOnly("com.mojang:authlib:1.5.25")
|
||||
compileOnly("org.spigotmc:spigot:1.17-R0.1-SNAPSHOT")
|
||||
compileOnly("org.jetbrains:annotations:22.0.0")
|
||||
compileOnly("com.comphenix.protocol:ProtocolLib:4.7.0")
|
||||
compileOnly("me.clip:placeholderapi:2.11.1")
|
||||
compileOnly("com.github.oraxen:oraxen:-SNAPSHOT")
|
||||
compileOnly("com.github.LoneDev6:API-ItemsAdder:2.5.4")
|
||||
implementation("net.kyori:adventure-api:4.9.3")
|
||||
implementation("net.kyori:adventure-text-minimessage:4.10.0-SNAPSHOT")
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.0.1")
|
||||
implementation("dev.triumphteam:triumph-gui:3.1.1")
|
||||
implementation("me.mattstudios.utils:matt-framework:1.4.6")
|
||||
implementation("org.spongepowered:configurate-yaml:4.1.2")
|
||||
implementation("org.bstats:bstats-bukkit:2.2.1")
|
||||
implementation("com.zaxxer:HikariCP:5.0.0")
|
||||
implementation("com.j256.ormlite:ormlite-jdbc:6.1")
|
||||
implementation("com.j256.ormlite:ormlite-core:6.1")
|
||||
}
|
||||
|
||||
tasks {
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(16)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
relocate("dev.triumphteam.gui", "io.github.fisher2911.hmccosmetics.gui")
|
||||
relocate("me.mattstudios.mf", "io.github.fisher2911.hmccosmetics.mf")
|
||||
relocate("net.kyori.adventure.text.minimessage", "io.github.fisher2911.hmccosmetics.adventure.minimessage")
|
||||
relocate("net.kyori.adventure.platform", "io.github.fisher2911.hmccosmetics.adventure.platform")
|
||||
relocate("org.spongepowered.configurate", "io.github.fisher2911.hmccosmetics.configurate")
|
||||
relocate("org.bstats", "io.github.fisher2911.hmccosmetics.bstats")
|
||||
relocate("com.zaxxer.hikaricp", "io.github.fisher2911.hmccosmetics.hikaricp")
|
||||
relocate("com.j256.ormlite", "io.github.fisher2911.hmccosmetics.ormlite")
|
||||
archiveFileName.set("HMCCosmetics.jar")
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
processResources {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(16))
|
||||
}
|
||||
|
||||
bukkit {
|
||||
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
|
||||
main = "io.github.fisher2911.hmccosmetics.HMCCosmetics"
|
||||
apiVersion = "1.17"
|
||||
name = "HMCCosmetics"
|
||||
authors = listOf("MasterOfTheFish")
|
||||
softDepend = listOf("Multiverse", "PlaceholderAPI", "Oraxen", "ItemsAdder")
|
||||
depend = listOf("ProtocolLib")
|
||||
permissions {
|
||||
register("hmccosmetics.cmd.default") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to execute the default command."
|
||||
}
|
||||
register("hmccosmetics.cmd.dye") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to dye armor."
|
||||
}
|
||||
register("hmccosmetics.cmd.reload") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to use the reload command."
|
||||
}
|
||||
register("hmccosmetics.cmd.set") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to set other users' cosmetics."
|
||||
}
|
||||
register("hmccosmetics.cmd.wardrobe") {
|
||||
default = BukkitPluginDescription.Permission.Default.OP
|
||||
description = "Permission to view the wardrobe"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public class CosmeticsCommand extends CommandBase {
|
||||
wardrobe.setActive(true);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(
|
||||
this.plugin,
|
||||
() -> wardrobe.spawnFakePlayer(player)
|
||||
() -> wardrobe.spawnFakePlayer(player, this.plugin.getSettings())
|
||||
);
|
||||
this.cosmeticsMenu.openDefault(player);
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import com.comphenix.protocol.wrappers.EnumWrappers;
|
||||
import dev.triumphteam.gui.components.GuiAction;
|
||||
import io.github.fisher2911.hmccosmetics.HMCCosmetics;
|
||||
import io.github.fisher2911.hmccosmetics.message.Message;
|
||||
import io.github.fisher2911.hmccosmetics.message.MessageHandler;
|
||||
import io.github.fisher2911.hmccosmetics.util.Utils;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
@@ -1,10 +1,8 @@
|
||||
package io.github.fisher2911.hmccosmetics.config;
|
||||
|
||||
import io.github.fisher2911.hmccosmetics.HMCCosmetics;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
|
||||
@ConfigSerializable
|
||||
public class CosmeticSettings {
|
||||
@@ -71,7 +71,7 @@ public class Database {
|
||||
|
||||
public void loadUser(final UUID uuid, final Consumer<User> onComplete) {
|
||||
final int armorStandId = FAKE_ENTITY_ID.getAndDecrement();
|
||||
final Wardrobe wardrobe = this.newWardrobe();
|
||||
final Wardrobe wardrobe = this.createNewWardrobe(uuid);
|
||||
Threads.getInstance().execute(
|
||||
() -> {
|
||||
try {
|
||||
@@ -156,9 +156,10 @@ public class Database {
|
||||
return armorItemDao;
|
||||
}
|
||||
|
||||
public Wardrobe newWardrobe() {
|
||||
public Wardrobe createNewWardrobe(final UUID ownerUUID) {
|
||||
return new Wardrobe(
|
||||
UUID.randomUUID(),
|
||||
ownerUUID,
|
||||
PlayerArmor.empty(),
|
||||
FAKE_ENTITY_ID.getAndDecrement(),
|
||||
FAKE_ENTITY_ID.getAndDecrement(),
|
||||
@@ -87,10 +87,11 @@ public class DatabaseConverter {
|
||||
|
||||
while (results.next()) {
|
||||
final PlayerArmor playerArmor = PlayerArmor.empty();
|
||||
final UUID uuid = UUID.fromString(results.getString(1));
|
||||
final User user = new User(
|
||||
UUID.fromString(results.getString(1)),
|
||||
uuid,
|
||||
playerArmor,
|
||||
this.database.newWardrobe(),
|
||||
this.database.createNewWardrobe(uuid),
|
||||
this.database.FAKE_ENTITY_ID.getAndDecrement()
|
||||
);
|
||||
final String backpackId = results.getString(2);
|
||||
@@ -107,16 +107,9 @@ public class CosmeticGui {
|
||||
this.gui.updateItem(slot, guiItem);
|
||||
}
|
||||
|
||||
public void open(final HumanEntity humanEntity) {
|
||||
final Optional<User> optionalUser = this.plugin.getUserManager()
|
||||
.get(humanEntity.getUniqueId());
|
||||
|
||||
if (optionalUser.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final User user = optionalUser.get();
|
||||
|
||||
public void open(final User user) {
|
||||
final Player player = user.getPlayer();
|
||||
if (player == null) return;
|
||||
this.gui = Gui.gui().
|
||||
title(Adventure.MINI_MESSAGE.deserialize(
|
||||
Placeholder.applyPapiPlaceholders(user.getPlayer(), this.title))).
|
||||
@@ -127,7 +120,7 @@ public class CosmeticGui {
|
||||
|
||||
this.setItems(user);
|
||||
|
||||
this.gui.open(humanEntity);
|
||||
this.gui.open(player);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1,14 +1,13 @@
|
||||
package io.github.fisher2911.hmccosmetics.gui;
|
||||
|
||||
import dev.triumphteam.gui.components.GuiAction;
|
||||
import dev.triumphteam.gui.guis.GuiItem;
|
||||
import io.github.fisher2911.hmccosmetics.HMCCosmetics;
|
||||
import io.github.fisher2911.hmccosmetics.config.ActionSerializer;
|
||||
import io.github.fisher2911.hmccosmetics.config.DyeGuiSerializer;
|
||||
import io.github.fisher2911.hmccosmetics.config.GuiSerializer;
|
||||
import io.github.fisher2911.hmccosmetics.config.ItemSerializer;
|
||||
import io.github.fisher2911.hmccosmetics.cosmetic.CosmeticManager;
|
||||
import io.github.fisher2911.hmccosmetics.user.User;
|
||||
import io.github.fisher2911.hmccosmetics.user.Wardrobe;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -23,7 +22,6 @@ import java.nio.file.Path;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class CosmeticsMenu {
|
||||
|
||||
@@ -43,14 +41,22 @@ public class CosmeticsMenu {
|
||||
public void openMenu(final String id, final HumanEntity humanEntity) {
|
||||
final CosmeticGui cosmeticGui = this.getGui(id);
|
||||
|
||||
if (cosmeticGui instanceof final DyeSelectorGui dyeSelectorGui) {
|
||||
final Optional<User> optionalUser = this.plugin.getUserManager().get(humanEntity.getUniqueId());
|
||||
optionalUser.ifPresent(user -> dyeSelectorGui.getGui(user, user.getLastSetItem().getType()).open(humanEntity));
|
||||
|
||||
if (optionalUser.isEmpty()) return;
|
||||
|
||||
User user = optionalUser.get();
|
||||
|
||||
final Wardrobe wardrobe = user.getWardrobe();
|
||||
if (wardrobe.isActive()) user = wardrobe;
|
||||
|
||||
if (cosmeticGui instanceof final DyeSelectorGui dyeSelectorGui) {
|
||||
dyeSelectorGui.getGui(user, user.getLastSetItem().getType()).open(humanEntity);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cosmeticGui != null) {
|
||||
cosmeticGui.open(humanEntity);
|
||||
cosmeticGui.open(user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +72,7 @@ public class CosmeticsMenu {
|
||||
}
|
||||
|
||||
public void openDyeSelectorGui(
|
||||
final User user,
|
||||
User user,
|
||||
final ArmorItem.Type type) {
|
||||
|
||||
final Player player = user.getPlayer();
|
||||
@@ -75,6 +81,9 @@ public class CosmeticsMenu {
|
||||
return;
|
||||
}
|
||||
|
||||
final Wardrobe wardrobe = user.getWardrobe();
|
||||
if (wardrobe.isActive()) user = wardrobe;
|
||||
|
||||
final CosmeticGui gui = this.getGui(DEFAULT_DYE_MENU);
|
||||
|
||||
if (gui instanceof final DyeSelectorGui dyeSelectorGui) {
|
||||
@@ -176,10 +176,10 @@ public class DyeSelectorGui extends CosmeticGui {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open(final HumanEntity player) {
|
||||
final Optional<User> optionalUser = this.plugin.getUserManager().get(player.getUniqueId());
|
||||
optionalUser.ifPresent(
|
||||
user -> this.getGui(user, user.getLastSetItem().getType()).open(player));
|
||||
public void open(final User user) {
|
||||
final Player player = user.getPlayer();
|
||||
if (player == null) return;
|
||||
this.getGui(user, user.getLastSetItem().getType()).open(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -3,7 +3,7 @@ package io.github.fisher2911.hmccosmetics.listener;
|
||||
import io.github.fisher2911.hmccosmetics.HMCCosmetics;
|
||||
import io.github.fisher2911.hmccosmetics.user.User;
|
||||
import io.github.fisher2911.hmccosmetics.user.UserManager;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.Optional;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
@@ -34,7 +34,7 @@ public class PlayerShiftListener implements Listener {
|
||||
|
||||
if (!wardrobe.isActive()) return;
|
||||
|
||||
wardrobe.setActive(false);
|
||||
wardrobe.despawnFakePlayer(player);
|
||||
this.plugin.getMessageHandler().sendMessage(
|
||||
player,
|
||||
Messages.CLOSED_WARDROBE
|
||||
@@ -4,19 +4,13 @@ import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import com.comphenix.protocol.ProtocolManager;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import com.comphenix.protocol.reflect.StructureModifier;
|
||||
import com.comphenix.protocol.wrappers.EnumWrappers;
|
||||
import com.comphenix.protocol.wrappers.MinecraftKey;
|
||||
import com.comphenix.protocol.wrappers.Pair;
|
||||
import com.comphenix.protocol.wrappers.PlayerInfoData;
|
||||
import com.comphenix.protocol.wrappers.WrappedChatComponent;
|
||||
import com.comphenix.protocol.wrappers.WrappedGameProfile;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import io.github.fisher2911.hmccosmetics.playerpackets.PlayerPackets;
|
||||
import io.github.fisher2911.hmccosmetics.playerpackets.PlayerPackets_1_17_R1;
|
||||
import io.github.fisher2911.hmccosmetics.playerpackets.PlayerPackets_1_18_R1;
|
||||
import io.github.fisher2911.nms.playerpackets.PlayerPackets;
|
||||
import io.github.fisher2911.nms.PlayerPackets_1_17_R1;
|
||||
import io.github.fisher2911.nms.PlayerPackets_1_18_R1;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.libs.it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@@ -24,7 +18,6 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -34,11 +27,12 @@ public class PacketManager {
|
||||
|
||||
static {
|
||||
final String version = Bukkit.getVersion();
|
||||
System.out.println("Version: " + Bukkit.getVersion());
|
||||
if (version.contains("1.17")) {
|
||||
playerPackets = new PlayerPackets_1_17_R1();
|
||||
} /*else if (version.contains("1.18")) {
|
||||
} else if (version.contains("1.18")) {
|
||||
playerPackets = new PlayerPackets_1_18_R1();
|
||||
}*/ else {
|
||||
} else {
|
||||
playerPackets = null;
|
||||
}
|
||||
}
|
||||
@@ -141,9 +135,14 @@ public class PacketManager {
|
||||
return packet;
|
||||
}
|
||||
|
||||
public static PacketContainer[] getFakePlayerPacket(final Location location, Player player, final UUID uuid, final int entityId) throws IllegalStateException {
|
||||
public static PacketContainer getFakePlayerSpawnPacket(final Location location, final UUID uuid, final int entityId) throws IllegalStateException {
|
||||
if (playerPackets == null) throw new IllegalStateException("This cannot be used in version: " + Bukkit.getVersion());
|
||||
return playerPackets.getSpawnPacket(location, player, uuid, entityId);
|
||||
return playerPackets.getSpawnPacket(location, uuid, entityId);
|
||||
}
|
||||
|
||||
public static PacketContainer getFakePlayerInfoPacket(final Player player, final UUID uuid) throws IllegalStateException {
|
||||
if (playerPackets == null) throw new IllegalStateException("This cannot be used in version: " + Bukkit.getVersion());
|
||||
return playerPackets.getPlayerInfoPacket(player, uuid);
|
||||
}
|
||||
|
||||
public static PacketContainer getRemovePlayerPacket(final Player player, final UUID uuid, final int entityId) {
|
||||
@@ -27,7 +27,7 @@ public class User {
|
||||
private final UUID uuid;
|
||||
private final PlayerArmor playerArmor;
|
||||
|
||||
private Wardrobe wardrobe;
|
||||
protected Wardrobe wardrobe;
|
||||
|
||||
private ArmorItem lastSetItem = ArmorItem.empty(ArmorItem.Type.HAT);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class User {
|
||||
}
|
||||
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
return this.uuid;
|
||||
}
|
||||
|
||||
public PlayerArmor getPlayerArmor() {
|
||||
@@ -117,21 +117,28 @@ public class User {
|
||||
if (!this.hasArmorStand) {
|
||||
this.spawnArmorStand(settings);
|
||||
}
|
||||
for (final Player player : Bukkit.getOnlinePlayers()) {
|
||||
this.updateArmorStand(player, settings);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateArmorStand(final Player other, final Settings settings) {
|
||||
final Player player = this.getPlayer();
|
||||
|
||||
if (player == null) return;
|
||||
|
||||
this.updateArmorStand(other, settings, player.getLocation());
|
||||
}
|
||||
|
||||
public void updateArmorStand(final Player other, final Settings settings, final Location location) {
|
||||
final List<Pair<EnumWrappers.ItemSlot, ItemStack>> equipmentList = new ArrayList<>();
|
||||
equipmentList.add(new Pair<>(EnumWrappers.ItemSlot.HEAD,
|
||||
this.playerArmor.getBackpack().getColored()
|
||||
));
|
||||
|
||||
final Location location = player.getLocation();
|
||||
|
||||
final PacketContainer armorPacket = PacketManager.getEquipmentPacket(equipmentList, this.armorStandId);
|
||||
final PacketContainer rotationPacket = PacketManager.getRotationPacket(this.armorStandId, location);
|
||||
final PacketContainer ridingPacket = PacketManager.getRidingPacket(player.getEntityId(), this.armorStandId);
|
||||
final PacketContainer ridingPacket = PacketManager.getRidingPacket(this.getEntityId(), this.armorStandId);
|
||||
|
||||
final PacketContainer metaContainer = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
|
||||
|
||||
@@ -145,7 +152,7 @@ public class User {
|
||||
metaContainer.getIntegers().write(0, this.armorStandId);
|
||||
metaContainer.getWatchableCollectionModifier().write(0, metaData.getWatchableObjects());
|
||||
|
||||
PacketManager.sendPacketToOnline(armorPacket, metaContainer, rotationPacket, ridingPacket);
|
||||
PacketManager.sendPacket(other, armorPacket, metaContainer, rotationPacket, ridingPacket);
|
||||
|
||||
final int lookDownPitch = settings.getCosmeticSettings().getLookDownPitch();
|
||||
|
||||
@@ -155,7 +162,7 @@ public class User {
|
||||
new ItemStack(Material.AIR)
|
||||
));
|
||||
|
||||
PacketManager.sendPacket(player, PacketManager.getEquipmentPacket(equipmentList, this.armorStandId));
|
||||
PacketManager.sendPacket(other, PacketManager.getEquipmentPacket(equipmentList, this.armorStandId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import io.github.fisher2911.hmccosmetics.util.builder.ItemBuilder;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.EntityEquipment;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
@@ -200,6 +199,9 @@ public class UserManager {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
|
||||
switch (armorItem.getType()) {
|
||||
case HAT, OFF_HAND -> this.updateCosmetics(setUser);
|
||||
case BACKPACK -> {
|
||||
if (wardrobe.isActive()) setUser.updateArmorStand(settings);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package io.github.fisher2911.hmccosmetics.user;
|
||||
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import io.github.fisher2911.hmccosmetics.config.Settings;
|
||||
import io.github.fisher2911.hmccosmetics.gui.ArmorItem;
|
||||
import io.github.fisher2911.hmccosmetics.inventory.PlayerArmor;
|
||||
import io.github.fisher2911.hmccosmetics.packet.PacketManager;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class Wardrobe extends User {
|
||||
|
||||
private final UUID ownerUUID;
|
||||
private final int entityId;
|
||||
private boolean active;
|
||||
|
||||
private Location currentLocation;
|
||||
|
||||
public Wardrobe(
|
||||
final UUID uuid,
|
||||
final UUID ownerUUID,
|
||||
final PlayerArmor playerArmor,
|
||||
final int armorStandId,
|
||||
final int entityId,
|
||||
final boolean active) {
|
||||
super(uuid, playerArmor, armorStandId);
|
||||
this.ownerUUID = ownerUUID;
|
||||
this.entityId = entityId;
|
||||
this.active = active;
|
||||
this.wardrobe = this;
|
||||
}
|
||||
|
||||
public void spawnFakePlayer(final Player viewer, final Settings settings) {
|
||||
this.currentLocation = viewer.getLocation().clone();
|
||||
this.currentLocation.setPitch(0);
|
||||
this.currentLocation.setYaw(0);
|
||||
final PacketContainer playerSpawnPacket = PacketManager.getFakePlayerSpawnPacket(
|
||||
this.currentLocation,
|
||||
this.getUuid(),
|
||||
this.entityId
|
||||
);
|
||||
final PacketContainer playerInfoPacket = PacketManager.getFakePlayerInfoPacket(
|
||||
viewer,
|
||||
this.getUuid()
|
||||
);
|
||||
PacketManager.sendPacket(viewer, playerInfoPacket, playerSpawnPacket);
|
||||
this.spawnArmorStand(viewer);
|
||||
this.updateArmorStand(viewer, settings, this.currentLocation);
|
||||
}
|
||||
|
||||
public void despawnFakePlayer(final Player viewer) {
|
||||
PacketManager.sendPacket(viewer, PacketManager.getRemovePlayerPacket(viewer, this.getUuid(), this.getEntityId()));
|
||||
this.despawnAttached();
|
||||
this.active = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEntityId() {
|
||||
return this.entityId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermissionToUse(final ArmorItem armorItem) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setActive(final boolean active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Player getPlayer() {
|
||||
return Bukkit.getPlayer(this.ownerUUID);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.fisher2911.hmccosmetics.playerpackets;
|
||||
package io.github.fisher2911.nms.playerpackets;
|
||||
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import org.bukkit.Location;
|
||||
@@ -8,7 +8,8 @@ import java.util.UUID;
|
||||
|
||||
public interface PlayerPackets {
|
||||
|
||||
PacketContainer[] getSpawnPacket(final Location location, final Player player, final UUID uuid, final int entityId);
|
||||
PacketContainer getSpawnPacket(final Location location, UUID uuid, final int entityId);
|
||||
PacketContainer getPlayerInfoPacket(final Player player, final UUID uuid);
|
||||
PacketContainer getRemovePacket(final Player player, final UUID uuid, final int entityId);
|
||||
|
||||
}
|
||||
@@ -1,2 +1,7 @@
|
||||
rootProject.name = "HMCCosmetics"
|
||||
include("common")
|
||||
include(
|
||||
"common",
|
||||
"nms",
|
||||
"1.17",
|
||||
"1.18"
|
||||
)
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
package io.github.fisher2911.hmccosmetics.user;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import io.github.fisher2911.hmccosmetics.gui.ArmorItem;
|
||||
import io.github.fisher2911.hmccosmetics.inventory.PlayerArmor;
|
||||
import io.github.fisher2911.hmccosmetics.packet.PacketManager;
|
||||
import org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class Wardrobe extends User {
|
||||
|
||||
private final int entityId;
|
||||
private boolean active;
|
||||
|
||||
public Wardrobe(
|
||||
final UUID uuid,
|
||||
final PlayerArmor playerArmor,
|
||||
final int armorStandId,
|
||||
final int entityId,
|
||||
final boolean active) {
|
||||
super(uuid, playerArmor, armorStandId);
|
||||
this.entityId = entityId;
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public void spawnFakePlayer(final Player viewer) {
|
||||
PacketManager.sendPacket(viewer, PacketManager.getFakePlayerPacket(viewer.getLocation(), viewer, this.getUuid(), this.entityId));
|
||||
}
|
||||
|
||||
public void despawnFakePlayer(final Player viewer) {
|
||||
PacketManager.sendPacket(viewer, PacketManager.getRemovePlayerPacket(viewer, this.getUuid(), this.entityId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermissionToUse(final ArmorItem armorItem) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setActive(final boolean active) {
|
||||
this.active = active;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
cosmetic-settings:
|
||||
require-empty-helmet: false
|
||||
require-empty-off-hand: true
|
||||
# The pitch the player must look down for the backpack to be removed
|
||||
# Set to -1 for no removal
|
||||
look-down-backpack-remove: 70
|
||||
@@ -1,8 +0,0 @@
|
||||
# SQLite or MySQL (case-insensitive)
|
||||
type: "sqlite"
|
||||
# The rest of these are only required for MySQL
|
||||
name: "name"
|
||||
username: "username"
|
||||
password: "password"
|
||||
ip: "ip"
|
||||
port: 3306
|
||||
@@ -1 +0,0 @@
|
||||
version: 2
|
||||
@@ -1,100 +0,0 @@
|
||||
title: "<white>"
|
||||
rows: 4
|
||||
gui-type: dye
|
||||
cosmetics-slots:
|
||||
27: HAT
|
||||
28: BACKPACK
|
||||
29: OFF_HAND
|
||||
items:
|
||||
10:
|
||||
material: LEATHER_HORSE_ARMOR
|
||||
model-data: 1
|
||||
color:
|
||||
red: 255
|
||||
green: 255
|
||||
blue: 255
|
||||
name: "<gray>Set to <#FFFFFF>white"
|
||||
set-color:
|
||||
red: 255
|
||||
green: 255
|
||||
blue: 255
|
||||
11:
|
||||
material: LEATHER_HORSE_ARMOR
|
||||
model-data: 1
|
||||
color:
|
||||
red: 190
|
||||
green: 20
|
||||
blue: 20
|
||||
name: "<gray>Set to <#BE1414>red"
|
||||
set-color:
|
||||
red: 190
|
||||
green: 20
|
||||
blue: 20
|
||||
12:
|
||||
material: LEATHER_HORSE_ARMOR
|
||||
model-data: 1
|
||||
color:
|
||||
red: 234
|
||||
green: 92
|
||||
blue: 43
|
||||
name: "<gray>Set to <#EA5C2B>orange"
|
||||
set-color:
|
||||
red: 234
|
||||
green: 92
|
||||
blue: 43
|
||||
13:
|
||||
material: LEATHER_HORSE_ARMOR
|
||||
model-data: 1
|
||||
color:
|
||||
red: 255
|
||||
green: 201
|
||||
blue: 0
|
||||
name: "<gray>Set to <#FFC900>yellow"
|
||||
set-color:
|
||||
red: 255
|
||||
green: 201
|
||||
blue: 0
|
||||
14:
|
||||
material: LEATHER_HORSE_ARMOR
|
||||
model-data: 1
|
||||
color:
|
||||
red: 163
|
||||
green: 218
|
||||
blue: 141
|
||||
name: "<gray>Set to <#A3DA8D>green"
|
||||
set-color:
|
||||
red: 163
|
||||
green: 218
|
||||
blue: 141
|
||||
15:
|
||||
material: LEATHER_HORSE_ARMOR
|
||||
model-data: 1
|
||||
color:
|
||||
red: 55
|
||||
green: 49
|
||||
blue: 181
|
||||
name: "<gray>Set to <#3731B5>blue"
|
||||
set-color:
|
||||
red: 55
|
||||
green: 49
|
||||
blue: 181
|
||||
16:
|
||||
material: LEATHER_HORSE_ARMOR
|
||||
model-data: 1
|
||||
color:
|
||||
red: 137
|
||||
green: 70
|
||||
blue: 166
|
||||
name: "<gray>Set to <#8946A6>purple"
|
||||
set-color:
|
||||
red: 137
|
||||
green: 70
|
||||
blue: 166
|
||||
31:
|
||||
material: PAPER
|
||||
name: "<#F7DCFA>Previous Page"
|
||||
amount: 1
|
||||
model-data: 1
|
||||
action: # See how the action system works on the wiki
|
||||
any:
|
||||
open-menu: main
|
||||
@@ -1,91 +0,0 @@
|
||||
title: "<white>" # GUI Title
|
||||
rows: 5 # Rows in the GUI
|
||||
items:
|
||||
1: # GUI Slot number
|
||||
material: LEATHER_HORSE_ARMOR # Also supports Oraxen items! Format: "oraxen:item_name"
|
||||
name: "<rainbow>Colorful Hat</rainbow>"
|
||||
lore: # Lore displayed when the player owns the item
|
||||
- ""
|
||||
- "<gray>Enabled: <#6D9DC5>%enabled%"
|
||||
- "<gray>Allowed: <#6D9DC5>%allowed%"
|
||||
locked-lore: # Lore displayed when the player does not have the correct permission.
|
||||
- "<red>You do not own this item!"
|
||||
amount: 1
|
||||
model-data: 2 # CustomModelData Number
|
||||
type: HAT
|
||||
dyeable: true # Enables dyeable item feature
|
||||
color: # Sets default color for item. Uses RGB format.
|
||||
red: 5
|
||||
green: 230
|
||||
blue: 100
|
||||
action: # See how the action system works on the wiki
|
||||
any:
|
||||
open-menu: dye-menu
|
||||
permission: "cosmetics.colorful_hat" # Can be anything you want.
|
||||
id: colorful_hat # Internal identifier. Can be anything you want.
|
||||
2:
|
||||
material: PAPER
|
||||
name: "<blue>Backpack"
|
||||
lore:
|
||||
- ""
|
||||
- "<gray>Enabled: <#6D9DC5>%enabled%"
|
||||
- "<gray>Allowed: <#6D9DC5>%allowed%"
|
||||
locked-lore:
|
||||
- "<red>You do not own this item!"
|
||||
amount: 1
|
||||
model-data: 4
|
||||
type: BACKPACK
|
||||
permission: ""
|
||||
id: backpack
|
||||
3:
|
||||
material: PAPER
|
||||
name: "<blue>Lantern Cosmetic"
|
||||
lore:
|
||||
- ""
|
||||
- "<gray>Enabled: <#6D9DC5>%enabled%"
|
||||
- "<gray>Allowed: <#6D9DC5>%allowed%"
|
||||
locked-lore:
|
||||
- "<red>You do not own this item!"
|
||||
amount: 1
|
||||
model-data: 5
|
||||
type: OFF_HAND
|
||||
permission: ""
|
||||
id: lantern_cosmetic
|
||||
4:
|
||||
material: PAPER
|
||||
name: "<blue>Baseball Hat"
|
||||
lore:
|
||||
- ""
|
||||
- "<gray>Enabled: <#6D9DC5>%enabled%"
|
||||
- "<gray>Allowed: <#6D9DC5>%allowed%"
|
||||
locked-lore:
|
||||
- "<red>You do not own this item!"
|
||||
amount: 1
|
||||
model-data: 6
|
||||
type: HAT
|
||||
permission: ""
|
||||
id: baseball_hat
|
||||
37:
|
||||
material: PAPER
|
||||
name: "<#40B7D6>Previous Page"
|
||||
amount: 1
|
||||
model-data: 1
|
||||
action:
|
||||
any:
|
||||
open-menu: menu-2
|
||||
40:
|
||||
material: PAPER
|
||||
name: "<rainbow>Customization Menu</rainbow>"
|
||||
amount: 1
|
||||
model-data: 3
|
||||
action:
|
||||
any:
|
||||
open-menu: dye-menu
|
||||
43:
|
||||
material: PAPER
|
||||
name: "<#40B7D6>Next Page"
|
||||
amount: 1
|
||||
model-data: 2
|
||||
action:
|
||||
any:
|
||||
open-menu: menu-2
|
||||
@@ -1,30 +0,0 @@
|
||||
no-permission: "<white> <red>No Permission!"
|
||||
no-cosmetic-permission: "<white> <red>You do not have permission for this cosmetic!"
|
||||
set-hat: "<white> <gradient:#6D9DC5:#45CDE9>Applied hat!"
|
||||
removed-hat: "<white> <gradient:#6D9DC5:#45CDE9>Removed hat!"
|
||||
set-backpack: "<white> <gradient:#6D9DC5:#45CDE9>Applied backpack!"
|
||||
removed-backpack: "<white> <gradient:#6D9DC5:#45CDE9>Removed backpack!"
|
||||
set-off-hand: "<white> <gradient:#6D9DC5:#45CDE9>Applied offhand!"
|
||||
removed-off-hand: "<white> <gradient:#6D9DC5:#45CDE9>Removed offhand!"
|
||||
set-dye-color: "<white> <gradient:#6D9DC5:#45CDE9>Set color of %item%!"
|
||||
must-be-player: "<red>You must be a player to do this!"
|
||||
reloaded: "<white> <gradient:#00ff87:#60efff>Config files reloaded!"
|
||||
invalid-type: "<white> <red>Invalid cosmetic type, please use <u>hat</u>, <u>backpack</u> or <u>off_hand</u>!"
|
||||
set-other-backpack: "<white><gradient:#6D9DC5:#45CDE9>You have set the backpack of %player% to %type%"
|
||||
set-other-hat: "<white><gradient:#6D9DC5:#45CDE9>You have set the hat of %player% to %type%"
|
||||
set-other-off-hand: "<white><gradient:#6D9DC5:#45CDE9>You have set the off hand of %player% to %type%"
|
||||
help-command: "<#6D9DC5><st> </st> <white> <gradient:#40B7D6:#6D9DC5>HMCCosmetics - Help</gradient> <white> <#6D9DC5> <st> </st>
|
||||
|
||||
|
||||
<#5AE4B5>- <#40B7D6>/cosmetics - <#6D9DC5>Opens cosmetics GUI.
|
||||
|
||||
<#5AE4B5>- <#40B7D6>/cosmetics add <gray><USERNAME> <ID> (#HEX)</gray> - <#6D9DC5>Adds cosmetic to player.
|
||||
|
||||
<#5AE4B5>- <#40B7D6>/cosmetics remove <gray><USERNAME> <BACKPACK/HAT></gray> - <#6D9DC5>Removes cosmetic from a player.
|
||||
|
||||
<#5AE4B5>- <#40B7D6>/cosmetics dye <gray><BACKPACK/HAT></gray> - <#6D9DC5>Opens dye menu for the specified cosmetic type.
|
||||
|
||||
<#5AE4B5>- <#40B7D6>/cosmetics help - <#6D9DC5>Opens this menu.
|
||||
|
||||
|
||||
<st> </st>"
|
||||
@@ -1,3 +0,0 @@
|
||||
translations:
|
||||
true: "true"
|
||||
false: "false"
|
||||
Reference in New Issue
Block a user