[solved] Where are StateEvents?

Where are StateEvents?
Example:
ServerStartingEvent, ServerStartedEvent, ServerStoppingEvent.

They are in Api. SpongeForge displays error.
java.lang.NoClassDefFoundError: org/spongepowered/api/event/state/ServerStartedEvent.

https://docs.spongepowered.org/en/plugin/lifecycle.html
Should be explained there.

Which API version and which Sponge version are you running?
API 2.1-Snapshot should work with latest Sponge (600+).

SpongeForge - 613;
API - spongeapi-2.1-20150715.230258-127.

The API is. The SpongeForge is not.

You’re using pre-Events2.0 API with post-Events2.0 SpongeForge. That shouldn’t work. :wink:
Either downgrade SpongeForge (probably to <591) or update your API dependency.
I suggest updating the API and building against latest Sponge (600+). There were several adjustments to the API and event structure.

It was the old version in the repository.
I fount them in the github.
I went to build a jar API.
Thank you.

You can just change your dependency to 2.1-SNAPSHOT, or you can take a look here:
https://repo.spongepowered.org/maven/org/spongepowered/spongeapi/2.1-SNAPSHOT/

I guess spongeapi-2.1-20150715.230258-127 is for Sponge prior to 591.
I might be wrong, though.

127 API - outdated.
I use new API. Super.

Well, yes. As you can see the API build 127 is from mid july… (15th july 2015 to be exact).
As the API is getting finished up, you could’ve guessed that it’s probably outdated :wink:

Anyways: I’m glad we could resolve your issue :smile:

Could you change the threads title to:
[SOLVED] Where are StateEvents?