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


#104

It has been updated to be

@Subscribe

instead of

@SpongeEventHandler

#105

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


#106

Originally it was @SpongeEventHandler, but now you can only use @Subscribe


#107

Thanks. How would one submit for an update edit on the OP here? Flag?


#108

To be honest, I don’t know if one can “submit” for an update, but I suppose contacting Tux2 or a moderator with some suggested updates could work. I suppose you could flag it as well. Its really up to you.


#109

Can’t wait.
I’m happy there’s no plugin.yml anymore like in bukkit.


#110

Thank you, excited to see how this project goes!


#111

I am quite confused with this whole Gradle stuff. In Bukkit, i just downloaded a bukkit.jar and made this a library in the project-setup in Eclipse. (It did not include the whole api when extracting). Is there currently a similar way, or am i just stupid? :smiley:


#112

Learn to use gradle and you’ll love it. Of course you can just dl the sponge api and set the jar as dependency, but why would you do such things? You’ll make me cry. :cry:


#113

Dont cry! I’ll continue trying to understand Gradle! ^^
But there is currently no jar downloadlink, is it? Because i thought you have to download that whole zip thing and have to compile it on your own… using Gradle xD
Or am i wrong?


#114

You can dl it directly from the maven. http://repo.spongepowered.org/Sponge/maven/org/spongepowered/spongeapi/


#115

Thanks, that worked. That leave me with another question-- why was it updated to @Subscribe in the first place. Also, why is it named that?


#116

It’s named that ecause you subscribe to the event. You’re basically listening for the start event and using it as and entry point for your plugin, as you would have used onEnable. It was updated cause sbdy found @SpongeEventHandler to be a stupid name, which it is :wink:


#117

Personally, I dont think @SpongeEventHandler is a bad name at all. It describes what it is for very well, which is the whole idea of variable names. Why not just have variable1 or variable2. The point of variable names are to describe what it does.


#118

But @Subscribe is the more obvious name, if you’ve ever worked with an Annotation-based EvenBus before (eg. Forge’s)


#119

You can use an ‘other’ flag to petition the moderators to make it into a community wiki, and then people can edit it.


#120

I agree 100% with this. I think we decided on hrocn or something on that. also, keeping everying for a basic Welcome to this server! plugin in 1 .java instead of 3 different files…


#121

Yes. I don’t mind the plugin.yml being there and all that stuff, but IMO things like that should be optional functionality.


#122

Thanks for the tips, @Tux2
You helped me a lot with this advice.