What to do and what NOT to do in Bukkit

Discussion in 'Resources' started by md_5, Nov 21, 2012.

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

    md_5

    Here is a list of things that you can and can't do in Bukkit. Basically the community guide to thread and plugin safety. The list is pretty small, but I am hoping you can expand it.

    What not to do
    • Kick player async (including chat!)
    • Teleport player on join
    • Kick player on join
    Thread Safe Methods
    • Bukkit.getServer()
    • CommandSender.sendMessage()
    • Entity.getEntityId()
    • Entity.getUniqueId()
    • BukkitScheduler.*
    • Server.getBukkitVersion()
    • Server.getPlayers()
    • World.getUID()
    • World.getMaxHeight()
    • World.getSeed()
     
    nopresnik, Panjab and ELCHILEN0 like this.
  2. Offline

    ELCHILEN0

    Do NOT: Manipulate blocks from an async thread.
     
  3. Offline

    KeybordPiano459

    What's the problem with kicking a player on join? A bunch of servers do that, and doesn't the default minecraft server whitelist?
     
  4. Offline

    md_5

    Thats not using the event though.
     
  5. Offline

    lol768

    I usually kick them from PlayerPreLoginEvent, is that the right event to use?
     
    1mpre55 and jackks like this.
  6. Offline

    breezeyboy

    or use
    event.setKickMessage("Nope u dope");
    event.setResult(Result.KICK_WHITELIST);
     
  7. Offline

    lol768

    Yeah, that's what I meant
     
    breezeyboy likes this.
Thread Status:
Not open for further replies.

Share This Page