Add api to getAllPropertyTypes.

This commit is contained in:
benwoo1110 2020-12-26 20:41:00 +08:00
parent 90937d6322
commit 793bbe3858
3 changed files with 18 additions and 1 deletions

View File

@ -37,6 +37,7 @@ import org.bukkit.util.Vector;
import org.jetbrains.annotations.Nullable;
import org.json.simple.JSONObject;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@ -1133,6 +1134,14 @@ public class MVWorld implements MultiverseWorld {
return this.props.getBedRespawn();
}
/**
* {@inheritDoc}
*/
@Override
public Collection<String> getAllPropertyTypes() {
return this.props.serialize().keySet();
}
/**
* {@inheritDoc}
*/

View File

@ -20,6 +20,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.permissions.Permission;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.List;
/**
@ -651,6 +652,13 @@ public interface MultiverseWorld {
*/
List<String> getWorldBlacklist();
/**
* Gets all the names of all properties that can be SET.
*
* @return All property names in list.
*/
Collection<String> getAllPropertyTypes();
/**
* Gets all the names of all properties that can be SET.
*

View File

@ -105,7 +105,7 @@ public class VersionCommand extends MultiverseCommand {
event.appendVersionInfo(this.getLegacyString());
// add the legacy file, but as markdown so it's readable
// TODO: Readd this in 5.0.0
// TODO API: Readd this in 5.0.0
// event.putDetailedVersionInfo("version.md", this.getMarkdownString());
// add config.yml