From ccab0cf83c25887d99c975f0fac2237142139730 Mon Sep 17 00:00:00 2001 From: Super_ Date: Sat, 31 Oct 2020 00:58:12 -0400 Subject: [PATCH] implmenetation --- src/main/java/me/totalfreedom/plex/Plex.java | 4 ++-- .../command/{impl => }/CommandParameters.java | 2 +- .../{impl => }/CommandPermissions.java | 2 +- .../command/{impl => }/CommandSource.java | 2 +- .../plex/{config => command}/MainConfig.java | 2 +- .../plex/command/{impl => }/PlexCommand.java | 2 +- .../{impl => }/RequiredCommandSource.java | 2 +- .../{impl => }/CustomChunkGenerator.java | 2 +- .../plex/world/{impl => }/CustomWorld.java | 2 +- .../world/{impl => }/FlatChunkGenerator.java | 2 +- .../world/{impl => }/NoiseChunkGenerator.java | 2 +- .../plex/world/{impl => }/NoiseOptions.java | 2 +- .../{impl => }/OctaveChunkGenerator.java | 2 +- .../plex/world/{impl => }/OctaveOptions.java | 2 +- .../plex/world/{ => impl}/Flatlands.java | 21 ++++++++++++++----- 15 files changed, 31 insertions(+), 20 deletions(-) rename src/main/java/me/totalfreedom/plex/command/{impl => }/CommandParameters.java (86%) rename src/main/java/me/totalfreedom/plex/command/{impl => }/CommandPermissions.java (86%) rename src/main/java/me/totalfreedom/plex/command/{impl => }/CommandSource.java (91%) rename src/main/java/me/totalfreedom/plex/{config => command}/MainConfig.java (95%) rename src/main/java/me/totalfreedom/plex/command/{impl => }/PlexCommand.java (98%) rename src/main/java/me/totalfreedom/plex/command/{impl => }/RequiredCommandSource.java (61%) rename src/main/java/me/totalfreedom/plex/world/{impl => }/CustomChunkGenerator.java (94%) rename src/main/java/me/totalfreedom/plex/world/{impl => }/CustomWorld.java (92%) rename src/main/java/me/totalfreedom/plex/world/{impl => }/FlatChunkGenerator.java (94%) rename src/main/java/me/totalfreedom/plex/world/{impl => }/NoiseChunkGenerator.java (96%) rename src/main/java/me/totalfreedom/plex/world/{impl => }/NoiseOptions.java (92%) rename src/main/java/me/totalfreedom/plex/world/{impl => }/OctaveChunkGenerator.java (96%) rename src/main/java/me/totalfreedom/plex/world/{impl => }/OctaveOptions.java (88%) rename src/main/java/me/totalfreedom/plex/world/{ => impl}/Flatlands.java (73%) diff --git a/src/main/java/me/totalfreedom/plex/Plex.java b/src/main/java/me/totalfreedom/plex/Plex.java index eb18dad..f1e2c56 100644 --- a/src/main/java/me/totalfreedom/plex/Plex.java +++ b/src/main/java/me/totalfreedom/plex/Plex.java @@ -4,7 +4,7 @@ import lombok.Getter; import lombok.Setter; import me.totalfreedom.plex.cache.MongoPlayerData; import me.totalfreedom.plex.cache.SQLPlayerData; -import me.totalfreedom.plex.config.MainConfig; +import me.totalfreedom.plex.command.MainConfig; import me.totalfreedom.plex.listener.ChatListener; import me.totalfreedom.plex.listener.PlayerListener; import me.totalfreedom.plex.rank.RankManager; @@ -14,7 +14,7 @@ import me.totalfreedom.plex.storage.SQLConnection; import me.totalfreedom.plex.storage.StorageType; import me.totalfreedom.plex.util.PlexLog; import me.totalfreedom.plex.util.PlexUtils; -import me.totalfreedom.plex.world.Flatlands; +import me.totalfreedom.plex.world.impl.Flatlands; import org.bukkit.World; import org.bukkit.plugin.java.JavaPlugin; diff --git a/src/main/java/me/totalfreedom/plex/command/impl/CommandParameters.java b/src/main/java/me/totalfreedom/plex/command/CommandParameters.java similarity index 86% rename from src/main/java/me/totalfreedom/plex/command/impl/CommandParameters.java rename to src/main/java/me/totalfreedom/plex/command/CommandParameters.java index c26c258..00d8a40 100644 --- a/src/main/java/me/totalfreedom/plex/command/impl/CommandParameters.java +++ b/src/main/java/me/totalfreedom/plex/command/CommandParameters.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.command.impl; +package me.totalfreedom.plex.command; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/src/main/java/me/totalfreedom/plex/command/impl/CommandPermissions.java b/src/main/java/me/totalfreedom/plex/command/CommandPermissions.java similarity index 86% rename from src/main/java/me/totalfreedom/plex/command/impl/CommandPermissions.java rename to src/main/java/me/totalfreedom/plex/command/CommandPermissions.java index 7f851ef..1b093e6 100644 --- a/src/main/java/me/totalfreedom/plex/command/impl/CommandPermissions.java +++ b/src/main/java/me/totalfreedom/plex/command/CommandPermissions.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.command.impl; +package me.totalfreedom.plex.command; import me.totalfreedom.plex.rank.enums.Rank; diff --git a/src/main/java/me/totalfreedom/plex/command/impl/CommandSource.java b/src/main/java/me/totalfreedom/plex/command/CommandSource.java similarity index 91% rename from src/main/java/me/totalfreedom/plex/command/impl/CommandSource.java rename to src/main/java/me/totalfreedom/plex/command/CommandSource.java index d03b6da..894fa7e 100644 --- a/src/main/java/me/totalfreedom/plex/command/impl/CommandSource.java +++ b/src/main/java/me/totalfreedom/plex/command/CommandSource.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.command.impl; +package me.totalfreedom.plex.command; import lombok.Getter; import me.totalfreedom.plex.player.PlexPlayer; diff --git a/src/main/java/me/totalfreedom/plex/config/MainConfig.java b/src/main/java/me/totalfreedom/plex/command/MainConfig.java similarity index 95% rename from src/main/java/me/totalfreedom/plex/config/MainConfig.java rename to src/main/java/me/totalfreedom/plex/command/MainConfig.java index b77c7fe..5a29637 100644 --- a/src/main/java/me/totalfreedom/plex/config/MainConfig.java +++ b/src/main/java/me/totalfreedom/plex/command/MainConfig.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.config; +package me.totalfreedom.plex.command; import java.io.File; import me.totalfreedom.plex.Plex; diff --git a/src/main/java/me/totalfreedom/plex/command/impl/PlexCommand.java b/src/main/java/me/totalfreedom/plex/command/PlexCommand.java similarity index 98% rename from src/main/java/me/totalfreedom/plex/command/impl/PlexCommand.java rename to src/main/java/me/totalfreedom/plex/command/PlexCommand.java index 756410d..7ff8067 100644 --- a/src/main/java/me/totalfreedom/plex/command/impl/PlexCommand.java +++ b/src/main/java/me/totalfreedom/plex/command/PlexCommand.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.command.impl; +package me.totalfreedom.plex.command; import me.totalfreedom.plex.PlexBase; import me.totalfreedom.plex.rank.enums.Rank; diff --git a/src/main/java/me/totalfreedom/plex/command/impl/RequiredCommandSource.java b/src/main/java/me/totalfreedom/plex/command/RequiredCommandSource.java similarity index 61% rename from src/main/java/me/totalfreedom/plex/command/impl/RequiredCommandSource.java rename to src/main/java/me/totalfreedom/plex/command/RequiredCommandSource.java index aea919c..df9b23d 100644 --- a/src/main/java/me/totalfreedom/plex/command/impl/RequiredCommandSource.java +++ b/src/main/java/me/totalfreedom/plex/command/RequiredCommandSource.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.command.impl; +package me.totalfreedom.plex.command; public enum RequiredCommandSource { diff --git a/src/main/java/me/totalfreedom/plex/world/impl/CustomChunkGenerator.java b/src/main/java/me/totalfreedom/plex/world/CustomChunkGenerator.java similarity index 94% rename from src/main/java/me/totalfreedom/plex/world/impl/CustomChunkGenerator.java rename to src/main/java/me/totalfreedom/plex/world/CustomChunkGenerator.java index 7805e7f..f6303a8 100644 --- a/src/main/java/me/totalfreedom/plex/world/impl/CustomChunkGenerator.java +++ b/src/main/java/me/totalfreedom/plex/world/CustomChunkGenerator.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.world.impl; +package me.totalfreedom.plex.world; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; diff --git a/src/main/java/me/totalfreedom/plex/world/impl/CustomWorld.java b/src/main/java/me/totalfreedom/plex/world/CustomWorld.java similarity index 92% rename from src/main/java/me/totalfreedom/plex/world/impl/CustomWorld.java rename to src/main/java/me/totalfreedom/plex/world/CustomWorld.java index b2d64ba..c2c0bcc 100644 --- a/src/main/java/me/totalfreedom/plex/world/impl/CustomWorld.java +++ b/src/main/java/me/totalfreedom/plex/world/CustomWorld.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.world.impl; +package me.totalfreedom.plex.world; import org.bukkit.World; import org.bukkit.WorldCreator; diff --git a/src/main/java/me/totalfreedom/plex/world/impl/FlatChunkGenerator.java b/src/main/java/me/totalfreedom/plex/world/FlatChunkGenerator.java similarity index 94% rename from src/main/java/me/totalfreedom/plex/world/impl/FlatChunkGenerator.java rename to src/main/java/me/totalfreedom/plex/world/FlatChunkGenerator.java index 2552c3d..406a2bb 100644 --- a/src/main/java/me/totalfreedom/plex/world/impl/FlatChunkGenerator.java +++ b/src/main/java/me/totalfreedom/plex/world/FlatChunkGenerator.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.world.impl; +package me.totalfreedom.plex.world; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; diff --git a/src/main/java/me/totalfreedom/plex/world/impl/NoiseChunkGenerator.java b/src/main/java/me/totalfreedom/plex/world/NoiseChunkGenerator.java similarity index 96% rename from src/main/java/me/totalfreedom/plex/world/impl/NoiseChunkGenerator.java rename to src/main/java/me/totalfreedom/plex/world/NoiseChunkGenerator.java index 33f3f85..cddf15e 100644 --- a/src/main/java/me/totalfreedom/plex/world/impl/NoiseChunkGenerator.java +++ b/src/main/java/me/totalfreedom/plex/world/NoiseChunkGenerator.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.world.impl; +package me.totalfreedom.plex.world; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; diff --git a/src/main/java/me/totalfreedom/plex/world/impl/NoiseOptions.java b/src/main/java/me/totalfreedom/plex/world/NoiseOptions.java similarity index 92% rename from src/main/java/me/totalfreedom/plex/world/impl/NoiseOptions.java rename to src/main/java/me/totalfreedom/plex/world/NoiseOptions.java index a70fd0c..2d87117 100644 --- a/src/main/java/me/totalfreedom/plex/world/impl/NoiseOptions.java +++ b/src/main/java/me/totalfreedom/plex/world/NoiseOptions.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.world.impl; +package me.totalfreedom.plex.world; import lombok.Getter; diff --git a/src/main/java/me/totalfreedom/plex/world/impl/OctaveChunkGenerator.java b/src/main/java/me/totalfreedom/plex/world/OctaveChunkGenerator.java similarity index 96% rename from src/main/java/me/totalfreedom/plex/world/impl/OctaveChunkGenerator.java rename to src/main/java/me/totalfreedom/plex/world/OctaveChunkGenerator.java index 1f44043..030f11a 100644 --- a/src/main/java/me/totalfreedom/plex/world/impl/OctaveChunkGenerator.java +++ b/src/main/java/me/totalfreedom/plex/world/OctaveChunkGenerator.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.world.impl; +package me.totalfreedom.plex.world; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; diff --git a/src/main/java/me/totalfreedom/plex/world/impl/OctaveOptions.java b/src/main/java/me/totalfreedom/plex/world/OctaveOptions.java similarity index 88% rename from src/main/java/me/totalfreedom/plex/world/impl/OctaveOptions.java rename to src/main/java/me/totalfreedom/plex/world/OctaveOptions.java index 02e6819..7fe4c60 100644 --- a/src/main/java/me/totalfreedom/plex/world/impl/OctaveOptions.java +++ b/src/main/java/me/totalfreedom/plex/world/OctaveOptions.java @@ -1,4 +1,4 @@ -package me.totalfreedom.plex.world.impl; +package me.totalfreedom.plex.world; import lombok.Getter; diff --git a/src/main/java/me/totalfreedom/plex/world/Flatlands.java b/src/main/java/me/totalfreedom/plex/world/impl/Flatlands.java similarity index 73% rename from src/main/java/me/totalfreedom/plex/world/Flatlands.java rename to src/main/java/me/totalfreedom/plex/world/impl/Flatlands.java index f5b5621..9682c78 100644 --- a/src/main/java/me/totalfreedom/plex/world/Flatlands.java +++ b/src/main/java/me/totalfreedom/plex/world/impl/Flatlands.java @@ -1,12 +1,14 @@ -package me.totalfreedom.plex.world; +package me.totalfreedom.plex.world.impl; import me.totalfreedom.plex.Plex; -import me.totalfreedom.plex.world.impl.CustomWorld; -import me.totalfreedom.plex.world.impl.FlatChunkGenerator; -import org.bukkit.ChatColor; +import me.totalfreedom.plex.world.CustomWorld; +import me.totalfreedom.plex.world.FlatChunkGenerator; import org.bukkit.Chunk; import org.bukkit.Material; import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.block.Sign; import org.bukkit.generator.BlockPopulator; import java.util.Random; @@ -23,7 +25,16 @@ public class Flatlands extends CustomWorld @Override public World generate() { - return super.generate(); + World world = super.generate(); + Block block = world.getBlockAt(0, 51, 0); + block.setType(Material.OAK_SIGN); + BlockState state = block.getState(); + if (state instanceof Sign) + { + Sign sign = (Sign) state; + + } + return world; } private static class FlatlandsChunkGenerator extends FlatChunkGenerator