mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +00:00
Fixed needing permissions to view items in wardrobe
This commit is contained in:
10
.idea/modules/1.18/HMCCosmetics.1.18.main.iml
generated
10
.idea/modules/1.18/HMCCosmetics.1.18.main.iml
generated
@@ -1,5 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module version="4">
|
<module version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="minecraft" name="Minecraft">
|
||||||
|
<configuration>
|
||||||
|
<autoDetectTypes>
|
||||||
|
<platformType>MCP</platformType>
|
||||||
|
<platformType>SPIGOT</platformType>
|
||||||
|
</autoDetectTypes>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
<component name="McpModuleSettings">
|
<component name="McpModuleSettings">
|
||||||
<option name="srgType" value="SRG" />
|
<option name="srgType" value="SRG" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
23
1.17/build.gradle.kts
Normal file
23
1.17/build.gradle.kts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
plugins {
|
||||||
|
id("java")
|
||||||
|
}
|
||||||
|
|
||||||
|
//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://jitpack.io")
|
||||||
|
maven("https://repo.dmulloy2.net/repository/public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
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")
|
||||||
|
}
|
||||||
23
1.18/build.gradle.kts
Normal file
23
1.18/build.gradle.kts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
plugins {
|
||||||
|
id("java")
|
||||||
|
}
|
||||||
|
|
||||||
|
//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://jitpack.io")
|
||||||
|
maven("https://repo.dmulloy2.net/repository/public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":nms"))
|
||||||
|
compileOnly("com.mojang:authlib:1.5.25")
|
||||||
|
compileOnly("org.spigotmc:spigot:1.18-R0.1-SNAPSHOT")
|
||||||
|
compileOnly("org.jetbrains:annotations:22.0.0")
|
||||||
|
compileOnly("com.comphenix.protocol:ProtocolLib:4.7.0")
|
||||||
|
}
|
||||||
@@ -40,14 +40,12 @@ public class DatabaseConverter {
|
|||||||
FILE_NAME
|
FILE_NAME
|
||||||
).toFile();
|
).toFile();
|
||||||
|
|
||||||
final boolean fileExists = file.exists();
|
|
||||||
|
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
this.plugin.saveResource("database" + File.separator + FILE_NAME, true);
|
this.plugin.saveResource("database" + File.separator + FILE_NAME, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
final YamlConfiguration config = YamlConfiguration.loadConfiguration(file);
|
final YamlConfiguration config = YamlConfiguration.loadConfiguration(file);
|
||||||
final int version = fileExists ? config.getInt("version") : 1;
|
final int version = config.getInt("version") == 0 ? 1 : config.getInt("version");
|
||||||
|
|
||||||
final Set<User> users = new HashSet<>();
|
final Set<User> users = new HashSet<>();
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ public class CosmeticGui {
|
|||||||
final String permission =
|
final String permission =
|
||||||
armorItem.getPermission() == null ? "" : armorItem.getPermission();
|
armorItem.getPermission() == null ? "" : armorItem.getPermission();
|
||||||
|
|
||||||
final boolean hasPermission = permission.isBlank() || player.hasPermission(permission);
|
final boolean hasPermission = permission.isBlank() || user.hasPermissionToUse(armorItem);
|
||||||
|
|
||||||
return new GuiItem(
|
return new GuiItem(
|
||||||
this.applyPlaceholders(user, player, armorItem, hasPermission),
|
this.applyPlaceholders(user, player, armorItem, hasPermission),
|
||||||
|
|||||||
22
nms/build.gradle.kts
Normal file
22
nms/build.gradle.kts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
plugins {
|
||||||
|
id("java")
|
||||||
|
}
|
||||||
|
|
||||||
|
//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://jitpack.io")
|
||||||
|
maven("https://repo.dmulloy2.net/repository/public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly("com.mojang:authlib:1.5.25")
|
||||||
|
compileOnly("org.spigotmc:spigot:1.18-R0.1-SNAPSHOT")
|
||||||
|
compileOnly("org.jetbrains:annotations:22.0.0")
|
||||||
|
compileOnly("com.comphenix.protocol:ProtocolLib:4.7.0")
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user