ConnectFour
ConnectFour

WHAT IS IT?
Most of you know "Connect Four" or "Four In A Line". This is the Minecraft version of it.
FEATURES
- play Connect Four in Minecraft
- get statistics about played games
- play multiple ConnectFour-games at the same time
- customizable language file
- create signs to join a game without commands
- very easy setup
- use any blocks you want instead of sand and gravel
- much settings in the config
- items as rewards
- vault economy support
- economy reward
- betting against your opponent
- have fun
INSTALLATION
Simply put the ConnectFour.jar into your plugins folder and restart the server.
CREATE A GAME
Build the Display
- First of all you have to build the display. This must be at least 7 x 7 blocks.
- Now the game needs a throw-in bar. This should be a 7 blocks wide line.
Select those Things
- Type /cfour create <gameName> <gameName> = The name of the game you're creating.
- Now select the Throw-in:
- Put two dirtblocks at the corners of the throw-in bar so there are 7 blocks (air) between them. (see image)
- Put two dirtblocks at the corners of the throw-in bar so there are 7 blocks (air) between them. (see image)
- And the Display:
- Put two cobblestoneblocks at the top corners of the display so there are 7 blocks (air) between them. (see image)
- Put two cobblestoneblocks at the top corners of the display so there are 7 blocks (air) between them. (see image)
- When the selection's done, save it with /cfour save
Set the Spawn
- The last thing you have to do is to set the spawn. For doing that type /cfour setspawn
Create a spawn-sign
- You can create spawn-signs, so you don't have to execute a command to join a game.
- Create a spawn-sign:
| LINE1 | [cfour] |
| LINE2 | <gameName> |
| LINE3 | empty |
| LINE4 | empty |
Set rewards (optional)
- You can do that if you want to give the winners some items.
- Set the rewards for a game: /cfour setrewards <gameName> <id:amount[:damage]> <...>
For example: /cfour setrewards game1 1:10 17:20:1 will set the rewards of "game1" to 10 cleanstone and 20 birchwood
When you've set some rewards but now you've changed your mind, do /cfour removerewards <gameName> for remove the rewards.
Set economy rewards (optional, needs vault)
- You can do that if you want to give some money to the winners.
- Set the economy rewards for a game: /cfour setEcoReward <gameName> <amount>
Set a betting stake (optional, needs vault)
- Use this, if you want your players to bet against each other.
- When a player joins the game, he'll have to pay <amount> of money to play. The winner will receive the whole amount.
- Set a betting stake for a game: /cfour setBetMoney <gameName> <amount>
Change the block IDs (optional)
- If you don't want to play with sand and gravel, you can set other IDs.
- To do that do: /cfour setblocks <gameName> <ID1> <ID2>
Congratulations! Your ConnectFour game is now playable :D
To remove a game type /cfour remove <gameName>
PLAY
How to play
- The players who want play ConnectFour have to type /cfour join <gameName>
- Now they're ingame. The distribution of sand and gravel and who has to begin is absolutley random.
- The player who's turn it is has to put he's block (sand or gravel) on the throw-in bar. Now the block will automaticaly be teleporter to the top of the display and fall down.
How to win
The target is to put the sand/gravel in a row of 4 blocks. This works horizontally, vertically and diagonally.
Be first or you will lose!
NOTICE: If you destroy the blocks whith WorldEdit or anything other, this will only have a visual effect. The real block positions will not be changed (but you can't play very good if you don't see where your block realy is).
CHANGE LANGUAGE
ConnectFour is available in two languages (German and English).
If you want to change the language type in /cfour lang <DE|EN|custom>
| DE | German |
| EN | English |
| custom | loads the texts from the languagefile |
VIDEOS
by Dragon252525
by VariationVault
CONFIG
#the language (DE|EN|custom) language: de #en-/disable "it's your turn" messages enable-*itsYourTurn*-spam: true #should the players be teleported to their previous position when the game is over? teleportOnGameEnd: true #should the display automaticaly be cleared when the game is over? (normaly it'll be cleared as soon as a new game beginns) clearTheDisplayOnGameEnd: false #should you be able to user join-signs enableJoinSigns: true #must the player be in the same world as the game to join? sameWorldToJoin: false #must the player be within a certain radius to join? checkMaxDistaceToGameSpawnOnJoin: false #radius maxDistanceToGameSpawn: 20 #some MySql settings for online statistics use_MySql: false mysql_host: localhost mysql_port: '3306' mysql_database: database mysql_username: username mysql_password: '12345'
COMMANDS AND PERMISSIONS
| Permission | Command | Description |
|---|---|---|
| cfour.user.* | none | All user permissions. |
| cfour.user.play | /cfour join | Join a game. |
| cfour.user.play | /cfour leave | Leave a game. |
| cfour.user.play | /cfour info | Shows a short Tutorial |
| cfour.user.tp | /cfour tp | Teleport to a game. |
| cfour.user.help | /cfour help | Shows the help page. |
| cfour.user.list | /cfour list | List all games. |
| cfour.user.stats | /cfour stats | Show the statistics. |
| cfour.admin.* | none | All admin and user permissions. |
| cfour.admin.reload | /cfour reload | Reload the config. |
| cfour.admin.lang | /cfour setlang <lang> | Change the language. |
| cfour.admin.clean | /cfour clear | Clear the display. |
| cfour.admin.create | /cfour create | Create a game. |
| cfour.admin.create | /cfour setspawn | Set the spawn of a game. |
| cfour.admin.create | /cfour remove | Remove a game. |
| cfour.admin.create | /cfour setrewards | Set the rewards for a game. |
| cfour.admin.create | /cfour removerewards | Remove the rewards from a game. |
| cfour.admin.create | /cfour setEcoReward | Set the economy reward for a game. |
| cfour.admin.create | /cfour removeEcoReward | Remove the economy reward from a game. |
| cfour.admin.create | /cfour setBetMoney | Set the stake for a game. |
| cfour.admin.create | /cfour removeBetMoney | Remove the stake from a game. |
| cfour.admin.create | /cfour setblocks | Change the blocks of a game (instead of sand and gravel). |
| cfour.admin.stop | /cfour stop | Stop a game. |
| cfour.admin.disable | /cfour disable | Disable a game to edit it. |
| cfour.admin.disable | /cfour enable | Enable a game. |
STATISTICS
INGAME
To see the statistics do /cfour stats
ONLINE
If you have a website, you can include this script to get some statistics about played games and players. Example here

Setup the Webstats script
- Open plugins/ConnectFour/config.yml , enter your MySql data and set use_MySql to true.
- If your webspace isn't on the same server as your gameserver, make sure that you have enabled external access to the database.
- Download it here
- Extract the .zip file into any folder on your webspace.
- Open the file yourFolder/config/config.php and edit the options.
- Put a link to yourFolder/index.php on your site or include it with an iframe.
- Be happy :D
Thanks to mig4ng for this awesome script :D
NOTICE
- drawns aren't logged here
- this aren't the same statistics as in the statistics.dat file, so don't remove it
KNOWN BUGS
- Sometimes it happens, that you have four in a row but the plugin doesn't notice it.
- If you enable betting, the players pay automatically when they join but don't get their money back when they leave without playing.
TODO
Bugfixes 1Upload imagesBugfixes 2Upload a videoAdd statisticsBugfixes 3fixed link to example pageimplement some functions that users have suggested

-
View User Profile
-
Send Message
Posted Jul 26, 2013@Dragon252525
So, I set up my games and everything is working correctly (I downgraded to set them up then upgraded again to set the rewards) but for some reason /cfour leave isn't working. I gave them the permission but the 2 examples I have are that when a player and I were playing a match another player joined to spectate with /cfour tp but when it ended the player and I were teleported out but not the spectator and when they tried to do /cfour leave, they said nothing happened but they were able to warp out. Another example I had was a player joined an arena but no one else was able to play at the moment so he went to leave with /cfour leave but nothing happened as well. After these 2 events I went to double check on the permissions and they do in fact have the permission to leave so is this something that needs to be fixed in the plugin?
-
View User Profile
-
Send Message
Posted Jul 25, 2013@Dragon252525
Thank you, I'll try that! :D
-
View User Profile
-
Send Message
Posted Jul 25, 2013@KrYojeNiX
thx for reporting
@10jared105
I'll upload a fix soon, but if you want to setup a game without any problems, you can download v2.6 it'll work for 1.6.2 too. If you want to use the new features you can just update back to v2.8; there shouldn't be any other problems than the bug with the selection.
-
View User Profile
-
Send Message
Posted Jul 25, 2013Anyone know what I should do?
@Dragon252525 Do you know?
-
View User Profile
-
Send Message
Posted Jul 24, 2013It won't allow me to place and define the regions with the cobblestone and dirt.. It lets me place the first one but when I go to place the second one it says that they need to be exactly 7 blocks apart and I've checked a couple times to make sure but they is a space of 7 blocks in between where I am trying to place them..
-
View User Profile
-
Send Message
Posted Jul 24, 2013Hi epic plugin thank you very much :) Just a little tip if it wont allow 2 points to be selected for the throw bar. The fix i found was to copy with world edit, rotate 90 degrees and paste. It then worked and was able to finish the set up. Hope that helps in finding the bug or anyone having trouble setting up. Also noticed had some issues with diagonals not recognised but no bigy, works a treat apart from that and is a lot of fun :) Thanks again
-
View User Profile
-
Send Message
Posted Jul 21, 2013@Gametista
It's a bug in v2.7 :o
I've already uploaded a fix but it's not approved yet :(
@owenwant
No problem :)
-
View User Profile
-
Send Message
Posted Jul 17, 2013Sweet, You added join signs! Thanks :D
-
View User Profile
-
Send Message
Posted Jul 16, 2013Hello, not sure what's going on, but I can get the throw-in section to create, but no matter how much cobblestone I place, it won't set that portion at all. Any ideas? Thanks!
I was able to create a copy of my server locally, downgrade to the 1.5.2 friendly version, create a game, then import the settings into the newer version. Strange way to have to go about it, but hey it works!
-
View User Profile
-
Send Message
Posted Jul 13, 2013@Rider_of_War
bug 1) I wasn't able to reproduce this bug and I don't know why this hapens from time to time.
bug 2) fixed
@Kami675
implemented
@Richardarkless
I didn't implement this because:
@lANTHONYl
implemented
@bennymcrae
implemented
-
View User Profile
-
Send Message
Posted Jul 13, 2013Make it so you can right click a sign and you join that game. That my sir will make this complete and ready to put on my server!
-The Sheep
-
View User Profile
-
Send Message
Posted Jun 22, 2013Is there a way to restrict players from joining a c4 game outside a certain radius? It would be nice to say that they have to be like 10 blocks away from the game to join it. It would certainly be a good idea to have to have players be in the same world the game is in to join it... at the very least. That's a major issue for me :/
-
View User Profile
-
Send Message
Posted Jun 21, 2013Great plugin, is there anyway to set Displays and Throw Ins to be bigger than 7 blocks wide. The issue is that I got other variants like 8x7, 9x8 and 10x9
-
View User Profile
-
Send Message
Posted Jun 20, 2013@Kami675
Vault economy support is always a nice touch to competitive games.
-
View User Profile
-
Send Message
Posted Jun 5, 2013@Dragon252525
Just a suggestion, when you join a game it requires "$10" to join and if you win you gain your money and the opponents money so "$20" total or maybe a you can attempt to start a game by betting so much money :D
-
View User Profile
-
Send Message
Posted May 15, 2013@Rider_of_War
I don't exactly know where thee first bug is caused. I'll have to go through the code again.
The second one: i'll fix this with the next update
Thanks for reporting ;)
-
View User Profile
-
Send Message
Posted May 3, 2013First, thanks for this plugin. It is fairly popular on my small server... However there is one intermittent "bug" of sorts that seems to happen to one player and so far is not reproducible and only occurs with one player.
There are no errors in console or server log, however, (randomly) on what should be a successful win the game will not register it and allow the game to continue.
http://i.imgur.com/K2nBgHb.png - the last result the last time it happened. The topmost gravel block was placed after the win.
If I can get this to reproduce, I'll post back, but after 30 some-odd games trying various combos, including the one in the screenshot, the games still end as proper.
Second, /c4 setEcoRewards <game> <amt> - I get two errors using the in-game command. First, it says <game> is not a number, so the work around was to rename the games to numbers (1 and 2). The amount however is carrying over to config.yml as the game identifier. Workaround was to manually change config.yml to the proper value and reload config. All is well with that, but just thought you might want to be made aware.
http://pastie.org/7760955 <- config post editing
Running v2.6
-
View User Profile
-
Send Message
Posted Apr 29, 2013@Fenners2013
You need java 1.7 to run this plugin If you can't update java, I could create a working version for you
-
View User Profile
-
Send Message
Posted Apr 29, 2013Hi, downloaded v2.6 added the .jar file to my plugin folder, restarted server and the folder doesnt create within plugins? i have craftbukkit beta v1.5.1 r02.
link to image of screenshot of server error message..... http:imgur.com/0wDaQsd
really want to put this on our server so please help :(
-
View User Profile
-
Send Message
Posted Apr 27, 2013@Dragon252525
Dragon if you would like to check out this bug feel free to join my server zneumann.dyndns.org I will give you any tools you need to debug the bug