Circuit Detector
Circuit Detector
Are you tired of continuously looping circuits which lag the server, and want to discover where those circuits are and even destroy them? Circuit Detector allows you to do all that and more.
Features
- Detect running redstone circuits, and now piston contraptions also
- Find the location of running redstone circuits and piston contraptions
- Automatically destroy redstone circuits and piston contraptions after they have been activated too frequently
Tutorial/Demonstration
The video is now a bit outdated, but still shows the basic concept.
Commands
/cd stat : Tells some statistics about the server.
/cd log : Toggles telling the player about redstone events occuring on the server, such as when redstone torches toggle, redstone activates, repeaters activate etc.
/cd unlog : Stops telling the player. You can actually just type /cd log again and it will do the same thing. This command exists just for novelty.
/cd list : Lists all locations which have been causing redstone/piston events on the server within the past 60 (or however configured) seconds.
/cd kill (<x> <y> <z>) : Destroys any circuit connected to the block at xyz. Do /cd kill with no arguments to kill the circuit the player is standing on.
/cd set ([threshold/refresh] <int>) : Sets one of two variables, threshold or refresh time. Do /cd set with no arguments to see the current value of the variables.
threshold: Allows a circuit to loop <int> times before automatically destroying it using the same method as /cd kill. When the value is 0, circuits may loop indefinitely. Default value is 0.
refresh: The amount of time in seconds in which all violations are periodically refreshed to 0.
Command Examples
/cd kill : Will kill the circuit the current player is standing on.
/cd kill 0 64 0 : Kills the circuit at x=0, y=64, z=0 if it exists.
/cd set threshold 50 : Sets the threshold for auto circuit destruction to 50 pulses.
/cd set: Shows the current values of all variables.
Permissions
CircuitDetector.cd : Allows use of all Circuit Detector commands.
Usage
- Use /cd log to discover redstone/piston events, especially recurring ones.
- Use either /cd kill <x> <y> <z> to destroy the circuit, or teleport to the location of the circuit to destroy it yourself, or perhaps discover who built the circuit.
- Or, automatically destroy repeating circuits by setting the threshold to a positive integer, so that when a circuit repeats this many times, the circuit is destroyed.
Configuration
Inside the configuration file (config.yml), there are two configurable values:
threshold: Allows a circuit to loop <int> times before automatically destroying it using the same method as /cd kill. When the value is 0, circuits may loop indefinitely. Default value is 0.
refresh: The amount of time in seconds in which all violations are periodically refreshed to 0.
Notes
- The # of events which a certain location has had is reset every 60 seconds (or whatever you configure it).
- Manual redstone activation also counts as a redstone event (pressing a button to push a piston), so do not set the threshold to be too low or the refresh time to be too high or else players' semi-automatic contraptions will be destroyed (this may be changed in a future update).
Changelog
TODO:
- Add support for logging to files
- Smarter circuit detection (besides repeated powering)
- Support other redstone devices like doors and comparators
- Support exempting certain regions from auto destruction
Source
I have decided to make this project open source so people can contribute whatever they want to the project. The repository is here:
GitHub Repository
If you find any bugs, file an issue using the built-in ticket button beside the download button, or on the GitHub issue tracker (preferred).
Feel free to suggest any ideas in the comments or with a ticket, or in the form of a pull request if you can program.
Credits
This project uses Fanciful for JSON text.
Are you still there?
Hi,
if you have completed some tickets (and do not find time to complete my last one) please just release what you have right now :-)
Hi,
have you already checked your Issues on Github?
@Baba43
Your welcome! I'll take a look at the suggestions and see what I can do.
Thanks, Netdex
Thank you for your great work. I have some suggestions to make it even more usefull. It would be great if you find time to improve your plugin :-)
@DrkMatr1984
Sorry for the extremely late reply, but I am currently working on this as a future feature. Thanks, Netdex
@zuzzas
Hello zuzzas,
No problem! If you REALLY want to donate (donations aren't necessary!), then you can donate with the "Donate" button on the top right of this page beside the Curse logo. Donations would help me continue to develop this plugin, but are really your own decision and are up to your discretion.
Sorry, but the code is currently not publicly available. However, I'm open to discussion about how certain parts of the plugin work.
Thanks, Netdex
Hi. First of all, thanks for the awesome plugin. I've found that the cause of lag on my server was a redstone circuit (thanks to CPU profiling) and your plugin helped me to find out it's physical location. Do you have a PayPal account so that I can send you a donation? Also, do you have a public code repository?
@tracat
Hello tracat, I am currently writing a patch for this issue. Thanks for your patience.
EDIT This has been patched in v1.3.
Thx for the great plugin. but here we found a strange thing. if we put a red stone torch and a button on any block, then press the button quickly,it explodes and we get more torches.We can make infinite torches Maybe you can fix it in the next version?
@Netdex
Would it be possible to exempt certain redstone devices, like CommandBlocks that run on clocks?
@smallpen
It should, but I'm working on an official 1.8 build as of now.
Is it support spigot 1.8 ?
Wooh!! Thanks guys for 100 downloads! Be sure to make a ticket if you find any bugs, or to request features.
I've been testing it and the plugin is AMAZING, but... Comparators are not being detected.
EDIT: Hoppers, dispensers, hoppers, doors, etc... are not being detected.
There's an unhandled NumberFormatException when typing /cd kill.
I've been waiting for a plugin like this forever! :D This is going directly to my server.
Wow, I would definitely download this plugin for my server. Time to get rid of lag!
Omg Finally someone who created something I always wanted! Thanks Netdex! :)
This is a pretty smart idea. Good job.