Fill mines (cuboid regions on your server) at a regular intervals automatically with percentages and blocks as you choose.
- Supports multiple worlds
- Use of blocks from mods
Smart Fill to prevent players needing to teleport on mine reset
- Decimal percentages per block
- Block placed random according to mine’s percentages
- No cap on different blocks per mine
- Easy in game setup
- Reminder messages at configurable times with configurable message types
- Refilling messages on refill with configurable message types
- Move players inside on refill to defined location if Smart Fill not used
- Per mine spawns
- Groups of mines on different clocks
- Reset mines at regular intervals with initial delay
- List all mines and mine groups that exist with a command
- Detailed info on a mine or mine group with a command
- Check time until a specified mine refills automatically with a command
- Clear entire mine with a command
- Manual refill mine according to percentages with a command
- Fill entire mine with specific block with a command
- Clickable signs to refill mines at a threshold percentage
- Detailed in game help for commands
- Player specific message toggling to prevent spam
- Better way to set up corners of mine (possible wand)
1.0.8 BETA2 Download version API: 7.0.0-Snapshot
Moved to SpongeForge API 7.0.0-Snapshot Fixed message bugs and updated messages Added feature to make signs that on click can fill mines if they are below a percentage full Added command to change percentage mine fill signs function Added personal toggle message command
1.0.7 Download version API: 5.0.0-Snapshot (also functions on API: 6.0.0)
Calculations on what blocks to be placed where moved to asynchronous thread (performance improvement) No block placed if new block is the same as old block (performance improvement) Filling now gives detailed message for each fill action reporting blocks changed and time taken
1.0.6 Download version API: 5.0.0-Snapshot (also functions on API: 6.0.0)
Moved to SpongeForge API 5.0.0-Snapshot (fixes mine filling issue due to api change) Performance improvements Improved filling messages Fixed typos
1.0.5 Download version API: 4.0.3
Fixed default config for AirBlock list (You must remove all \") Fixed default mine spawn setting on creating new mine
1.0.4 Download version API: 4.0.3
Added title message capabilities Added message type for remind and reset messages now configurable Added UpdateChatSettings command Added system for per mine spawns Removed SetSpawn command Added AddSpawn command Added RemoveSpawn command Added UpdateSpawn command Added ChangeSpawn command Improved command filling of mines to include error message returns Improved details / info command Re-organised command files Changed teleportation to allow unsafe teleportation
1.0.3 Download version API: 4.0.3
Added update fallback block command Added update group command Added Smart fill Added Smart fill setup command Added add new air block command Added remove air block command Improved info command output
1.0.2 Download version API: 4.0.3
Added list reminder times command Added add new remind time command Added remove remind time command Added block info object replacing old double hash map for percentages Added redefine mine command Fixed more typos Fixed help bug
1.0.1 Download version API: 4.0.3
Fixed light blue variants Fixed typos
1.0.0 Download version API: 4.0.1
#General backbone idea (how it works)
On server startup a global clock begins. This clock ticks every second. Every second a calculation is done with each mine group to check time remaining until the mine resets. If that mine groups time remaining is equal to that of a timing in the remind time list of the config file a message will be sent to all players informing of a mine reset of all mines in that mine group in the time remaining. If that time remaining is 0 all the mines in the group will be filled according to each mines percentages and a message sent to all players and console of all mines reset. Any player who is inside a mine when that mine is being filled will be either be moved the the spawn point as set in the config if smart fill is not enabled and if smart fill is enabled will remain in the mine however the mine will not fill as usual around the player.
When a mine refills it will look at all the blocks for that mine and each percentage. The “fallback” block as set in the config is the default block and is default to stone. The plugin will find the percentage of all added ores and then assign the remainder to the fall back block so 100% of the mine has a block. Then for each block a random number will be generated and the plugin will work out what percentage range this number falls in and place that block. For example if I was to add iron ore at 20% to a mine with a fallback block of stone first the plugin would work out iron ore was at 20% so fall back block (in this case stone) would be 80%. Then the plugin would decide 0% to 20% it would place iron ore and 20% to 100% it would place stone. Then for each random it will find what range it is in and place that block. If the random was 1, 8, 15 or 19 iron would be placed. A random of 21, 84 and 100 would all place stone. This is all done in fractions of a second taking about 0.0000136 seconds per block (my mines of 22 000 blocks fill in sets of 4 and take 1.2 seconds, that is 88000 blocks).
#Quick start guide
Update the default spawn for if a player is in a mine when that mine resets. We will set it at 0.5 64 0.5 facing north in the world we are running the command in.
command: /mine updatespawn Default 0.5 64 0.5 north (Added in 1.0.4)
command: /mine setspawn 0.5 64 0.5 north (Removed in 1.0.4)
Create a new mine group called “example” that resets every 30 minutes (1800 seconds) with clock starting 10 minutes (600 seconds) after server start. All mines in this group will reset 40 minutes after first server start and then reset every 30 minutes after that.
command: /mine definegroup example 1800 600
Create a new mine called “first” in the group “example” in the cuboid within 0 64 0 and 10 50 10 in the world player is currently in.
command: /mine definemine example first 0 64 0 10 50 10
(easy way to find coordinates of a block is to place a block at the corner, press f3 and find the block location located last in the list of the right hand side of screen)
Add an ore to our new mine called “first” at 20%. Stand directly on top of the chosen block it and run the command.
command: /mine addore first 20
Now you can add the rest of your ores and use the other config commands as shown in the “Commands and permissions” section. You can test your handy work by filling the mine manually and looking at the result.
/mine fill first
#Smart fill (version 1.0.3)
Smart fill is the name I have given to a new idea to filling mines. Normally a mine is filled completely therefore any player inside must be moved. For players this reduces the immersion as they then need to return to the mines. Smart fill is a way around this. When smart fill is enabled and a mine resets it will check for players inside a mine. If a player is inside a mine it will not adjust any blocks within the smart fill radius of that player. Therefore any tunnels, torches etc. will be untouched and that small area will not be re-populated. This means the player will now not have to be teleported out of the mine and a mine reset will not affect the game-play for the player. There is also Smart fill only air setting. This setting improves smart fill further. On mine reset it will do all as before however now the region around the player will be checked. Any block space that is a gas, liquid or a block on the AirBlocks list in the config will be left untouched while all other blocks will be regenerated. Therefor a strip mined area will repopulate where blocks such as stone is however blocks such as torches will remain untouched similar to a world edit mask. Smart fill, Smart fill radius and Smart fill only air is all configured per mine allowing precise control.
#Message channels (version 1.0.4)
There are 3 supported message channels that are configured in almost the same way to how Linux permissions work. The 3 channels can be selected individually or in any combination and are independantly configurable between RESET and REMINDER messages. The 3 channels are Chat, ActionBar and Title. The way message chanels are selected is via adition of the types values.
Chat channel has value of 1.
ActionBar channel has value of 2.
Title channel has a value of 4.
Set the value for your message type to the addition of the values of the chat channels you want. For example if you want ActionBar and Title you simply add 2 (ActionBar’s value) and 4 (Title’s value) to get a final value of 6. If you set your Reset messages to 6 in the config all messages about a mine reseting will only show to players in the ActionBar and Title chanels.
Note: All reset and reminder messages will show in console regardless of settings.
#Mine fill signs (version 1.0.8)
Mine fill signs implement a feature for players to refill mines by right clicking signs. These signs when right clicked will check percentage filled of the given mine, if the percentage of the mine that is filled is below a preset percentage then that mine will reset. This allows players in extreme cases where the mine is rapidly depleted to refill the mine without staff help.
For this to work the given sign must have the text “[Mine]” on the first line. The second line must detail the name of the mine this sign will interact with. The final two lines are not checked and hence can be anything.
#Commands and permissions
minereset.help (Required for all other commands)
Use this command to list all the mine sub commands user has access to and how to use them
/mine time [mine]
Check time remaining before mine resets
Toggle message settings command (Added in 1.0.8)
Toggles your settings between receiving and blocking mine fill and reminder messages
/mine list [groups|mines|spawns]
List all groups or mines that exist
/mine info [group|mine|spawn] [name]
Get all info on group or mine
General Admin Commands
Reloads mine config file
Saves the mine config being used over one in folder
/mine clear [mine]
Clear all block from a mine
/mine fill [mine]
Fill a mine according to its blocks and percentages (manual reset)
/mine fillblock [mine]
Fill a mine with the block you are currently standing on
Added AddSpawn command (Added in 1.0.4)
/mine addspawn [x] [y] [z] [facing]
Adds a new spawn point with the values listed
Added RemoveSpawn command (Added in 1.0.4)
/mine removespawn [spawn point]
Removes the listed spawn point (To alter default spawn use "Default" other wise use the number of spawn)
Added UpdateSpawn command (Added in 1.0.4)
/mine updatespawn [spawn point] [x] [y] [z] [facing]
Updates the spawn information to the listed values (To alter default spawn use "Default" other wise use the number of spawn)
Added ChangeSpawn command (Added in 1.0.4)
/mine changespawn [mine] [spawn point]
Set the listed mine to use the listed spawn point (To alter default spawn use "Default" other wise use the number of spawn)
SetSpawn command (Removed in 1.0.4)
/mine setspawn [x] [y] [z] [north|south|east|west]
Use this command to save the spot players are sent to when they are in a mine on mine reset to the given X Y and Z coordinates with the facing as entered (player only will, use world player is currently in for spawn world)
/mine definegroup [group name] [reset time] [initial delay]
Create a new mine group with name, reset time and initial delay as listed
UpdateGroup command (Added in 1.0.3)
/mine updategroup [group name] [reset time] [initial delay]
Updates an existing mine group with name, reset time and initial delay as listed
/mine deletegroup [group name] [safe|force]
Deletes an existing mine group. If safe then deletion will fail if mine group has contents
/mine definemine [group] [mine name] [pos1x] [pos1y] [pos1z] [pos2x] [pos2y] [pos2z]
Create a new mine in listed group with name and positions as listed using the coordinate values of the two opposite corners of a mine
RedefineMine command (Added in 1.0.2)
/mine redefinemine [group] [mine name] [pos1x] [pos1y] [pos1z] [pos2x] [pos2y] [pos2z]
Redefine a mine to change its settings to listed group with name and positions as listed
/mine deletemine [mine name]
Delete the mine listed
/mine addore [mine] [percentage]
Adds the block you are standing on to listed mine at listed percentage
/mine updateore [mine] [percentage]
Updates the block you are standing on in listed mine to listed percentage (percentage of 0 will remove the block from the mine)
ListReminders command (Added in 1.0.2)
List the times before a mine reset reminder messages are sent
AddRemindTime command (Added in 1.0.2)
/mine addremindtime [seconds]
Add a time (in seconds) to send a reset reminder message before a mine reset
RemoveRemindTime command (Added in 1.0.2)
/mine removeremindtime [seconds]
Remove a time (in seconds) to send a reset reminder message before a mine reset
SetupSmartFill command (Added in 1.0.3)
/mine setupsmartfill [mine] [true|false(enabled)] [radius] [true|false(only air)]
Changes the smart fill settings for the listed mine to the listed settings
AddAirBlock command (Added in 1.0.3)
Adds the block the player is standing on to the list of blocks that will not be modified when using SmartFill and SmartFillOnlyAir settings
RemoveAirBlock command (Added in 1.0.3)
Removes the block the player is standing on to the list of blocks that will not be modified when using SmartFill and SmartFillOnlyAir settings
UpdateChatSettings command (Added in 1.0.4)
/mine updatechatsettings [FillingText|ReminderText] [setting]
Changes the way messages of the listed type are sent to players
UpdateSignFillPercentage command (Added in 1.0.8)
/mine updateSignFillPercentage [Percentage]
Changes the percentage of blocks that are not air before the mine fill signs function
It is advised to do most of the config in game as it can be touchy at times especially with the exact strings of the blocks to add as percentages. Please not however that to change the remind times it can only be done directly though editing the config file and reloading the config (this won’t change the timers on mines). It is also much easier to do some other actions like renaming a group or mine because it does not require deletion and then making from scratch with the new name in game. You may also want to copy item lists for mines as its easier then using the
addore command for every block for every mine if you have many similar mines.
Like the plugin and feeling generous? Feel free to send me a tip via PayPal. All donations are greatly appreciated.