Cannot use addons as API
See original GitHub issueDescription We cannot use any code from the addons as an API. I tried to use the IslandLevelCalculatedEvent, but once i try, i get a NoClassDefError, prolly because only your custom ClassLoader knows about this class, and not the normal JVM one. Would you know how to get around this problem ? For now i moved the event from addon-level to bentobox to fix this issue locally so i can continue working.
Steps to reproduce the behavior: Example code :
import bentobox.addon.level.event.IslandLevelCalculatedEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import java.util.LinkedList;
import java.util.List;
public class IslandListener implements Listener
{
@EventHandler
public void onIslandLevelChange(IslandLevelCalculatedEvent event)
{
// Code
}
}
Expected behavior Be able to use the event
Screenshots /
Server Information:
- Database being used (Flat file, MySQL, Mongo): Flat file
- OS: Debian 8
- Java Version: Java 8 (191)
- BentoBox version: 0.14.1
- Addons installed? BSkyBlock 0.5.0-SNAPSHOT, BentoBox-Challenges 0.2.0-SNAPSHOT, Level 0.1.0-SNAPSHOT
- Other plugins? Only the one i’m developing
Additional context Note : This class is definitely loaded after Bentobox and its addons are fully enabled
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Cannot use addons as API · Issue #352 - GitHub
We cannot use any code from the addons as an API. I tried to use the IslandLevelCalculatedEvent, but once i try, i get...
Read more >A new API for submitting and updating add-ons
The new add-on submission api aims to overcome these limitations and (eventually) allow developers to submit and manage all parts of their add- ......
Read more >Using add-ons | Apps Script - Google Developers
This documentation section describes how users can install, authorize and start using Google Workspace add-ons. Installing add-ons. Before you ...
Read more >Add-ons — addons-server documentation - Read the Docs
Currently only compatible with language packs through the add-on detail API, ignored for other types of add-ons and APIs.
Read more >Microsoft Store API : Cannot create promo code for addon type ...
It is not possible to generate promotional codes for subscription add-ons. This is mentioned on the document - Generate promotional codes ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, I added another key-value pair to reference the underlying event. I did play with overriding the getEventName() method from Event, but that would cause the AddonEvent itself not to have a correct name. Anyway, this way the underlying event can be understood.
@Poslovitch @PSNRigner Okay, I’ll look at this again this weekend.