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

[NewAPI] A problem about gamemode

Comments in 'Plugin Development' started by yeungkachun, Sep 6, 2014.

Thread Status:
Not open for further replies.
  1. yeungkachun
    Offline

    yeungkachun New Member

    Joined:
    Feb 9, 2014
    Posts:
    19
    Minecraft User:
    yeungkachun
    If I want to make a plugin to use [/gm <mode> <player>] to replace [/gamemode <mode> <player>]
    how can I do ?
    Sorry my bad English.
    PEMapModder likes this.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Run at onEnable():
    PHP:
    $cmd $this->getServer()->getCommandMap()->getCommand("gamemode");
    $cmd->setAliases(array_merge($cmd->getAliases(), ["gm"]));
    Falk, LDX and Adaasi like this.
  3. yeungkachun
    Offline

    yeungkachun New Member

    Joined:
    Feb 9, 2014
    Posts:
    19
    Minecraft User:
    yeungkachun
Thread Status:
Not open for further replies.

Share This Page

Advertisement