Send player consoles message.

Discussion in 'Plugin Development' started by BlueCraftMC, Dec 30, 2015.

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

    BlueCraftMC

    So i just created a plugin where you type the command /createworld it'll create a world, in the console, it shows the progress of the world creation (% of the creation done). but it doesn't show in the game(the command sender). So basically i want to show the console perspective in the game (only for the sender of the command).
     
  2. Offline

    TheMexicanKirby

    @BlueCraftMC,
    You mind showing what you have so we can better understand what you're trying to do?
     
    Last edited: Dec 30, 2015
  3. Offline

    YoYoNoYo555

    can't you just do
    Code:
    if(cmd.getLabel().equalsIgnoreCase("createworld")){
    //your code
    Player player = (Player)sender;
    player.sendMessage(ChatColor.GREEN+"What Ever You Want To Send Them");
    }
    
    IDK, I am also new to making plugins so I could be wrong.
     
  4. Offline

    teej107

    @BlueCraftMC World creation uses the main thread and usually lags the server for some seconds. So sending the message won't do anything like what you expect.
    You can have messages to say when the world starts being created and when it ends.
     
  5. Offline

    mcdorli

    Please, use, cmd.getName() instead of cmd.getLabel().
     
  6. Offline

    BlueCraftMC

    no, if you create a world, it shows the console the percent of world creation. what i want is to show it in game.
     
  7. Offline

    Xerox262

    Then instead of sender.sendMessage use Bukkit.broadcastMessage
     
  8. Offline

    teej107

    That isn't what he wants.

    @BlueCraftMC
     
    BlueCraftMC likes this.
  9. Offline

    BlueCraftMC

    It doesnt really lag on my server
     
  10. Offline

    mcdorli

    It's not the lag you're probably familiar with. Try to set yourself into gm 0, and try to mine blocks, while a world is generating. It basically doesn't handle server updates for a good 4-5 seconds
     
  11. Offline

    teej107

    Either way, you can't do any synchronous task during world creation.
     
Thread Status:
Not open for further replies.

Share This Page