[OUTDATED] Coming from Bukkit? Here's Some Tips and Tricks to Get you Started

Thanks for the tips, @Tux2

Isnā€™t it good to have plugin.yml
Because if you do the version tag donā€™t you want to make it soā€¦
Plugin.yml
Name: MyAwesomePlugin
Author: Latouth
Version: 1.29.4

And if you do the version tag you donā€™t have to modify all the code with that.
With perms and commands it can be useful to find out pluginā€™s permissions if they didnā€™t list on the plugin page.

What exactly are some things that they did not understand ?

There is more but those are by far the most common pitfalls.

The milestone goal in the GitHub repo says November 30th. Itā€™s a matter of days! :smile:

1 Like

And if you look at the percentage completed, that doesnā€™t seem likely. Granted they could just not be marking the issues as completed.

1 Like

There are a lot of issues that havenā€™t been marked, but primarily a majority of the PRs have been pending other PRs for the sake of dependency (Entity events being held up from Entities PR). Unless otherwise noted, Sponge API still is planned for release by the end of this month.

I did mention that. Though there a 3 days until the end of the month. Iā€™m leaning towards a slight delay in the release.

1 Like

Where did you get that @Pink__Slime ?

This?

Yeā€¦ thanks! @Pink__Slime
Btw its 15% Nowā€¦

Very cool :slight_smile: Thanks for the quick intro. :smiley:

This is fun but how do we check if another plugin is enabled? (loaded?) How do I make dependencies to other ā€œmodsā€

Okay this is kind of topic necro, but one way this could work without changing anything else is to have other plugins with API fire events like EconomyCraftReady. Then you can hook those and figure out when theyā€™re loaded that way.

I woud love To See something like that you coud Marke something like The plugin.yml ore Do It directly in The code (sorry im on my cellphone)

1 Like

Likely? Already complete. A day late, but so? Only 12 hours! They kept their promises.

You do realise I said that almost a week agoā€¦

1 Like

A single line of code beats messy plugin.ymls any day :smiley:

1 Like

So Iā€™ve downloaded the SpongeAPI 1.0 release and I opened it up in Eclipse as a project. I did not make any changes between opening it and exporting it as a .jar file. I am making an example plugin for my own use in the future and I was making the methods that handle when the plugin is loading, enabling, disable, unloading, etc. When I put this line of code:

@SpongeEventHandler
public void onPreload(ServerAboutToStartEvent event){}

the @SpongeEventHandler became underlined in red by the program because it could not be resolved to a type. When I hovered over it to do a quick fix I could not find the import. Eclipse found ServerAboutToStartEvent fine and imported it from the .jar file I exported and added as a library in the example. I just want to know if anyone can tell me why it canā€™t find this.

Thanks!

It has been updated to be

@Subscribe

instead of

@SpongeEventHandler
2 Likes

I have a question/feedback. Is it @Subscribe, or @SpongeEventHandler? Or do both work?