mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-04 05:26:55 +00:00
adds support for vanish plugins
This commit is contained in:
@@ -118,6 +118,15 @@ public class PlexUtils implements PlexBase
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean hasVanishPlugin()
|
||||
{
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("SuperVanish") || Bukkit.getPluginManager().isPluginEnabled("PremiumVanish"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isPluginCMD(String cmd, String pluginName)
|
||||
{
|
||||
Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(pluginName);
|
||||
@@ -157,7 +166,7 @@ public class PlexUtils implements PlexBase
|
||||
|
||||
return LEGACY_FORMATTING_PATTERN.matcher(input).find() ?
|
||||
LegacyComponentSerializer.legacyAmpersand().deserialize(input.replaceAll("([§&]+)(k+)", "") // Ugly hack, but it tries to prevent &k and any attempts to bypass it.
|
||||
).decoration(TextDecoration.OBFUSCATED, TextDecoration.State.FALSE) :
|
||||
).decoration(TextDecoration.OBFUSCATED, TextDecoration.State.FALSE) :
|
||||
SafeMiniMessage.mmDeserializeWithoutEvents(input);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user