Empire Command Signs

17.5k Downloads

This Plugin adds actions for rightclicking on your signs.

You can add an arbitrary number of Commands which will be executed by right-clicking the Sign. These Commands will be executed on a location defined by you! You also have the opportunity to set the needed permission to use the sign. You can also give temporary permissions to a player for executing the commands. As of Version Beta-0.4 you can use Economy to charge for using a sign.

Beta-0.3: Buttons can also be CommandSigns ;-)

Beta-0.3.1: You can also set a pressureplate (id 70 and 72) as CommandSign. To activate it, walk on it.

In Version Beta-0.3 and above you'll need the SQLibrary!!

Installing the Plugin (Beta-0.3 and above)

  • Download the latest Version of this plugin AND of the SQLibrary. Do not forget this Step!
  • (Beta-0.4 +) If you want to use economy you should have Vault installed on your server.
  • Drop these files in your Plugins folder. Maybe you have to delete the config file to get the new entries, if you are upgrading.
  • Start your server.
  • (Beta-0.4 +) If you are not using economy, go into the plugin's Config file, set the useEconomy-value to false and reload the server.

Using a CommandSign

If it is a sign, just rightclick it (leftclick too if activated in config).

If it is a Button, toggle the Button by rightclick (to use it with the redstone output together). If activated in config, you can do a leftclick to use it without the redstone current (In my Opinion Minecraft uses only rightclicks to activate buttons).

If it is a Pressure Plate, place yourself on it. (No Clicking).

In some cases rightclicks doesn't work, because you have a block in your hand, which cannot be placed there. For Best Results Use A Tool

Creating a CommandSign

To create a CommandSign you must first place a Sign. Then you type "/ecs create" and rightclick the Sign to register this Sign in ECS's Database.

If you use a pressure plate please click too. Moving on it is only for Using the plate.

Adding Commands

Type "/ecs addcommand <Your command here>" to add a command. You must type the leading slash if it is an command. Otherwise the player would chat.

"/ecs addcommand time set 0" -> The Player sends the Message "time set 0" on rightclicking.

"/ecs addcommand /time set 0" -> The Player executes the command "/time set 0" on rightclicking.

Templates

It is possible to use the template "%player%". If you add it to your command it will be replaced by the executings' player name.

"/ecs addcommand Player %player% just used the sign!" -> The Player "John_Doe" sends the Message "Player John_Doe just used the sign!"

Adding temporary Permissions

Type "/ecs addperm <Your permission here>" to add temporary permissions to the player. These temporary permissions allow the player to execute commands which they normally are not allowed to. The permissions are revoked after the command executung process.

Modify a Command/Permission

Type "/ecs modcommand" or "/ecs modperm" then enter the Index of the command/permission and then the value to replace. The index can be received by the "/ecs info" - command on the sign. It's the leading number of each entry.

example: You want to modify the Permission number 4 to "john.doe" => "/ecs modperm 4 john.doe"

Remove a Command/Permission

Type "/ecs remcommand" or "/ecs remperm" then enter the Index of the command/permission.

example: You want to remove the Command number 2 => "/ecs remcommand 2"

Set the required permission to use this Sign

Type "/ecs setperm <Your permission here>" to set the required permission. The player must have this permission if he wants to use this sign.

Set the position where the plugins are executed

First move to the location where the commands should be executed. Then type "/ecs setloc" and right-click your sign. This is multiworld compatible.

Set the Sign to OP-only

Type "/ecs setop <true | false>" and then right click the sign.

Get Info about any CommandSign

Type "/ecs info" and rightclick the Sign.

Remove a Sign

Type "/ecs remove" and rightclick a CommandSign.

Commands

  • /ecs create - Perm: ecs.admin - Creates a new Sign
  • /ecs addcommand [optional: "id <value>"] <command> - Perm: ecs.admin - Adds a command
  • /ecs addperm [optional: "id <value>"] <permission> - Perm: ecs.admin - Adds a temporary permission
  • /ecs modcommand [optional: "id <value>"] <index> <newcommand> - Perm: ecs.admin - Modifies a command (index is visible in "/ecs info")
  • /ecs modperm [optional: "id <value>"] <index> <newpermission> - Perm: ecs.admin - Modifies a permission
  • /ecs remcommand [optional: "id <value>"] <index> - Perm: ecs.admin - Removes a command
  • /ecs remperm [optional: "id <value>"] <index> - Perm: ecs.admin - Removes a command
  • /ecs setperm [optional: "id <value>"] <permission> - Perm: ecs.admin - Sets the required permission. Default is ecs.use
  • /ecs setloc [optional: "id <value>" "none"] - Perm: ecs.admin - Sets/removes ("none") the location of the commands execute
  • /ecs setop [optional: "id <value>"] <true | false> - Perm: ecs.admin - Sets this sign op-only
  • /ecs info - Perm: ecs.info - Gets info about this sign
  • /ecs remove [optional: "id <value>"] - Perm: ecs.admin - removes this sign
  • /ecs reload - Perm: ecs.reload - Reloads the plugins database

Beta 0.4 +:

  • /ecs seteconomy [optional: "id <value>"] <None|Check|Withdraw|Give> <Value> - Perm: ecs.admin - Sets the economy status. Please avoid negative values.

Instead of rightclicking the sign everytime you can place a "id <Sign-id>" between the command and the argument. example: /ecs addcommand id 2 /time set 0 - this adds the command "/time set 0" to the sign with id 2. The id can be seen in the info of the sign.

Config-File

  • leftclick: (default: true) - you can say whether you use only rightclicks, or leftclicks too (true: left AND rightclicking, false: only rightclicking).
  • useEconomy: (default: false) - make use of economy features. (Features may be buggy).
  • silentexecute: (default: false) - not fully implemented silent mode.
  • debugMessages: (default: false) - toggle log spamming

Intended Upgrades

  • Economy Support (check if a specified amount of money is available / charge money for use) - started, uploaded - need testers!
  • Run Commands as Op
  • Send the player a message
  • Add the ability to prevent the command-executing plugins to send the player messages (i don't know how).
  • Adding more Templates.... (less priority, if someone needs more Templates, send me a PM, i'll code that first then)

Known Problems (with other plugins)

  • iSafe: Commands on a blacklist are not executed. (Not actually a problem ;-))
  • Version 0.3b: Signs are not loaded properly because the sqlibrary was not in the dependency list - was fixed in 0.4

Special Thanks to:

Information about the beta stage

This plugin is still in beta-stage so there can occur bugs which block some funtions of the server or influence the server in other negative ways. I will fix the bugs as fast as i can. Therefore there can be many updates in a short time period.

This Project on GitHub - Here you can get the newest of the newest version (dev builds). If you use this source you are the first one to get the buxfixes but also the first one to get probably new bugs.

Feel free to give me a feedback / send a ticket with suggestions and problems.