Code Monkey home page Code Monkey logo

hidecommands's Introduction

HideCommands Plugin Logo/Icon

Poggit CI Status Poggit Release Status Join the Discord Server

Description

A PocketMine-MP plugin that removes specific commands from the in-game command suggestions. Supports different settings per world.

Note: Just because the commands are hidden, doesn't mean they can't be executed. You still need to make sure to have proper permission management in place.

Usage

  1. Put phar from Poggit into plugins folder
  2. Start server
  3. Stop server
  4. Edit the config.yml file located in plugin_data/HideCommands
    • Per-world settings:
      • The settings under default: are the default settings for all worlds
      • The settings under per-world: overwrite the default settings
    • Choose whitelist or blacklist mode
      • whitelist mode will only show the commands specified below and hide all others
      • blacklist mode will hide the commands specified below and show all others
    • Select the commands to whitelist/blacklist
      • Always use the full command names, not aliases!
        • Hiding a command also hides all its aliases
        • For example: "unban" is an alias of "pardon" in order to hide the "unban" command, add "pardon" to the blacklist

The permission hidecommands.unhide allows players to see hidden commands again. It has been set to default: false, which means you need to explicitly give it to a player or group using a permission manager like PurePerms.

Additional Information

Icon credits: https://pixabay.com/vectors/spy-hat-anony-anonymous-detect-2657484/

hidecommands's People

Contributors

himbeersaftlp avatar joshuaphyt avatar kygekdev avatar poggit-bot avatar thegamingsnail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hidecommands's Issues

Single commands dont Work

I have a command called "/k" when I kept it in the config (- "k") it doesn't show up on the commands players can only use.

Suggestion

Hey! I love this plugin, it makes the server look much cleaner for the players, but is it possible to implement a feature for ops to still see hidden commands? or players with certain permission? Thanks a lot!

Error

[12:39:04] [Server thread/ERROR]: Could not load 'C:\Users\Ajayk\OneDrive\Desktop\svr\plugins\HideCommands.phar' in folder 'C:\Users\Ajayk\OneDrive\Desktop\svr\plugins': Unknown permission default name "fals"
[12:39:04] [Server thread/CRITICAL]: InvalidArgumentException: "Unknown permission default name "fals"" (EXCEPTION) in "src/pocketmine/permission/Permission" at line 82
[12:39:04] [Server thread/CRITICAL]: #0 src/pocketmine/permission/Permission(111): pocketmine\permission\Permission::getByName(string[4] fals)
[12:39:04] [Server thread/CRITICAL]: #1 src/pocketmine/permission/Permission(118): pocketmine\permission\Permission::loadPermission(string[19] hidecommands.unhide, array[2], string[5] false, array[0])
[12:39:04] [Server thread/CRITICAL]: #2 src/pocketmine/permission/Permission(94): pocketmine\permission\Permission::loadPermission(string[12] hidecommands, array[2], string[5] false, array[0])
[12:39:04] [Server thread/CRITICAL]: #3 src/pocketmine/plugin/PluginDescription(168): pocketmine\permission\Permission::loadPermissions(array[1])
[12:39:04] [Server thread/CRITICAL]: #4 src/pocketmine/plugin/PluginDescription(95): pocketmine\plugin\PluginDescription->loadMap(array[9])
[12:39:04] [Server thread/CRITICAL]: #5 src/pocketmine/plugin/PharPluginLoader(60): pocketmine\plugin\PluginDescription->__construct(string[415] ---.name: HideCommands.version: 1.0.3.main: Himbeer\HideCommands\Main.api:.- 3.6)
[12:39:04] [Server thread/CRITICAL]: #6 src/pocketmine/plugin/PluginManager(238): pocketmine\plugin\PharPluginLoader->getPluginDescription(string[61] C:\Users\Ajayk\OneDrive\Desktop\svr\plugins\HideCommands.phar)
[12:39:04] [Server thread/CRITICAL]: #7 src/pocketmine/Server(1854): pocketmine\plugin\PluginManager->loadPlugins(string[44] C:\Users\Ajayk\OneDrive\Desktop\svr\plugins)
[12:39:04] [Server thread/CRITICAL]: #8 src/pocketmine/command/defaults/ReloadCommand(49): pocketmine\Server->reload()
[12:39:04] [Server thread/CRITICAL]: #9 src/pocketmine/command/SimpleCommandMap(248): pocketmine\command\defaults\ReloadCommand->execute(object pocketmine\command\ConsoleCommandSender, string[6] reload, array[0])
[12:39:04] [Server thread/CRITICAL]: #10 src/pocketmine/Server(1811): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[6] reload)
[12:39:04] [Server thread/CRITICAL]: #11 src/pocketmine/Server(1423): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[6] reload)
[12:39:04] [Server thread/CRITICAL]: #12 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine{closure}()
[12:39:04] [Server thread/CRITICAL]: #13 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
[12:39:04] [Server thread/CRITICAL]: #14 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1606826344.125)
[12:39:04] [Server thread/CRITICAL]: #15 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
[12:39:04] [Server thread/CRITICAL]: #16 src/pocketmine/Server(1588): pocketmine\Server->start()
[12:39:04] [Server thread/CRITICAL]: #17 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[36] C:\Users\Ajayk\OneDrive\Desktop\svr, string[44] C:\Users\Ajayk\OneDrive\Desktop\svr\plugins)
[12:39:04] [Server thread/CRITICAL]: #18 src/pocketmine/PocketMine(304): pocketmine\server()
[12:39:04] [Server thread/CRITICAL]: #19 (11): require(string[91] phar://C:/Users/Ajayk/OneDrive/Desktop/svr/PocketMine-MP.phar/src/pocketmine/Poc)

Configuration error.

When starting the server, it crashes because of the plugin.
The problem is in the config (I didn't even change it)

[11:57:28.166] [Server thread/CRITICAL]: ErrorException: "yaml_parse(): scanning error encountered during parsing: mapping values are not allowed in this context (line 17, column 16)" (EXCEPTION) in "pmsrc/src/plugin/PluginDescription" at line 90

PM4

Commands per Permission

Could you add an option, do add all commands, what the groups has permissions set in pureperms or something?

It would be nice, if they could be set itself.

Type Error

"Himbeer\HideCommands\Settings::__construct(): Argument #1 ($configData) must be of type array, bool given, called in /home/container/plugins/CommandEntfernerPerWorld/src/Himbeer/HideCommands/Main.php on line 32" (EXCEPTION) in "plugins/CommandEntfernerPerWorld/src/Himbeer/HideCommands/Settings" at line 21
--- Stack trace ---
#0 plugins/CommandEntfernerPerWorld/src/Himbeer/HideCommands/Main(32): Himbeer\HideCommands\Settings->__construct(false)
#1 pmsrc/src/plugin/PluginBase(119): Himbeer\HideCommands\Main->onEnable()
#2 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#3 pmsrc/src/Server(1407): pocketmine\plugin\PluginManager->enablePlugin(object Himbeer\HideCommands\Main#52635)
#4 pmsrc/src/Server(1036): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#45253)
#5 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#6 pmsrc/src/PocketMine(364): pocketmine\server()
#7 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)
--- End of exception information ---

Doesn't work with EasyCommandAutofill

The HideCommands plugin doesn't work (not hiding commands) if EasyCommandAutofill plugin is installed within the same server.

How to Reproduce:

  • Prepare a fresh PocketMine-MP server without any plugins.
  • Install HideCommands and EasyCommandAutofill to the server.
  • Start the server, edit HideCommands as you want, then restart the server.
  • Join the server and you'll see all commands are still visible when typing / in the chat.

discord:zenJi

I would like a working example because I apologize for my misunderstanding.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.