Skip to content

ShipsCore Documentation

Mose edited this page Feb 8, 2021 · 1 revision

Ships Core

What Is Ships Core?

Ships Core is the API and implementation of the API that is used within the plugin Ships to translate high level calls into calls for the implementation that the implementation is running ontop of. For example, the CoreToBukkit version of Ships Core is required for Ships to run on Bukkit as Ships makes high level calls to Ships Core which CoreToBukkit translates those calls into Bukkit calls.

Why is Ships Core needed?

Version of Ships previous to Ships 6 did not have nor need Ships Core, this is because Ships could only be ran on the Bukkit platform. However the Minecraft server space has moved forward with increase demand for Modded servers as well as alternatives to Bukkit such as the Sponge platform, it became apparent that Ships would need to be more abstract to work on more platforms then just Bukkit. So with Ships 6 being a complete rewrite anyway, it made sense to include a abstraction layer which became Ships Core.

What are the limits of Ships Core?

Both Sponge and Bukkit are the primary targets for Ships Core and therefore Ships Core is designed for those two platforms in mind (sorry Forge users). As Ships Core is designed to work on both Sponge and Bukkit it means that the limitations of each platform extend into Ships Core, therefore as Bukkit doesn't expose the player's ping in the Bukkit API (It is in CraftBukkit but Ill go into why thats not a option later) it is not exposed within Ships Core despite Sponge allowing it.

Is there a performance hit due to Ships Core?

Ships Core is designed to be as invisible to the end user as possible and therefore in most cases, there isn't much if any of a performace hit

Any benifit to Ships Core over native?

The main benifit is that you only need to write a plugin once to then have it work on all Ships Core implementations (That is unless there is a bug within the implementation). However Ships Core does add its own features that are not present within Bukkit and/or Sponge to help quickly develop your plugin.

An example of a feature that is added to Ships Core that isn't within the native Bukkit code is EntitySnapshots which allow you to save a whole entity and then spawn multiple entities from that single entity snapshot with all the NBT data being the same. This is a feature within Sponge and therefore you will gain more reliance on the Sponge platform.

Can I make my own implementation/edit your implementation

Yep, while Ships itself is all rights reserved, Ships Core and its implementations are a open source licence for any modifications you wish to apply. Just clone and get to work