Make a player execute a Command

Discussion in 'Plugin Development' started by twinflyer, Oct 16, 2011.

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


    Hey guys,
    I'm quite new to Java and Bukkit-Plugins.
    Untill now I have programmed a little Plugin to use "/gm 1" or "/gm 0" to change your gamemode.
    I want to programm Plugins, which are special designed for our server. To make things easyer.

    For that I need a solution to make a user use a Command.
    For example:

    player.executeCmd("/gm 1");

    Is it that easy, or what do I have to do?

  2. Offline


    You can just do"/gm 1");
  3. Offline


    thaks :D
    hoped that it is that easy :D
  4. You should rather use player.performCommand("gm 1").
    I've no idea what the actual difference is, but when there is a special method for something, why not use it?
  5. Offline


    didn't know that this funktion exists :p
    but you're right. I'll use player.performCommand :D
Thread Status:
Not open for further replies.

Share This Page