FunctionalServerControl icon

FunctionalServerControl -----

Great functionality for player/server control



Update 1.09.5
Bugs, bugs, and more bugs. Well, nothing, I'll fix it on the sly =)

Briefly about the update:
  • The problem with MySQL and SQLite has been fixed (in theory)
  • Now clickable messages and hover text are available on server versions from 1.8 to 1.19.3
  • AdventureAPI support has been removed (well, except for places with events from Paper)
  • Added a convenient (in my opinion) component for working with components from md_5
Examples for those who use the API of this plugin (if there are any):
Code (Java):
package your.custom.pack ;

import net.alis.functionalservercontrol.api.FunctionalApi ;
import net.alis.functionalservercontrol.libraries.net.md_5.bungee.api.chat.ClickEvent ;
import net.alis.functionalservercontrol.libraries.net.md_5.bungee.api.chat.HoverEvent ;
import net.alis.functionalservercontrol.libraries.net.md_5.bungee.api.chat.TextComponent ;
import net.alis.functionalservercontrol.spigot.additional.textcomponents.Component ;

public class Example {

    public void sendCoolMessage (Player player ) {
        FunctionalApi api = FunctionalApi. get ( ) ;
        if (api != null ) {
            Component. SimplifiedComponent [ ] components = new Component. SimplifiedComponent [ ] { new Component. SimplifiedComponent ( "" ) } ;
            TextComponent [ ] components2 = new TextComponent [ ] { new TextComponent ( "" ), new TextComponent ( "" ) } ;
            Component. SimplifiedComponent simplifiedComponent = new Component. SimplifiedComponent ( ) ; //Creating a lightweight version of TextComponent from md_5
            simplifiedComponent
                    . append ( new TextComponent ( "your " ) )
                    . append ( "custom " )
                    . append ( " ", components ) // " " - delimiter
                    . append ( " ", components2 )
                    . setHoverEvent (HoverEvent. Action. SHOW_TEXT, "Some hover text" )
                    . setClickEvent (ClickEvent. Action. OPEN_URL, "https://vk.com/alphatwo" )
                    . appendOnStart ( new Component. SimplifiedComponent ( "re " ) )
                    . appendOnStart ( "He" )
                    . translateDefaultColorCodes ( ) ; //Correctly replaces color codes (usually when switching to a new line, colors using '§' and '&' do not work)
            String content = simplifiedComponent. getString ( ) ; //We get the text content of the component
            TextComponent component = simplifiedComponent. get ( ) ;   //We get the original component from md_5
            api. getCoreAdapter ( ). expansion ( ). sendMessage (player, simplifiedComponent ) ; //We send the Simplified Component to the player
            api. getCoreAdapter ( ). expansion ( ). sendMessage (player, component ) ; //We send the original component to the player

            player. spigot ( ). sendMessage (simplifiedComponent ) ; // <- Does not work
            player. spigot ( ). sendMessage (component ) ; // <- Does not work
        }
    }

}
----------, Jan 22, 2023
Resource Information
Author:
----------
Total Downloads: 481
First Release: Jan 18, 2023
Last Update: Jan 22, 2023
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings