mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Rename a few settings variables; add forwarding support for HuskBungeeRTP
This commit is contained in:
1 parent
e025b7bf92
commit
48906c018b
3 files changed
+42
-33
No files matched your search
@@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.StringJoiner;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class RtpCommand extends CommandBase {
|
||||
@@ -31,8 +32,16 @@ public class RtpCommand extends CommandBase {
|
||||
} else {
|
||||
MessageManager.sendMessage(p, "error_rtp_invalid_dimension");
|
||||
}
|
||||
} else if (Bukkit.getPluginManager().getPlugin("HuskBungeeRTP") != null) {
|
||||
StringJoiner commandForward = new StringJoiner(" ").add("huskbungeertp:rtp");
|
||||
for (String argument : args) {
|
||||
commandForward.add(argument);
|
||||
}
|
||||
p.performCommand(commandForward.toString());
|
||||
} else {
|
||||
MessageManager.sendMessage(p, "error_command_disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ public class Settings {
|
||||
private String warpsDataTable;
|
||||
|
||||
// Connection settings for MySQL
|
||||
private int mySQLport;
|
||||
private String mySQLhost;
|
||||
private String mySQLdatabase;
|
||||
private String mySQLusername;
|
||||
private String mySQLpassword;
|
||||
private String mySQLparams;
|
||||
private int mySQLPort;
|
||||
private String mySQLHost;
|
||||
private String mySQLDatabase;
|
||||
private String mySQLUsername;
|
||||
private String mySQLPassword;
|
||||
private String mySQLParams;
|
||||
|
||||
// Dynmap integration settings
|
||||
private boolean doMapIntegration;
|
||||
@@ -83,7 +83,7 @@ public class Settings {
|
||||
// RTP command settings
|
||||
private boolean doRtpCommand;
|
||||
private int rtpRange;
|
||||
private int rtpCooldown;
|
||||
private int rtpCoolDown;
|
||||
|
||||
// Spawn command settings
|
||||
private boolean doSpawnCommand;
|
||||
@@ -133,12 +133,12 @@ public class Settings {
|
||||
this.doBungee = false;
|
||||
}
|
||||
|
||||
this.mySQLhost = config.getString("data_storage_options.mysql_credentials.host", "localhost");
|
||||
this.mySQLdatabase = config.getString("data_storage_options.mysql_credentials.database", "HuskHomes");
|
||||
this.mySQLusername = config.getString("data_storage_options.mysql_credentials.username", "root");
|
||||
this.mySQLpassword = config.getString("data_storage_options.mysql_credentials.password", "pa55w0rd");
|
||||
this.mySQLport = config.getInt("data_storage_options.mysql_credentials.port", 3306);
|
||||
this.mySQLparams = config.getString("data_storage_options.mysql_credentials.params", "?autoReconnect=true&useSSL=false");
|
||||
this.mySQLHost = config.getString("data_storage_options.mysql_credentials.host", "localhost");
|
||||
this.mySQLDatabase = config.getString("data_storage_options.mysql_credentials.database", "HuskHomes");
|
||||
this.mySQLUsername = config.getString("data_storage_options.mysql_credentials.username", "root");
|
||||
this.mySQLPassword = config.getString("data_storage_options.mysql_credentials.password", "pa55w0rd");
|
||||
this.mySQLPort = config.getInt("data_storage_options.mysql_credentials.port", 3306);
|
||||
this.mySQLParams = config.getString("data_storage_options.mysql_credentials.params", "?autoReconnect=true&useSSL=false");
|
||||
|
||||
this.doMapIntegration = config.getBoolean("map_integration.enabled", false);
|
||||
this.mapPlugin = config.getString("map_integration.plugin", "dynmap");
|
||||
@@ -217,7 +217,7 @@ public class Settings {
|
||||
|
||||
this.doRtpCommand = config.getBoolean("random_teleport_command.enabled", true);
|
||||
this.rtpRange = config.getInt("random_teleport_command.range", 5000);
|
||||
this.rtpCooldown = config.getInt("random_teleport_command.cooldown", 30);
|
||||
this.rtpCoolDown = config.getInt("random_teleport_command.cooldown", 30);
|
||||
|
||||
this.privateHomesPerPage = config.getInt("general.lists.private_homes_per_page", 10);
|
||||
this.publicHomesPerPage = config.getInt("general.lists.public_homes_per_page", 10);
|
||||
@@ -293,7 +293,7 @@ public class Settings {
|
||||
}
|
||||
|
||||
public int getRtpCoolDown() {
|
||||
return rtpCooldown;
|
||||
return rtpCoolDown;
|
||||
}
|
||||
|
||||
public int getTeleportRequestExpiryTime() {
|
||||
@@ -324,28 +324,28 @@ public class Settings {
|
||||
return warpsDataTable;
|
||||
}
|
||||
|
||||
public int getMySQLport() {
|
||||
return mySQLport;
|
||||
public int getMySQLPort() {
|
||||
return mySQLPort;
|
||||
}
|
||||
|
||||
public String getMySQLhost() {
|
||||
return mySQLhost;
|
||||
public String getMySQLHost() {
|
||||
return mySQLHost;
|
||||
}
|
||||
|
||||
public String getMySQLdatabase() {
|
||||
return mySQLdatabase;
|
||||
public String getMySQLDatabase() {
|
||||
return mySQLDatabase;
|
||||
}
|
||||
|
||||
public String getMySQLusername() {
|
||||
return mySQLusername;
|
||||
public String getMySQLUsername() {
|
||||
return mySQLUsername;
|
||||
}
|
||||
|
||||
public String getMySQLpassword() {
|
||||
return mySQLpassword;
|
||||
public String getMySQLPassword() {
|
||||
return mySQLPassword;
|
||||
}
|
||||
|
||||
public String getMySQLparams() {
|
||||
return mySQLparams;
|
||||
public String getMySQLParams() {
|
||||
return mySQLParams;
|
||||
}
|
||||
|
||||
public boolean doSpawnCommand() {
|
||||
|
||||
@@ -64,12 +64,12 @@ public class MySQL extends Database {
|
||||
");"
|
||||
};
|
||||
|
||||
final String host = HuskHomes.getSettings().getMySQLhost();
|
||||
final int port = HuskHomes.getSettings().getMySQLport();
|
||||
final String database = HuskHomes.getSettings().getMySQLdatabase();
|
||||
final String username = HuskHomes.getSettings().getMySQLusername();
|
||||
final String password = HuskHomes.getSettings().getMySQLpassword();
|
||||
final String params = HuskHomes.getSettings().getMySQLparams();
|
||||
final String host = HuskHomes.getSettings().getMySQLHost();
|
||||
final int port = HuskHomes.getSettings().getMySQLPort();
|
||||
final String database = HuskHomes.getSettings().getMySQLDatabase();
|
||||
final String username = HuskHomes.getSettings().getMySQLUsername();
|
||||
final String password = HuskHomes.getSettings().getMySQLPassword();
|
||||
final String params = HuskHomes.getSettings().getMySQLParams();
|
||||
|
||||
private Connection connection;
|
||||
|
||||
|
||||
Reference in new issue
Block a user