Skip to content

Commit b7323b5

Browse files
committed
Document empty value in get_server_info()
Server name no longer exists in server.properties
1 parent e162c2f commit b7323b5

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

src/main/java/com/laytonsmith/abstraction/MCServer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ public interface MCServer extends AbstractionObject {
9696

9797
MCOfflinePlayer[] getOfflinePlayers();
9898

99-
/* Boring information get methods -.- */
100-
String getServerName();
101-
10299
String getMotd();
103100

104101
String getAPIVersion();

src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCServer.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,6 @@ public String getWorldContainer() {
442442
return s.getWorldContainer().getPath();
443443
}
444444

445-
@Override
446-
public String getServerName() {
447-
return "";
448-
}
449-
450445
@Override
451446
public String getMotd() {
452447
return s.getMotd();

src/main/java/com/laytonsmith/core/functions/Minecraft.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ public String docs() {
588588
+ " and only that information for that index will be returned."
589589
+ " ---- Otherwise if value is not specified (or is -1), it returns an array of"
590590
+ " information with the following pieces of information in the specified index: "
591-
+ "<ul><li>0 - Server name; the name of the server in server.properties.</li>"
591+
+ "<ul><li>0 - Empty.</li>"
592592
+ "<li>1 - API version; The version of the plugin API this server is implementing.</li>"
593593
+ "<li>2 - Server version; The bare version string of the server implementation.</li>"
594594
+ "<li>3 - Allow flight; If true, Minecraft's inbuilt anti fly check is disabled.</li>"
@@ -645,8 +645,7 @@ public Mixed exec(Target t, Environment env, Mixed... args) throws CancelCommand
645645
ArrayList<Mixed> retVals = new ArrayList<>();
646646

647647
if(index == 0 || index == -1) {
648-
//Server name
649-
retVals.add(new CString(server.getServerName(), t));
648+
retVals.add(new CString("", t));
650649
}
651650

652651
if(index == 1 || index == -1) {

0 commit comments

Comments
 (0)