TrainerCommands

From Pixelmon Generations Wiki
Jump to navigation Jump to search

The Trainer Commands sidemod adds the ability for command(s) to be applied to an NPC which will be executed when the player interacts with the NPC in a specified way. Any Pixelmon and Minecraft command may be executed by the NPCs. The @pl placeholder may be used in commands, which will be replaced by the interacting player's name (ex: /tp @pl 0 100 0). All commands are executed with the console as the source and as such, commands that need to be executed by a player will not work (ex: /spawn). Optionally, a sudo command may be used if one is installed, like the one the Nucleus plugin provides (ex: /sudo @pl spawn).

The lists of applied commands will be executed in the order that they are added to the NPC. They will be executed once the battle begins, after the NPC Trainer says his/her win/loss message, after a forfeit, or immediately when the NPC is interacted with.

The available interact types are:

  • Win - The NPC has won and the player has lost.
  • Loss - The NPC has lost and the player has won. Runs if the forfeit as a loss setting is true.
  • Battle Start - The NPC battle has begun.
  • Forfeit - The player has ran from the battle. Runs if the forfeit as a loss setting is false.
  • Interact - The player has interacted with the NPC.


Installation

Trainer Commands can be installed universally on both the client and the server. If installed on the server, it does not need to be installed on the client to use it.

Minecraft Launcher

  1. Download Trainer Commands from the sidemods section of the downloads page.
  2. Locate your .minecraft installation folder.
    • On Windows, your installation folder can be located by using Windows + R at the same time and entering %appdata%.
  3. Drop/move the downloaded jar file into the mods folder.
  4. Start your launcher and wait for all mods to load.

Technic Launcher

  1. Download Trainer Commands from the sidemods section of the downloads page.
  2. Locate your .technic installation folder.
    • On Windows, your installation folder can be located by using Windows + R at the same time and entering %appdata%.
  3. Open the modpacks folder and then open the folder of the modpack you're using.
  4. Drop/move the downloaded jar file into the mods folder.
  5. Start your modpack and wait for all mods to load.

Server

  1. Download Trainer Commands from the sidemods section of the downloads page.
  2. Drop/move the downloaded jar file into the mods folder on the server's files.
  3. Start the server and wait for all mods to load.

Commands

TEdit

Command Information
* /tedit add <win/loss/battle_start/forfeit/interact> <command>: Adds the specified command to the list of commands that are executed from the console when interacting with this NPC in the specified way.

After running the command, click on an NPC to add the command to it.

Permissions

  • /tedit - trainercommands.command.tedit

Config Settings

The TrainerCommands trainercommands.cfg configuration file is located in the \config\ folder of the server.

  • Forfeit equates to a Loss - Enables forfeiting being treated as a loss type instead of a forfeit type.