HomeIsWhereTheHeartIs
Keybased protection, team score and a reason for conflicts.
What's the use of fortresses and castles if anybody can just mine right in? What's the use of labyrinths if anyone just mine right through them? Why build traps if people just bypass them by mining around them? I made this plugin because I got tired of the lack of game play mechanics in Minecraft.
Basic premises of plugin: On first join find yourself in a indestructible room without escape. Select your spawn location by pushing any of four buttons (nort, east, south or west). Gather ten blocks of obsidian and build a heart for protection. In front of the heart you set the key (three blocks) and put one block of iron, gold or diamond to fuel the heart. As long as the three leftmost slots in your inventory is the same as the key you have permission within the hearts protected volume (radius configurable). Without the correct key the volume is protected by the level of protection offered by the choice of fuel. Put a sign on the heart and write a team name on the first line. Several hearts can have the same team name. Hearts do not need to share the key even if they belong to the same team. All iron, gold and diamond put in the chest behind the heart counts as team points. Points are calculated and displayed every time a chest behind a heart is opened. For players without the right key it becomes cumbersome to mine within a hearts protected volume. Also man made blocks/items (bricks, fence, doors, ovens, crafting tables etc) can't be destroyed by mining or be used (buttons, levers and pressure plates are excluded). However they are still vulnerable to TNT.
What does this mean:
- You can build amazing castles and bases that actually takes some cunning and fighting to break into.
- TNT now matters!
- Traps now matters too!
- Should you mine and collect valuable material or should you attack and steal from other teams savings?
- Should you use valuable material for score or to make tools?
- Lots of room for betrayal and backstabing through distributing key to enemy, changing key without team mates knowledge, running off with amassed treasure etc.
- No commands! Either you know the right key or you don't!
- More than 30,000 possible key combinations.
Features:
- On first join players get to choose their spawn location on the server [north, east, south, west] (configurable distance).
- Build heart to protect volume around heart (configurable radius).
- Iron, Gold and Diamond block used as fuel for heart, each with different level of protection:
- - Iron block - Items/manmade blocks unmineable and harder to mine for players without the right key.
- - Gold block - Same as iron plus players without the right key can't build. Also no mobspawn above level 62 within hearts protected volume (configurable level).
- - Diamond block - Same as gold but no mobspawn at all within hearts protected volume.
- Each heart has a key for permission and a chest for score.
- Each heart can be assigned to a team through a sign (Only first line on sign matters).
- Keys are set in each players inventory (the three leftmost slots).
- If two hearts overlap the oldest one has precedence.
- Push any stone button to calculate and display score per team, based on iron, gold and diamond in heart-chests.
- In protected areas mining is more cumbersome for players without the right key.
- In protected areas man made blocks/items cannot be destroyed by mining (However they can still be destroyed by TNT).
Instruction: Put HomeIsWhereTheHeartIs.jar in plugin directory. Start and stop server once to generate config file.
Known issues:
- Sometimes the chunks for the selected spawn area is not loaded fast enough when chosen for the first time, and the player falls to his death. This shouldn't matter too much as all players have no items on join and a respawn puts the player back in the correct location.
- This is my first ever Java programming. I have tried to squash all bugs but expect to find bugs/issues.
- Also the settings bestFuelMobCancel, betterFuelMobNerf and useHeartChest are currently unused.
Future development:
- I would like to implement so that armor and TNT can not be carried at the same time. This because TNT now has a much more powerfull role and being able to spot enemies likely to carry TNT would add to the game play.
Changelog:
Version 1.4
In this release some new stuff has been added:
noPVP and noTNT fuel:
These are blocks which can be used as fuel for a heart. Within the radius of a heart with noPVP fuel, no players with the right key can die. If the heart has noTNT fuel, then all explosions within the raidus will be cancelled. They can be configured in the config.yml file. If you want to disable this functionality I recommend setting noPVP to block 137 (command block) and noTNT to 7 (bedrock) as these blocks shouldnt be available to players unless they cheat. Default values for noPVP is 133 (Block of Emerald) and for noTNT it is 22 (Block of Lapis Lazuli).
Enchanted book perk for the leading team:
Once every ingame day/night cycle (24000 ticks) the team with the most score will get an enchanted book with random enchantment and random level in the chest beloging to their heart. If there is no space left in the chest there will be no book. If a team has several hearts the receiving chest will be randomized.
Version 1.3.2
Moved lots of previously hardcoded stuff to the config. The following are now configurable:
- cancelMob: 50,51,52,53,54,55,56,57,58,59,60,61,62,63
- breakProtectedItems: 25,26,27,28,29,33,34,45,47,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,77,84,85,91,93,94,95,96,98,101,107,108,109,112,113,114,116,117,118,120
- useProtectedItems: 26,54,58,61,62,64,95,96,107,116,117
- allowedBlocks: 46,51,77
- blockSubstitution: 121>98,42>41,53>5,57>42,87>48,1>4,5>24,43>44,41>24,89>88,48>89,44>82,24>12,4>13
- Fixed a couple of bugs where I accidentally (sloppily :)) used the default world without checking the actual world of the heart. This bugged out hearts in other worlds than the standard, made score only calculate contents of chests in the same world as the player and so on. I believe I have fixed them all.
- This version creates a new config, so you should stop the server, delete (or move) your current config and then restart the server.
Version 1.3
- New config value, useSpawnBox. Set to false if you do not want to use the room where players first spawn and choose their destination.
- You MUST add the field useSpawnBox to the config.yml file. It should be directly below "Spawn:". Dont forget the two leading spaces. If you're not familiar with editing yml files it's better to stop the server, delete config.yml, update the .jar file and start the server again. Then a completely new config.yml file will be created.
- Fuel consumption is implemented but not thouroughly tested. Set consumeFuel to true in config to enable. consumeCheckInterval sets how often the server should check if a heart has consumed its fuel. consumeTime is how long before a block of fuel is consumed. A value of 20 is one second. Default consumeTime is 24000 which is 20 minutes (One complete MC day cycle).
- The best fuel in a heart is consumed first
- Pressing a button no longer calculates and shows score. This is now done by using one of the chests on the backside of a heart. This means that you can not check score if you do not have access to a heart.
Version 1.2
- Default config now in English
- Placing TNT in area protected by either gold or diamond fuel without having the right key now places primed TNT entity.
Version 1.1
- Releasing the plugin
Is there any way to avoid people using xray to see the key?
Great plugin!
@NargontheDragon
Hi, thats an intreresting idea. There's a couple of things you'd lose compared to the combination based keys, such as being able to figure out others keys based on what they drop once killed and stuff like that. With this you'd absolutely get the key from someones drop. And I can understand the need for the extra thre inventory slots :) I am looking into this since I anyway have a couple of other ideas I would like to try out.
Best regards, RE
you should make an alternate key mode like a book with a title that matches the heart sign that would be epic! so i dont waste 3 slots on those items for the key.
Version 1.4 just released (both for 1.6.4 and 1.7.2): This release adds perks for the leading team and also the option to use noPVP and noTNT blocks as fuel for a heart.
Rock on! Resident Emil
@capobase
Do you have a server running with the plugin, that I could join?
Hi Everyone who's ever been or will be interested in this plugin. Since I no longer have the time to keep developing this plugin I have open sourced it on Git Hub. Please knock yourselves out :)
https://github.com/ResidentEmil/HomeIsWhereTheHeartIs/
Br, Resident Emil
hi, i dont know why, console is ok, the plugin create the config, but it doesnt work, the spawn box works well but i cant create the hearth, i dont have any permissions thanks, awesome plugin bro
can anyone describe in german, what this mod does?
thx
julia :)
@TheFirstCastlecrafter
Hi, What do you mean with multiple teams? The plugin already support binding a heart to a "team" of your choice depending on what you write on the sign on the heart. Could you please explain your thoughts about ranks?
Best regards, RE
I am having a small ish problem, whenever a user places a block in an area protected by this plugin, (they don't have key for) it allows them to place it, and passes an exception to the server saying that it could not pass the event to the plugin. Was wondering if you could update? Or at least release the source code so I can make an unofficial patch just for me (it is illegal to decompile other people's jars w/o permission).
love the idea but dude you need to update this i need multiple teams though hope that will work and ranks and to go along but yeah nice plugin just needs updating
HI, I tested the latest version with Bukkit 1.2.5-R4 a couple of days ago. It works fine!
@ResidentEmil
You bet I like it! Thank a lot!!
1.3.2 released. All the stuff we discussed below is moved to the config (yes, allowedBlocks too). I also fixed a number of bugs that affected hearts in different worlds.
Hope you like it!
Br,
RE
Hi guys,
I just uploaded 1.3.2 Beta with most of the stuff we talk about below moved to the config. Please read the changelog. Don't forget to stop your server, delete your old config, and start the server to let the plugin create a new config.
I have very little time at the moment, so if you could possibly try this out it would be great. It is a beta so there might be bugs and other issues.
Have fun!
Br,
RE
@ResidentEmil
Absolutely! This is really awesome, I cant't wait!
Hi all, This has been some busy weeks, but I think I have it figured out how to move both which mobs to cancel and what (and how) blocks are affected by mining under the influence of a heart. Mob cancel will be implemented with a simple comma separated line in the config. Something like:
mobCancel = 1,2,3,4
Where the numbers are entity ID's
Unbreakable blocks will be implemented in the same way:
unbreakable = 1,2,3,4
Where the number are block ID's
Block substitution (what a block turns into if mined under the influence of a heart) will be implemented like this:
blockSubstitution = 1>2,3>4,4>5
Where the numbers are block ID's and ">" means "turns into". I.e block of ID 1 turns into a block of ID 2 etcetera.
This will make the plugin much more flexible BUT it will also put much more responsibility on the admin. It will for example be possible to make substitution loops where sand turns into dirt turns into cobblestone turns into sand and thus will effectively not be mineable. The default config will have the settings I am now hardcoding into the plugin.
Will this cover what you have asked for?
Br, RE
Thanks for the reply. I just wanted to be able to change which blocks were unbreakable and also define what certain blocks will change to when they can be broken. i.e stone to cobblestone, then gravel, THEN sand, then sandstone, and even back to stone. I don't know what that would entail to write into the config.yml file.
I am not a programmer by any means, but i did figure out how decompile the .class files (I thought I could change it easily myself) and it seems like it would be easy to do by just adding the additional lines of code. However, when I tried to compile the code I get errors, that are probably an artifact of not having the source and not knowing what the heck I am doing. That is the only reason why I wanted the source... to play around an see if I could get it to work.
If you are willing to add that stuff that is great, but if not I still like the plugin and will be using it.
@ProfessorSmart
Hi, I am glad to hear that you appreciate my plugin. At the moment I am not considering sharing the source. However that may change in the future. Please list what modifications you would like to see. They might be possible to implement as configuration options.
Br, RE
Thanks for the plugin!
Would you be willing to share your source code so I can make custom changes for my server?