Upload folder via GUI - src

This commit is contained in:
Git Manager GUI
2026-05-22 20:19:05 +02:00
parent 241cc6c036
commit e850f86abe
48 changed files with 1994 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package de.teleportsuite.models;
import java.util.UUID;
public class Home {
private final UUID uuid;
private final String name;
private final TeleportLocation location;
public Home(UUID uuid, String name, TeleportLocation location) {
this.uuid = uuid; this.name = name; this.location = location;
}
public UUID getUuid() { return uuid; }
public String getName() { return name; }
public TeleportLocation getLocation() { return location; }
}

View File

@@ -0,0 +1,33 @@
package de.teleportsuite.models;
import org.bukkit.Location;
import org.bukkit.World;
public class Portal {
private final String name;
private final String world;
private final int x1, y1, z1, x2, y2, z2;
private final String targetServer;
private final TeleportLocation destination;
public Portal(String name, String world, int x1, int y1, int z1, int x2, int y2, int z2,
String targetServer, TeleportLocation destination) {
this.name = name; this.world = world;
this.x1 = x1; this.y1 = y1; this.z1 = z1;
this.x2 = x2; this.y2 = y2; this.z2 = z2;
this.targetServer = targetServer; this.destination = destination;
}
public boolean contains(Location loc) {
if (!loc.getWorld().getName().equals(world)) return false;
int bx = loc.getBlockX(), by = loc.getBlockY(), bz = loc.getBlockZ();
return bx >= Math.min(x1,x2) && bx <= Math.max(x1,x2) &&
by >= Math.min(y1,y2) && by <= Math.max(y1,y2) &&
bz >= Math.min(z1,z2) && bz <= Math.max(z1,z2);
}
public String getName() { return name; }
public String getWorld() { return world; }
public String getTargetServer() { return targetServer; }
public TeleportLocation getDestination() { return destination; }
}

View File

@@ -0,0 +1,38 @@
package de.teleportsuite.models;
import org.bukkit.Bukkit;
import org.bukkit.Location;
public class TeleportLocation {
private String world;
private double x, y, z;
private float yaw, pitch;
private String server;
public TeleportLocation(String world, double x, double y, double z, float yaw, float pitch, String server) {
this.world = world; this.x = x; this.y = y; this.z = z;
this.yaw = yaw; this.pitch = pitch; this.server = server;
}
public TeleportLocation(Location loc, String server) {
this.world = loc.getWorld().getName();
this.x = loc.getX(); this.y = loc.getY(); this.z = loc.getZ();
this.yaw = loc.getYaw(); this.pitch = loc.getPitch();
this.server = server;
}
public Location toBukkitLocation() {
return new Location(Bukkit.getWorld(world), x, y, z, yaw, pitch);
}
public String getWorld() { return world; }
public double getX() { return x; }
public double getY() { return y; }
public double getZ() { return z; }
public float getYaw() { return yaw; }
public float getPitch() { return pitch; }
public String getServer() { return server; }
public boolean isLocalServer(String localServer) {
return server == null || server.equals("local") || server.equals(localServer);
}
}

View File

@@ -0,0 +1,20 @@
package de.teleportsuite.models;
import java.util.UUID;
public class Warp {
private final String name;
private final TeleportLocation location;
private final UUID creator;
private final String permission;
public Warp(String name, TeleportLocation location, UUID creator, String permission) {
this.name = name; this.location = location;
this.creator = creator; this.permission = permission;
}
public String getName() { return name; }
public TeleportLocation getLocation() { return location; }
public UUID getCreator() { return creator; }
public String getPermission() { return permission; }
}