mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-19 15:09:23 +00:00
fix carbonchat hook
This commit is contained in:
@@ -19,6 +19,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(project(":api"))
|
compileOnly(project(":api"))
|
||||||
compileOnly(project(":backend"))
|
compileOnly(project(":backend"))
|
||||||
|
compileOnly("net.kyori:adventure-api:${rootProject.properties["adventure_bundle_version"]}")
|
||||||
compileOnly("dev.dejvokep:boosted-yaml:${rootProject.properties["boosted_yaml_version"]}")
|
compileOnly("dev.dejvokep:boosted-yaml:${rootProject.properties["boosted_yaml_version"]}")
|
||||||
// WorldGuard
|
// WorldGuard
|
||||||
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.9")
|
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.9")
|
||||||
@@ -27,11 +28,11 @@ dependencies {
|
|||||||
// Chat
|
// Chat
|
||||||
compileOnly(files("libs/VentureChat-3.7.1.jar"))
|
compileOnly(files("libs/VentureChat-3.7.1.jar"))
|
||||||
compileOnly(files("libs/TrChat-2.0.11.jar"))
|
compileOnly(files("libs/TrChat-2.0.11.jar"))
|
||||||
compileOnly(files("libs/carbonchat-paper-3.0.0-beta.27.jar"))
|
|
||||||
compileOnly(files("libs/AdvancedChat-1.3.7.jar"))
|
compileOnly(files("libs/AdvancedChat-1.3.7.jar"))
|
||||||
compileOnly(files("libs/CMIAPI-9.7.4.1.jar"))
|
compileOnly(files("libs/CMIAPI-9.7.4.1.jar"))
|
||||||
compileOnly(files("libs/ChatControl-11.3.1.jar"))
|
compileOnly(files("libs/ChatControl-11.3.1.jar"))
|
||||||
compileOnly(files("libs/Typewriter.jar"))
|
compileOnly(files("libs/Typewriter.jar"))
|
||||||
|
compileOnly("de.hexaoxi:carbonchat-api:3.0.0-beta.36")
|
||||||
compileOnly("net.william278.huskchat:huskchat-bukkit:3.0.4")
|
compileOnly("net.william278.huskchat:huskchat-bukkit:3.0.4")
|
||||||
compileOnly("net.essentialsx:EssentialsX:2.20.1")
|
compileOnly("net.essentialsx:EssentialsX:2.20.1")
|
||||||
compileOnly("net.essentialsx:EssentialsXChat:2.20.1")
|
compileOnly("net.essentialsx:EssentialsXChat:2.20.1")
|
||||||
@@ -65,6 +66,6 @@ java {
|
|||||||
|
|
||||||
tasks.withType<JavaCompile> {
|
tasks.withType<JavaCompile> {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
options.release.set(17)
|
options.release.set(21)
|
||||||
dependsOn(tasks.clean)
|
dependsOn(tasks.clean)
|
||||||
}
|
}
|
||||||
Binary file not shown.
@@ -49,7 +49,7 @@ public class CarbonChatProvider extends AbstractChatMessageProvider {
|
|||||||
|
|
||||||
public CarbonChatProvider(CustomNameplates plugin, ChatManager manager) {
|
public CarbonChatProvider(CustomNameplates plugin, ChatManager manager) {
|
||||||
super(plugin, manager);
|
super(plugin, manager);
|
||||||
this.api = net.draycia.carbon.api.CarbonChatProvider.carbonChat();
|
api = net.draycia.carbon.api.CarbonChatProvider.carbonChat();
|
||||||
try {
|
try {
|
||||||
this.originalMessageMethod = CarbonChatEvent.class.getMethod("originalMessage");
|
this.originalMessageMethod = CarbonChatEvent.class.getMethod("originalMessage");
|
||||||
this.channelKeyMethod = ChatChannel.class.getMethod("key");
|
this.channelKeyMethod = ChatChannel.class.getMethod("key");
|
||||||
@@ -172,11 +172,8 @@ public class CarbonChatProvider extends AbstractChatMessageProvider {
|
|||||||
if (channel == null) {
|
if (channel == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String perm = channel.permission();
|
CarbonPlayer carbonPlayer = this.api.userManager().user(player.uuid()).join();
|
||||||
if (perm == null) {
|
return channel.permissions().joinPermitted(carbonPlayer).permitted();
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return player.hasPermission(perm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user