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