diff --git a/api/pom.xml b/api/pom.xml index ce30257..0025120 100755 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,6 +19,14 @@ chat-api jar + + + dv8tion + m2-dv8tion + https://m2.dv8tion.net/releases + + + org.spongepowered @@ -43,6 +51,23 @@ 5.3 provided + + com.alttd + galaxy-api + 1.17-R0.1-SNAPSHOT + compile + + + com.alttd + galaxy-api + 1.17-R0.1-SNAPSHOT + compile + + + net.dv8tion + JDA + 4.3.0_291 + \ No newline at end of file diff --git a/galaxy/pom.xml b/galaxy/pom.xml index a14a6d6..200d026 100755 --- a/galaxy/pom.xml +++ b/galaxy/pom.xml @@ -71,6 +71,15 @@ placeholderapi https://repo.extendedclip.com/content/repositories/placeholderapi/ + + dv8tion + m2-dv8tion + https://m2.dv8tion.net/releases + + + jitpack.io + https://jitpack.io + @@ -95,11 +104,22 @@ slf4j-api 1.7.30 + + net.dv8tion + JDA + 4.3.0_291 + me.clip placeholderapi 2.10.10 provided + + com.gitlab.ruany + LiteBansAPI + 0.3.4 + provided + \ No newline at end of file diff --git a/galaxy/src/main/java/com/alttd/chat/handler/ChatHandler.java b/galaxy/src/main/java/com/alttd/chat/handler/ChatHandler.java index ba979fd..b53e0ad 100755 --- a/galaxy/src/main/java/com/alttd/chat/handler/ChatHandler.java +++ b/galaxy/src/main/java/com/alttd/chat/handler/ChatHandler.java @@ -9,6 +9,7 @@ import com.alttd.chat.util.Utility; import com.alttd.chat.util.Utils; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; +import litebans.api.Database; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.minimessage.MiniMessage; @@ -63,7 +64,7 @@ public class ChatHandler { sendPrivateMessage(player, target, "privatemessage", component); Component spymessage = miniMessage.parse(Config.MESSAGESPY, templates); for(Player pl : Bukkit.getOnlinePlayers()) { - if(pl.hasPermission("chat.social-spy")) { // todo add a toggle for social spy + if(pl.hasPermission("chat.social-spy") && !pl.equals(player) && !pl.getName().equalsIgnoreCase(target)) { // todo add a toggle for social spy pl.sendMessage(spymessage); } } @@ -75,6 +76,12 @@ public class ChatHandler { player.sendMessage(GCNOTENABLED);// GC IS OFF INFORM THEM ABOUT THIS and cancel return; } + + if (Database.get().isPlayerMuted(player.getUniqueId(), null)) { + Utils.sendBlockedNotification("Muted" ,player, message, ""); + return; + } + long timeLeft = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - user.getGcCooldown()); if(timeLeft <= Config.GCCOOLDOWN && !player.hasPermission("chat.globalchat.cooldownbypass")) { // player is on cooldown and should wait x seconds player.sendMessage(miniMessage.parse(Config.GCONCOOLDOWN, Template.of("cooldown", Config.GCCOOLDOWN-timeLeft+"")));