4
4
import com .cryptomorin .xseries .messages .Titles ;
5
5
import github .scarsz .discordsrv .util .DiscordUtil ;
6
6
import jss .customjoinandquitmessages .CustomJoinAndQuitMessages ;
7
- import jss .customjoinandquitmessages .hook .DiscordSRVHHook ;
8
- import jss .customjoinandquitmessages .hook .EssentialsXDiscordHook ;
9
- import jss .customjoinandquitmessages .hook .EssentialsXHook ;
10
- import jss .customjoinandquitmessages .hook .LuckPermsHook ;
7
+ import jss .customjoinandquitmessages .hook .*;
11
8
import jss .customjoinandquitmessages .json .MessageBuilder ;
12
9
import jss .customjoinandquitmessages .manager .HookManager ;
13
10
import jss .customjoinandquitmessages .manager .PlayerManager ;
@@ -48,6 +45,7 @@ public void onJoinListener(@NotNull PlayerJoinEvent e) {
48
45
LuckPermsHook luckPermsHook = HookManager .getInstance ().getLuckPermsHook ();
49
46
EssentialsXDiscordHook essentialsXDiscordHook = HookManager .getInstance ().getEssentialsXDiscordHook ();
50
47
EssentialsXHook essentialsXHook = HookManager .get ().getEssentialsXHook ();
48
+ SuperVanishHook superVanishHook = HookManager .get ().getSuperVanishHook ();
51
49
Player p = e .getPlayer ();
52
50
String tempGroup ;
53
51
@@ -92,6 +90,18 @@ public void onJoinListener(@NotNull PlayerJoinEvent e) {
92
90
Util .sendColorMessage (p , Util .getVar (p , text ));
93
91
}
94
92
93
+ if (Util .isVanished (p )){
94
+ e .setJoinMessage (null );
95
+ return ;
96
+ }
97
+
98
+ if (superVanishHook .isEnabled ()){
99
+ if (superVanishHook .isVanishPlayer (p )){
100
+ e .setJoinMessage (null );
101
+ return ;
102
+ }
103
+ }
104
+
95
105
if (essentialsXHook .isEnabled ()) {
96
106
if (Settings .hook_essentials_hideplayervanish ) {
97
107
if (essentialsXHook .isVanish (p )) {
@@ -168,7 +178,7 @@ public void onJoinListener(@NotNull PlayerJoinEvent e) {
168
178
String Action_Url = config .getString ("Join.ClickEvent.Actions.Url" );
169
179
String Action_Suggest = config .getString ("Join.ClickEvent.Actions.Suggest-Command" );
170
180
171
- List <String > Action_Dev = config .getStringList ("Join.ClickEvent.DevActions" );
181
+ // List<String> Action_Dev = config.getStringList("Join.ClickEvent.DevActions");
172
182
173
183
String Title_Text = config .getString ("Join.Title.Title" );
174
184
String SubTitle_Text = config .getString ("Join.Title.SubTitle" );
@@ -199,7 +209,7 @@ public void onJoinListener(@NotNull PlayerJoinEvent e) {
199
209
200
210
if (isClick ) {
201
211
202
- for (String action : Action_Dev ){
212
+ /* for(String action : Action_Dev){
203
213
204
214
String[] parts = action.split(":");
205
215
String type = parts[0].trim();
@@ -220,9 +230,8 @@ public void onJoinListener(@NotNull PlayerJoinEvent e) {
220
230
break;
221
231
}
222
232
}
223
- messageBuilder .sendToAll ();
233
+ messageBuilder.sendToAll();*/
224
234
225
- /** Temp Disabled
226
235
assert isClick_Mode != null ;
227
236
if (isClick_Mode .equalsIgnoreCase ("command" )) {
228
237
messageBuilder .setExecuteCommand (Action_Command ).sendToAll ();
@@ -231,7 +240,7 @@ public void onJoinListener(@NotNull PlayerJoinEvent e) {
231
240
} else if (isClick_Mode .equalsIgnoreCase ("suggest" )) {
232
241
messageBuilder .setSuggestCommand (Action_Suggest ).sendToAll ();
233
242
}
234
- */
243
+
235
244
236
245
} else {
237
246
messageBuilder .sendToAll ();
@@ -300,12 +309,25 @@ public void onQuit(@NotNull PlayerQuitEvent e) {
300
309
DiscordSRVHHook discordSRVHHook = HookManager .getInstance ().getDiscordSRVHHook ();
301
310
EssentialsXDiscordHook essentialsXDiscordHook = HookManager .getInstance ().getEssentialsXDiscordHook ();
302
311
EssentialsXHook essentialsXHook = HookManager .get ().getEssentialsXHook ();
312
+ SuperVanishHook superVanishHook = HookManager .get ().getSuperVanishHook ();
303
313
PlayerManager playerManager = new PlayerManager ();
304
314
305
315
boolean isNormal = Settings .c_type .equalsIgnoreCase ("normal" );
306
316
boolean isGroup = Settings .c_type .equalsIgnoreCase ("group" );
307
317
boolean isNone = Settings .c_type .equalsIgnoreCase ("none" );
308
318
319
+ if (Util .isVanished (p )){
320
+ e .setQuitMessage (null );
321
+ return ;
322
+ }
323
+
324
+ if (superVanishHook .isEnabled ()){
325
+ if (superVanishHook .isVanishPlayer (p )){
326
+ e .setQuitMessage (null );
327
+ return ;
328
+ }
329
+ }
330
+
309
331
if (essentialsXHook .isEnabled ()) {
310
332
if (Settings .hook_essentials_hideplayervanish ) {
311
333
if (essentialsXHook .isVanish (p )) {
@@ -443,4 +465,6 @@ public void onQuit(@NotNull PlayerQuitEvent e) {
443
465
}
444
466
}
445
467
468
+
469
+
446
470
}
0 commit comments