saving the player location when disconnecting for the next server join
parent
319407ecc5
commit
49c40a87bb
|
@ -26,6 +26,8 @@ public class PlayerQuitListener implements Listener {
|
||||||
if (!CloudNetDriver.getInstance().getComponentName().startsWith("Lobby")) {
|
if (!CloudNetDriver.getInstance().getComponentName().startsWith("Lobby")) {
|
||||||
Map<Object, Object> map = KrakatoaAPI.getInstance().getRedisManager().getPlayer(uuid);
|
Map<Object, Object> map = KrakatoaAPI.getInstance().getRedisManager().getPlayer(uuid);
|
||||||
|
|
||||||
|
KrakatoaAPI.getInstance().getLogger().info("quit " + map.keySet());
|
||||||
|
|
||||||
if (!map.isEmpty()) {
|
if (!map.isEmpty()) {
|
||||||
map.put("lastLocation", round(player.getLocation().getX()) + " " + round(player.getLocation().getY()) + " " + round(player.getLocation().getZ()));
|
map.put("lastLocation", round(player.getLocation().getX()) + " " + round(player.getLocation().getY()) + " " + round(player.getLocation().getZ()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue