shoghicp / FastTransfer

Transfer vanilla Minecraft: PE clients to another server
GNU Lesser General Public License v3.0
26 stars 19 forks source link

Feature Request #8

Open ghost opened 9 years ago

ghost commented 9 years ago

hi, if possible, add a API to know from where the player are comming to the server...

an example of plugin implementation:

public function comeFromWhere(PlayerJoinEvent $e){
$this-ft->getPluginManager()->getPlugin("FastTransfer");
$player = $event->getPlayer();
$port = "19133"; //config get
$ip = "127.0.0.1"; //config get
if($this->ft->comeFrom($player, $ip, $port);
 $player->teleport($x, $y, $z); //whatever
}
}

this would be great... (since there's no "Feature Request" option on github I posted that here, fell free to close that)

PEMapModder commented 9 years ago

MCPE redirects the Player directly without sending a referrer entry like in the HTTP protocol, so this is not possible. Maybe you should instead request that to MCPE instead?

TheDiamondYT1 commented 9 years ago

Wouldn't this be possible by setting up a MySQL network?

TheDiamondYT1 commented 9 years ago

All servers connected to MySQL, it sends the data from the first server to the database then when joining the second server it reads it.

PEMapModder commented 9 years ago

@RandomAltThingy in that case, it sounds more useful to just create a socket server on the other side and send a packet to it, instead of using a third-party communicator (MySQL).