Skip to content

Commit e10cfcc

Browse files
committed
feat: add silence leave for premiumvanish (fixes #167)
1 parent 3d52572 commit e10cfcc

File tree

7 files changed

+21
-12
lines changed

7 files changed

+21
-12
lines changed

multichat/dependency-reduced-pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>xyz.olivermartin.multichat</groupId>
55
<artifactId>multichat</artifactId>
6-
<version>1.9.6</version>
6+
<version>1.9.7</version>
77
<build>
88
<plugins>
99
<plugin>
@@ -47,7 +47,7 @@
4747
</repository>
4848
<repository>
4949
<id>sponge</id>
50-
<url>http://repo.spongepowered.org/maven</url>
50+
<url>https://repo.spongepowered.org/maven</url>
5151
</repository>
5252
<repository>
5353
<id>bungeecord-repo</id>
@@ -59,11 +59,11 @@
5959
</repository>
6060
<repository>
6161
<id>vault-repo</id>
62-
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
62+
<url>https://ci.ender.zone/plugin/repository/everything</url>
6363
</repository>
6464
<repository>
6565
<id>placeholderapi</id>
66-
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
66+
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
6767
</repository>
6868
<repository>
6969
<id>jitpack.io</id>
@@ -80,7 +80,7 @@
8080
<dependency>
8181
<groupId>org.spongepowered</groupId>
8282
<artifactId>spongeapi</artifactId>
83-
<version>7.1.0</version>
83+
<version>7.3.0</version>
8484
<scope>provided</scope>
8585
<exclusions>
8686
<exclusion>

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)