mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
Started SQLite work
This commit is contained in:
1 parent
d3a787be67
commit
559e38fc4b
21 files changed
+788
-65
No files matched your search
@@ -58,6 +58,10 @@ public class Home extends TeleportationPoint {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package me.william278.huskhomes2.Objects;
|
||||
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
public class Settings {
|
||||
|
||||
String language;
|
||||
String server;
|
||||
|
||||
String storageType;
|
||||
|
||||
String playerTable;
|
||||
String locationsTable;
|
||||
String homesTable;
|
||||
String warpsTable;
|
||||
|
||||
boolean doBungee;
|
||||
|
||||
private void setSettings(FileConfiguration configFile) {
|
||||
this.language = configFile.getString("language");
|
||||
this.doBungee = configFile.getBoolean("bungee_options.enable_bungee_mode");
|
||||
this.server = configFile.getString("bungee_options.server_id");
|
||||
|
||||
this.storageType = configFile.getString("data_storage_option.storage_type");
|
||||
|
||||
this.playerTable = configFile.getString("data_storage_options.table_names.player_data");
|
||||
this.locationsTable = configFile.getString("data_storage_options.table_names.location_data");
|
||||
this.homesTable = configFile.getString("data_storage_options.table_names.home_data");
|
||||
this.warpsTable = configFile.getString("data_storage_options.table_names.warp_data");
|
||||
|
||||
}
|
||||
|
||||
public Settings(FileConfiguration configFile) {
|
||||
setSettings(configFile);
|
||||
}
|
||||
|
||||
public void reloadSettings(FileConfiguration configFile) {
|
||||
setSettings(configFile);
|
||||
}
|
||||
|
||||
public String getStorageType() {
|
||||
return storageType;
|
||||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
public String getServerID() {
|
||||
return server;
|
||||
}
|
||||
|
||||
public boolean doBungee() {
|
||||
return doBungee;
|
||||
}
|
||||
|
||||
public String getPlayerTable() {
|
||||
return playerTable;
|
||||
}
|
||||
|
||||
public String getLocationsTable() {
|
||||
return locationsTable;
|
||||
}
|
||||
|
||||
public String getHomesTable() {
|
||||
return homesTable;
|
||||
}
|
||||
|
||||
public String getWarpsTable() {
|
||||
return warpsTable;
|
||||
}
|
||||
}
|
||||
@@ -58,4 +58,27 @@ public class TeleportationPoint {
|
||||
}
|
||||
}
|
||||
|
||||
public String getWorldName() {
|
||||
return worldName;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package me.william278.huskhomes2.Objects;
|
||||
|
||||
import org.bukkit.Location;
|
||||
|
||||
public class Warp extends TeleportationPoint {
|
||||
|
||||
String name;
|
||||
String description;
|
||||
|
||||
public Warp(Location location, String server, String name) {
|
||||
super(location, server);
|
||||
this.name = name;
|
||||
this.description = "A publicly accessible warp";
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.name = description;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user