Skip to content

Commit 0dae808

Browse files
committed
Documentation stuff
1 parent 6ae662d commit 0dae808

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

API/src/main/java/me/ifydev/dimensify/api/backend/BackendType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@AllArgsConstructor
1515
@Getter
1616
public enum BackendType {
17-
FLAT_FILE(Optional.empty(), "Flat file"),
17+
FLAT_FILE(Optional.empty(), "FlatFile"),
1818
MYSQL(Optional.of(SQLHandler.class), "MySQL"),
1919
SQLITE(Optional.of(SQLHandler.class), "SQLite");
2020

DimensifySpigot/src/main/java/me/ifydev/dimensifyspigot/DimensifyMain.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public class DimensifyMain extends JavaPlugin {
5353
@Getter private WorldController worldController;
5454
@Getter private PortalRegistry portalRegistry;
5555

56+
@Getter private boolean allowEntryByDefault = true;
57+
@Getter private boolean permissionRestrictDimensions = false;
58+
5659
@Override
5760
public void onEnable() {
5861
createConfig();

DimensifySpigot/src/main/java/me/ifydev/dimensifyspigot/backend/SpigotFlatFileHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void initialize() {
4747
File data = plugin.getDataFolder();
4848

4949
// Ensure the files exist
50-
storageFile = new File(data, "storage.yml");
50+
storageFile = new File(data, plugin.getConfig().getString("connection.file", "storage.yml"));
5151
if (!storageFile.exists()) {
5252
storageFile.getParentFile().mkdirs();
5353
plugin.saveResource("storage.yml", false);

DimensifySpigot/src/main/java/me/ifydev/dimensifyspigot/commands/DimensifyCommand.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ public boolean onCommand(CommandSender sender, Command command, String s, String
110110

111111
meta.getSeed().ifPresent(seed -> creator.seed(Long.valueOf(seed)));
112112

113-
Bukkit.getScheduler().runTask(plugin, () -> plugin.getWorldController().loadWorld(creator));
114-
plugin.getLogger().info("Finished generating world '" + worldName + "'!");
115-
sender.sendMessage(ColorUtil.makeReadable(DimensifyConstants.WORLD_CREATED.replace("<WORLD>", worldName)));
113+
Bukkit.getScheduler().runTask(plugin, () -> {
114+
plugin.getWorldController().loadWorld(creator);
115+
sender.sendMessage(ColorUtil.makeReadable(DimensifyConstants.WORLD_CREATED.replace("<WORLD>", worldName)));
116+
});
116117
return;
117118
} else if (args[0].equalsIgnoreCase("go")) {
118119
if (!(sender instanceof Player)) {
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
1+
# This is the backend that will be used for storing data within Dimensify.
2+
# The following options are valid: `sqlite`, `flatfile`, and `mysql`.
13
storage: sqlite
4+
# All options except for `file` are only used for MySQL`.
5+
# When the storage is `sqlite`, the file name for the database will be the name you selected within
6+
# `file`, with `.db` appended to the end.
7+
# However, when `storage` is `flatfile`, then it will be `file` with `.yml` appended to the end.
28
connection:
39
host: localhost
410
port: 3306
511
database: dimensify
612
username: dimensify
713
password: magicalpassword
8-
file: dimensify.db
14+
file: dimensify
15+
16+
# Setting `permission_restrict_dimensions` to `true` will make all dimensions require permissions in
17+
# the following format: `dimension.<dimension_name>.allow` or `dimension.<dimension_name>.deny`.
18+
# If the permission is not present on the player, then we'll use the value from `default_dimension_restriction`.
19+
permission_restrict_dimensions: false
20+
# `true` allows entry by default, `false` denies entry by default.
21+
default_dimension_restriction: true
922

1023
preload_worlds: false
11-
worlds:
24+
# To set worlds to be preloaded on server startup, add them to the `world_preload` list.
25+
# Ex:
26+
# world_preload:
27+
# - something
28+
# - another
29+
#
30+
# For worlds to preload, the option `preload_worlds` must be set to true as well.
31+
world_preload:

0 commit comments

Comments
 (0)