watch - add optional text commands
Ephemeris opened this issue ยท 5 comments
Users are requesting an optional text-command, to invoke the left/right click function of the watch, so that they can:
- have one-less tool in their hotbar
- use keybinds
suggested commands:
/toolbelt day
/toolbelt night
link to code, in case that helps:
https://github.com/Peter200lx/ToolBelt/blob/master/src/com/github/peter200lx/toolbelt/tool/Watch.java
hmm, this is a bit of a tricky issue. The stated goal of ToolBelt is to have a suite of tools that are simple to use. To that end I've focused on not allowing command-line options to change the behavior of a tool. However, this is a slightly different case as it is not trying to change the behavior so much as invoke the behavior.
I'll have to think about if this should be implemented as part of this plugin, and if so, how to properly do so. I'll let you know if I have any further thoughts, and feel free to do the same.
I would vote for no. There are already plenty of command line plugins to mess with the time. The watch is totally optional. If you want it on your hotbar, then use it Otherwise, plenty of "general" plugins have time commands
@nightpool : but that would require installing an additional plugin (with the burden of yet another thing to update, and that might not update rapidly to 1.3+). Versus, writing a (few?) lines of code to add a text command to the 'optional' watch (thereby freeing up a hotbar slot, or removing the necessity of switching a clock in and out of our hotbar every 7 minutes)
The only plugin I can find with this function, is not yet started (PermissionsClock). Everything else works server-wide, not per-player. (which interferes with redstone timing, and annoys the players who want time to flow normally)
Our users generally use the macro keybind mod in their clients, which allows automated scripts. eg. "every 7 minutes, run the command '/toolbelt day'"
(Your stated reason for not including it, seems to translate as "I don't want it, therefore you shouldn't have it". If you have a technical objection, then please explain it clearly. If you can find another plugin that matches the functionality, with zero additional overhead, then please link it.)
The issue is that ToolBelt is built with the goal of being simple to use, with the users only interacting with any tool through clicks. The code was written with this mindset, and there is no mechanism in place for a text command to be passed into any tool. Adding in a text command to a specific tool (the watch) would require a fairly large refactoring of the code. Summary: Initially a design decision, now backed by the way the plugin is coded, would be major change to add that functionality.
Honestly, it would be a pretty fast plugin to build as I already have all the logic designed. If you wish I should be able to have a command only player specific time control plugin within a week. If you do desire me to make a stand-alone text command based plugin, let me know.
However, it sounds like CommandBook is what you want. It has the ability to have per-player time setting, locking a players time so they don't have any day-night cycle at all, and some other cool tricks. Also, it is built in a modular fashion so you don't have to enable more components then you want. You could enable the time component and disable the rest to get just the functionality you want.