mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +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.Connection;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.util.StringJoiner;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class RtpCommand extends CommandBase {
|
public class RtpCommand extends CommandBase {
|
||||||
@@ -31,8 +32,16 @@ public class RtpCommand extends CommandBase {
|
|||||||
} else {
|
} else {
|
||||||
MessageManager.sendMessage(p, "error_rtp_invalid_dimension");
|
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 {
|
} else {
|
||||||
MessageManager.sendMessage(p, "error_command_disabled");
|
MessageManager.sendMessage(p, "error_command_disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -32,12 +32,12 @@ public class Settings {
|
|||||||
private String warpsDataTable;
|
private String warpsDataTable;
|
||||||
|
|
||||||
// Connection settings for MySQL
|
// Connection settings for MySQL
|
||||||
private int mySQLport;
|
private int mySQLPort;
|
||||||
private String mySQLhost;
|
private String mySQLHost;
|
||||||
private String mySQLdatabase;
|
private String mySQLDatabase;
|
||||||
private String mySQLusername;
|
private String mySQLUsername;
|
||||||
private String mySQLpassword;
|
private String mySQLPassword;
|
||||||
private String mySQLparams;
|
private String mySQLParams;
|
||||||
|
|
||||||
// Dynmap integration settings
|
// Dynmap integration settings
|
||||||
private boolean doMapIntegration;
|
private boolean doMapIntegration;
|
||||||
@@ -83,7 +83,7 @@ public class Settings {
|
|||||||
// RTP command settings
|
// RTP command settings
|
||||||
private boolean doRtpCommand;
|
private boolean doRtpCommand;
|
||||||
private int rtpRange;
|
private int rtpRange;
|
||||||
private int rtpCooldown;
|
private int rtpCoolDown;
|
||||||
|
|
||||||
// Spawn command settings
|
// Spawn command settings
|
||||||
private boolean doSpawnCommand;
|
private boolean doSpawnCommand;
|
||||||
@@ -133,12 +133,12 @@ public class Settings {
|
|||||||
this.doBungee = false;
|
this.doBungee = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mySQLhost = config.getString("data_storage_options.mysql_credentials.host", "localhost");
|
this.mySQLHost = config.getString("data_storage_options.mysql_credentials.host", "localhost");
|
||||||
this.mySQLdatabase = config.getString("data_storage_options.mysql_credentials.database", "HuskHomes");
|
this.mySQLDatabase = config.getString("data_storage_options.mysql_credentials.database", "HuskHomes");
|
||||||
this.mySQLusername = config.getString("data_storage_options.mysql_credentials.username", "root");
|
this.mySQLUsername = config.getString("data_storage_options.mysql_credentials.username", "root");
|
||||||
this.mySQLpassword = config.getString("data_storage_options.mysql_credentials.password", "pa55w0rd");
|
this.mySQLPassword = config.getString("data_storage_options.mysql_credentials.password", "pa55w0rd");
|
||||||
this.mySQLport = config.getInt("data_storage_options.mysql_credentials.port", 3306);
|
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.mySQLParams = config.getString("data_storage_options.mysql_credentials.params", "?autoReconnect=true&useSSL=false");
|
||||||
|
|
||||||
this.doMapIntegration = config.getBoolean("map_integration.enabled", false);
|
this.doMapIntegration = config.getBoolean("map_integration.enabled", false);
|
||||||
this.mapPlugin = config.getString("map_integration.plugin", "dynmap");
|
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.doRtpCommand = config.getBoolean("random_teleport_command.enabled", true);
|
||||||
this.rtpRange = config.getInt("random_teleport_command.range", 5000);
|
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.privateHomesPerPage = config.getInt("general.lists.private_homes_per_page", 10);
|
||||||
this.publicHomesPerPage = config.getInt("general.lists.public_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() {
|
public int getRtpCoolDown() {
|
||||||
return rtpCooldown;
|
return rtpCoolDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTeleportRequestExpiryTime() {
|
public int getTeleportRequestExpiryTime() {
|
||||||
@@ -324,28 +324,28 @@ public class Settings {
|
|||||||
return warpsDataTable;
|
return warpsDataTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMySQLport() {
|
public int getMySQLPort() {
|
||||||
return mySQLport;
|
return mySQLPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMySQLhost() {
|
public String getMySQLHost() {
|
||||||
return mySQLhost;
|
return mySQLHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMySQLdatabase() {
|
public String getMySQLDatabase() {
|
||||||
return mySQLdatabase;
|
return mySQLDatabase;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMySQLusername() {
|
public String getMySQLUsername() {
|
||||||
return mySQLusername;
|
return mySQLUsername;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMySQLpassword() {
|
public String getMySQLPassword() {
|
||||||
return mySQLpassword;
|
return mySQLPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMySQLparams() {
|
public String getMySQLParams() {
|
||||||
return mySQLparams;
|
return mySQLParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean doSpawnCommand() {
|
public boolean doSpawnCommand() {
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ public class MySQL extends Database {
|
|||||||
");"
|
");"
|
||||||
};
|
};
|
||||||
|
|
||||||
final String host = HuskHomes.getSettings().getMySQLhost();
|
final String host = HuskHomes.getSettings().getMySQLHost();
|
||||||
final int port = HuskHomes.getSettings().getMySQLport();
|
final int port = HuskHomes.getSettings().getMySQLPort();
|
||||||
final String database = HuskHomes.getSettings().getMySQLdatabase();
|
final String database = HuskHomes.getSettings().getMySQLDatabase();
|
||||||
final String username = HuskHomes.getSettings().getMySQLusername();
|
final String username = HuskHomes.getSettings().getMySQLUsername();
|
||||||
final String password = HuskHomes.getSettings().getMySQLpassword();
|
final String password = HuskHomes.getSettings().getMySQLPassword();
|
||||||
final String params = HuskHomes.getSettings().getMySQLparams();
|
final String params = HuskHomes.getSettings().getMySQLParams();
|
||||||
|
|
||||||
private Connection connection;
|
private Connection connection;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user