Enum MessageChannel

    • Method Detail

      • values

        public static MessageChannel[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MessageChannel c : MessageChannel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MessageChannel valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • parse

        @Nullable
        public static @Nullable MessageChannel parse​(@NotNull
                                                     @NotNull String channel)
        Parse the channel as MessageChannel.
        Parameters:
        channel - the channel to parse
        Returns:
        the enum for the channel
      • parseAsBungeecord

        @Nullable
        public static @Nullable MessageChannel parseAsBungeecord​(@NotNull
                                                                 @NotNull String channel,
                                                                 @NotNull
                                                                 @NotNull ADPPlugin plugin)
        Parse the Bungeecord channel as MessageChannel. The channel uses the syntax "plugin:channel" or "Bungeecord"
        Parameters:
        channel - the channel to parse
        plugin - the plugin instance
        Returns:
        the enum for the channel
      • parseAsVelocity

        @Nullable
        public static @Nullable MessageChannel parseAsVelocity​(@NotNull
                                                               @NotNull String channel,
                                                               @NotNull
                                                               @NotNull ADPPlugin plugin)
        Parse the Velocity channel as MessageChannel. The channel uses the syntax "plugin:channel" or "Bungeecord"
        Parameters:
        channel - the channel to parse
        plugin - the plugin instance
        Returns:
        the enum for the channel