RegenBlock
Part of the Minds of Chimera Project (dev)
CodeBlocks | MOCPlaytimeTracker | MOCDBLib | RegenBlock | MOCGoodEats | MOC3DImporter | ImageImport | MOCKiosk | MOCRater | MOCFizziks | GravitySheep | MOCChemistry | MOCRegistry
RegenBlock allows a creation of regions within Minecraft worlds that have a certain re-spawn timer assigned to them. Once a block in the region is destroyed by a player or a new block is placed it will regenerate to the old state after the timer is up.
Example uses
Regeneration of natural resources in certain areas, resetting of region to an earlier state - in a tutorial area on my server, there is a broken bridge that has to be repaired by the player, but after the player does so the bridge would normally remain fixed for the next player that does the tutorial, with RegenBlock I am able to "regenerate" old broken bridge. Can be possibly used as anti-griefing to some degree, but it will only check events associated with played placing or destroying blocks, not tnt, lava fire etc.
Permissions
regenblock.self - all or nothing permission for the use of any commands
Commands
(all at op level)
- Selection
- /rb select (ex,ey,ez) - Starts/stops player's selection mode. ex/ey/ez will expand selection in that direction. Y is vertical.
- /rb listselection - Lists player's current selection points.
- Editor
- /rb edit - Puts you into editor mode that allows you to change blocks in a region without triggering the re-spawn.
- Info
- /rb info - Print out information about the region in front of the character
- /rb list - lists all regions
- Global Blacklist
- /rb blacklist add/remove (id id id ...) - adds/removes supplied block IDs. Blacklisted blocks will be ignored by the plugin and not regenerated.
- Reload
- /rb reload - Reloads the configuration file. Use this if you updated regions through config.yml and have to reload it.
- Region management
- /rb create (name) [re-spawn time] - Creates a region based on your selection from /rb select
- /rb remove (name) - removes region from the list
- /rb type [typeId] - sets region type, 0 for normal, 1 for mine. Mine will regenerate only upwards and with random blocks that you specify with /rb spawnblock
- /rb sync [0/1/2/3] - sets region to regenerate all at once or not, 0 - normal operation, 1 - all blocks re-spawn at once based on first block broken, 2 - same as 1, but based on last block broken, 3 - blocks re-spawn in normal order, but shifted in time based on last block broken.
- /rb modify (name) [re-spawn time] - modify existing region
- /rb modify time (name) (re-spawn time) - modify existing region's re-spawn time
- /rb alarm time/message/radius (name) (value)- changes the region's alarm settings. Alarm will go off before blocks are due for re-pop to warn players.
- /rb rblacklist (name) add/remove (id id id ...) - adds/removes supplied block IDs for region. Blacklist blocks for a specific region.
- /rb feedback (name) (type) - sets feedback type for the region. 0 - none, 1 - on place, 2 - on place/remove
- /rb feedback set (string) - sets string sent to player during region feedback. Use TIME to show re-spawn time.
- /rb spawnblock (name) - lists region's spawn blocks.
- /rb spawnblock add (name) [id chance id chance...] - adds new blocks with spawn chance. Chances do not need to add up to 100.
- /rb spawnblock remove (name) [id id id...] - removes blocks.
- /rb repop (name) - Re-spawns all blocks in a given region
API
Method available directly from RegenBlock class.
public void regenBlock(Location location, Material material, byte data, Player player, Boolean isBreakEvent) location - block's location material - what material block should be set to once restored data - data value for the restored block player - player that broke/placed the block isBreakEvent - test if this is a BlockBreak of BlockPlace event.
@Raidendex
lol wish i knew how :P when would the be the earliest you could do this? Just wondering no rush.
@skeletons10
I will add that guys. I'm just busy this week with 3 tests and some homework in school, so I might not have time. On a bright side if anyone wants to patch it in, source code is included in every jar. Should be easy enough to add to the function that checks if blocks are "ripe" yet for respawn to also see if they are 1 min before respawn state and throw some message to all players withing so many blocks of the area or something.
Feature Request [on synced regions] A message to display before the blocks are all reset Were the message is customizable and you can set the time in seconds that it is sent ahead of the blocks being reset +2
Feature Request [on synced regions] A message to display before the blocks are all reset Were the message is customizable and you can set the time in seconds that it is sent ahead of the blocks being reset
+1
Thanks keep up the good work.
Feature Request [on synced regions] A message to display before the blocks are all reset Were the message is customizable and you can set the time in seconds that it is sent ahead of the blocks being reset
@SeanStar5
Ill add it next time. there are really a few other things that kinda mess up. Like sand/gravel falling down, beds, doors, signs. So I will probably do them all together.
@jonny11011
I removed it in latest version
Hey i know i have already posted but i really want to use your plugin
How ever my server uses multipull worlds and as i said
when a player enters another world the message [regen block] world changed resting points appears in the chat please can u make a option so that message will not show up or inform me on how to remove it..
@Raidendex
You going to add leaves decay logging/qeueing to this? I gave you the code, you just have to implement it. It's in my fork as well.
Uploaded a new version 3.2. It's compiled with 1.2 bukkit so should work on those servers as well if needed.
Few changes - moved all extra feedback commands into debug mode only (/rb debug) removed /regenblock command, just /rb now. And added the sync regen option. /rb region sync regionName 0/1 0 is default normal operation, 1 will sync respawn time of all blocks in a region with the first one broken.
So if regen time is 10 mins, when first block is broken it will respawn in 10 mins, all the following blocks broken within that 10 mins will regenerate at the same time as the first one. Once that 10 mins is up, next broken block will start next sync'ed queue of blocks.
This will work for either region type... I think ;P
Forked this source and added leaves decay as well as a resource saver function. (Allows you to set how often it runs the block check function, default 300 seconds or 5 minutes)
You can also set your regions type to 2 which sets the respawn timer to regenerate all the blocks at once per how long your respawn timer is. (The thing HighlifeTTU was looking for.)
You can find the source here: https://github.com/SeanStar/RegenBlock/ You can find the jar here: http://dl.dropbox.com/u/32529420/RegenBlock.jar
EDIT: Added the options to disable leavesdecay regeneration and console logging in config.
EDIT2: Added region type 3 (Combination of 1 and 2), changed selection to tool instead of command, changed console logging to just standard debug command.
Hello i love the plugin !
One thing that is stopping me from using it on my server is that when ANY player enters a new world gets the message- [RegenBlock] World changed. Points cleared. -Please could you put a option to remove this or inform me on how to remove this message
Please add this to your RegenBlockBlockListernet.java
Fixes the leaves decay not coming back on trees. (This should be a feature) Thanks for including the source in your jar file, I was able to patch it myself.
Accidentally posted again, I'm so busy I don't know what I'm doing. Anyways Raiden. If you can get that change in, I'll gladly donate $15 to your cause.
@HighlifeTTU
I'll look into this, will have to add another region type, but hopefully it shouldn't be too difficult to work with the existing framework.
I really like this, and I am wanting to use this to make some great things on my server. However, is there a way to have it check an entire area after X seconds and regen ALL blocks at that time? I'm a little concerned with performance since its constantly checking blocks to replace. I'd like to have an area that regenerates every 24 hours to what it originally was, allowing folks to fight over it and then know at a set time each day its "refreshed" to be fought over again.
Is that possible?
Thanks for the update!
@Raidendex
Uploaded new version 3.0
Make sure you back up old configuration file as it will likely to be deleted and replaced with new default version.
Changes details can be found on the files page.
@Raidendex
Just looked at 1.1 R6 as well as 1.2.3 R0. Nothing big was changed, but the current file will not work since they have finally removed the Configuration class, but switching to YamlConfiguration is pretty easy.
I am redoing some of the things in the plugin though right now, so will be a few days perhaps before I have updated version out.
@kahlilnc
I haven't tried it with anything above R4, not even sure where to get new ones as my old latest jar link doesnt work anymore ! V.V