X-Ray Block Percentage
X-Ray Block Percentage Version: 1.9.2 Alpha
X-Ray Block Percentage, or XBP is a plugin that adds a command to automatically search logger plugin databases (currently supports Hawkeye, LogBlock, and CoreProtect, more plugins coming) for blocks that typical X-Ray hackers will attempt to mine and displays a percentage value of total blocks broken for each type of block.
Current Features
- Displays percentages on any type of block defined in config file (defaults are Iron Ore, Gold Ore, Lapis Ore, Mossy Cobblestone, Emerald Ore, and Diamond Ore).
- Displays total number of blocks broken and amounts of each ore broken.
- Searches across time defined in config file (default is the previous 48 hours) starting from when the command is executed.
- Searches across all worlds by default, can be configured to exclude worlds.
- Displays a warning when a player breaks any type of block defined in config file (default is Diamond Ore) with parameters defined in config file (default is 1.5% and 8 blocks).
- Modification and reloading of config file is available via command.
- Searching is multithreaded to prevent server lag.
Commands
- /xbp [playername] - Performs an XBP search.
- /xbp reload - Reloads settings from config file.
- /xbp config - See here for full usage.
Permissions Nodes
- xbp.*: All permissions
- xbp.xbp: Allows running /xbp [playername] command and viewing of update alerts.
- xbp.warning: Allows viewing of XBP diamond alerts.
- xbp.bypass: Allows for player bypassing of warning checking.
- xbp.config: Allows for player to modify configs via command.
Upcoming Features
- Support for other logging plugins:
- HawkEye/HawkEye Reloaded - Released Version update in progress
- LogBlock - Released Version update in progress
- CoreProtect - Released Version update in progress
- SWatchdog - In Progress
- LogEx - Planned
- Prism - Planned
- HawkEye/HawkEye Reloaded - Released Version update in progress
- Searching for players with top break percentages
Supports
- Plugin managers such as GroupManager or PermissionsBukkit
- Multiple worlds
- Hawkeye v1.0.7b HawkEye Reloaded update in progress
- LogBlock v1.58 Version update in progress
- CoreProtect v1.54 Version update in progress
Special thanks goes to the TCNations server for providing a server with HawkEye to test on and to Vettexl for putting up with my shenanigans. Thanks a ton!
@skippyaut
Hm... I don't see any obvious reasons for this at the moment. I'll look into it some more.
@Adondriel
It doesn't store any information. All information is gathered from logging plugins already installed on servers.
@Pyho Where does this plugin store the information?
@Pyho The Error startet immediatley after 1.9.2 update for all player when tey break Diaore.
@skippyaut
Did this recently start happening, or did it start happening for all players immediately after updating?
Hi, with the 1.9.2 Version, every player gets the CoreProtect Error: Player data file not found! Error when they break Diaore. But /xbp name works fine without problems.
Okay i think i found the problem, I was not know the uppercase and lowercase letters matter. Its work with only lowercase.
@zOxigen00
Hm... Can you look in your CoreProtect data files for a file named after the player in question and with a .dat file extension? It should be in plugins/CoreData/p/
Hmm sometimes, well more then less i use the /xbp playername command the plugin not show the ratio, only a message:
[INFO] CoreProtect Error: Player data file not found!
Any idea for this?
@fletch_to_99
Yep. Still working on this. Largely, it's a performance issue, seeing as how it involves searching every player and ordering them.
@Pyho
Can you please add in a /xray top command that will show the top user breaks for all ores total.
Also add the optional parameters /Xray top (amount of players to list) (block id)
That would be awesome! Thanks
@rolecraft
Yep. MySQL-stored logger plugins are supported. It reads MySQL information directly from the config files of the particular plugins or uses APIs coded into the plugins.
@Jdon278
I'll work on releasing the code shortly. It's not too hard to figure out how to do it. Just do some sort of Reader and parse each line. CoreProtect stores data in a player file referencing a timestamp and a chunk file. The chunk files have all the real data. (what the player did, where it was, what type of block was broken/placed/interacted with, etc.)
@zOxigen00
No problem! :D
@Gemil01
Whoops! Fail on my part. :C A fix for this has been submitted.
Since 1.91 i get these errors:
http://pastebin.com/35BakKBw
I'm using craftbukkit build 279 and logblock.
Thank u the CoreProtect support :)
@Pyho
Any way you can send me the source, as it would help me out a bunch, if I ever release a plugin using it, it will be open source and ill give all credit to you.
Was this possible with Mysql? I dont seem to find an option to insert my mysql info.
And i do wish to run it on mysql if possible :p
@Jobsti2
Sure, I'll add a name output somewhere.
@Jdon278
XBP accesses the CoreProtect data files directly in the case of flat file storage. (Hence the lag that was happening in 1.9.0 from searching players with huge block break amounts. Multithreading should have fixed that.) If data is logged with MySQL, it does everything via MySQL queries.
I can see you have no source, so I must ask how did you access coreprotect logs ? As I cant find any public api for it.
Littlte request
- Showing the searched playername in the header after the red "XBP" -> XBP for <name>
Hi, I get no Warnings displayed? I tested it with a 2nd Account. I have 60 percent diabreak, but no warning. I am op and have also given me the perm xbp.*
@YoFuzzy3
I'll work on these items. The silk touch might be harder, since XBP reads from logger plugin data and not all logger plugins record whether or not a block was mined via silk touch. The other option is to, like you said, only record ores placed by natural means.
@sharp237
I've been considering this idea for a little bit. It shouldn't be horribly difficult. I'll work on it.