Solved How do I use BarAPI?

Discussion in 'Plugin Development' started by Techno, Mar 23, 2014.

Thread Status:
Not open for further replies.
  1. As it says in the title, how do I use BarAPI?

    Code:
    // Bar Thang!
    BarAPI.setMessage(Player p, "Message 1");
    
    I put that in ^^, but there are errors...
     
  2. Offline

    The Fancy Whale

    try
    Code:java
    1. BarAPI.setMessage(p, "Message 1");

    Also, you have this in your build path right?
     
  3. Offline

    Garris0n

    You do know Java, right?
     
  4. Offline

    The Fancy Whale

    Okay, well is that code I said working?
     
  5. Last edited by a moderator: Jun 7, 2016
  6. Offline

    The Fancy Whale

    Depends on what you are trying to do... if you want it when a player logs in it is PlayerJoinEvent
     
  7. The Fancy Whale
    For some reason, when I create an event its not working for me.... I want to put it in a playerloginevent, could you do it for me? It's just not working for me :/
     
  8. Offline

    BeMacized


    put this in your Listener class
    Code:java
    1. @EventHandler
    2. public void onPlayerJoin(PlayerJoinEvent evt) {
    3. BarAPI.setMessage(evt.getPlayer(),"Message 1");
    4. }
     
  9. BeMacized
    Thanks!

    BeMacized
    There's an error in the console:
    Code:
    Caused by: java.lang.ClassNotFoundException: me.confuser.barapi.BarAPI
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  10. Offline

    The Fancy Whale

    You need barapi installed on your server. Also, you should probably learn a little more about the bukkit api and java before jumping into coding...
     
Thread Status:
Not open for further replies.

Share This Page