This game depends on my plugin GameBox!
- Tested Minecraft Versions:
- 1.8
- 1.9
- 1.10
- 1.11
- 1.12
- 1.13
- Source Code:
- https://github.com/NiklasEi/GameBox_Battleship
![]()
Sink your opponents ships before he sinks yours!
A fun inventory game for two Players
open the spoilers for some awesome pictures
This game depends on my plugin GameBox. It is one of many inventory games for which GameBox provides a neat GUI and lots of customization.
Take a look at the GameBox page for the other games
![]()
This two player game is about sinking your opponents ships, before he sinks yours. Each player can see two different inventories. One is shown while the opponent is attacking. It shows your own ships on the water and slots that were fired at before are marked.
The enemy did not fire before:
![]()
The other inventory is shown while the player is attacking and displays hidden slots where the player did not fired at yet. With a click on one of these hidden slots the player fires and the slot will reveal either water or an enemy ship.
Five hits and one miss:
![]()
Five hits and two misses:
![]()
The game is won if one player hit all ships of his opponent. Per default the game is also won, if the opponent does not fire during the fire timer (default: 10 seconds). This can be changed in the configuration file.
This game was finished because the first player did not shoot during his 10 second time frame (configurable in configuration file).
![]()
![]()
For the game to start the players must first place their ships. The number or each ship type can be set to one or to two in the configuration file. There are four different ship types: two blocks long, three blocks long, four blocks long and five blocks long.
No ship placed yet (click to place one block):
![]()
The shown player has already placed his first (5 blocks long) and his second (4 blocks long) ship and is now waiting for the other player to finish placing the second ship. If the timer runns out without a player placing his/her ship(s) the game will place them randomly and will move on to the next step.
![]()
![]()
- You can set a cost and a reward for playing (requires Vault and an economy plugin). Both players have to pay, the winner gets the reward regardless of how he won (see next point)
- You can also set a rewards in token (see GameBox paga for more information on the token system)
- If one player closes the inventory he gives up! That means the other player won.
- Customisation:
- All used block types are configurable
- You can configure the countdowns
- How much time the players have to set one ship type
- How much time they have to fire
- How much time the players have to see what happened, bevore attacker and defender grids are changed
- All messages/inventory titles
- Specify the language file you want to use in your config
- If you wrote a language file in a language i do not have yet, please tell me so i can add it to the default files
- Defaults:
- lang_en.yml
- lang_de.yml
Code (YAML):# ----------------------------------------------------------------------------#
# #
# Battleship config #
# #
# ----------------------------------------------------------------------------#
# name of the language file (in the folder 'language')
# the default.yml file is overwritten on every server restart!
# This means you will have to use the other files to customize the messages, but since i am adding messages regulary in updates
# you can use the default file if you just want to have the up to date english default messages
langFile: "default.yml"
gameBox:
mainButton:
# define the Material and data for the button (format: 'material:data')
materialData: "IRON_BLOCK"
# display name of the button
displayName: "&3Battleship"
# lore of the button
lore:
- ""
- "&1Heavy battle on the ocean"
gameButtons:
# number of ships in the game (only 1 or 2)
# if not set they will all default to 1
normalGame:
materialData: "IRON_BLOCK"
displayName: "&l&1Normal"
lore:
- ""
- '&l&51 Carrier, 1 Battleship,'
- ' &l&52 Cruisers, 1 Destroyer'
- '&1Cost: &45'
- '&1Reward: &210'
# slot of the button in the gui
# be careful to not use the same twice ;)
slot: 12
cost: 5
reward: 10
aircraftCarrier: 1
battleship: 1
cruiser: 2
destroyer: 1
inviteGuiTitle: " Start a game of &3Battleship"
specialRules:
materialData: "COAL_BLOCK"
displayName: "&l&1Special rule"
lore:
- ""
- '&l&5One ship of each kind'
- '&1Cost: &410'
- '&1Reward: &215'
- '&l&5In this game the attacker'
- ' &l&5will even change after a hit'
slot: 14
cost: 5
# false by default
# this changes attacker even if you hit a ship
changeGridAfterHit: true
# false by default
# this changes attacker when the fire timer ran out instead of ending the game
switchGridsAfterFireTimerRanOut: true
reward: 10
inviteGuiTitle: " &3Battleship&r with special rules"
withTopList:
materialData: "nether_star"
displayName: "&l&1Combat"
lore:
- ""
- '&l&52 Cruisers otherwise'
- ' &l&5one of each ship'
- '&1Cost: &450'
- '&1Reward: &2100'
- '&l&5Your number of wins'
- ' &l&5in this game will be tracked!'
- '&l&5Compare yourself'
- ' &l&5with others in the top list.'
slot: 30
cost: 50
reward: 100
# if true the best score of this button is saved
saveStats: true
cruiser: 2
inviteGuiTitle: " &3Battleship &5Combat"
topListButtons:
# use the same key as the game you want to display the top list for
# for that button 'saveStats' must be true (see above)
withTopList:
materialData: "nether_star"
displayName: "&l&cTop list"
lore:
- ""
- "&1Combat &1top list"
slot: 32
# inventory title of the top list (%player% and %game%)
inventoryTitle: ' Top List'
# Lore of the skulls in the inventory. Use %rank% for the rank and %wins% for the number of wins
skullLore:
- ''
- '&6Rank:&1 %rank%'
- '&6Wins:&1 %wins%'
gameRules:
# play sounds in the game
playSounds: true
# requires vault and an economy plugin
economy:
enabled: false
# use "Material:data" or "ID:data"
# Some materials can not be displayed in an inventory, just test everything after changing
# You are advised to use different materials. At least on the same grid
# otherwise the game could break
materials:
yourGrid:
ship:
material: "Iron_block"
name: "&7Ship"
lockedShip:
material: "7"
name: "&8Locked ship"
miss:
material: "160:3"
name: "&2Yeah! A miss!"
hit:
material: "35:14"
name: "&4Damn! A hit..."
water:
material: "160:11"
name: "&1Water"
othersGrid:
cover:
material: "WOOL:7"
name: "&6Cover"
miss:
material: "160:11"
name: "&4That did not hit..."
hit:
material: "Iron_block"
name: "&2Booom! Gotcha"
# Customise the timers used in the game (all times in seconds)
timers:
# timer used during the ship-set part of the game
shipSetTimer:
countdown: 30
# timer used during the main part of the game
fireTimer:
countdown: 10
# timer used when attacker and defender change
changingGrids:
countdown: 3
If you like my inventory games you should take a look at Minesweeper, GemCrush and all the other GameBox gamesor express your happiness with a small donation
![]()
To Do
- mark sunk ships by adding glow to them
Tell me your ideas!
Got any bugs or suggestions? Please tell me in the discussion.

<Legacy> Battleship ⚓ [for GameBox v2] 3.1.0
Play Battleship against a second player in an inventory
-
ChillerKraft, jules215, Eternirya and 1 other person like this.
Recent Updates
- Minecraft 1.13 Jul 28, 2018
- Update for GameBox v2 Mar 31, 2018
- Added missing title to langauge file + improved default messages Sep 22, 2017
Recent Reviews
-
Dude44
- 4/5,
Good Idea but it don´t work on 1.14.4! ------------------------------------------------------------
-
RickySambora
- 5/5,
Woaaa....Good plugin, hope you can finish other games project. It can killing my time to play this small game and this one also funny
-
HewDaily
- 5/5,
This latest version of Battleship is incredible. And it's integration with the dev's new GameBox system?! Puh-leeeeeez. This is THE coolest of the cool time-wasting mini-games. We added it as a rank perk. You gotta earn access to this plugin on our servers, and it's worth it!
-
Author's Response
Thank you :)
-
jules215
- 5/5,
I found this plugin while looking through Spigot. I ended up sending the link to my friend because I thought he would like it. We tested it out on his server and we both love it! I ended up installing it on my server as well it's great! I do have one suggestion though, have a indicator or something happen when you sink a ship because it is very confusing if you don't know if you sunk your opponents ship or not and try going for another slot next to the ship. I think it would make this plugin even better and add more detail just like the actual game!
-
Author's Response
I am currently doing version 2, compatible with my upcoming plugin GameBox. Afterwards i will clean up the code of battleship. Then I will add this function at the same time.
-
padantic1234
- 3/5,
Awsome idea, but the top 10 list resets on reloads ??? You think you could add another file or something to get this to work, but all in all. Good plugin
-
Gigorahk
- 5/5,
Amazing little plugin! I have it on my server and the players love it. Causes no lag and easy to setup.
-
Author's Response
Thanks a lot :)
-
CielPhantomhive
- 5/5,
It is a wonderful plugin :) any plans on making more? and maybe a way to play with a bot? how youd do it..who knows..though it would be cool :P another suggestion would be for custom resource packs for each of the games :)
-
Author's Response
Always working on more :)
I ll think about a bot. Sounds good.
Thank you for your review!
-
H_curt
- 5/5,
Now I'm just annoyed on how awesome the plugins you make compared to others, these plugins are so fun!!
-
Author's Response
Thanks ^^
-
TheJadyha
- 5/5,
Absolute fantastic resource. It's quite addicting and very fun to play. It fits in very nicely with my server. I am mind blown on how this resource is free. Keep up the great work and please continue the development of this plugin.
-
Author's Response
Thank you :)
-
halowhoflungpoo
- 5/5,
love it works fantastic thank you very much for making this. will make a great addition to my server.
-
Author's Response
Thank you!