From d8705528a85d3066ddb6fc08c0553db8ab2eb63f Mon Sep 17 00:00:00 2001 From: zessirb Date: Sun, 22 Jul 2018 22:33:50 +0200 Subject: [PATCH] Replaces javafx pairs with Map Entries --- src/main/java/com/onaple/epicboundaries/WorldAction.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/onaple/epicboundaries/WorldAction.java b/src/main/java/com/onaple/epicboundaries/WorldAction.java index 76a5703..32457a0 100644 --- a/src/main/java/com/onaple/epicboundaries/WorldAction.java +++ b/src/main/java/com/onaple/epicboundaries/WorldAction.java @@ -18,7 +18,7 @@ import java.util.concurrent.CompletableFuture; public class WorldAction { - private static Map> playersToTransfer = new HashMap<>(); + private static Map> playersToTransfer = new HashMap<>(); /** * Transfer the player into a world @@ -36,8 +36,8 @@ public void transferPlayerToWorld(Player player, Location location) { * @param worldName Name of the world to transfer player(s) to */ public void consumePlayerTransferQueue(String worldName) { - for (Map.Entry> entry : playersToTransfer.entrySet()) { - Pair locationPair = entry.getValue(); + for (Map.Entry> entry : playersToTransfer.entrySet()) { + Map.Entry locationPair = entry.getValue(); if (locationPair.getKey().equals(worldName)) { Sponge.getServer().loadWorld(worldName).ifPresent(world -> { Location location = world.getLocation(locationPair.getValue()); @@ -88,7 +88,7 @@ private void registerInstance(String worldName) { * @param position Position to teleport the player to */ public void addPlayerToTransferQueue(String playerName, String worldName, Vector3d position) { - playersToTransfer.put(playerName, new Pair<>(worldName, position)); + playersToTransfer.put(playerName, new AbstractMap.SimpleEntry<>(worldName, position)); } /**