Sky Resources 2

Sky Resources 2

3M Downloads

API

Opened this issue ยท 4 comments

commented

Will be possible add some kind of API for those events:

  • creating island
  • inviting new player
  • leaving island
    ...

This will be helpful for antigrief mods (spongeforge plugins), which need info about island positions, owners and members changes.

An API allow using this great mod on the public servers.

commented

So, you basically want a way to create an "event" that gets called when running those cmds, etc.
And a way to get island information.

commented

Yes, exactly.

commented

something like this will be in mod using api:

           @SubscribeEvent
           public void onIsladCreate(PlatformCreateEvent event) {
                       
           double xpos = event.x;
           double zpos = event.z;
           int size = event.platformsize;
           String owner = event.platformowner;
            
           .....
           call antigrief mod with args xpos,zpos,size,owner
                   to create new protected region...
           .....
           }
commented

Put in the next version. Should work fine :D