mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +00:00
Finish MySQL implementation
This commit is contained in:
1 parent
bd52c99d4d
commit
28a54b0b4a
8 files changed
+457
-156
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package net.william278.huskhomes.teleport;
|
||||
|
||||
import net.william278.huskhomes.player.Player;
|
||||
import net.william278.huskhomes.player.User;
|
||||
import net.william278.huskhomes.position.Position;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -13,7 +14,7 @@ public class Teleport {
|
||||
* The player involved in the teleport
|
||||
*/
|
||||
@NotNull
|
||||
public Player player;
|
||||
public User player;
|
||||
|
||||
/**
|
||||
* The target position for the player
|
||||
@@ -21,7 +22,7 @@ public class Teleport {
|
||||
@NotNull
|
||||
public Position target;
|
||||
|
||||
public Teleport(@NotNull Player player, @NotNull Position target) {
|
||||
public Teleport(@NotNull User player, @NotNull Position target) {
|
||||
this.player = player;
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.william278.huskhomes.teleport;
|
||||
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.player.Player;
|
||||
import net.william278.huskhomes.player.User;
|
||||
import net.william278.huskhomes.position.Position;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -29,7 +30,7 @@ public class TeleportManager {
|
||||
* @param position the target {@link Position} to teleport to
|
||||
*/
|
||||
public CompletableFuture<TeleportResult> teleport(Player player, Position position) {
|
||||
final Teleport teleport = new Teleport(player, position);
|
||||
final Teleport teleport = new Teleport(new User(player), position);
|
||||
if (position.server.equals(plugin.getServerData())) {
|
||||
return player.teleport(teleport.target);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user