Ships
Ships

|
Source Code - Github |
JavaDocs |
Sponge version |
Discord channel |
Translate Core |
|---|
Looking for Dev builds?
Dev builds give off new features and bug fixes before they are officially released, however these features and bug fixes may not have been tested as much as a release on here
Old page:
I am testing this new page out. I am aware of some parts that are missing such as ship types, but please say if there is anything that you wish to see. I plan on making a FAQ's that includes common questions such as how to change ship requirements.
If you want to see the old page, it is here
Video tutorial
Ships 6 changes
Ships has gone through many changes, Ships 6 is the latest rewrite of the plugin. The latest rewrite fixes multiple bugs found in the root of previous versions of Ships.
Features
Moving ships
As the name of the plugin suggests, you can create your own ship and move it with just a single click.
Works with all blocks
There is a fully-fledged list where you can configure every block to react differently for the ships, including being able to add a block type to interact with Ships, detect it as a collide, and even not react at all.
Teleport to ships
There have been many requests to be able to teleport to ships for not only this plugin but others like it. This feature has been added to Ships, however, if it is something you do not wish, then you can disable to command by not adding the command.
Falling Ships
Ships will fall/sink if requirements are not met, this could be done through your own interaction such as running out of fuel, or by something else such as a TNT explosion.
Ship types
| Airship | Link |
| Ship | Link |
| Marsship | Link |
| Submarine | Link |
| Plane | Link |
| Hybridship | Coming soon |
Move the ship:
In Ships, movement is done by signs. You can see all signs here
Collide types:
| Name | ID | Description |
|---|---|---|
| Detect collide | DETECT_COLLIDE | If Ships detects this block in the way of a ship moving then the ship will not move with the error of this block being in the way |
| Material | MATERIAL | Material means that you can build a ship out of this block and the Ships block detection system will detect it as part of your ship |
| Ignore | IGNORE | If Ships detects this block in the way of a ship moving then the block will break and the ship will take its place |
Permissions
| Permission node | Description |
|---|---|
|
ships.cmd.info |
Allows the player to use the command '/ships info' |
|
ships.cmd.blockinfo |
Allows the player to use the command '/ships blockinfo' |
|
ships.cmd.shiptype.create |
Allows the player to use the command '/ships shiptype create' |
|
ships.cmd.config.set |
Allows the player to use the command '/ships config set' |
|
ships.cmd.config.view |
Allows the player to use the command '/ships config view' |
|
ships.cmd.blocklist.set |
Allows the player to use the command '/ships blocklist set' |
|
ships.cmd.blocklist.view |
Allows the player to use the command '/ships blocklist view' |
|
ships.cmd.ship.track |
Allows the player to use the command '/ships ship track' |
|
ships.cmd.ship.eot |
Allows the player to use the command '/ships ship eot' |
|
ships.cmd.ship.crew |
Allows the player to use the command '/ships ship crew' |
| ships.move.own.ships.airship | Allows a player to move own airship |
| ships.move.own.ships.watership | Allows a player to move own ship |
| ships.move.own.ships.marsship | Allows a player to move own marsship |
| ships.move.other.ships.airship | Allows a player to move anyones airship |
| ships.make.ships.airship | Allows a player to make a airship |
| ships.remove.other |
Allows a player to destroy anyones ships sign |
Developers:
Looking for a development wiki? maven/gradle dependencies? or something else relating to ships or translate core? Take a look at the getting started wiki
-
View User Profile
-
Send Message
Posted Dec 20, 2019In reply to somberbot01:
This could be a number of things.
What happens if you use the command of
/Ships ship <your ship id> track
It should display the whole ship in bedrock for 10 seconds. However if the sign to move the ship isnt turning to bedrock then it means that Ships isnt detecting it for some reason.
-
View User Profile
-
Send Message
Posted Dec 20, 2019In reply to mosemister:
i just did it and all signs and parts are turning into obsidian including the fire
-
View User Profile
-
Send Message
Posted Dec 20, 2019In reply to somberbot01:
i figured out my sign was to far away also how do i delete a ship
-
View User Profile
-
Send Message
Posted Dec 20, 2019In reply to somberbot01:
Glad you figured it out. To delete a ship, simply destroy the licence sign ([Ships] sign)
-
View User Profile
-
Send Message
Posted Dec 28, 2019In reply to somberbot01:
Looks like someone left the debug code on the release artifact :)
-
View User Profile
-
Send Message
Posted Dec 28, 2019In reply to bielsimon:
Wait really? I thought i cleared all that up. Oops XD
-
View User Profile
-
Send Message
Posted Dec 11, 2019Ships Update:
A new update is coming (85 days after the previous update ... so much for weekly) that fixes a bug that many have specified where a player does not move with the ship, especially with larger distances.
-
View User Profile
-
Send Message
Posted Dec 11, 2019Hey, I really like the plugin. For the most time it is working perfectly fine. But sometimes, when I move the watership, it sinks by one block and water starts appearing all over it. Is there a thing i can do to prevent it?
-
View User Profile
-
Send Message
Posted Dec 11, 2019In reply to Forge_User_00144435:
So the feature is called "sinking ships". If the ship does not meet the requirements, it will fall 1 block.
There
iswas a option in the ships config file to disable this, ill readd the features-
View User Profile
-
Send Message
Posted Dec 11, 2019In reply to mosemister:
Okay, thanks for the extremely fast reply.
Keep it up!
-
View User Profile
-
Send Message
Posted Dec 11, 2019In reply to Forge_User_00144435:
Your welcome. Hope the new update comes fast.
-
View User Profile
-
Send Message
Posted Nov 17, 2019Hello Mosemister,
First I would like to thank you for continuing development for one of the best bukkit plugins that exist.
I would like to report a minor bug, and ask a few questions/make suggestions about your plugin.
First, in Spigot 1.14.4, with the latest Ships alpha build (2.7), I tested building a small regular water ship, barely 6 blocks long, and when moving at max speed, the player would often not get teleported. it was fine at lower speed.
I found the way signs that are not on a ship to react to be confusing? Not really problematic, but after removing the license sign, the only way to remove the other signs in survival mode is to remove the blocks behind them. That is a minor inconvenience, but if you just sent the message and let the sign break, it would be easier to dismantle ships.
Do you have plans to add some sort of "car-like"/"hovercraft" vehicle type? As in, one that can hover maybe a block or two above ground and go on land, but not fly.
How does custom ship types work exactly? Do they extend the movement properties of a default ship?
And finally, do you have plans for integration of Cannons in the near or far future?
-
View User Profile
-
Send Message
Posted Nov 17, 2019In reply to Sixela963:
Hey. Thanks for the feedback. Glad you like the plugin.
As for the player moving off the ship, this is to do with a issue within "Core" the compatibility layer between Ships and a Minecraft platform (in the case of this version of Ships, it will either be Paper or Bukkit (ever so slight different)). If you want the technical reason for this bug, its where Core assumes that all entity snapshots are to either restore a deleted entity or to create a new entity with all the properties of the entity it is based of. However due to the fact Player's can not be deleted and restored, core just doesnt restore the player details (including the new position). Its a slight oversight but one that should be easy to fix. Sadly i haven't had the time to.
As for Signs. This is a oversite on my end. Because i designed core with Sponge in mind and has just been highly modified to work on Bukkit, I made the events work like Sponge's events. So technical wise, 2 events fire when you break a block (including signs). The first is BlockBreakEvent and the other is BlockInteractEvent. In sponge the latter does not fire when a block is broken unless its a 1 hit block. In bukkit it does. Ships detects the block interaction event and cancels it (thanks to creative being a 1 hit on all blocks). This can be a easy fix too, by just checking if the player is in creative or not. Cancelling it on if they are in creative.
There are no plans to add any more ship types then the ones explained on this page. Cars are not really in the sense of Ships so don't expect that "ship type" to ever come directly to Ships. However you are not the first to ask about it, so maybe another plugin that hooks directly into Ships could happen to add the ship type. Sorry.
As for custom ships. They extend all properties of the ship type they are based on. So if you created a custom ship based on the marsship, you wont be able to make it require a burner but you would be able to make it fly by day/night. If you look at the config for the custom ship, it is exactly the same as the ship you based it on with the exception of the values.
As for Cannons. It has been attempted a few times every major version of ships that I have started (aka ships 4 and 5) both of them failed due to the block finding algorithm missing the block cannons registered, my guess is it was an issue with my block finder as I know it would sometimes miss a block in those versions.
When Ships 6 is fully released, another attempt will be done. As you may know Ships 6 has a block finder algorithm and actually stores the structure directly in the ship, so it should fix that issue. If it all works then it will be released as a "Ships Bridge".
Hope that answers all your questions. Feel free to ask more and/or a clarification for any of these answers.
-
View User Profile
-
Send Message
Posted Nov 23, 2019In reply to mosemister:
Hi mosemister,
I did not expect you to respond that fast. First, thanks for your clarifications.
I would like to make one more suggestion that should be relatively easy to implement: the ability to put a cap on the proportion of blocks. e.g., a lightly-armored ship that can only have up to 10% stonebricks. I don't see it being challenging to implement, and it could add an interesting layer of complexity to ship-building.
Also, I have been trying to figure out plugin programming myself, but I have trouble doing what you seem to have done simply: moving a block while keeping its state and data. I have managed to clone a block and its state, but as soon as I try to remove the original, the server crashes (something to do with AIR not having BlockStateDirection according to the crash log? I am trying to move a dispenser). Sorry if it is the wrong place to ask, but how do you move blocks? I tried looking at your source code but I couldn't make sense of it... Of course forget it if you don't feel like explaining a lot of coding logic.
-
View User Profile
-
Send Message
Posted Nov 23, 2019In reply to Sixela963:
Your suggestions has been suggested before and the materials list has been adapted to make it so a limit to blocks is possible.
As for your programming logic. Getting a error of Air not being directional is strange? Do you mean ClassCastException?
As for how blocks move in ships, while it seems like a simple concept the code behind it is not simple. It was actually one of the main reasons for "core".
Core is a huge project so its not surprising that you can not make sense on how the underlying works, especially on the bukkit side where it converts data it really shouldn't need to convert just so bukkit is happy with it.
Anyway, core makes the block movement in ships simple with the idea of BlockDetails that store everything known about the block including the main block data and tile entity data. After the store it can remove the original block by just setting the block to air. Ships doesn't remove the original block until a much later stage though.
Anyway, when it finds and stores all the blocks of the ship as BlockSnapshots, ships will move to the movement process that deletes the original block and sets the new position as the next block.
I am more then happy to talk code, however its hard to get my points across without seeing my code and your code. So here are a few links to my code.
Block Details Interface: https://github.com/Minecraft-Ships/ShipsCore/blob/master/src/org/core/world/position/block/details/BlockDetails.java
Block Detail implementation for Bukkit: https://github.com/Minecraft-Ships/CoreToBukkit/blob/master/src/main/java/org/ships/implementation/bukkit/world/position/block/details/blocks/BBlockDetails.java
-
View User Profile
-
Send Message
Posted Nov 29, 2019In reply to mosemister:
Now I start to grasp the true size of the project... I never realized how big it was.
From what I understand, BlockDetails is your general template for all blocks with more complex info, and then you make child interfaces/classes for tile entities?
Also, I tried reading part of your moving algorithm, and while I didn't understand all of it, I noticed you do all block modifications with runnables. Is it an absolute necessity? Do they all happen in the same server tick?
For my own plugin, the precise error is something like this (snippet from the crash log):
Description: Exception while ticking java.lang.IllegalArgumentException: Cannot get property BlockStateDirection{name=facing, clazz=class net.minecraft.server.v1_14_R1.EnumDirection, values=[north, east, south, west, up, down]} as it does not exist in Block{minecraft:air} at net.minecraft.server.v1_14_R1.BlockDataAbstract.get(SourceFile:95) at net.minecraft.server.v1_14_R1.DispenseBehaviorItem.dispense(DispenseBehaviorItem.java:18) at net.minecraft.server.v1_14_R1.BlockDispenser.dispense(BlockDispenser.java:63) at net.minecraft.server.v1_14_R1.BlockDispenser.tick(BlockDispenser.java:90) at net.minecraft.server.v1_14_R1.IBlockData.a(SourceFile:265) at net.minecraft.server.v1_14_R1.WorldServer.b(WorldServer.java:577) at net.minecraft.server.v1_14_R1.TickListServer.b(TickListServer.java:82) at net.minecraft.server.v1_14_R1.WorldServer.doTick(WorldServer.java:298) at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1068) at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:393) at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:970) at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815) at java.lang.Thread.run(Unknown Source)So it doesn't even happen in my plugin? I do something that nms doesn't like at all, and I am not sure what... I think it may have to do with update order, wich is why I am asking you about ticks in your movement.
Of course if you don't want to help a random person debug his rookie mistakes, I won't bother you.
-
View User Profile
-
Send Message
Posted Nov 29, 2019In reply to Sixela963:
Ships 6 was and still is a huge undertaking. The idea of a full transformation came in around Ships 4.1 sort of time. While Ships 5 did start from the ground up, i was still young in the programming world and well, my code wasn't great so I didn't aim as large as Ships 6. Not only that but there wasnt a need for the compatibility layer of Core as Bukkit was the only platform I supported and the DMCA takedown of bukkit was no where in sight. But a huge undertaking is a statement I would agree with.
So BlockDetail. You are correct. BlockDetail is just a interface with the base implementation being BBlockDetail that covers most blocks. Then there are other blocks that require extra special rules such as those with TileEntities.
As for the runnables in the movement algorithm. Im guessing you looked at the Ships 6 movement algorithm. The reason why there are runnables in that case is because all the blocks do not get processed on the same tick. Due to the fact there are a lot of users of ships who use large ships and the fact minecraft can not handle multiple threads that process the world, bukkit can not send multiple block changes over a single network packet and a few other issues. All the blocks being processed on a single server tick will crash the server with "stack overflow error" or "tick took X seconds" (depending on the algorithm being used) so some creative ways to process heaps of blocks have been made, one of them is to break down the huge chunk of blocks into smaller more process friendly heaps of blocks. So yes, all the runnables are required. However to handle a small heap of blocks, say 1-3500 blocks, you wouldn't need to use runnables ... That being said, if your getting into the 1000s then i would consider it.
As for your error. Im not seeing any of the error relating to your code. So my question is how are you setting the block? Code wise?
Block block;
block.setType(Material.AIR);
?
-
View User Profile
-
Send Message
Posted Nov 30, 2019In reply to mosemister:
Yes, I am using block.setType(Material.AIR). block.breakNaturally() also crashes.
Here is my code:
@EventHandler public void onDispenserEvent(BlockDispenseEvent dispenseEvent) { ItemStack itemStack = dispenseEvent.getItem(); if (itemStack.getType().equals(Material.WRITABLE_BOOK) && dispenseEvent.getBlock().getType().equals(Material.DISPENSER)) { dispenseEvent.setCancelled(true); Block block = dispenseEvent.getBlock(); block.getWorld().getPlayers().get(0).sendMessage(block.toString()); // just some ugly debugging BlockState dispenserState = block.getState(); if (dispenserState instanceof Dispenser) //an attempt to suppress the error; didn't work. This check isn't really necessary. { BlockFace targetBlockFace = ((org.bukkit.block.data.type.Dispenser)dispenserState.getBlockData()).getFacing(); Block targetBlock = block.getRelative(targetBlockFace); targetBlock.setBlockData(dispenserState.getBlockData()); block.breakNaturally();//this is where I put something like block.setType(Material.AIR) or block.breakNaturally(), crashes either way. }The general idea is to "move" the dispenser forward one block in the direction it is facing if it holds a particular item, in this case a book and quill. Everything works fine if I don't remove the original dispenser.
After some further testing it seems that even without the rest of the code, removing the block causes a crash. Am I doing something that shouldn't be done in this?
Thanks a lot for helping me out; if this problem persists I will ask the question on bukkit forums to stop spamming your comment section. (honestly I should have done that in the first place but somehow didn't think of it.)
-
View User Profile
-
Send Message
Posted Nov 30, 2019In reply to Sixela963:
Ive not got a pc infront of me. But the code seems logically ok, even if it isnt in my style.
There are cases where bukkit implementation is the fault. It maybe that spigot did some efficiency improvements so it doesn't reset the keys on a new block but they forgot to remove the keys that should be removed.
In my early days i used Bukkit forums to help when I needed it, while i never made a topic on it, it did come in useful.
This is a post made on the spigot issue board that sounds like the issue you are having.
" order by created DESC" rel="noopener nofollow" target="_blank">https://hub.spigotmc.org/jira/browse/SPIGOT-2095?filter=-4&jql=text ~ "Get property" order by created DESC
Its been marked as resolved so try updating your bukkit version and see if that helps
-
View User Profile
-
Send Message
Posted Dec 1, 2019In reply to mosemister:
Seems like that issue is two years old, and I am using the latest spigot API...
Well that's a bummer, the second plugin I ever make and it doesn't work, but it's not even my fault. I'll try to find a workaround, maybe ask around bukkit forums, and propably file a bug report.
Out of curiosity, when you said "not your style" what did you mean by that? how would you have done it?
Thanks a lot for the help!