1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GrabBag 2.3.0

Collection of miscellaneous commands and listener modules

This plugin collects a number of commands and listener plugins that I find useful and wanted to have in a single plugin rather through multiple ones. The available commands and listener modules can be configured. This allows this plugin to co-exist peacefully with other plugins.

Command Reference
The following commands are available:

  • afk: Toggles AFK status
    usage: afk [message]

    Implements basic Away From Key functionality. This is actually implemented on the basis of the freeze-thaw, mute-unmute and shield modules. These have to be active for this command to work.

  • after: schedule command after a number of seconds
    usage: after <seconds><command>|list|cancel<id>

    Will schedule to run command afters econds. The list sub command will show all the queued commands. Thecancelsub command allows you to cancel queued commands.

  • alias: Create a new command alias

    Create an alias to a command. Use the-fto override existing commands

    • alias -f list query list
    • alias -f help echo You are beyond help!
    • alias fancycmd rc fancycmd
  • as: run command as somebody else
  • at: schedule command at an appointed date/time

    Will schedule to runcommandat the given date/time. This uses php'sstrtotimefunction sotimesmust follow the format described inDate and Time Formats. Thelistsub command will show all the queued commands. Thecancelsub command allows you to cancel queued commands.

  • blowup: explode a player

    Explodesplayerwith an explosion with the givenyield(a number). Ifmagicis specified no damage will be taken by blocks. The default isnormal, where blocks do get damaged.

  • burn: Burns the specified player

    Setsplayeron fire for the specified number of seconds. Default is 15 seconds.

  • chat-on|chat-off: Allow players to opt-out from chat

    Prevents players from sending/receiving chat messages. The following options are recognized:
    • --list : Lists the players that have chat on/off status
    • --server : Globally toggles on/off chat.
  • clearchat: Clears your chat window

  • clearhotbar: Clear player's hotbar

  • clearinv: Clear player's inventory
  • crash: manage crash dumps

    Will show the number ofcrashfiles in the server. The following optional sub-commands are available:
    • crashcount
      • Count the number of crash files
    • crashls[pattern]
      • List crash files
    • crashclean[pattern]
      • Delete crash files
    • show[pattern]
      • Shows the crash file ##
  • delhome: Removes your home
  • delwarp: Removes warp
  • dismiss: Dismiss a previously summoned player
  • echo: shows the given text
  • entities: entity management

    By default it will show the current entities. The following sub-commands are available:
    • entitiesls[world]
      • Show entities in[world](or current world if not specified).
    • entitiestiles[world]
      • Show tile entities in[world](or current world if not specified).
    • entitiesinfo[e#|t#]
      • Show details about one or more entities or tiles.
    • entitiesrm[e#]
      • Removes one or more entities.
    • entitiessignN[t#]message text
      • Changes the text lineNin the tile/sign identified byt#.
    • entitiescount
      • Show a count of the number of entities on the server.
    • entitiesnuke[all|mobs|others]
      • Clear entities from the server.
    Additionally, tiles can be specified by providing the following:
    • t(x),(y),(z)[,world]
  • expand: Shows the given text after handling variable expansions
  • fixit: Fix item being held
  • fly: Toggle flyingONLY FOR PM >1.5
  • follow: Follow a player
  • follow-off: stop following a player
  • followers: List who is following who
  • followme: Make a player follow you
  • followme-off: stop making a player follow you
  • freeze|thaw: freeze/unfreeze a player so they cannot move.

    Stops players from moving. If no player specified it will show the list of frozen players.

    If--hardor--softis specified instead of a player name, it will change the freeze mode.

  • ftserver: Travel to remove servers

    Teleport to servers defined with the/serverscommand.

  • get: obtain an item

    This is a shortcut togivethat lets player get items for themselves. You can replaceitemwithmoreand the current held item will be duplicated.

  • gift: give an item to a player

    This is a re-implementation ofgivecommand.

  • gma: Change your gamemode toAdventure.
  • gmc: Change your gamemode toCreative.
  • gms: Change your gamemode toSurvival.
  • gmspc: Change your gamemode toSpectator.
  • heal: Restore health to a player

    Heals a player. If the amount is positive it will heal, if negative the player will be hurt. The units are in 1/2 hearts.

  • home: Teleport to home
  • invis: makes player invisible
    usage:invisThis will toggle your invisibility status.
  • iteminfo: Show additional info on item held
  • log: toggle server logging (chat-scribe)

    without arguments will return the logging mode. Otherwiseonwill enable logging,offwill disable logging.

  • mute|unmute: mutes/unmutes a player so they can not use chat

    Stops players from chatting. If no player specified it will show the list of muted players.

  • near: Shows what players are near by
  • nick: Change your display name
  • onevent: Run command on event
    usage: usage:onevent<event>[cmd]

    This command will make it so a command will be executed whenever an event is fired. Options:
    • onevent
      • show registered events
    • onevent<event>
      • Show what command will be executed.
    • onevent
      • Will schedule forcommandto be executed.
    • onevent--none
      • Will remove the given event handler
  • opms: sends a message to ops only

    Sends chat messages that are only see by ops. Only works with ops that are on-line at the moment. If you no ops are on-line you should use therptcommand.

  • ops: Shows who are the ops on this server.
  • perm: temporarily change player's permissions

    This can be used to temporarily change player's permissions. Changes are only done in-memory, so these will revert if the disconnects or the server reloads. You can specify apermissionand it will show it's value or if true|false is specified it will be changed. If you specifydump, it will show all permissions associated to a player.

  • players: Shows what players are on-line
  • plenty: When in survival, make sure that a player never runs out of items

    Whenplentyis on, the player will not run out of items. Whenever the current block being placed is about to run out, you are given new blocks of the same type automatically.

  • pluginmgr: manage plugins

    Manage plugins. The following sub-commands are available:
    • pluginmgrenable<plugin>
      • Enable a disabled plugin.
    • pluginmgrdisable<plugin>
      • Disables an enabled plugin.
    • pluginmgrreload<plugin>
      • Disables and enables a plugin.
    • pluginmgrinfo<plugin>
      • Show plugin details
    • pluginmgrcommands<plugin>
      • Show commands registered by plugin
    • pluginmgrpermissions<plugin>
      • Show permissions registered by plugin
    • pluginmgrload<path>
      • Load a plugin from file path (presumably outside thepluginfolder.)
    • pluginmgrdumpmsg<plugin>[lang]
      • Dump messages.ini.
    • pluginmgruninstall<plugin>
      • Uninstall plugin.
    • pluginmgrfeature<plugin>[[-|+]feature]
      • For plugins that have afeaturestable inconfig.ymlthis will let you change those settings.
  • poptp: Returns to the previous location
  • prefix: prepend prefix to chat lines
    usage:prefix[-n]<prefix text>

    This allows you to prepend a prefix to chat lines. To stop enter/prefixby itself (orprefixat the console). Usage examples:
    • Send multiple/as playercommands in a row.
    • Start a private chat/tell playerwith another player.
    • You prefer commands over chat:/prefix -n /
    When prefix is enabled and you one to send justonecommand without prefix, prepend your text with<.

  • pushtp: Saves current location and teleport
  • query: query remote servers

    This is a query client that you can use to query other remote servers.

    Servers are defined with theserverscommand.

    • query list
      • List players on all configuredqueryconnections.
    • query info<id>
      • Return details from query
    • query players<id>
      • Return players on specified server
    • query plugins<id>
      • Returns plugins on specified server
    • query summary
      • Summary of server data
  • rc: Runs the given script

    This command will execute PMScripts present in theGrabBagfolder. By convention, the ".pms" suffix must be used for the file name, but the ".pms" is ommitted when issuing this command.

    The special scriptautostart.pmsis executed automatically when theGrabBagplugin gets enabled.

    By default only scripts in the Plugin directory are executed. You can disable this feature with the command:

    To resume limiting:

  • rcon: rcon client

    This is an rcon client that you can used to send commands to other remote servers identified byid.

    You can specify multiple targets by separating with commas (,). Otherwise, you can use--allkeyword for theidif you want to send the commands to all configured servers.

    Use theserverscommand to define the rcon servers.

  • reg: Manage player registrations

    By default it will show the number of registered players. The following sub-commands are available:
    • count
      • default sub-command. Counts the number of registered players.
    • list[pattern]
      • Display a list of registered players or those that match the wildcardpattern.
    • rm<player>
      • Removesplayerregistration.
    • since<when>
      • Display list of players registered since a date/time.
  • rem: Do nothing
  • reop: Let ops drop priviledges temporarily

    Will dropoppriviledges from player. Player can getopback at any time by enterreopagain or by disconnecting.

  • rminv: Remove item from player's Inventory
  • rpt: report an issue to ops

    Logs/reports an issue to server ops. These issues are stored in a a file which can be later read by the server operators. Use this when there arenoops on-line. If there are ops on-line you should use theopmscommand.

    The following ops only commands are available:
    • rptread[##]
      • reads reports. You can specify the page by specifying a number.
    • rptclear<all|##>
      • will delete the specified report or ifall, all the reports.
  • seearmor: Show player's armor
  • seeinv: Show player's inventory
  • servers: Manage peer server connections

    This is used to manage the peer server definitions used by theRCONandQUERYmodules, among others.

    • servers add<id><host>[port][options][# comments]
      • adds a new connection withid
    • servers rm<id>
      • Removes peerid.
    • servers ls
      • List configured peers.
    • servers info<id>
      • Show server details Avalable options (when adding servers):
    • rcon-port=port : Alternative port for RCON
    • rcon-pw=secret : RCON password
    • rcon-host="str" : Alternative host for RCON
    • no-motd-task : This server will not be polled by the MOTD Daemon
    • no-query-task : This server will not be polled by the Query Daemon
    • query-use-ipv4 : Resolve host name when doing queries
    • query-use-ipv4 : Resolve host name when doing queries
    • query-host=host : Alternative host to be used in queries
    • ping-host=host : Alternative host to be used in MOTD pings
    • ping-use-ipv4 : Ping host by IP address
    • ft-host=host : Alternative host to be used in fast transfer
  • servicemode: controls servicemode

    Ifonit will activate service mode. In service mode new players can not join (unless they are ops). Existing players can remain but may be kicked manually by any ops.

  • setarmor: Sets armor (even in creative)

    This command lets you armor up. It can armor up creative players too. If noplayeris given, the player giving the command will be armored.

    Quality can be one ofnone,leather,chainmail,iron,goldordiamond. This will make all armor components of that quality.

    Otherwise you can specify an armor item, and this will be placed in your armor slot.

  • sethome: Sets your home location

  • setwarp: Sets warp location
  • shield: player is protected from taking damage

    This will toggle your shield status.

  • shield: player is teleported to the place of last death
  • showtimings: Shows timing repots as reported bytimings

    If nothing specified it will list available reports. These are of the form oftimings.txtortimings1.txt.

    To specify a report entertfortimings.txtort1fortimings1.txt.

  • skin: manage player's skins

    Manipulate player's skins on the server. Sub-commands:
    • skinls
      • List all available skins on the server. Default command.
    • skin[player]save<name>
      • Savesplayer's skin toname.
    • skin[player]load[--slim]<name>
      • Loadsplayer's skin fromname.
    • skin[player]slim
      • Make player's skin slim
    • skin[player]thick
      • Make player's skin non-slim
    • skinformats
      • Show supported formats
  • slay: Kills the specified player
    usage:slay<player>[messsage]Kills a player with an optionalmessage.
  • spawn: Teleport player to spawn point
  • spectator|unspectator: toggle a player's spectator mode(DEPRECATED)

    This command will turn a player into an spectator. In this mode players can move but not interact (i.e. can't take/give damage, can't place/break blocks, etc).

    If no player was specified, it will list spectators.

  • spy: spy on a player in-game (chat-scribe)

    This command is useful for a help-desk type function. Let's you locale_lookup over the shoulder of a player and see what commands they are entering.

  • summon: Summons a player to your location
  • throw: Throw a player in the air
  • top: Teleport player to the top
  • tpaccept: Accept a Teleport request
  • tpahere: Ask a player to teleport to you
  • tpask: Ask a player to teleport to them
  • tpdecline: Decline a teleport request
  • trace: controls event tracing

    Trace will show to the user the different events that are being triggered on the server. To reduce spam, events are de-duplicated.

    Sub commands:
    • trace
      • Shows the current trace status
    • traceon
      • Turns on tracing
    • traceoff
      • Turns off tracing
    • traceevents[type|class]
      • Show the list of the different event types and classes. If atypeorclasswas specified, it will show the events defined for them.
    • trace<event|type|class>[additional options]
      • Will add the specifiedevent|type|classto the current user's trace session.
    • trace<-event|type|class>[additional options]
      • If you start theevent|type|classspecification name with adash, theevent|type|classwill be removed from the current trace session.
  • wall: shows the given text to all servers

    This will broadcast the given message to all the servers lited in"serverlist"that havercon-pwdefined. You must haverconenabled and all servers should be runningGrabBagwithwallsupport.

  • warp: Teleport to warp.
    usage:warp[player][warpname]Teleports towarpname. If nowarpnameis given, it will list the warps available.

    Permissions are created with the form:gb.warp.warpname.

  • whois: Gives detailed information on players
  • xyz: shows the players position and bearing
Commands scheduled byatandafterwill only run as long as the server is running. These scheduled commands willnotsurvive server reloads or reboots. If you want persistent commands, it is recommended that you use a plugin likeTimeCommander.

Module reference
Display particles when a player gets hit

Broadcast player's using FastTransfer

This listener module will broadcast when a player uses FastTransfer

Broadcast player teleports

This listener module will broadcast when a player teleports to another location. It also generates some smoke and plays a sound.

Implements "@" command prefixes

Please refer to the CommandSelector section

Customize what happens when a player dies

Currently this module only supports theKeepInvfeature. This feature lets you select what happens with a player's inventory when they get killed.

  • default : This is the PocketMine-MP default, which the player loses their inventory and it is drop as pickable items.
  • keep : The player gets to keep their inventory and nothing gets dropped.
  • nodrops : The player loses their inventory but no items are dropped. This is useful to reduce the amount of Item Entities which in heavy used servers may cause lag.
  • perms: Player permissions are checked on what to do. Players must have one permission between these:
    • gb.cdeath.default
    • gb.cdeath.keep
    • gb.cdeath.nodrops
Customize players when they joins the server

This module does the following:

  • Broadcast a message when an op joins
  • Show the server's motd on connect.
  • Keeps slots reserved for Ops (or VIPs)
  • Players can start with equipment
  • Always Spawn functionality
Merges the slot count of multiple servers

This module requres either themotd-taskorquery-taskto be enabled.

Background task to ping configured remote servers

This module will ping servers in the server list to retrieve motd/cache

Background task to query configured remote servers

This module will query servers in the server list to retrieve query cacheable data.

Uses!!to repeat command with changes

If you want to repeat a previous command enter!!withoutany "/" in front. This works for commands and chat messages.

You can optionally append additional text to!!to do certain things:

  • !!number
    • Will let you paginate output. For example, entering:
      • /mw ls
      • !!2
      • !!3
    • This will start showing the output of/mw lsand consecutive pages.
  • !!/
    • if you forgot the "/" in front, this command will add it. Example:
      • help
      • !!/
  • !!text
    • Will appendtextto the previous command. For example:
      • /gamemode
      • !! survival john
    • This will show the usage of survival, the next line will change the gamemode of john to survival.
  • !!str1 str2
    • Will repeat the previous command replacingstr1withstr2Example:
      • /give player drt
      • !!drt dirt
    • This will changedrtintodirt.
  • !!^text
    • Will inserttextat the beginning of the command.
Command Selectors
This adds "@" prefixes for commands. SeeCommand Prefixesfor an explanation on prefixes.

This only implements the following prefixes:

  • @a - all players
  • @e - all entities (including players)
  • @r - random player/entity
The following selectors are implemented:

  • c: (only for @r),count
  • m: game mode
  • type: entity type, use Player for player.
  • name: player's name
  • w: world
Since version 2.3 of GrabBag, an API is available. For more information see theAPI documentation.

Most of GrabBag features are available through the GrabBag API or through libcommon (which is included with GrabBag). If there is a feature missing from the API, please file a bug report.

Configuration is through theconfig.ymlfile. The following sections are defined:

  • world: world broadcast setting. If true, will broadcast teleports accross worlds.
  • local: local broadcast setting. This will broadcast teleports that go beyond this number.
  • privacy: RE => text : used to clean-up logs
  • notice: Show this text whenever a player logs-in
  • max-commands: Limit the ammount of commands generated by @ prefixes
  • inv: default, keep, nodrops, perms
This section you can enable/disable commands and listener modules. You do this in order to avoid conflicts between different PocketMine-MP plugins. It has one line per feature:

feature: true|false

Iftruethe feature is enabled. iffalsethe feature is disabled.

  • hard-freeze: how hard to freeze players. Iftrueno movement is allowed. Iffalse, turning is allowed but not walking/running/flying, etc.
  • adminjoin: broadcast whenever an op joins
  • servermotd: show the server's motd when joining
  • reserved: Number of reserved slots (0 to disable)
  • spawn-items: List of items to include when joining
  • spawn-armor: List of armor to include when joining
  • spawn: default, always, world, home, perms
  • ticks: how often tasks are fired...
  • ticks: how often tasks are fired...
This section configures peer servers. This can be used withrconandquerycommands.

Permission Nodes
  • gb.cmd.back: Allow players to return to place of death
  • gb.cmd.pushpoptp (op): position stack
  • gb.cmd.whois (op): view players details
  • gb.cmd.whois.showip (op): view players IP address
  • gb.join.reserved (op): players with this permission can use reserved slots
  • gb.join.giveitems: receive items on join
  • gb.join.givearmor: receive armor on join
  • gb.join.spawn.default (disabled): Players with this permission join according to PocketMine defaults
  • gb.join.spawn.always (disabled): Players with this permission will always spawn on the default world on join
  • (disabled): Players with this permission will spawn in the last world on join
  • gb.join.spawn.home (disabled): Players with this permission will join in their Home location
  • gb.cmd.servers (op): servers command
  • (op): view server configuration
  • (op): view server IP address
  • (op): view rcon secrets
  • gb.cmd.servers.write (op): change server configuration
  • gb.cmd.ftserver (op): Allow user to use Fast Transfer
  • gb.cmd.follow (op): lets you follow others
  • gb.cmd.followme (op): let others follow you
  • (op): Manage skins
  • (op): Manage other's skins
  • gb.cmd.log (op): Allow players to enable logging
  • gb.cmd.spy (op): Allow players to enable spying
  • gb.spy.privacy (disabled): Players with this permission do not have logging/spying
  • gb.cmd.after (op): access command scheduler
  • gb.cmd.alias (op): allow creating aliases
  • gb.cmd.summon (op): summon|dismmiss command
  • gb.cmd.crash (op): crash dump management
  • gb.cmd.entities (op): entity management
  • gb.cmd.get (op): get blocks
  • gb.cmd.gma (op): Switch gamemode to Adventure
  • gb.cmd.gms (op): Switch gamemode to Survival
  • gb.cmd.gmc (op): Switch gamemode to Creative
  • gb.cmd.gmspc (op): Switch gamemode to Spectator
  • gb.cmd.plenty (op): Give players plenty of stuff
  • gb.cmd.servicemode (op): service mode command
  • gb.servicemode.allow (op): login when in service mode
  • gb.cdeath: players with this permission benefit from keepiinv
  • gb.cdeath.default (disabled): Player dies according to PocketMine defaults
  • gb.cdeath.keep (disabled): Player keeps inventory on death
  • gb.cdeath.nodrops (disabled): Player does not drop items on death
  • gb.cmd.mute (op): mute/unmute players
  • gb.cmd.onevent (op): access onevent command
  • gb.cmd.reop: Reop command
  • gb.cmd.reop.others (op): ReOp others
  • gb.cmd.tpask (op): Submit a tp request
  • gb.cmd.tpahere: Submit a tp-here request
  • gb.cmd.tpaccept: Accept tpask|tpahere
  • gb.cmd.tpaccept.tpask: Accept tpask
  • gb.cmd.tpaccept.tpahere (op): Accept tpask
  • gb.cmd.tpdecline: Decline tpask|tpahere
  • gb.cmd.echo: echo command
  • gb.cmd.expand (op): expand command
  • gb.cmd.rem: remark command
  • (op): flight control
  • gb.cmd.tracer (op): access event tracing
  • gb.cmd.afk (op): afk command
  • gb.cmd.togglechat: lets players opt out from chat
  • gb.cmd.togglechat.others (op): lets you toggle chat for others
  • gb.cmd.togglechat.excempt (op): chat-off players will always receive chats from these players
  • (op): Can toggle chat for the server as a whole
  • gb.cmd.clearchat: Clear your chat window
  • gb.cmd.nick: Change display name
  • gb.cmd.slay (op): Allow slaying players
  • gb.cmd.throw (op): Troll players
  • gb.cmd.sudo (op): Run command as another user
  • gb.cmd.blowup (op): Explode other players
  • gb.cmd.burn (op): Burn other players
  • gb.cmd.permmgr (op): Manipulate Permissions
  • gb.cmd.seearmor (op): View armor
  • gb.cmd.seeinv (op): View inventory
  • gb.cmd.warp: teleport to warp location
  • gb.cmd.warp.other (disabled): warp others
  • gb.cmd.setwarp (op): set home command
  • (op): set a new warp
  • gb.cmd.setwarp.move: move existing warp
  • gb.cmd.delwarp (op): Remove warp
  • gb.cmd.invisible (op): invisibility power
  • gb.cmd.invisible.inmune (disabled): can see invisible players
  • gb.cmd.near: near by players
  • gb.cmd.opms: Send op only messages
  • gb.cmd.rpt: Report issues
  • (op): Read reported issues
  • gb.cmd.ops: Display ops
  • gb.cmd.players: connected players
  • gb.cmd.pluginmgr (op): Run-time management of plugins
  • gb.cmd.prefix: Prefix command
  • gb.cmd.query: Query command
  • gb.cmd.query.details: View details (info, plugins)
  • gb.cmd.query.players: View players
  • gb.cmd.query.players.showip: View players server IP
  • gb.cmd.query.list: Query List sub command
  • gb.cmd.rcon (op): Rcon client
  • gb.cmd.regs (op): Manage player registrations
  • gb.module.cmdsel: use command selectors
  • gb.cmd.pmscript (op): access rc (pmscript) command
  • (op): top commnad
  • (op): top others commnad
  • gb.cmd.wall (op): broadcast command
  • xyz command
  • (op): xyz command on others
  • gb.cmd.setarmor (op): Configure armor
  • gb.cmd.setarmor.others (op): Configure other's armor
  • gb.cmd.shield (op): Allow players to become invulnverable
  • gb.cmd.spawn: Teleport to spawn
  • gb.cmd.spectator (op): Turn players into spectators
  • gb.cmd.timings (op): view timings report
  • gb.module.repeater: use !! to repeat commands
  • gb.cmd.clearinv: clear player's inventory
  • gb.cmd.clearinv.others (op): clear other's inventory
  • gb.cmd.rminv: remove item from inventory
  • gb.cmd.rminv.others (op): remove item from other's inventory
  • gb.cmd.clearhotbar: clear player's hotbar
  • gb.cmd.clearhotbar.others (op): clear other's hotbar
  • gb.cmd.fixit (op): Fix player's held item
  • gb.cmd.fixit.others (op): Fix other players held item
  • gb.cmd.freeze (op): freeze/thaw players
  • gb.cmd.heal (op): heal players
  • gb.cmd.home: teleport to home location
  • gb.cmd.sethome: set home command
  • (op): set a new home
  • gb.cmd.sethome.move: move existing home
  • gb.cmd.delhome: Remove home
  • gb.cmd.iteminfo: get info on item held
  • gb.cmd.iteminfo.other (op): item info of others
This plugin will honour the server language configuration. The languages currently available are:

  • English
  • Spanish
You can provide your own message file by creating a file calledmessages.iniin the plugin config directory. Checkgithubfor sample files. Alternatively, if you haveGrabBagv2.3 installed, you can create an emptymessages.iniusing the command:

Additional Libraries
The following third party libraries are included:

  • xPaw's MinecraftQuery
WIP and issues
  • Query:
    • Queries are done in the main thread.
    • Queries to the same server do not work.
  • Deprecated modules:
    • CmdSpectator
  • MCPE-0.12 has the following issues:
    • teleports are a bit glitchy
    • Heal command does not work properly
    • FastTransfer sessions do not free connections
    • Inventory gets out of sync
    • skins do not get loaded on the fly