Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirecting to a pre-defined IP

Comments in 'Plugin Development' started by SuperChipsLP, Nov 2, 2013.

  1. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Hey!

    For example, i have a server on the Port 19132
    and one on 19133.

    I want to make a plugin that, when player.connect happens on server1,
    it redirects to server2.

    Is that possible?

    Thanks!
  2. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    Use Socket.
  3. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    How? Maybe like $this->api->server->socket('mydomain.com:19133'); ?
  4. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    Or anything else?
    Would someone please give me an example?

    Thank you!
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    So you want two devices run two different worlds?
  6. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    No. I want to redirect TO Port 19133 FROM 19132. The Port '19133' should be changeable. I just want to get to server2 without joining server1. Like when 'player.connect' happens, its going to redirect you
    to server2 instantly..
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Because I was thinking about SimpleWorlds... You only need two ports when you have two consoles.
  8. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    The Point is: server2's port should be dynamic. The server1 to server2 was just an example. It can also be like server1 to server5. Or server1 to server3..
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The main point of my question is why not use simpleworlds, while it is the same ip (therefore the same owner). So I guessed the reason was you wanted to redirect players to another console, because if you don't have multiple computers (or whatever) working on the same ip, just multiple worlds, you could've used SimpleWorlds.
    According to the documentation, only ports 19132-19135 can be used.
    If you want to forward the player to another ip, maybe works like a website?
  10. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    I would guess you need a proxy to do that...
  11. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    My servers are running a Survival Games Plugin.
    Each instance is currently only available trough another port.

    I want it to redirect to the next free server (i know how to do that).

Share This Page

Advertisement