mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Remove getServerName()
This commit is contained in:
parent
ca8b82dcbe
commit
8b0e59209c
@ -570,11 +570,6 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
return new BukkitInventoryUtil();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServerName() {
|
||||
return Bukkit.getServerName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startMetrics() {
|
||||
Metrics metrics = new Metrics(this);
|
||||
|
@ -236,12 +236,6 @@ public interface IPlotMain extends ILogger {
|
||||
*/
|
||||
void registerWorldEvents();
|
||||
|
||||
/**
|
||||
* Get the name of the server.
|
||||
* @return the server name
|
||||
*/
|
||||
String getServerName();
|
||||
|
||||
/**
|
||||
* Get the class that will manage player titles.
|
||||
* @return
|
||||
|
@ -148,13 +148,7 @@ public class Load extends SubCommand {
|
||||
String world = split[1];
|
||||
PlotId id = PlotId.fromString(split[2] + ';' + split[3]);
|
||||
String size = split[4];
|
||||
String server = split[5].replaceAll(".schematic", "");
|
||||
String color;
|
||||
if (PS.get().IMP.getServerName().replaceAll("[^A-Za-z0-9]", "").equals(server)) {
|
||||
color = "$4";
|
||||
} else {
|
||||
color = "$1";
|
||||
}
|
||||
String color = "$4";
|
||||
MainUtil.sendMessage(player,
|
||||
"$3[$2" + (i + 1) + "$3] " + color + time + "$3 | " + color + world + ';' + id + "$3 | " + color + size + 'x' + size);
|
||||
} catch (Exception e) {
|
||||
@ -191,7 +185,7 @@ public class Load extends SubCommand {
|
||||
time -= minutes * 60;
|
||||
toreturn.append(minutes + "m ");
|
||||
}
|
||||
if (toreturn.equals("") || (time > 0)) {
|
||||
if (toreturn.length() == 0 || (time > 0)) {
|
||||
toreturn.append(time + "s ");
|
||||
}
|
||||
return toreturn.toString().trim();
|
||||
|
@ -63,12 +63,11 @@ public class Save extends SubCommand {
|
||||
@Override
|
||||
public void run() {
|
||||
String time = (System.currentTimeMillis() / 1000) + "";
|
||||
String name = PS.get().IMP.getServerName().replaceAll("[^A-Za-z0-9]", "");
|
||||
Location[] corners = plot.getCorners();
|
||||
int size = (corners[1].getX() - corners[0].getX()) + 1;
|
||||
PlotId id = plot.getId();
|
||||
String world = plot.getArea().toString().replaceAll(";", "-").replaceAll("[^A-Za-z0-9]", "");
|
||||
final String file = time + '_' + world + '_' + id.x + '_' + id.y + '_' + size + '_' + name;
|
||||
final String file = time + '_' + world + '_' + id.x + '_' + id.y + '_' + size;
|
||||
UUID uuid = player.getUUID();
|
||||
SchematicHandler.manager.upload(value, uuid, file, new RunnableVal<URL>() {
|
||||
@Override
|
||||
|
@ -293,11 +293,6 @@ public class SpongeMain implements IPlotMain {
|
||||
Sponge.getEventManager().registerListeners(this, new WorldEvents());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServerName() {
|
||||
throw new UnsupportedOperationException("NOT IMPLEMENTED YET");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startMetrics() {
|
||||
SpongeMetrics metrics = new SpongeMetrics(this.game, this.plugin);
|
||||
|
Loading…
Reference in New Issue
Block a user