CostOnCommand: Set Command Costs on Your Minecraft Server

Understanding CostOnCommand: The Smart Way to Charge for Commands in Minecraft Running a Minecraft server often means balancing fun with a healthy in-game economy. One clever approach is to attach costs to commonly used commands, encouraging players to earn money before teleporting, warping, or u...

Download CostOnCommand

Original name: CostOnCommand

FileVersionLoaderSize
CostOnCommand.jar——31 КБDownload

Understanding CostOnCommand: The Smart Way to Charge for Commands in Minecraft

Running a Minecraft server often means balancing fun with a healthy in-game economy. One clever approach is to attach costs to commonly used commands, encouraging players to earn money before teleporting, warping, or using other powerful tools. CostOnCommand is a lightweight plugin that does exactly that, letting server owners assign different prices to commands based on a player's permission group. Whether you want to charge a flat fee for /back or offer VIPs a discount, this plugin gives you the flexibility to shape your server's economy without complex scripting.

How CostOnCommand Works

At its core, CostOnCommand hooks into the Vault economy system, so you need a compatible economy plugin like Essentials Economy or iConomy. Once installed, you define a list of commands in the configuration file and assign a base cost. Then, using permission nodes, you can override that cost for specific groups. For example, a default player might pay $100 to use /back, while a VIP group pays only $50, and a premium veteran group enjoys an even lower rate of $25. The plugin checks the player's permissions before executing the command and deducts the appropriate amount—or blocks the command if the player can't afford it.

One of the standout features is its simplicity. You don't need to edit every single command; you just define the command label (like "back" for /back) and the plugin handles the rest. However, note that currently it applies to all commands starting with that label. So if you set a cost for "warp," every warp command—/warp shop, /warp pvp, etc.—will incur the same cost. The developer has acknowledged this limitation and plans to add more granular control in future updates.

Setting Up Permissions the Right Way

Permissions are the heart of CostOnCommand's flexibility. After adding a cost entry in the config, you must grant a corresponding permission to the groups you want to affect. The permission format is costoncommand.[name], where [name] matches the key you used in the config. For instance:

  • In config.yml, you might define a cost entry called "vip1" with a reduced price.
  • Then in your permissions manager (like PermissionsEx or GroupManager), you add costoncommand.vip1 to the VIP group.
  • Players in that group will automatically get the cheaper rate whenever they use the command.

This system is group-agnostic—the group name doesn't need to match the config key, only the permission node. That means you can create complex pricing tiers without restructuring your existing permission setup. If you're looking for a hassle-free way to manage plugins, you can install CostOnCommand easily through the foxygame.net launcher — a modern, flexible launcher that lets you download mods directly from its menu, saving time on manual setup.

Configuration and Language Support

The main config.yml file is straightforward. You list commands under a "commands" section, each with a default cost. Below that, you can add custom cost entries for different permission levels. The plugin also supports multiple languages. To add a new language, simply copy the EN.yml file from the lang folder, rename it to your language code (like FR.yml for French), translate the messages, and update the "lang" setting in config.yml. After a /coc reload, all in-game messages will switch to the new language seamlessly.

This multilingual support is especially useful for international servers or communities where players speak different languages. The messages cover everything from insufficient funds alerts to successful command execution, ensuring a smooth player experience regardless of locale.

Commands and Reloading

The plugin keeps its command set minimal. The only admin command is:

  • /coc reload – reloads all configuration files, including language files, without restarting the server.

There are no player-facing commands, as the cost system works silently in the background. This simplicity reduces clutter and keeps the focus on gameplay.

Known Limitations and Future Improvements

As mentioned, the main bug is that CostOnCommand cannot differentiate between commands that share the same starting name. If you set a cost for "warp," it will affect every command that begins with "warp," including subcommands like /warp create or /warp list. This is a known issue, and the developer has stated they will fix it in a later release. Until then, plan your command cost assignments carefully to avoid unintended charges.

Another point to note is that the plugin uses Metrics (PluginMetrics) to collect anonymous usage statistics. This helps the developer see how many servers are running the plugin. If you prefer to opt out, you can disable it in the PluginMetrics config file without affecting functionality.

Compatibility and Requirements

CostOnCommand is built for Minecraft versions 1.7.10 and 1.8, so it's ideal for legacy servers or those running older modpacks. It requires Vault to interface with the economy, but beyond that it has no heavy dependencies. The source code is available on GitHub (repository by Tannerq) for anyone interested in reviewing or forking the project.

Why Use CostOnCommand on Your Server?

Adding costs to commands isn't just about draining player wallets—it's about creating meaningful progression. When a new player has to work to afford a /home teleport, they feel more invested in the server's economy. VIPs appreciate the tangible perk of discounted commands, which can boost donation incentives. The plugin is lightweight, easy to configure, and fits neatly into any server that already uses Vault. Whether you're running a survival, factions, or towny server, CostOnCommand adds a layer of economic depth with minimal overhead.

For server admins who value both simplicity and customization, this plugin strikes a solid balance. The ability to define per-group costs, switch languages on the fly, and reload configurations instantly makes it a practical tool in any admin's toolkit. As the plugin matures and gains the ability to target specific subcommands, it will become even more powerful. In the meantime, it remains a reliable way to monetize commands and encourage economic activity on your Minecraft server.