Skip to content

Commit

Permalink
Merge pull request #142 from beanbeanjuice/integration
Browse files Browse the repository at this point in the history
Release v0.3.7
  • Loading branch information
beanbeanjuice committed May 13, 2024
2 parents 52c3cfa + 8056123 commit 328e737
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = "com.beanbeanjuice"
version = "0.3.6"
version = "0.3.7"

java {
sourceCompatibility = JavaVersion.VERSION_17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void initializeVelocityVanishListener() {
@Subscribe(order = PostOrder.LAST)
public void onPlayerChat(PlayerChatEvent event) {
Player player = event.getPlayer();
if (VelocityVanishAPI.isInvisible(player)) return;
if (plugin.getConfig().getAsBoolean(ConfigDataKey.VANISH_ENABLED) && VelocityVanishAPI.isInvisible(player)) return;
if (!Helper.playerCanChat(plugin.getConfig(), player.getUniqueId(), player.getUsername())) return;

event.getPlayer().getCurrentServer().ifPresent((connection) -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.beanbeanjuice.simpleproxychat.utility.listeners.velocity;

import com.beanbeanjuice.simpleproxychat.SimpleProxyChatVelocity;
import com.beanbeanjuice.simpleproxychat.utility.config.ConfigDataKey;
import com.velocitypowered.api.proxy.Player;
import de.myzelyam.api.vanish.VelocityVanishAPI;

Expand All @@ -27,6 +28,8 @@ private boolean hasStateChange(Player player) {
}

private void checkStateChange() {
if (!plugin.getConfig().getAsBoolean(ConfigDataKey.VANISH_ENABLED)) return;

plugin.getProxyServer().getAllPlayers().forEach(player -> {
if (hasStateChange(player)) {
if (vanishedPlayers.get(player)) listener.leave(player);
Expand Down

0 comments on commit 328e737

Please sign in to comment.