File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/main/java/io/github/jochyoua/mychristianswearfilter/shared Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 19
19
import org .bukkit .configuration .file .FileConfiguration ;
20
20
import org .bukkit .configuration .file .YamlConfiguration ;
21
21
import org .bukkit .entity .Player ;
22
+ import org .bukkit .plugin .Plugin ;
22
23
23
24
import java .awt .Color ;
24
25
import java .io .File ;
@@ -303,16 +304,25 @@ public boolean supported(String string) {
303
304
statement = Integer .parseInt (Bukkit .getBukkitVersion ().split ("[.\\ -]" )[1 ]) >= 16 ;
304
305
break ;
305
306
case "discordsrv" :
306
- statement = plugin .getConfig ().getBoolean ("settings.discordSRV.enabled" ) && (plugin .getServer ().getPluginManager ().getPlugin ("DiscordSRV" ) != null );
307
+ Plugin discordSrv = plugin .getServer ().getPluginManager ().getPlugin ("DiscordSRV" );
308
+ if (plugin .getConfig ().getBoolean ("settings.discordSRV.enabled" ) && discordSrv != null ) {
309
+ statement = discordSrv .isEnabled ();
310
+ }
307
311
break ;
308
312
case "protocollib" :
309
- statement = plugin .getServer ().getPluginManager ().getPlugin ("ProtocolLib" ) != null ;
313
+ Plugin protocolLib = plugin .getServer ().getPluginManager ().getPlugin ("ProtocolLib" );
314
+ if (protocolLib != null ) {
315
+ statement = protocolLib .isEnabled ();
316
+ }
310
317
break ;
311
318
case "mysql" :
312
319
statement = Manager .FileManager .getFile (plugin , "sql" ).getBoolean ("mysql.enabled" ) && plugin .getHikariCP ().isEnabled ();
313
320
break ;
314
321
case "placeholderapi" :
315
- statement = (plugin .getServer ().getPluginManager ().getPlugin ("PlaceholderAPI" ) != null ) && plugin .getConfig ().getBoolean ("settings.enable placeholder api" );
322
+ Plugin placeholderAPI = plugin .getServer ().getPluginManager ().getPlugin ("PlaceholderAPI" );
323
+ if (plugin .getConfig ().getBoolean ("settings.enable placeholder api" ) && placeholderAPI != null ) {
324
+ statement = placeholderAPI .isEnabled ();
325
+ }
316
326
break ;
317
327
}
318
328
return statement ;
You can’t perform that action at this time.
0 commit comments