Skip to content

Commit 690aa7d

Browse files
committed
fix: add silence leave for premiumvanish (fixes #167)
1 parent 3d52572 commit 690aa7d

File tree

7 files changed

+22
-13
lines changed

7 files changed

+22
-13
lines changed

multichat/dependency-reduced-pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<groupId>xyz.olivermartin.multichat</groupId>
56
<artifactId>multichat</artifactId>
6-
<version>1.9.6</version>
7+
<version>1.9.7</version>
78
<build>
89
<plugins>
910
<plugin>
@@ -47,7 +48,7 @@
4748
</repository>
4849
<repository>
4950
<id>sponge</id>
50-
<url>http://repo.spongepowered.org/maven</url>
51+
<url>https://repo.spongepowered.org/maven</url>
5152
</repository>
5253
<repository>
5354
<id>bungeecord-repo</id>
@@ -59,11 +60,11 @@
5960
</repository>
6061
<repository>
6162
<id>vault-repo</id>
62-
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
63+
<url>https://ci.ender.zone/plugin/repository/everything</url>
6364
</repository>
6465
<repository>
6566
<id>placeholderapi</id>
66-
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
67+
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
6768
</repository>
6869
<repository>
6970
<id>jitpack.io</id>
@@ -294,4 +295,3 @@
294295
</dependency>
295296
</dependencies>
296297
</project>
297-

multichat/pom.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
43
<modelVersion>4.0.0</modelVersion>
54

65
<groupId>xyz.olivermartin.multichat</groupId>
76
<artifactId>multichat</artifactId>
8-
<version>1.9.6</version>
7+
<version>1.9.7</version>
98

109
<repositories>
1110

@@ -16,7 +15,7 @@
1615

1716
<repository>
1817
<id>sponge</id>
19-
<url>http://repo.spongepowered.org/maven</url>
18+
<url>https://repo.spongepowered.org/maven</url>
2019
</repository>
2120

2221
<repository>
@@ -31,12 +30,12 @@
3130

3231
<repository>
3332
<id>vault-repo</id>
34-
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
33+
<url>https://ci.ender.zone/plugin/repository/everything</url>
3534
</repository>
3635

3736
<repository>
3837
<id>placeholderapi</id>
39-
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
38+
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
4039
</repository>
4140

4241
<repository>
@@ -167,4 +166,4 @@
167166

168167
</dependencies>
169168

170-
</project>
169+
</project>

multichat/src/main/java/xyz/olivermartin/multichat/bungee/Events.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,11 @@ public void onLogout(PlayerDisconnectEvent event) {
605605

606606
if ( ConfigManager.getInstance().getHandler("joinmessages.yml").getConfig().getBoolean("showquit") == true ) {
607607

608+
// PremiumVanish support, return as early as possible to avoid loading unnecessary resources
609+
if (MultiChat.premiumVanish && MultiChat.hideVanishedStaffInLeave && BungeeVanishAPI.isInvisible(player)) {
610+
return;
611+
}
612+
608613
String joinformat = ConfigManager.getInstance().getHandler("joinmessages.yml").getConfig().getString("networkquit");
609614
String silentformat = ConfigManager.getInstance().getHandler("joinmessages.yml").getConfig().getString("silentquit");
610615

multichat/src/main/java/xyz/olivermartin/multichat/bungee/MultiChat.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public class MultiChat extends Plugin implements Listener {
101101
public static boolean hideVanishedStaffInMsg = true;
102102
public static boolean hideVanishedStaffInStaffList = true;
103103
public static boolean hideVanishedStaffInJoin = true;
104+
public static boolean hideVanishedStaffInLeave = true;
104105

105106
public static List<String> legacyServers = new ArrayList<String>();
106107

@@ -383,6 +384,7 @@ public void onEnable() {
383384
hideVanishedStaffInMsg = configYML.getBoolean("premium_vanish.prevent_message");
384385
hideVanishedStaffInStaffList = configYML.getBoolean("premium_vanish.prevent_staff_list");
385386
hideVanishedStaffInJoin = configYML.getBoolean("premium_vanish.silence_join");
387+
hideVanishedStaffInLeave = configYML.getBoolean("premium_vanish.silence_leave");
386388
}
387389

388390
}

multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/MultiChatCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public void execute(CommandSender sender, String[] args) {
157157
MultiChat.hideVanishedStaffInMsg = ConfigManager.getInstance().getHandler("config.yml").getConfig().getSection("premium_vanish").getBoolean("prevent_message");
158158
MultiChat.hideVanishedStaffInStaffList = ConfigManager.getInstance().getHandler("config.yml").getConfig().getSection("premium_vanish").getBoolean("prevent_staff_list");
159159
MultiChat.hideVanishedStaffInJoin = ConfigManager.getInstance().getHandler("config.yml").getConfig().getSection("premium_vanish").getBoolean("silence_join");
160+
MultiChat.hideVanishedStaffInLeave = ConfigManager.getInstance().getHandler("config.yml").getConfig().getSection("premium_vanish").getBoolean("silence_leave");
160161
}
161162

162163
} else {

multichat/src/main/resources/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ premium_vanish:
271271
prevent_message: true # Prevent players being able to /msg vanished staff
272272
prevent_staff_list: true # Prevent vanished staff showing up in /staff
273273
silence_join: true # Prevent vanished players sending a join message
274+
silence_leave: true # Prevent vanished players sending a leave message
274275

275276
# Legacy (PRE-1.16) Servers
276277
# Listing servers here will mark them as 'LEGACY' servers

multichat/src/main/resources/config_fr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ premium_vanish:
276276
prevent_message: true # Bloquer l'utilisation de la commande /msg
277277
prevent_staff_list: true # Masquer de la liste /staff
278278
silence_join: true # Prevent vanished players sending a join message
279+
silence_leave: true # Prevent vanished players sending a leave message
279280

280281
# Legacy (PRE-1.16) Servers
281282
# Listing servers here will mark them as 'LEGACY' servers

0 commit comments

Comments
 (0)