Closed SlimeDog closed 4 years ago
@Poslovitch seemed to be interested in adding Plan hook to BentoBox itself - I don't know how it turned out. It might be delayed until the PluginData rework has been done on Plan end (https://github.com/Rsl1122/Plan-PlayerAnalytics/issues/638)
How is it going Poslovitch? :)
Have a nice day. :D
I disagree : BentoBox is not released yet, and I don't want to get reports from plugin developers that complain about API breaking changes.
I'm working on a "Hooks API" on BentoBox. Plan will be one of the plugins that'll be supported by default with it. Addons will have the ability to register their custom data in a much easier way. Yes, it's currently postponed, but not only because of the pending rework of PluginData.
Wait and see, that's what I love to say these days.
Alright.
All the good things take time :)
I think this issue might have been forgotten. @Poslovitch How would you like to go about this? (Include in Plan or include in Bentobox?)
Thanks.
@Rsl1122 both are suitable solutions. I'd prefer to have it built-in in BentoBox though. I'll investigate that tonight.
I had a look at the ASkyBlock extension (https://github.com/plan-player-analytics/Extension-ASkyBlock/tree/master/src/main/java/com/djrapitops/extension). I like how the API works, however, is there a simple, straight-forward way for me to test my extension without having to set up a full Plan installation?
It is possible to test against implementation errors https://github.com/plan-player-analytics/Extension-ASkyBlock/blob/master/src/test/java/com/djrapitops/extension/ExtensionImplementationTest.java
Unfortunately there is no way to view how it looks without an installation
If that is an issue, it is possible to install Plan on a local Bukkit server with "just" drag-and-drop (SQLite + Webserver on port 8804)
I can report on "how it looks" when the code is in place. Plenty of test servers out here.
I started work on this in https://github.com/plan-player-analytics/Extension-BentoBox
I like the API of BentoBox, it appears very flexible. I ran into some trouble trying to find the rigth Strings for add on request, as I don't know what add-ons to need for the metadata (and what they provide)
Best I could find was searching the repositories for registerRequestHandler
, but it doesn't include any island related things (BSkyBlock doesn't register any request handlers for example)
@Poslovitch could you help me out by pointing me towards how to check if the player has an island in BSkyBlock (as an example)
could you help me out by pointing me towards how to check if the player has an island in BSkyBlock (as an example).
The main API (which all gamemodes use) is provided by BentoBox (and you therefore need not rely on addon requests).
In your case, what you are looking for is part of the IslandsManager and the PlayersManager.
More specifically, if you want to check if the player has an island, you need to use these two methods.
IslandsManager#hasIsland(...)
returns true if the player owns an island.IslandsManager#inTeam(...)
returns true if the player is in a team (i.e. he is member on an island but does not own it).Thanks :)
Thanks for getting things started with that Extension. I feel ashamed I haven't started it before... My excuses.
Alright, I got something similar to the ASkyBlock Extension done for AcidIsland, BSkyBlock, CaveBlock and SkyGrid - just to confirm, can those names be used to get the GameModeAddon
for those plugins from AddonsManager
(in this manner)?
Here is a test build Plan-5.0 dev build 383.jar.zip
I didn't have time to test it today, but I'll do so some time next week.
Your Implementation looks good.
Please add reporting for BentoBox and the bSkyBlock/bAcidIsland addons (1.13.x replacements for aSkyBlock/AcidIsland). No idea as to the API changes required.
https://github.com/BentoBoxWorld