⚡ Sangsakala Proxy 🏠 Home
Skip to content

Add action bar API #23

Open
Open

Description

@KelpyCode

Is there any way to use or implement the protocol of the action bar?
I've seen there are some libs/snippets of using them with Java, altough you can't really implement it at this point with JS/TS

Other than that, I like this project a lot, by this I can finally make decent plugins by using JS and just skip that whole Java bs
I hope you are going to support it in future

Activity

  1. astorks commented on Jun 3, 2020

    @astorks
    Owner

    Let me do a bit of research and figure out how best to add an action bar api.
    Do you have any specific minecraft version you are targeting?

    And thanks, I'm glad you like this project. I figured it would help some developers who don't like/know java still be able to create fully featured plugins. I for sure plan on supporting this plugin well into the future, including 1.16 support, new features, api's, etc.


    6/6/2020
    https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.Spigot.html#sendMessage-net.md_5.bungee.api.ChatMessageType-net.md_5.bungee.api.chat.BaseComponent-
    Looks like spigot already has an api, i just need to allow the script engine access to spigot api's


    6/8/2020
    I've updated the dev branch to support spigot api's you can download a dev build with the link below, the zip includes the plugin jar and the typescript/javascript libraries. I'll update the release build with these changes later this week.
    https://github.com/astorks/ScriptableMC-Engine/actions/runs/127842177

    import ChatMessageType from '../lib/net/md_5/bungee/api/ChatMessageType.js';
    import ComponentBuilder from '../lib/net/md_5/bungee/api/chat/ComponentBuilder.js';
    import SpigotChatColor from '../lib/net/md_5/bungee/api/ChatColor.js';
    
    ...
    
    let componentBuilder = new ComponentBuilder("Hello World!!").color(SpigotChatColor.AQUA);
    player.spigot().sendMessage(ChatMessageType.ACTION_BAR, componentBuilder.getParts());
    
    ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions