Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method to set player's scoreboard group and/or custom triggers #25

Closed
2 tasks done
mattyokan opened this issue May 8, 2019 · 14 comments
Closed
2 tasks done

Method to set player's scoreboard group and/or custom triggers #25

mattyokan opened this issue May 8, 2019 · 14 comments
Labels
Concerns: Developer API This refers to the public access developer API. Status: Active Progress Progress on this issue is being made and it is under active development

Comments

@mattyokan
Copy link

mattyokan commented May 8, 2019

Feature request

This template is for suggesting changes or new features to KiteBoard.
For reporting issues and/or bugs, use the Bug Report template!

Confirmation

I confirm, that I made the following steps:

Feature

What feature should be added to KiteBoard? What should be improved?
Describe it as good as possible.

It would be great to have at least a method to set a player's active scoreboard. If you're motivated, a custom trigger system would also be great, but that's quite a bit of work haha

Reasons to add/improve

Why should it be added or changed?
Reasons like "It's cool." don't count! Give real reasons.

I want to be able to switch scoreboards for our server based on our own conditions (such as a player having a faction). It should be simple really given that it's already a command, should just be a couple of lines.

Images/Links

Provide links/images of the feature/improvement (if possible).
Code examples are also accepted.

Not an image but I would imagine it as something like this in the KiteboardAPI class.

    /**
     * Set a player's current scoreboard group.
     * @param player The player to set
     * @param group The name of the group
     */
    public static void setScoreboardGroup(Player player, String group) {
        // Your implementation
    }
@Niall7459
Copy link
Owner

I have plans to add full developer api to KiteBoard with everything included, first I think the whole event trigger system needs an overhaul, once I’ve somewhat got a stable plan of an API design that will hold out for the most, if not rest of KiteBoards existence, I will add this.

Another possibility could be assignment based on conditions I.e %player_health% <= 2.0.

Overall this sounds like a great idea though, will defiantly get looking into it once my exams are over.

Thanks for your suggestion.

@Niall7459 Niall7459 added Priority: Low No immediate attention required request feature New feature, improvement or similar. labels May 8, 2019
@mattyokan
Copy link
Author

Has a more in-depth API been implemented as of yet @Niall7459? I'm returning to a project where contextual scoreboards (especially based on different locations/worldguard regions) are necessary, and I would love to use KiteBoard as the network I work for uses it and I would much prefer it over having to develop my own scoreboard or use an alternative. I checked the wiki and the API page has seemed to stay the same.

@Niall7459
Copy link
Owner

Hi, if you could provide me with a list of features/abilities that you need the API to perform I will implement it.

@mattyokan
Copy link
Author

I'm mostly just looking for an API to set a player's currently active scoreboard based on conditions that I need. I have various combinations of conditions (things like entering a world, entering different worldguard regions within a world, etc.) where I will need to display contextual scoreboards to the player to show them the most relevant information.

@mattyokan
Copy link
Author

Anything @Niall7459?

@Niall7459
Copy link
Owner

Will add in next version 3.0.9

@Niall7459
Copy link
Owner

Niall7459 commented May 9, 2020

Just to let you know this is actively being worked on

Will you need to be able to programatically create scoreboards? Or are you still using configuration based scoreboards and only need to be able to set them?

@Niall7459 Niall7459 added Status: Active Progress Progress on this issue is being made and it is under active development Priority: Medium Attention required in near future Concerns: Developer API This refers to the public access developer API. and removed Priority: Low No immediate attention required Version: Release 3 labels May 11, 2020
@Niall7459
Copy link
Owner

Will you need to be able to programatically create scoreboards? Or are you still using configuration based scoreboards and only need to be able to set them?

@mattyokan
Copy link
Author

Should be fine to only need to set them to ones predefined in config, I don't believe programatically creating scoreboards is necessary (although it could be nice). Sorry for the late reply (final exams this week and last week).

@Niall7459
Copy link
Owner

No problem

There will most likely be two ways to do this

  1. using methods such as setGroup
  2. registering a custom criteria. in which you would return true when you want to show your board. (probably preferred way)

@Niall7459
Copy link
Owner

This is pretty much ready, just waiting for last part of api to be reviewed.

@Niall7459
Copy link
Owner

Added
https://github.com/Niall7459/KiteBoard-Documentation/wiki/Developer-API

Api jar is available on the released tab

Any issues reach out to me

#47
https://github.com/Niall7459/KiteBoard-Documentation/issues/39
#36

@Niall7459
Copy link
Owner

How is the api working for you?

@mattyokan
Copy link
Author

The criteria system is useful. I'm using it for showing a KOTH board when the user is near the KOTH location. Thanks again for adding it!

@Niall7459 Niall7459 pinned this issue Aug 13, 2020
@Niall7459 Niall7459 removed Priority: Medium Attention required in near future request feature New feature, improvement or similar. labels Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Concerns: Developer API This refers to the public access developer API. Status: Active Progress Progress on this issue is being made and it is under active development
Projects
None yet
Development

No branches or pull requests

2 participants