More bukkit adapter stuff, load SQL schema from file, start work on MySQL implementation, start event processing

This commit is contained in:
William committed 2022-05-22 03:03:23 +01:00
1 parent 8e7d5e74a0
commit bd52c99d4d
18 files changed
+973 -101

No files matched your search

@@ -1,20 +1,21 @@
package net.william278.huskhomes.position;
import net.william278.huskhomes.player.Player;
import net.william278.huskhomes.player.User;
import org.jetbrains.annotations.NotNull;
import java.util.UUID;
/**
* Represents a home set by a {@link Player}
* Represents a home set by a {@link User}
*/
public class Home extends SavedPosition {
/**
* The {@link Player} who owns this home
* The {@link User} who owns this home
*/
@NotNull
public final Player owner;
public final User owner;
/**
* {@code true} if this home is public
@@ -24,13 +25,13 @@ public class Home extends SavedPosition {
public Home(double x, double y, double z, float yaw, float pitch,
@NotNull World world, @NotNull Server server,
@NotNull PositionMeta positionMeta, @NotNull UUID uuid,
@NotNull Player owner, boolean isPublic) {
@NotNull User owner, boolean isPublic) {
super(x, y, z, yaw, pitch, world, server, positionMeta, uuid);
this.owner = owner;
this.isPublic = isPublic;
}
public Home(Position position, PositionMeta meta, @NotNull Player owner) {
public Home(Position position, PositionMeta meta, @NotNull User owner) {
super(position, meta);
this.owner = owner;
this.isPublic = false;
@@ -2,6 +2,9 @@ package net.william278.huskhomes.position;
import org.jetbrains.annotations.NotNull;
/**
* Represents a local position on this server
*/
public class Location {
/**
@@ -2,8 +2,6 @@ package net.william278.huskhomes.position;
import org.jetbrains.annotations.NotNull;
import java.util.UUID;
/**
* Represents a position - a location somewhere on the proxy network or server
*/
@@ -8,20 +8,20 @@ import org.jetbrains.annotations.NotNull;
public class Server {
/**
* Proxy-defined identifier of this server
* Proxy-defined name of this server
*/
@NotNull
public String id;
public String name;
public Server(@NotNull String id) {
this.id = id;
public Server(@NotNull String name) {
this.name = name;
}
@Override
public boolean equals(Object other) {
if (other instanceof Server server) {
// If the id of this server matches another, the servers are the same.
return server.id.equalsIgnoreCase(this.id);
// If the name of this server matches another, the servers are the same.
return server.name.equalsIgnoreCase(this.name);
}
return super.equals(other);
}