SuperVanish Support

Discussion in 'Plugin Development' started by MDev, May 29, 2021.

  1. Offline


    I want to ask how can I implement support for the SuperVanish plugin in my plugin? Specifically, I need to change the Join and Quit messages when a player types the /vanish command.
    I tried the code provided by the developer himself, but unfortunately it doesn't work for me:
    public static boolean isVanished(Player player) {
    for (MetadataValue meta : player.getMetadata("vanished")) {
    if (meta.asBoolean()) return true;}
    return false;}
    public void joinEvent(PlayerJoinEvent e) {
    Player p = e.getPlayer();
    if (Bukkit.getPluginManager().isPluginEnabled("SuperVanish") || Bukkit.getPluginManager().isPluginEnabled("PremiumVanish")) {
    if (isVanished(p)) {
    So how can I change these yellow messages that SuperVanish has there?

  2. Offline


    @MDev What do you want exactly? Do the leave and join messages occur when the player types the command or something else? If you want to remove the "player.getName() left the game" & "player.getName() joined the game" I'd recommend that you put nothing inside of the "e.setJoinMessage(String s);" method.

Share This Page