1. Welcome to LilyPad. Download the project, explore the forums, and create your own LilyPad network.


    If you use the software and enjoy it or have a question, or would like to contribute to the future of the software directly or through resources, please sign up and join our little community.

Help With Connect-API?

Discussion in 'Development' started by Dr_fantasmo, Apr 27, 2013.

  1. Dr_fantasmo

    Dr_fantasmo New Member

    Hi, I'm currently attempting to create a simple portal plugin using the Connect-API. With my current code the player walks through the portal and don't connect to the other server, they start ghosting until they re-log. Any idea what I am doing wrong?

    Current Code:
    Code (text):
    public Connect getBukkitConnect()
      {
        return (Connect)super.getServer().getServicesManager().getRegistration(Connect.class).getProvider();
      }
     
    public void requestRedirect(final Player player, String server) {
              Connect c=getBukkitConnect();
              try{
              c.request(new RedirectRequest(player.getName(),server));}
              catch(Exception e){
                  e.printStackTrace();
                  player.sendMessage("Error Connecting To Server");
              }
          }
  2. Coelho

    Coelho Software Engineer Staff Member Administrator Maintainer

    Code (text):

    public RedirectRequest(String server, String player) {
     
    Your arguments are backwards :)
  3. Dr_fantasmo

    Dr_fantasmo New Member

    lol, thank you.

Share This Page