File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/pro/cloudnode/smp/cloudnodemsg Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 11package pro .cloudnode .smp .cloudnodemsg ;
22
3+ import org .bukkit .entity .Player ;
4+ import org .bukkit .metadata .MetadataValue ;
35import org .bukkit .plugin .java .JavaPlugin ;
46import org .jetbrains .annotations .NotNull ;
57import pro .cloudnode .smp .cloudnodemsg .command .MainCommand ;
@@ -33,6 +35,12 @@ public void onDisable() {
3335 // Plugin shutdown logic
3436 }
3537
38+ public static boolean isVanished (final @ NotNull Player player ) {
39+ for (final @ NotNull MetadataValue meta : player .getMetadata ("vanished" ))
40+ if (meta .asBoolean ()) return true ;
41+ return false ;
42+ }
43+
3644 private final @ NotNull PluginConfig config = new PluginConfig (getConfig ());
3745
3846 public @ NotNull PluginConfig config () {
You can’t perform that action at this time.
0 commit comments