Skip to content

Instantly share code, notes, and snippets.

@theresajayne
Created May 20, 2014 17:10
Show Gist options
  • Select an option

  • Save theresajayne/79c351fd0ff81f653756 to your computer and use it in GitHub Desktop.

Select an option

Save theresajayne/79c351fd0ff81f653756 to your computer and use it in GitHub Desktop.
name: SlashChest
main: com.radcraft.slashchest.SlashChest
version: 1.5.2
author: radfast
description: >
This plugin creates a /chest command. Admins can use /openchest and other useful commands.
commands:
chest:
aliases: [xc]
description: Open a player's /chest
usage: |
/<command> - Open this player's /chest
tprandom:
aliases:
description: Teleport to a random location
usage: |
/<command> - Teleports you to a random location
dragonspawn:
aliases: [enderdragon]
description: Spawn a lovely Ender Dragon at player's current location
usage: |
/<command> - Spawn the Ender Dragon
openchest:
aliases: [opench]
description: Opens the /chest of another player
usage: |
/<command> <Player> - Opens that player's /chest
ospawn:
aliases:
description: Force-moves the player to ospawn - even if offline
usage: |
/<command> <Player> - Force player to ospawn
movechest:
aliases:
description: Force-moves the player's inventory to a target wooden chest - even if offline
usage: |
/<command> <Player> [inv|armor|ender|special] - Force move player's special chest or inventory / armor / enderchest to a wooden chest
copydat:
aliases:
description: Copy a players .dat file for staff use
usage: |
/<command> <Player> - Makes a copy of a specific player's .dat file in the World folder for staff convenience
Code instantiating the commands
pm.registerEvents((Listener)new SlashChestListener(), (Plugin)this);
this.getCommand("chest").setExecutor((CommandExecutor)new CommandChest(this));
this.getCommand("openchest").setExecutor((CommandExecutor)new CommandOpenChest(this));
this.getCommand("dragonspawn").setExecutor((CommandExecutor)new CommandDragonspawn(this));
this.getCommand("ospawn").setExecutor((CommandExecutor)new CommandOSpawn(this));
this.getCommand("movechest").setExecutor((CommandExecutor)new CommandMoveChest(this));
this.getCommand("copydat").setExecutor((CommandExecutor)new CommandCopyDat(this));
this.getCommand("tprandom").setExecutor((CommandExecutor)new CommandTpRandom(this));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment