From 3ac164f251622f6a93038472bdfd535bff7ad9a8 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 16 Jun 2023 14:32:36 +0200 Subject: [PATCH 01/14] Bump version --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 15c2dde6..4fead5f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -group=com.eintosti -version=2.24.1-SNAPSHOT +group=de.eintosti +version=3.0.0-SNAPSHOT org.gradle.daemon=true org.gradle.caching=true org.gradle.parallel=true From bb8fbaa8dd873b1a1303348eff07e4a23637356a Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 16 Jun 2023 17:12:04 +0200 Subject: [PATCH 02/14] Add API (#200) * Begin API implementation * Add provider, fix plugin loading * Fix provider not loading correctly * Add maven repo * Add some javadocs * Fix building * Change repo url * Differentiate between releases and snapshots * Add api information to readme * Add `@ApiStatus.Internal` annotations to public events --- README.md | 35 +++ buildSrc/src/main/kotlin/CommonConfig.kt | 2 +- buildsystem-api/build.gradle.kts | 42 +++ .../eintosti/buildsystem/api/BuildSystem.java | 30 ++ .../buildsystem/api/BuildSystemProvider.java | 46 +++ .../api/event/world/BuildWorldEvent.java | 48 ++++ .../api}/event/world/BuildWorldLoadEvent.java | 13 +- .../event/world/BuildWorldPostLoadEvent.java | 22 ++ .../world/BuildWorldPostUnloadEvent.java | 22 ++ .../event/world/BuildWorldUnloadEvent.java | 13 +- .../buildsystem/api/player/BuildPlayer.java | 29 ++ .../buildsystem/api/player/PlayerManager.java | 92 ++++++ .../api}/settings/DesignColor.java | 2 +- .../api}/settings/NavigatorType.java | 5 +- .../buildsystem/api/settings/Settings.java | 71 +++++ .../api/settings/WorldDisplay.java | 17 ++ .../buildsystem/api/settings/WorldFilter.java | 55 ++++ .../buildsystem/api}/settings/WorldSort.java | 10 +- .../buildsystem/api/world/BuildWorld.java | 225 +++++++++++++++ .../api/world/BuildWorldCreator.java | 95 +++++++ .../buildsystem/api/world/Builder.java | 38 +++ .../buildsystem/api/world/Visibility.java | 29 ++ .../buildsystem/api/world/WorldManager.java | 135 +++++++++ .../buildsystem/api/world/data/WorldData.java | 151 ++++++++++ .../api}/world/data/WorldStatus.java | 15 +- .../api}/world/data/WorldType.java | 16 +- .../api/world/generator/CustomGenerator.java | 27 ++ .../api/world/generator/Generator.java | 30 ++ buildsystem-core/build.gradle.kts | 1 + ...uildSystem.java => BuildSystemPlugin.java} | 58 ++-- .../de/eintosti/buildsystem/Messages.java | 18 +- .../buildsystem/api/BuildSystemApi.java | 39 +++ .../buildsystem/command/BackCommand.java | 14 +- .../buildsystem/command/BlocksCommand.java | 6 +- .../buildsystem/command/BuildCommand.java | 14 +- .../command/BuildSystemCommand.java | 6 +- .../buildsystem/command/ConfigCommand.java | 6 +- .../command/ExplosionsCommand.java | 14 +- .../buildsystem/command/GamemodeCommand.java | 6 +- .../buildsystem/command/NoAICommand.java | 14 +- .../buildsystem/command/PhysicsCommand.java | 14 +- .../buildsystem/command/SettingsCommand.java | 6 +- .../buildsystem/command/SetupCommand.java | 6 +- .../buildsystem/command/SkullCommand.java | 6 +- .../buildsystem/command/SpawnCommand.java | 12 +- .../buildsystem/command/SpeedCommand.java | 6 +- .../buildsystem/command/TimeCommand.java | 10 +- .../buildsystem/command/TopCommand.java | 10 +- .../buildsystem/command/WorldsCommand.java | 6 +- .../worlds/AddBuilderSubCommand.java | 20 +- .../subcommand/worlds/BuildersSubCommand.java | 14 +- .../subcommand/worlds/DeleteSubCommand.java | 14 +- .../subcommand/worlds/EditSubCommand.java | 14 +- .../worlds/ImportAllSubCommand.java | 18 +- .../subcommand/worlds/ImportSubCommand.java | 20 +- .../subcommand/worlds/InfoSubCommand.java | 21 +- .../subcommand/worlds/ItemSubCommand.java | 6 +- .../worlds/RemoveBuilderSubCommand.java | 12 +- .../worlds/RemoveSpawnSubCommand.java | 12 +- .../subcommand/worlds/RenameSubCommand.java | 12 +- .../worlds/SetCreatorSubCommand.java | 12 +- .../subcommand/worlds/SetItemSubCommand.java | 12 +- .../worlds/SetPermissionSubCommand.java | 16 +- .../worlds/SetProjectSubCommand.java | 16 +- .../subcommand/worlds/SetSpawnSubCommand.java | 12 +- .../worlds/SetStatusSubCommand.java | 14 +- .../subcommand/worlds/TeleportSubCommand.java | 14 +- .../subcommand/worlds/UnimportSubCommand.java | 12 +- .../buildsystem/config/ConfigValues.java | 18 +- .../buildsystem/config/ConfigurationFile.java | 4 +- .../buildsystem/config/PlayersConfig.java | 8 +- .../buildsystem/config/SetupConfig.java | 8 +- .../buildsystem/config/SpawnConfig.java | 4 +- .../buildsystem/config/WorldConfig.java | 21 +- .../player/PlayerInventoryClearEvent.java | 12 +- .../event/world/BuildWorldEvent.java | 34 --- .../event/world/BuildWorldPostLoadEvent.java | 13 - .../world/BuildWorldPostUnloadEvent.java | 13 - .../luckperms/LuckPermsExpansion.java | 6 +- .../calculators/BuildModeCalculator.java | 8 +- .../luckperms/calculators/RoleCalculator.java | 17 +- .../PlaceholderApiExpansion.java | 24 +- .../buildsystem/internal/ServerVersion.java | 4 +- .../listener/AsyncPlayerChatListener.java | 4 +- .../listener/AsyncPlayerPreLoginListener.java | 26 +- .../listener/BlockPhysicsListener.java | 10 +- .../listener/BlockPlaceListener.java | 12 +- .../BuildModePreventationListener.java | 8 +- .../BuildWorldResetUnloadListener.java | 14 +- .../listener/EditSessionListener.java | 12 +- .../listener/EntitySpawnListener.java | 10 +- .../listener/FoodLevelChangeListener.java | 12 +- .../listener/InventoryCloseListener.java | 8 +- .../listener/InventoryCreativeListener.java | 6 +- .../listener/NavigatorListener.java | 24 +- .../listener/PlayerChangedWorldListener.java | 23 +- .../PlayerCommandPreprocessListener.java | 19 +- .../PlayerInventoryClearListener.java | 10 +- .../listener/PlayerJoinListener.java | 35 ++- .../listener/PlayerMoveListener.java | 16 +- .../listener/PlayerQuitListener.java | 16 +- .../listener/PlayerRespawnListener.java | 8 +- .../listener/PlayerTeleportListener.java | 14 +- .../listener/SettingsInteractListener.java | 37 +-- .../listener/SignChangeListener.java | 4 +- .../listener/WeatherChangeListener.java | 4 +- .../listener/WorldManipulateListener.java | 23 +- .../navigator/inventory/ArchiveInventory.java | 9 +- .../inventory/FilteredWorldsInventory.java | 48 ++-- .../inventory/NavigatorInventory.java | 6 +- .../navigator/inventory/PrivateInventory.java | 13 +- .../navigator/inventory/WorldsInventory.java | 13 +- ...rldDisplay.java => BuildWorldDisplay.java} | 17 +- ...WorldFilter.java => BuildWorldFilter.java} | 44 +-- .../settings/NavigatorInventoryType.java | 9 +- .../buildsystem/player/BlocksInventory.java | 6 +- ...erManager.java => BuildPlayerManager.java} | 112 +++----- .../buildsystem/player/CachedValues.java | 4 - ...BuildPlayer.java => CraftBuildPlayer.java} | 35 +-- .../buildsystem/player/LogoutLocation.java | 4 - .../{Settings.java => CraftSettings.java} | 81 ++++-- .../buildsystem/settings/DesignInventory.java | 14 +- .../buildsystem/settings/NoClipManager.java | 10 +- .../settings/SettingsInventory.java | 16 +- .../buildsystem/settings/SettingsManager.java | 37 +-- .../buildsystem/settings/SpeedInventory.java | 6 +- .../tabcomplete/BuildTabComplete.java | 4 +- .../tabcomplete/ConfigTabComplete.java | 4 +- .../tabcomplete/EmptyTabComplete.java | 4 +- .../tabcomplete/GamemodeTabComplete.java | 4 +- .../tabcomplete/PhysicsTabComplete.java | 8 +- .../tabcomplete/SpawnTabComplete.java | 4 +- .../tabcomplete/SpeedTabComplete.java | 4 +- .../tabcomplete/TimeTabComplete.java | 8 +- .../tabcomplete/WorldsTabComplete.java | 12 +- .../buildsystem/util/InventoryUtils.java | 65 ++--- .../buildsystem/util/PlayerChatInput.java | 6 +- .../eintosti/buildsystem/util/SkullCache.java | 4 +- ...rldManager.java => BuildWorldManager.java} | 269 ++++++++---------- .../{BuildWorld.java => CraftBuildWorld.java} | 217 ++++---------- ...eator.java => CraftBuildWorldCreator.java} | 72 ++--- .../world/{Builder.java => CraftBuilder.java} | 10 +- .../buildsystem/world/SpawnManager.java | 11 +- .../{WorldData.java => BuildWorldData.java} | 111 +++++--- .../world/data/StatusInventory.java | 20 +- ...enerator.java => CustomGeneratorImpl.java} | 7 +- .../world/generator/Generator.java | 27 -- .../DeprecatedVoidGenerator.java | 3 - .../voidgenerator/ModernVoidGenerator.java | 3 - .../world/modification/BuilderInventory.java | 15 +- .../world/modification/CreateInventory.java | 14 +- .../world/modification/DeleteInventory.java | 8 +- .../world/modification/EditInventory.java | 43 +-- .../world/modification/GameRuleInventory.java | 11 +- .../world/modification/SetupInventory.java | 10 +- .../src/main/resources/plugin.yml | 2 +- settings.gradle.kts | 1 + 157 files changed, 2499 insertions(+), 1373 deletions(-) create mode 100644 buildsystem-api/build.gradle.kts create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java rename {buildsystem-core/src/main/java/de/eintosti/buildsystem => buildsystem-api/src/main/java/de/eintosti/buildsystem/api}/event/world/BuildWorldLoadEvent.java (56%) create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java rename {buildsystem-core/src/main/java/de/eintosti/buildsystem => buildsystem-api/src/main/java/de/eintosti/buildsystem/api}/event/world/BuildWorldUnloadEvent.java (57%) create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java rename {buildsystem-core/src/main/java/de/eintosti/buildsystem => buildsystem-api/src/main/java/de/eintosti/buildsystem/api}/settings/DesignColor.java (93%) rename {buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator => buildsystem-api/src/main/java/de/eintosti/buildsystem/api}/settings/NavigatorType.java (78%) create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java rename {buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator => buildsystem-api/src/main/java/de/eintosti/buildsystem/api}/settings/WorldSort.java (91%) create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Visibility.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java rename {buildsystem-core/src/main/java/de/eintosti/buildsystem => buildsystem-api/src/main/java/de/eintosti/buildsystem/api}/world/data/WorldStatus.java (81%) rename {buildsystem-core/src/main/java/de/eintosti/buildsystem => buildsystem-api/src/main/java/de/eintosti/buildsystem/api}/world/data/WorldType.java (81%) create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java rename buildsystem-core/src/main/java/de/eintosti/buildsystem/{BuildSystem.java => BuildSystemPlugin.java} (92%) create mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java delete mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldEvent.java delete mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostLoadEvent.java delete mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostUnloadEvent.java rename buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/{WorldDisplay.java => BuildWorldDisplay.java} (68%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/{WorldFilter.java => BuildWorldFilter.java} (62%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/player/{PlayerManager.java => BuildPlayerManager.java} (78%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/player/{BuildPlayer.java => CraftBuildPlayer.java} (83%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/{Settings.java => CraftSettings.java} (75%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/world/{WorldManager.java => BuildWorldManager.java} (84%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/world/{BuildWorld.java => CraftBuildWorld.java} (71%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/world/{BuildWorldCreator.java => CraftBuildWorldCreator.java} (84%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/world/{Builder.java => CraftBuilder.java} (77%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/{WorldData.java => BuildWorldData.java} (52%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/{CustomGenerator.java => CustomGeneratorImpl.java} (71%) delete mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/Generator.java diff --git a/README.md b/README.md index 71c61771..01a7fab3 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,41 @@ not to forget: let each player decide which settings whey think are best for the ![Graph](https://bstats.org/signatures/bukkit/BuildSystem.svg) +## Developer API + +**Maven:** + +```xml + + + eintosti + https://repo.eintosti.de/release + +``` + +```xml + + + de.eintosti + buildsystem-api + version + + ``` + +**Or alternatively, with Gradle:** + +```kotlin +repositories { + maven { + url = uri("https://repo.eintosti.de/release") + } +} + +dependencies { + compileOnly("de.eintosti:buildsystem-api:version") +} +``` + ## Contributing ### To compile... diff --git a/buildSrc/src/main/kotlin/CommonConfig.kt b/buildSrc/src/main/kotlin/CommonConfig.kt index 97ddecd2..51e1ab7b 100644 --- a/buildSrc/src/main/kotlin/CommonConfig.kt +++ b/buildSrc/src/main/kotlin/CommonConfig.kt @@ -17,7 +17,7 @@ fun Project.applyCommonConfiguration() { } maven { name = "PaperMC" - url = uri("https://papermc.io/repo/repository/maven-public/") + url = uri("https://repo.papermc.io/repository/maven-public/") } maven { name = "OSS Sonatype Snapshots" diff --git a/buildsystem-api/build.gradle.kts b/buildsystem-api/build.gradle.kts new file mode 100644 index 00000000..1d4ebce6 --- /dev/null +++ b/buildsystem-api/build.gradle.kts @@ -0,0 +1,42 @@ +applyCommonConfiguration() + +plugins { + `java-library` + `maven-publish` +} + +dependencies { + compileOnly(libs.spigot) + compileOnly(libs.annotations) + compileOnly(libs.xseries) +} + +java { + withSourcesJar() + withJavadocJar() +} + +publishing { + repositories { + maven { + name = "BuildSystem" + url = if (project.version.toString().endsWith("-SNAPSHOT")) { + uri("https://repo.eintosti.de/snapshots") + } else { + uri("https://repo.eintosti.de/release") + } + credentials(PasswordCredentials::class) + authentication { + create("basic") + } + } + } + publications { + create("maven") { + groupId = "de.eintosti" + artifactId = "buildsystem-api" + version = project.version.toString() + from(components["java"]) + } + } +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java new file mode 100644 index 00000000..9cd69c2e --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api; + +import de.eintosti.buildsystem.api.player.BuildPlayer; +import de.eintosti.buildsystem.api.player.PlayerManager; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.WorldManager; + +public interface BuildSystem { + + /** + * Gets the {@link WorldManager}, responsible for managing {@link BuildWorld} instances. + * + * @return The world manager + */ + WorldManager getWorldManager(); + + /** + * Gets the {@link PlayerManager}, responsible for managing {@link BuildPlayer} instances. + * + * @return The player manager + */ + PlayerManager getPlayerManager(); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java new file mode 100644 index 00000000..3900fe7e --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api; + +import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; + +public class BuildSystemProvider { + + private static BuildSystem instance = null; + + /** + * Gets an instance of the {@link BuildSystem} API. + * + * @return An instance of the BuildSystem API + * @throws IllegalStateException if the API is not loaded yet + */ + @NotNull + public static BuildSystem get() { + BuildSystem instance = BuildSystemProvider.instance; + if (instance == null) { + throw new IllegalStateException("BuildSystem has not loaded yet!"); + } + return instance; + } + + @ApiStatus.Internal + static void register(BuildSystem instance) { + BuildSystemProvider.instance = instance; + } + + @ApiStatus.Internal + static void unregister() { + BuildSystemProvider.instance = null; + } + + @ApiStatus.Internal + private BuildSystemProvider() { + throw new AssertionError(); + } +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java new file mode 100644 index 00000000..4b6e71a0 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.event.world; + +import de.eintosti.buildsystem.api.world.BuildWorld; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; + +/** + * Represents a {@link BuildWorld} related event. + */ +public class BuildWorldEvent extends Event { + + private static final HandlerList HANDLER_LIST = new HandlerList(); + + private final BuildWorld buildWorld; + + @ApiStatus.Internal + public BuildWorldEvent(BuildWorld buildWorld) { + this.buildWorld = buildWorld; + } + + /** + * Gets the {@link BuildWorld} involved in this event + * + * @return The world involved in this event + */ + public BuildWorld getBuildWorld() { + return buildWorld; + } + + @NotNull + @Override + public HandlerList getHandlers() { + return HANDLER_LIST; + } + + public static HandlerList getHandlerList() { + return HANDLER_LIST; + } +} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldLoadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java similarity index 56% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldLoadEvent.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java index ab9095f4..b2aec6db 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldLoadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java @@ -1,7 +1,15 @@ -package de.eintosti.buildsystem.event.world; +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.event.world; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.api.world.BuildWorld; import org.bukkit.event.Cancellable; +import org.jetbrains.annotations.ApiStatus; /** * Called when a {@link BuildWorld} is loaded. @@ -10,6 +18,7 @@ public class BuildWorldLoadEvent extends BuildWorldEvent implements Cancellable private boolean cancelled = false; + @ApiStatus.Internal public BuildWorldLoadEvent(BuildWorld buildWorld) { super(buildWorld); } diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java new file mode 100644 index 00000000..7c89cf80 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.event.world; + +import de.eintosti.buildsystem.api.world.BuildWorld; +import org.jetbrains.annotations.ApiStatus; + +/** + * Called after a {@link BuildWorld} has loaded. + */ +public class BuildWorldPostLoadEvent extends BuildWorldEvent { + + @ApiStatus.Internal + public BuildWorldPostLoadEvent(BuildWorld buildWorld) { + super(buildWorld); + } +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java new file mode 100644 index 00000000..aa6d1240 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.event.world; + +import de.eintosti.buildsystem.api.world.BuildWorld; +import org.jetbrains.annotations.ApiStatus; + +/** + * Called after a {@link BuildWorld} has unloaded. + */ +public class BuildWorldPostUnloadEvent extends BuildWorldEvent { + + @ApiStatus.Internal + public BuildWorldPostUnloadEvent(BuildWorld buildWorld) { + super(buildWorld); + } +} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldUnloadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java similarity index 57% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldUnloadEvent.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java index 83461ac0..5bb3879e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldUnloadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java @@ -1,7 +1,15 @@ -package de.eintosti.buildsystem.event.world; +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.event.world; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.api.world.BuildWorld; import org.bukkit.event.Cancellable; +import org.jetbrains.annotations.ApiStatus; /** * Called when a {@link BuildWorld} is unloaded. @@ -10,6 +18,7 @@ public class BuildWorldUnloadEvent extends BuildWorldEvent implements Cancellabl private boolean cancelled = false; + @ApiStatus.Internal public BuildWorldUnloadEvent(BuildWorld buildWorld) { super(buildWorld); } diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java new file mode 100644 index 00000000..006746b7 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.player; + +import de.eintosti.buildsystem.api.settings.Settings; + +import java.util.UUID; + +public interface BuildPlayer { + + /** + * Gets the unique-id of the player. + * + * @return The player's UUID + */ + UUID getUniqueId(); + + /** + * Gets the player's per-player settings. + * + * @return The player's settings + */ + Settings getSettings(); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java new file mode 100644 index 00000000..b9a29436 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.player; + +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Visibility; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.Unmodifiable; + +import java.util.Collection; +import java.util.Set; +import java.util.UUID; + +public interface PlayerManager { + + /** + * Gets a build-player object by the given uuid. + * + * @param uuid The uuid to look up + * @return The player, if found, otherwise {@code null} + */ + BuildPlayer getBuildPlayer(UUID uuid); + + /** + * Gets a build-player object by the given player. + * + * @param player The uuid to look up + * @return The player, if found, otherwise {@code null} + */ + BuildPlayer getBuildPlayer(Player player); + + /** + * Gets a collection of all {@link BuildPlayer}s. + * + * @return A collection of all build-players. + */ + @Unmodifiable + Collection getBuildPlayers(); + + /** + * Gets a set of all players currently in "build mode". + * + * @return A set of all players in "build mode". + * @see #isInBuildMode(Player) + */ + Set getBuildModePlayers(); + + /** + * Gets whether a player is currently in "build mode". + * + * @param player The player + * @return {@code true} if the player is in "build mode", otherwise {@code false} + */ + boolean isInBuildMode(Player player); + + /** + * Gets whether the given player is allowed to create a new {@link BuildWorld}.
+ * This depends on the following factors: + *
    + *
  • Is the maximum amount of worlds set by the config less than the amount of existing worlds?
  • + *
  • Is the maximum amount of worlds created by the player less than the amount of worlds said player is allowed to create?
  • + *
+ * + * @param player The player trying to create a world + * @param visibility The visibility of the world trying to be created + * @return {@code true} if the player is allowed to create a world, otherwise {@code false} + */ + boolean canCreateWorld(Player player, Visibility visibility); + + /** + * Returns the maximum amount of {@link BuildWorld}s a player can create. + *

+ * If the player has the permission {@code buildsystem.admin}, unlimited worlds can be created. + * Otherwise, there are two different permissions to set said amount: + *

+ * To set the maximum of... + *

    + *
  • ...public worlds, use {@literal buildsystem.create.public.}
  • + *
  • ...private worlds, use {@literal buildsystem.create.private.}
  • + *
+ * + * @param player The player object + * @param visibility The visibility of the worlds to check the maximum of. Possible values: {@link Visibility#PUBLIC} or {@link Visibility#PRIVATE} + * @return If set, the maximum amount of worlds a player can create, otherwise -1 + */ + int getMaxWorlds(Player player, Visibility visibility); +} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignColor.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java similarity index 93% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignColor.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java index 219d93a3..31f55748 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignColor.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java @@ -5,7 +5,7 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -package de.eintosti.buildsystem.settings; +package de.eintosti.buildsystem.api.settings; public enum DesignColor { RED, diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorType.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java similarity index 78% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorType.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java index a3079bfe..eb99133e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorType.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java @@ -5,8 +5,9 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -package de.eintosti.buildsystem.navigator.settings; +package de.eintosti.buildsystem.api.settings; public enum NavigatorType { - OLD, NEW + OLD, + NEW; } \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java new file mode 100644 index 00000000..e89f220f --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.settings; + +public interface Settings { + + NavigatorType getNavigatorType(); + + void setNavigatorType(NavigatorType navigatorType); + + DesignColor getDesignColor(); + + void setDesignColor(DesignColor designColor); + + WorldDisplay getWorldDisplay(); + + void setWorldDisplay(WorldDisplay worldDisplay); + + boolean isClearInventory(); + + void setClearInventory(boolean clearInventory); + + boolean isDisableInteract(); + + void setDisableInteract(boolean disableInteract); + + boolean isHidePlayers(); + + void setHidePlayers(boolean hidePlayers); + + boolean isInstantPlaceSigns(); + + void setInstantPlaceSigns(boolean instantPlaceSigns); + + boolean isKeepNavigator(); + + void setKeepNavigator(boolean keepNavigator); + + boolean isNightVision(); + + void setNightVision(boolean nightVision); + + boolean isNoClip(); + + void setNoClip(boolean noClip); + + boolean isPlacePlants(); + + void setPlacePlants(boolean placePlants); + + boolean isScoreboard(); + + void setScoreboard(boolean scoreboard); + + boolean isSlabBreaking(); + + void setSlabBreaking(boolean slabBreaking); + + boolean isSpawnTeleport(); + + void setSpawnTeleport(boolean spawnTeleport); + + boolean isTrapDoor(); + + void setTrapDoor(boolean trapDoor); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java new file mode 100644 index 00000000..f1b529e9 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.settings; + +public interface WorldDisplay { + + WorldSort getWorldSort(); + + void setWorldSort(WorldSort worldSort); + + WorldFilter getWorldFilter(); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java new file mode 100644 index 00000000..07d21124 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.settings; + +import de.eintosti.buildsystem.api.world.BuildWorld; + +import java.util.function.Predicate; + +public interface WorldFilter { + + enum Mode { + NONE("world_filter_mode_none"), + STARTS_WITH("world_filter_mode_starts_with"), + CONTAINS("world_filter_mode_contains"), + MATCHES("world_filter_mode_matches"); + + private final String loreKey; + + Mode(String loreKey) { + this.loreKey = loreKey; + } + + public String getLoreKey() { + return loreKey; + } + + public Mode getNext() { + switch (this) { + default: // NONE + return STARTS_WITH; + case STARTS_WITH: + return CONTAINS; + case CONTAINS: + return MATCHES; + case MATCHES: + return NONE; + } + } + } + + Mode getMode(); + + void setMode(Mode mode); + + String getText(); + + void setText(String text); + + Predicate apply(); +} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldSort.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java similarity index 91% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldSort.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java index 5593368f..98c09ad3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldSort.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java @@ -5,11 +5,7 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -package de.eintosti.buildsystem.navigator.settings; - -import de.eintosti.buildsystem.Messages; - -import java.util.List; +package de.eintosti.buildsystem.api.settings; public enum WorldSort { NAME_A_TO_Z("world_sort_name_az"), @@ -27,8 +23,8 @@ public enum WorldSort { this.loreKey = loreKey; } - public List getItemLore() { - return Messages.getStringList(loreKey); + public String getLoreKey() { + return loreKey; } public static WorldSort matchWorldSort(String type) { diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java new file mode 100644 index 00000000..ad785c42 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world; + +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.api.world.generator.CustomGenerator; +import org.bukkit.Difficulty; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.UUID; + +public interface BuildWorld { + + /** + * Get the bukkit world linked to the build-world. + * + * @return The bukkit world + */ + World getWorld(); + + /** + * Get the name of the world. + * + * @return The world's name + */ + String getName(); + + /** + * Set the name of the world. + * + * @param name The name to set to + */ + void setName(String name); + + /** + * Gets whether the world has a creator + * + * @return {@code true} if the world has a creator, {@code false} otherwise + */ + boolean hasCreator(); + + /** + * Get the name of the player who created the world. + *

+ * In older versions of the plugin, the creator was not saved which is why {@code null} can be returned. + * + * @return The name of the player who created the world + */ + @Nullable + String getCreator(); + + /** + * Set the name of the creator. + * + * @param creator The name of the creator + */ + void setCreator(String creator); + + /** + * Get the unique-id of the player who created the world. + *

+ * In older versions of the plugin, the creator was not saved which is why {@code null} can be returned. + * + * @return The unique-id of the player who created the world + */ + @Nullable + UUID getCreatorId(); + + /** + * Set the unique-id of the creator. + * + * @param creatorId The unique-id of the creator + */ + void setCreatorId(UUID creatorId); + + /** + * Gets whether the given player is the creator of the world. + * + * @param player The player to check + * @return {@code true} if the player is the creator, {@code false} otherwise + */ + boolean isCreator(Player player); + + /** + * Get world's type. + * + * @return The {@link WorldType} of the world + */ + WorldType getType(); + + /** + * Gets the world's data. + * + * @return The {@link WorldData} of the world + */ + WorldData getData(); + + /** + * Get the creation date of the world. + * + * @return The amount of milliseconds that have passed since {@code January 1, 1970 UTC}, until the world was created. + */ + long getCreationDate(); + + /** + * Get the custom chunk generator used to generate the world. + * + * @return The custom chunk generator used to generate the world. + */ + @Nullable + CustomGenerator getCustomGenerator(); + + /** + * Cycles to the next {@link Difficulty}. + */ + void cycleDifficulty(); + + /** + * Get a list of all builders who can modify the world. + * + * @return the list of all builders + */ + List getBuilders(); + + /** + * Get a list of all {@link Builder} names + * + * @return A list of all builder names + */ + List getBuilderNames(); + + /** + * Get a builder by the given uuid. + * + * @param uuid The player's unique-id + * @return The builder object, if any, or {@code null} + */ + @Nullable + Builder getBuilder(UUID uuid); + + /** + * Get whether the given uuid matches that of an added builder. + * + * @param uuid The unique-id of the player to be checked + * @return Whether the player is a builder + */ + boolean isBuilder(UUID uuid); + + /** + * Get whether the given player has been added as a {@link Builder}. + * + * @param player The player to be checked + * @return Whether the {@link Player} is a builder + * @see #isBuilder(UUID) + */ + boolean isBuilder(Player player); + + /** + * Add a {@link Builder} to the current list of builders + * + * @param builder The builder object + */ + void addBuilder(Builder builder); + + /** + * Remove a {@link Builder} from the current list of builders + * + * @param builder The builder object + */ + void removeBuilder(Builder builder); + + /** + * Add a {@link Builder} to the current list of builders + * + * @param uuid The builder's unique ID + * @see #removeBuilder(Builder) + */ + void removeBuilder(UUID uuid); + + /** + * Get whether the world has been loaded, allowing a player to enter it. + * + * @return {@code true} if the world is loaded, otherwise {@code false} + */ + boolean isLoaded(); + + /** + * Unloads the world. + *

+ * In order for the world to be unloaded, the following criteria must be met: + *

    + *
  • There cannot be any players in the world
  • + *
  • The world is not allowed to be the spawn world
  • + *
  • The world is not allowed to be on the blacklist of worlds which cannot be unloaded
  • + *
+ */ + void unload(); + + /** + * Attempts to unload the world without checking if players are in the world. + *

+ * As with {@link #unload()}, in order for the world to be unloaded, the following criteria must be met: + *

    + *
  • The world is not allowed to be the spawn world
  • + *
  • The world is not allowed to be on the blacklist of worlds which cannot be unloaded
  • + *
+ * + * @param save Should chunks be saved before unloading + */ + void forceUnload(boolean save); + + /** + * Loads the world. + */ + void load(); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java new file mode 100644 index 00000000..4cc9cac6 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world; + +import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.api.world.generator.CustomGenerator; +import org.bukkit.Difficulty; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.bukkit.generator.ChunkGenerator; +import org.jetbrains.annotations.Nullable; + +public interface BuildWorldCreator { + + /** + * Sets the name of the world. + * + * @param name The world name + * @return The world creator object + */ + BuildWorldCreator setName(String name); + + /** + * Sets the creator of the world. + * + * @param creator The creator, may be {@code null} + * @return The world creator object + */ + BuildWorldCreator setCreator(@Nullable Builder creator); + + /** + * Sets the template which the world should be copied from. + *

+ * Only used if the world type is {@link WorldType#TEMPLATE} + * + * @param template The template name + * @return The creator object + */ + BuildWorldCreator setTemplate(String template); + + /** + * Sets the type of the world. + * + * @param type The world type + * @return The world creator object + */ + BuildWorldCreator setType(WorldType type); + + /** + * Sets the custom {@link ChunkGenerator} of the world. + * + * @param customGenerator The custom chunk generator + * @return The world creator object + */ + BuildWorldCreator setCustomGenerator(CustomGenerator customGenerator); + + BuildWorldCreator setPrivate(boolean privateWorld); + + BuildWorldCreator setDifficulty(Difficulty difficulty); + + BuildWorldCreator setCreationDate(long creationDate); + + /** + * Depending on the {@link BuildWorld}'s {@link WorldType}, the corresponding {@link World} will be generated in a different way. + * Then, if the creation of the world was successful and the config is set accordingly, the player is teleported to the world. + * + * @param player The player who is creating the world + */ + void createWorld(Player player); + + /** + * Imports an existing world as a {@link BuildWorld}. + * + * @param player The player who is importing the world + * @param teleport Should the player be teleported to the world after importing is finished + */ + void importWorld(Player player, boolean teleport); + + @Nullable + World generateBukkitWorld(); + + /** + * Generate the {@link World} linked to a {@link BuildWorld}. + * + * @param checkVersion Should the world version be checked + * @return The world object + */ + @Nullable + World generateBukkitWorld(boolean checkVersion); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java new file mode 100644 index 00000000..1dd1f20b --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world; + +import org.bukkit.entity.Player; + +import java.util.UUID; + +public interface Builder { + + /** + * Returns a unique and persistent id for the builder. + * Should be equal to the corresponding {@link Player}'s unique id. + * + * @return The uuid + * @see Player#getUniqueId() + */ + UUID getUuid(); + + /** + * Gets the name of the builder. + * + * @return The builder name + */ + String getName(); + + /** + * Sets the name of the builder. + * + * @param name The name to change to + */ + void setName(String name); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Visibility.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Visibility.java new file mode 100644 index 00000000..b74e628b --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Visibility.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world; + +public enum Visibility { + /** + * Public worlds are displayed in the world navigator. + */ + PUBLIC, + + /** + * Private worlds are displayed in an extra menu - the private world navigator. + */ + PRIVATE, + + /** + * Used for when the visibility of a world can be ignored. + */ + IGNORE; + + public static Visibility matchVisibility(boolean isPrivateWorld) { + return isPrivateWorld ? PRIVATE : PUBLIC; + } +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java new file mode 100644 index 00000000..4c62bd0e --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world; + +import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.api.world.generator.Generator; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.bukkit.generator.ChunkGenerator; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.Unmodifiable; + +import java.util.Collection; +import java.util.List; + +public interface WorldManager { + + /** + * Gets the {@link BuildWorld} by the given name. + * + * @param worldName The name of the world + * @return The world object if one was found, {@code null} otherwise + */ + BuildWorld getBuildWorld(String worldName); + + /** + * Gets the {@link BuildWorld} by the given {@link World}. + * + * @param world The bukkit world object + * @return The world object if one was found, {@code null} otherwise + */ + BuildWorld getBuildWorld(World world); + + /** + * Gets a list of all {@link BuildWorld}s. + * + * @return A list of all worlds + */ + @Unmodifiable + Collection getBuildWorlds(); + + /** + * Gets a list of all {@link BuildWorld}s created by the given player. + * + * @param player The player who created the world + * @return A list of all worlds created by the given player. + */ + List getBuildWorldsCreatedByPlayer(Player player); + + /** + * Gets a list of all {@link BuildWorld}s created by the given player. + * + * @param player The player who created the world + * @param visibility The visibility the world should have + * @return A list of all worlds created by the given player. + */ + List getBuildWorldsCreatedByPlayer(Player player, Visibility visibility); + + /** + * Checks if a world with the given name already exists. + * + * @param worldName The name of the world + * @return Whether if a world with the given name already exists + */ + boolean worldExists(String worldName); + + /** + * Change the name of a {@link BuildWorld} to a given name. + * + * @param buildWorld The build world object + * @param newName The name the world should be renamed to + */ + void renameWorld(BuildWorld buildWorld, String newName); + + /** + * Gets the {@link ChunkGenerator} for the generation of a {@link BuildWorld} with {@link WorldType#CUSTOM}. + * + * @param plugin The name of the plugin providing the generator + * @param generatorId Unique ID, if any, that was specified to indicate which generator was requested + * @param worldName Name of the world that the chunk generator should be applied to. + * @return The chunk generator for use in the world generation + */ + @Nullable + ChunkGenerator getChunkGenerator(String plugin, String generatorId, String worldName); + + /** + * Import a {@link BuildWorld} from a world directory. + * + * @param worldName The name of the world to import + * @param creator The builder who should be set as the creator + * @param generator The generator type used by the world + * @param generatorName The name of the custom generator if generator type is {@link Generator#CUSTOM} + * @return {@code true} if the world was successfully imported, otherwise {@code false} + */ + boolean importWorld(String worldName, Builder creator, Generator generator, String generatorName); + + /** + * Delete an existing {@link BuildWorld}. + * In comparison to {@link #unimportWorld(BuildWorld, boolean)}, deleting a world deletes the world's directory. + * + * @param buildWorld The world to be deleted + */ + void deleteWorld(BuildWorld buildWorld); + + /** + * Unimport an existing {@link BuildWorld}. + * In comparison to {@link #deleteWorld(BuildWorld)}, unimporting a world does not delete the world's directory. + * + * @param buildWorld The build world object + * @param save Should the world be saved before unimporting + */ + void unimportWorld(BuildWorld buildWorld, boolean save); + + /** + * Teleport a player to a {@link BuildWorld}. + * + * @param player The player to be teleported + * @param worldName The name of the world + */ + void teleport(Player player, String worldName); + + /** + * Checks if the provided player is allowed to enter the {@link BuildWorld}. + * + * @param player The player + * @param buildWorld The world + * @return {@code true} if the player is allowed to enter, otherwise {@code false} + */ + boolean canEnter(Player player, BuildWorld buildWorld); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java new file mode 100644 index 00000000..682ebda0 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world.data; + +import com.cryptomorin.xseries.XMaterial; +import de.eintosti.buildsystem.api.world.BuildWorld; +import org.bukkit.Difficulty; + +public interface WorldData { + + /** + * Gets the {@link BuildWorld}'s custom spawn in the format {@code x;y;z;yaw;pitch}. + * + * @return The custom spawn location as a string + */ + Type customSpawn(); + + /** + * Gets the permission needed to enter the {@link BuildWorld}. + * + * @return The permission + */ + Type permission(); + + /** + * Gets the project description of the {@link BuildWorld}. + * + * @return The project description + */ + Type project(); + + /** + * Gets the difficulty of the {@link BuildWorld}. + * + * @return The bukkit world's difficulty + */ + Type difficulty(); + + /** + * Gets the material used to display the {@link BuildWorld} in the navigator. + * + * @return The material + */ + Type material(); + + /** + * Gets the current status of the {@link BuildWorld}. + * + * @return The current status + */ + Type status(); + + /** + * Gets whether blocks can be broken in the {@link BuildWorld}. + * + * @return {@code true} if allowed, otherwise {@code false} + */ + Type blockBreaking(); + + /** + * Gets whether blocks interaction are enabled in the {@link BuildWorld}. + * + * @return {@code true} if enabled, otherwise {@code false} + */ + Type blockInteractions(); + + /** + * Gets whether blocks can be placed in the {@link BuildWorld}. + * + * @return {@code true} if allowed, otherwise {@code false} + */ + Type blockPlacement(); + + /** + * Gets whether the "builders feature" is enabled in the {@link BuildWorld}. + * + * @return {@code true} if enabled, otherwise {@code false} + */ + Type buildersEnabled(); + + /** + * Gets whether explosions are enabled in the {@link BuildWorld}. + * + * @return {@code true} if enabled, otherwise {@code false} + */ + Type explosions(); + + /** + * Gets whether entities have an AI in the {@link BuildWorld}. + * + * @return {@code true} if enabled, otherwise {@code false} + */ + Type mobAi(); + + /** + * Gets whether physics is applied to blocks in the {@link BuildWorld}. + * + * @return {@code true} if enabled, otherwise {@code false} + */ + Type physics(); + + /** + * Gets whether the visibility of the {@link BuildWorld} is set to private. + * + * @return {@code true} if private, otherwise {@code false} + */ + Type privateWorld(); + + /** + * Gets the timestamp of the last time the {@link BuildWorld} was last edited. + * + * @return The difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. + */ + Type lastEdited(); + + /** + * Gets the timestamp of the last time the {@link BuildWorld} was last loaded. + * + * @return The difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. + */ + Type lastLoaded(); + + /** + * Gets the timestamp of the last time the {@link BuildWorld} was last unloaded. + * + * @return The difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. + */ + Type lastUnloaded(); + + interface Type { + + /** + * Gets the current value. + * + * @return The current value + */ + T get(); + + /** + * Sets the current value. + * + * @param value The value to set to + */ + void set(T value); + } +} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldStatus.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java similarity index 81% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldStatus.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java index 0c360c41..827ac233 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldStatus.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java @@ -5,10 +5,9 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -package de.eintosti.buildsystem.world.data; +package de.eintosti.buildsystem.api.world.data; -import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.api.world.BuildWorld; public enum WorldStatus { /** @@ -43,11 +42,11 @@ public enum WorldStatus { */ HIDDEN("status_hidden", 6); - private final String typeNameKey; + private final String key; private final int stage; - WorldStatus(String typeNameKey, int stage) { - this.typeNameKey = typeNameKey; + WorldStatus(String key, int stage) { + this.key = key; this.stage = stage; } @@ -56,8 +55,8 @@ public enum WorldStatus { * * @return The type's display name */ - public String getName() { - return Messages.getString(typeNameKey); + public String getKey() { + return key; } /** diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldType.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java similarity index 81% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldType.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java index 8aa6270b..f8f268be 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldType.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java @@ -5,9 +5,8 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -package de.eintosti.buildsystem.world.data; +package de.eintosti.buildsystem.api.world.data; -import de.eintosti.buildsystem.Messages; import org.bukkit.World.Environment; public enum WorldType { @@ -61,10 +60,10 @@ public enum WorldType { */ UNKNOWN(null); - private final String typeNameKey; + private final String key; - WorldType(String typeNameKey) { - this.typeNameKey = typeNameKey; + WorldType(String key) { + this.key = key; } /** @@ -72,10 +71,7 @@ public enum WorldType { * * @return The type's display name */ - public String getName() { - if (typeNameKey == null) { - return "-"; - } - return Messages.getString(typeNameKey); + public String getKey() { + return key; } } \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java new file mode 100644 index 00000000..6ca789a4 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world.generator; + +import org.bukkit.generator.ChunkGenerator; + +public interface CustomGenerator { + + /** + * Gets the name of the chunk generator. + * + * @return The name + */ + String getName(); + + /** + * Gets the chunk generator. + * + * @return The chunk generator + */ + ChunkGenerator getChunkGenerator(); +} \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java new file mode 100644 index 00000000..f4abda4f --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api.world.generator; + +public enum Generator { + /** + * A normal world + */ + NORMAL, + + /** + * A flat world + */ + FLAT, + + /** + * A void world + */ + VOID, + + /** + * A custom world + */ + CUSTOM; +} \ No newline at end of file diff --git a/buildsystem-core/build.gradle.kts b/buildsystem-core/build.gradle.kts index fea4cc30..5fefc934 100644 --- a/buildsystem-core/build.gradle.kts +++ b/buildsystem-core/build.gradle.kts @@ -23,6 +23,7 @@ repositories { } dependencies { + api(project(":buildsystem-api")) project.project(":buildsystem-abstraction").subprojects.forEach { implementation(project(it.path)) } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystem.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java similarity index 92% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystem.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java index b51ca504..18f1ca4c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystem.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java @@ -7,6 +7,9 @@ */ package de.eintosti.buildsystem; +import de.eintosti.buildsystem.api.BuildSystem; +import de.eintosti.buildsystem.api.BuildSystemApi; +import de.eintosti.buildsystem.api.settings.NavigatorType; import de.eintosti.buildsystem.command.BackCommand; import de.eintosti.buildsystem.command.BlocksCommand; import de.eintosti.buildsystem.command.BuildCommand; @@ -34,14 +37,13 @@ import de.eintosti.buildsystem.navigator.inventory.NavigatorInventory; import de.eintosti.buildsystem.navigator.inventory.PrivateInventory; import de.eintosti.buildsystem.navigator.inventory.WorldsInventory; -import de.eintosti.buildsystem.navigator.settings.NavigatorType; import de.eintosti.buildsystem.player.BlocksInventory; -import de.eintosti.buildsystem.player.BuildPlayer; +import de.eintosti.buildsystem.player.BuildPlayerManager; +import de.eintosti.buildsystem.player.CraftBuildPlayer; import de.eintosti.buildsystem.player.LogoutLocation; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.DesignInventory; import de.eintosti.buildsystem.settings.NoClipManager; -import de.eintosti.buildsystem.settings.Settings; import de.eintosti.buildsystem.settings.SettingsInventory; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.settings.SpeedInventory; @@ -59,9 +61,9 @@ import de.eintosti.buildsystem.util.UpdateChecker; import de.eintosti.buildsystem.version.customblocks.CustomBlocks; import de.eintosti.buildsystem.version.gamerules.GameRules; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import de.eintosti.buildsystem.world.SpawnManager; -import de.eintosti.buildsystem.world.WorldManager; import de.eintosti.buildsystem.world.data.StatusInventory; import de.eintosti.buildsystem.world.modification.BuilderInventory; import de.eintosti.buildsystem.world.modification.CreateInventory; @@ -77,6 +79,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.PluginManager; +import org.bukkit.plugin.ServicePriority; import org.bukkit.plugin.java.JavaPlugin; import java.io.File; @@ -85,7 +88,7 @@ import java.util.concurrent.Callable; -public class BuildSystem extends JavaPlugin { +public class BuildSystemPlugin extends JavaPlugin { public static final int SPIGOT_ID = 60441; public static final int METRICS_ID = 7427; @@ -97,10 +100,10 @@ public class BuildSystem extends JavaPlugin { private ArmorStandManager armorStandManager; private InventoryUtils inventoryUtils; private NoClipManager noClipManager; - private PlayerManager playerManager; + private BuildPlayerManager playerManager; private SettingsManager settingsManager; private SpawnManager spawnManager; - private WorldManager worldManager; + private BuildWorldManager worldManager; private ArchiveInventory archiveInventory; private BlocksInventory blocksInventory; @@ -126,6 +129,8 @@ public class BuildSystem extends JavaPlugin { private LuckPermsExpansion luckPermsExpansion; private PlaceholderApiExpansion placeholderApiExpansion; + private BuildSystemApi api; + @Override public void onLoad() { createTemplateFolder(); @@ -135,15 +140,15 @@ public void onLoad() { @Override public void onEnable() { - this.getConfig().options().copyDefaults(true); - this.saveConfig(); + getConfig().options().copyDefaults(true); + saveConfig(); this.configValues = new ConfigValues(this); initClasses(); if (!initVersionedClasses()) { getLogger().severe("BuildSystem does not support your server version: " + versionString); getLogger().severe("Disabling plugin..."); - this.setEnabled(false); + setEnabled(false); return; } @@ -152,22 +157,25 @@ public void onEnable() { registerListeners(); registerExpansions(); - performUpdateCheck(); + this.worldManager.load(); + this.playerManager.load(); + this.spawnManager.load(); - worldManager.load(); - playerManager.load(); - spawnManager.load(); + this.api = new BuildSystemApi(this); + this.api.register(); + getServer().getServicesManager().register(BuildSystem.class, api, this, ServicePriority.Normal); Bukkit.getOnlinePlayers().forEach(pl -> { getSkullCache().cacheSkull(pl.getName()); - BuildPlayer buildPlayer = playerManager.createBuildPlayer(pl); - Settings settings = buildPlayer.getSettings(); + CraftBuildPlayer buildPlayer = playerManager.createBuildPlayer(pl); + CraftSettings settings = buildPlayer.getSettings(); settingsManager.startScoreboard(pl, settings); noClipManager.startNoClip(pl, settings); }); registerStats(); + performUpdateCheck(); Bukkit.getConsoleSender().sendMessage(ChatColor.RESET + "BuildSystem » Plugin " + ChatColor.GREEN + "enabled" + ChatColor.RESET + "!"); } @@ -175,7 +183,7 @@ public void onEnable() { @Override public void onDisable() { Bukkit.getOnlinePlayers().forEach(pl -> { - BuildPlayer buildPlayer = playerManager.getBuildPlayer(pl); + CraftBuildPlayer buildPlayer = playerManager.getBuildPlayer(pl); buildPlayer.getCachedValues().resetCachedValues(pl); buildPlayer.setLogoutLocation(new LogoutLocation(pl.getWorld().getName(), pl.getLocation())); @@ -195,6 +203,8 @@ public void onDisable() { unregisterExpansions(); + this.api.unregister(); + Bukkit.getConsoleSender().sendMessage(ChatColor.RESET + "BuildSystem » Plugin " + ChatColor.RED + "disabled" + ChatColor.RESET + "!"); } @@ -212,12 +222,12 @@ private boolean initVersionedClasses() { private void initClasses() { this.armorStandManager = new ArmorStandManager(); - this.playerManager = new PlayerManager(this); + this.playerManager = new BuildPlayerManager(this); this.inventoryUtils = new InventoryUtils(this); this.inventoryUtils.loadTypes(); this.inventoryUtils.loadStatus(); this.noClipManager = new NoClipManager(this); - this.worldManager = new WorldManager(this); + this.worldManager = new BuildWorldManager(this); this.settingsManager = new SettingsManager(this); this.spawnManager = new SpawnManager(this); @@ -409,7 +419,7 @@ public void reloadConfigData(boolean init) { if (init) { initVersionedClasses(); - worldManager.getBuildWorlds().forEach(BuildWorld::manageUnload); + worldManager.getCraftBuildWorlds().forEach(CraftBuildWorld::manageUnload); if (configValues.isScoreboard()) { getSettingsManager().startScoreboard(); } else { @@ -430,7 +440,7 @@ public InventoryUtils getInventoryUtil() { return inventoryUtils; } - public PlayerManager getPlayerManager() { + public BuildPlayerManager getPlayerManager() { return playerManager; } @@ -446,7 +456,7 @@ public SpawnManager getSpawnManager() { return spawnManager; } - public WorldManager getWorldManager() { + public BuildWorldManager getWorldManager() { return worldManager; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java index e2d650e2..ec952598 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java @@ -13,6 +13,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.FileOutputStream; @@ -33,7 +34,7 @@ public class Messages { private static YamlConfiguration config; public static void createMessageFile() { - JavaPlugin plugin = JavaPlugin.getPlugin(BuildSystem.class); + JavaPlugin plugin = JavaPlugin.getPlugin(BuildSystemPlugin.class); File file = new File(plugin.getDataFolder(), "messages.yml"); try { if (file.createNewFile()) { @@ -888,7 +889,11 @@ private static String getPrefix() { } @SafeVarargs - public static void sendMessage(CommandSender sender, String key, Map.Entry... placeholders) { + public static void sendMessage(@Nullable CommandSender sender, String key, Map.Entry... placeholders) { + if (sender == null) { + return; + } + String message = getString(key, placeholders); if (!message.isEmpty()) { sender.sendMessage(message); @@ -921,9 +926,16 @@ private static String replacePlaceHolders(String query, Map.Entry 0 - ? new SimpleDateFormat(JavaPlugin.getPlugin(BuildSystem.class).getConfigValues().getDateFormat()).format(millis) + ? new SimpleDateFormat(JavaPlugin.getPlugin(BuildSystemPlugin.class).getConfigValues().getDateFormat()).format(millis) : "-"; } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java new file mode 100644 index 00000000..55984588 --- /dev/null +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2023, Thomas Meaney + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ +package de.eintosti.buildsystem.api; + +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.player.PlayerManager; +import de.eintosti.buildsystem.api.world.WorldManager; + +public class BuildSystemApi implements BuildSystem { + + private final BuildSystemPlugin plugin; + + public BuildSystemApi(BuildSystemPlugin plugin) { + this.plugin = plugin; + } + + @Override + public WorldManager getWorldManager() { + return plugin.getWorldManager(); + } + + @Override + public PlayerManager getPlayerManager() { + return plugin.getPlayerManager(); + } + + public void register() { + BuildSystemProvider.register(this); + } + + public void unregister() { + BuildSystemProvider.unregister(); + } +} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java index 3bd97177..77f0157b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java @@ -7,10 +7,10 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.player.BuildPlayer; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.player.BuildPlayerManager; +import de.eintosti.buildsystem.player.CraftBuildPlayer; import io.papermc.lib.PaperLib; import org.bukkit.Location; import org.bukkit.command.Command; @@ -23,10 +23,10 @@ public class BackCommand implements CommandExecutor { - private final BuildSystem plugin; - private final PlayerManager playerManager; + private final BuildSystemPlugin plugin; + private final BuildPlayerManager playerManager; - public BackCommand(BuildSystem plugin) { + public BackCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.playerManager = plugin.getPlayerManager(); plugin.getCommand("back").setExecutor(this); @@ -56,7 +56,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N private void teleportBack(Player player) { UUID playerUuid = player.getUniqueId(); - BuildPlayer buildPlayer = playerManager.getBuildPlayer(playerUuid); + CraftBuildPlayer buildPlayer = playerManager.getBuildPlayer(playerUuid); Location previousLocation = buildPlayer.getPreviousLocation(); if (previousLocation == null) { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java index 9303a6c0..741a95a4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -17,9 +17,9 @@ public class BlocksCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public BlocksCommand(BuildSystem plugin) { + public BlocksCommand(BuildSystemPlugin plugin) { this.plugin = plugin; plugin.getCommand("blocks").setExecutor(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java index 141fda2e..9c8e99ce 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java @@ -8,11 +8,11 @@ package de.eintosti.buildsystem.command; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.player.BuildPlayer; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CachedValues; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.player.CraftBuildPlayer; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.command.Command; @@ -26,10 +26,10 @@ public class BuildCommand implements CommandExecutor { - private final BuildSystem plugin; - private final PlayerManager playerManager; + private final BuildSystemPlugin plugin; + private final BuildPlayerManager playerManager; - public BuildCommand(BuildSystem plugin) { + public BuildCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.playerManager = plugin.getPlayerManager(); plugin.getCommand("build").setExecutor(this); @@ -81,7 +81,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N private void toggleBuildMode(Player target, Player sender, boolean self) { UUID targetUuid = target.getUniqueId(); - BuildPlayer buildPlayer = playerManager.getBuildPlayer(targetUuid); + CraftBuildPlayer buildPlayer = playerManager.getBuildPlayer(targetUuid); CachedValues cachedValues = buildPlayer.getCachedValues(); if (playerManager.getBuildModePlayers().remove(targetUuid)) { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java index c93b9e64..70a008ba 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.command; import com.google.common.collect.Lists; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.command.Command; @@ -21,9 +21,9 @@ public class BuildSystemCommand extends PagedCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public BuildSystemCommand(BuildSystem plugin) { + public BuildSystemCommand(BuildSystemPlugin plugin) { super("buildsystem_permission", "buildsystem_title_with_page"); this.plugin = plugin; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java index a57f0aad..5614a330 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -16,9 +16,9 @@ public class ConfigCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public ConfigCommand(BuildSystem plugin) { + public ConfigCommand(BuildSystemPlugin plugin) { this.plugin = plugin; plugin.getCommand("config").setExecutor(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java index e1f581de..72eb9999 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java @@ -7,11 +7,11 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.command.Command; @@ -24,10 +24,10 @@ public class ExplosionsCommand implements CommandExecutor { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; - public ExplosionsCommand(BuildSystem plugin) { + public ExplosionsCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); plugin.getCommand("explosions").setExecutor(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java index 22522d51..6298b2a4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import org.bukkit.Bukkit; import org.bukkit.GameMode; @@ -21,9 +21,9 @@ public class GamemodeCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public GamemodeCommand(BuildSystem plugin) { + public GamemodeCommand(BuildSystemPlugin plugin) { this.plugin = plugin; plugin.getCommand("gamemode").setExecutor(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java index 86f4a41f..091e81ca 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java @@ -7,12 +7,12 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.util.EntityAIManager; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.command.Command; @@ -27,10 +27,10 @@ public class NoAICommand implements CommandExecutor { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; - public NoAICommand(BuildSystem plugin) { + public NoAICommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); plugin.getCommand("noai").setExecutor(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java index 33cb88d5..f3aaead4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java @@ -7,11 +7,11 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.command.Command; @@ -24,10 +24,10 @@ public class PhysicsCommand implements CommandExecutor { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; - public PhysicsCommand(BuildSystem plugin) { + public PhysicsCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); plugin.getCommand("physics").setExecutor(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java index 0207eb3f..c54756cf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -17,9 +17,9 @@ public class SettingsCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public SettingsCommand(BuildSystem plugin) { + public SettingsCommand(BuildSystemPlugin plugin) { this.plugin = plugin; plugin.getCommand("settings").setExecutor(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java index dd66537f..5d60390f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -17,9 +17,9 @@ public class SetupCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public SetupCommand(BuildSystem plugin) { + public SetupCommand(BuildSystemPlugin plugin) { this.plugin = plugin; plugin.getCommand("setup").setExecutor(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java index 3452e20e..8f78d497 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.command.Command; @@ -21,10 +21,10 @@ public class SkullCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public SkullCommand(BuildSystem plugin) { + public SkullCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getCommand("skull").setExecutor(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java index be92a503..214b6e9d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java @@ -7,11 +7,11 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.SpawnManager; -import de.eintosti.buildsystem.world.WorldManager; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.command.Command; @@ -24,11 +24,11 @@ public class SpawnCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final SpawnManager spawnManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public SpawnCommand(BuildSystem plugin) { + public SpawnCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.spawnManager = plugin.getSpawnManager(); this.worldManager = plugin.getWorldManager(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java index 0305ed21..6d0d9f79 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.command; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -20,9 +20,9 @@ public class SpeedCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public SpeedCommand(BuildSystem plugin) { + public SpeedCommand(BuildSystemPlugin plugin) { this.plugin = plugin; plugin.getCommand("speed").setExecutor(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java index 7a67489b..83fb6793 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java @@ -7,10 +7,10 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.config.ConfigValues; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.command.Command; @@ -23,11 +23,11 @@ public class TimeCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public TimeCommand(BuildSystem plugin) { + public TimeCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); this.worldManager = plugin.getWorldManager(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java index 5dbf4604..36fc04c7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java @@ -7,9 +7,9 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import io.papermc.lib.PaperLib; import org.bukkit.Location; import org.bukkit.World; @@ -24,10 +24,10 @@ public class TopCommand implements CommandExecutor { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; - public TopCommand(BuildSystem plugin) { + public TopCommand(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); plugin.getCommand("top").setExecutor(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java index b5867981..172c5290 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.command; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.command.subcommand.worlds.*; @@ -21,9 +21,9 @@ public class WorldsCommand implements CommandExecutor { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public WorldsCommand(BuildSystem plugin) { + public WorldsCommand(BuildSystemPlugin plugin) { this.plugin = plugin; plugin.getCommand("worlds").setExecutor(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java index cf9574d7..4ab95b32 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java @@ -8,16 +8,16 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.Builder; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuilder; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -26,17 +26,17 @@ public class AddBuilderSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public AddBuilderSubCommand(BuildSystem plugin, String worldName) { + public AddBuilderSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -65,7 +65,7 @@ public void getAddBuilderInput(Player player, BuildWorld buildWorld, boolean clo new PlayerChatInput(plugin, player, "enter_player_name", input -> { String builderName = input.trim(); Player builderPlayer = Bukkit.getPlayerExact(builderName); - Builder builder; + CraftBuilder builder; UUID builderId; if (builderPlayer == null) { @@ -75,9 +75,9 @@ public void getAddBuilderInput(Player player, BuildWorld buildWorld, boolean clo player.closeInventory(); return; } - builder = new Builder(builderId, builderName); + builder = new CraftBuilder(builderId, builderName); } else { - builder = new Builder(builderPlayer); + builder = new CraftBuilder(builderPlayer); builderId = builderPlayer.getUniqueId(); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java index 8365c57c..8476b1d5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java @@ -7,28 +7,28 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.entity.Player; public class BuildersSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public BuildersSubCommand(BuildSystem plugin, String worldName) { + public BuildersSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -39,7 +39,7 @@ public void execute(Player player, String[] args) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { Messages.sendMessage(player, "worlds_builders_unknown_world"); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java index 0cd6754a..39aec856 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java @@ -7,28 +7,28 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.entity.Player; public class DeleteSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public DeleteSubCommand(BuildSystem plugin, String worldName) { + public DeleteSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -39,7 +39,7 @@ public void execute(Player player, String[] args) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { Messages.sendMessage(player, "worlds_delete_unknown_world"); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java index 722276a1..7332acab 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java @@ -9,28 +9,28 @@ import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.entity.Player; public class EditSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public EditSubCommand(BuildSystem plugin, String worldName) { + public EditSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -41,7 +41,7 @@ public void execute(Player player, String[] args) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { Messages.sendMessage(player, "worlds_edit_unknown_world"); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java index f8088623..808e9006 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java @@ -7,16 +7,16 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.generator.Generator; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.ArgumentParser; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.Builder; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.generator.Generator; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuilder; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -25,9 +25,9 @@ public class ImportAllSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public ImportAllSubCommand(BuildSystem plugin) { + public ImportAllSubCommand(BuildSystemPlugin plugin) { this.plugin = plugin; } @@ -43,7 +43,7 @@ public void execute(Player player, String[] args) { return; } - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (worldManager.isImportingAllWorlds()) { Messages.sendMessage(player, "worlds_importall_already_started"); return; @@ -70,7 +70,7 @@ public void execute(Player player, String[] args) { ArgumentParser parser = new ArgumentParser(args); Generator generator = Generator.VOID; - Builder builder = new Builder(null, "-"); + CraftBuilder builder = new CraftBuilder(null, "-"); if (parser.isArgument("g")) { String generatorArg = parser.getValue("g"); @@ -95,7 +95,7 @@ public void execute(Player player, String[] args) { Messages.sendMessage(player, "worlds_importall_player_not_found"); return; } - builder = new Builder(creatorId, creatorArg); + builder = new CraftBuilder(creatorId, creatorArg); } worldManager.importWorlds(player, directories, generator, builder); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java index d369e037..a91ddac4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java @@ -7,17 +7,17 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.generator.Generator; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.ArgumentParser; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.Builder; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.generator.Generator; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuilder; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -28,10 +28,10 @@ public class ImportSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public ImportSubCommand(BuildSystem plugin, String worldName) { + public ImportSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @@ -48,7 +48,7 @@ public void execute(Player player, String[] args) { return; } - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld != null) { Messages.sendMessage(player, "worlds_import_world_is_imported"); @@ -74,7 +74,7 @@ public void execute(Player player, String[] args) { return; } - Builder creator = new Builder(null, "-"); + CraftBuilder creator = new CraftBuilder(null, "-"); Generator generator = Generator.VOID; String generatorName = null; @@ -106,7 +106,7 @@ public void execute(Player player, String[] args) { Messages.sendMessage(player, "worlds_import_player_not_found"); return; } - creator = new Builder(creatorId, creatorArg); + creator = new CraftBuilder(creatorId, creatorArg); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java index 897934ee..be112fe0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java @@ -7,14 +7,15 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -23,17 +24,17 @@ public class InfoSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public InfoSubCommand(BuildSystem plugin, String worldName) { + public InfoSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -44,7 +45,7 @@ public void execute(Player player, String[] args) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { Messages.sendMessage(player, "worlds_info_unknown_world"); return; @@ -56,13 +57,13 @@ public void execute(Player player, String[] args) { new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName()), new AbstractMap.SimpleEntry<>("%creator%", buildWorld.getCreator()), new AbstractMap.SimpleEntry<>("%item%", worldData.material().get().name()), - new AbstractMap.SimpleEntry<>("%type%", buildWorld.getType().getName()), + new AbstractMap.SimpleEntry<>("%type%", Messages.getDataString(buildWorld.getType().getKey())), new AbstractMap.SimpleEntry<>("%private%", worldData.privateWorld().get()), new AbstractMap.SimpleEntry<>("%builders_enabled%", worldData.buildersEnabled().get()), new AbstractMap.SimpleEntry<>("%builders%", buildWorld.getBuildersInfo()), new AbstractMap.SimpleEntry<>("%block_breaking%", worldData.blockBreaking().get()), new AbstractMap.SimpleEntry<>("%block_placement%", worldData.blockPlacement().get()), - new AbstractMap.SimpleEntry<>("%status%", worldData.status().get().getName()), + new AbstractMap.SimpleEntry<>("%status%", Messages.getDataString(worldData.status().get().getKey())), new AbstractMap.SimpleEntry<>("%project%", worldData.project().get()), new AbstractMap.SimpleEntry<>("%permission%", worldData.permission().get()), new AbstractMap.SimpleEntry<>("%time%", buildWorld.getWorldTime()), diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java index 4e83944e..15dd58bf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; @@ -16,9 +16,9 @@ public class ItemSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public ItemSubCommand(BuildSystem plugin) { + public ItemSubCommand(BuildSystemPlugin plugin) { this.plugin = plugin; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java index 20e3a392..6da86984 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java @@ -8,15 +8,15 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -25,17 +25,17 @@ public class RemoveBuilderSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public RemoveBuilderSubCommand(BuildSystem plugin, String worldName) { + public RemoveBuilderSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java index 89362aeb..2674b4d6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java @@ -7,28 +7,28 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; import java.util.AbstractMap; public class RemoveSpawnSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public RemoveSpawnSubCommand(BuildSystem plugin) { + public RemoveSpawnSubCommand(BuildSystemPlugin plugin) { this.plugin = plugin; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); String playerWorldName = player.getWorld().getName(); if (!worldManager.isPermitted(player, getArgument().getPermission(), playerWorldName)) { plugin.sendPermissionMessage(player); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java index 91c6a72c..eebc7557 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java @@ -8,29 +8,29 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; public class RenameSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public RenameSubCommand(BuildSystem plugin, String worldName) { + public RenameSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java index 40550fa4..5d60fd0e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java @@ -8,32 +8,32 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; import java.util.AbstractMap; public class SetCreatorSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public SetCreatorSubCommand(BuildSystem plugin, String worldName) { + public SetCreatorSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java index 9dcc78b3..080db4d9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java @@ -8,13 +8,13 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -23,17 +23,17 @@ public class SetItemSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public SetItemSubCommand(BuildSystem plugin, String worldName) { + public SetItemSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java index a64f53d1..1301d66d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java @@ -8,31 +8,31 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.entity.Player; import java.util.AbstractMap; public class SetPermissionSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public SetPermissionSubCommand(BuildSystem plugin, String worldName) { + public SetPermissionSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -43,7 +43,7 @@ public void execute(Player player, String[] args) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { Messages.sendMessage(player, "worlds_setpermission_unknown_world"); return; @@ -52,7 +52,7 @@ public void execute(Player player, String[] args) { getPermissionInput(player, buildWorld, true); } - public void getPermissionInput(Player player, BuildWorld buildWorld, boolean closeInventory) { + public void getPermissionInput(Player player, CraftBuildWorld buildWorld, boolean closeInventory) { new PlayerChatInput(plugin, player, "enter_world_permission", input -> { buildWorld.getData().permission().set(input.trim()); plugin.getPlayerManager().forceUpdateSidebar(buildWorld); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java index 5fb47d6f..07b724a7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java @@ -8,31 +8,31 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.entity.Player; import java.util.AbstractMap; public class SetProjectSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public SetProjectSubCommand(BuildSystem plugin, String worldName) { + public SetProjectSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -43,7 +43,7 @@ public void execute(Player player, String[] args) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { Messages.sendMessage(player, "worlds_setproject_unknown_world"); return; @@ -52,7 +52,7 @@ public void execute(Player player, String[] args) { getProjectInput(player, buildWorld, true); } - public void getProjectInput(Player player, BuildWorld buildWorld, boolean closeInventory) { + public void getProjectInput(Player player, CraftBuildWorld buildWorld, boolean closeInventory) { new PlayerChatInput(plugin, player, "enter_world_project", input -> { buildWorld.getData().project().set(input.trim()); plugin.getPlayerManager().forceUpdateSidebar(buildWorld); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java index 1ffd35c4..7bdc08bb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java @@ -7,13 +7,13 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -21,15 +21,15 @@ public class SetSpawnSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public SetSpawnSubCommand(BuildSystem plugin) { + public SetSpawnSubCommand(BuildSystemPlugin plugin) { this.plugin = plugin; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); String playerWorldName = player.getWorld().getName(); if (!worldManager.isPermitted(player, getArgument().getPermission(), playerWorldName)) { plugin.sendPermissionMessage(player); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java index f4865502..f72ea238 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java @@ -7,28 +7,28 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.entity.Player; public class SetStatusSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public SetStatusSubCommand(BuildSystem plugin, String worldName) { + public SetStatusSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; @@ -39,7 +39,7 @@ public void execute(Player player, String[] args) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { Messages.sendMessage(player, "worlds_setstatus_unknown_world"); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java index fc353af3..b1ac6484 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java @@ -7,22 +7,22 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.entity.Player; public class TeleportSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public TeleportSubCommand(BuildSystem plugin) { + public TeleportSubCommand(BuildSystemPlugin plugin) { this.plugin = plugin; } @@ -38,8 +38,8 @@ public void execute(Player player, String[] args) { return; } - WorldManager worldManager = plugin.getWorldManager(); - BuildWorld buildWorld = worldManager.getBuildWorld(args[1]); + BuildWorldManager worldManager = plugin.getWorldManager(); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(args[1]); if (buildWorld == null) { Messages.sendMessage(player, "worlds_tp_unknown_world"); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java index 1a25962a..c0bed7f4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java @@ -7,30 +7,30 @@ */ package de.eintosti.buildsystem.command.subcommand.worlds; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; import java.util.AbstractMap; public class UnimportSubCommand implements SubCommand { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final String worldName; - public UnimportSubCommand(BuildSystem plugin, String worldName) { + public UnimportSubCommand(BuildSystemPlugin plugin, String worldName) { this.plugin = plugin; this.worldName = worldName; } @Override public void execute(Player player, String[] args) { - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); if (!worldManager.isPermitted(player, getArgument().getPermission(), worldName)) { plugin.sendPermissionMessage(player); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java index 457f2d0b..d957a2cb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java @@ -8,7 +8,8 @@ package de.eintosti.buildsystem.config; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.Visibility; import org.bukkit.Difficulty; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; @@ -22,7 +23,7 @@ public class ConfigValues { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private String dateFormat; private String timeUntilUnload; @@ -66,7 +67,7 @@ public class ConfigValues { private Map defaultGameRules; private Set blackListedWorldsToUnload; - public ConfigValues(BuildSystem plugin) { + public ConfigValues(BuildSystemPlugin plugin) { this.plugin = plugin; setConfigValues(); } @@ -297,8 +298,15 @@ public int getImportDelay() { return importDelay; } - public int getMaxWorldAmount(boolean privateWorld) { - return privateWorld ? maxPrivateWorldAmount : maxPublicWorldAmount; + public int getMaxWorldAmount(Visibility visibility) { + switch (visibility) { + case PUBLIC: + return maxPublicWorldAmount; + case PRIVATE: + return maxPrivateWorldAmount; + default: + throw new IllegalArgumentException("Invalid visibility. Use PUBLIC or PRIVATE"); + } } public Map getDefaultGameRules() { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java index 4af6c133..17cb75f0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.config; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; @@ -20,7 +20,7 @@ public abstract class ConfigurationFile { private final File file; private final FileConfiguration configuration; - public ConfigurationFile(BuildSystem plugin, String fileName) { + public ConfigurationFile(BuildSystemPlugin plugin, String fileName) { this.file = new File(plugin.getDataFolder(), fileName); this.configuration = YamlConfiguration.loadConfiguration(file); loadFile(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java index 50558dfc..748f0fea 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java @@ -7,18 +7,18 @@ */ package de.eintosti.buildsystem.config; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.player.BuildPlayer; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.player.CraftBuildPlayer; import java.util.Collection; public class PlayersConfig extends ConfigurationFile { - public PlayersConfig(BuildSystem plugin) { + public PlayersConfig(BuildSystemPlugin plugin) { super(plugin, "players.yml"); } - public void savePlayers(Collection buildPlayers) { + public void savePlayers(Collection buildPlayers) { buildPlayers.forEach(buildPlayer -> getFile().set("players." + buildPlayer.getUniqueId().toString(), buildPlayer.serialize())); saveFile(); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java index 9b61175f..01fb6a8f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java @@ -8,13 +8,13 @@ package de.eintosti.buildsystem.config; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.data.WorldStatus; -import de.eintosti.buildsystem.world.data.WorldType; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.api.world.data.WorldType; public class SetupConfig extends ConfigurationFile { - public SetupConfig(BuildSystem plugin) { + public SetupConfig(BuildSystemPlugin plugin) { super(plugin, "setup.yml"); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java index f6a08944..87188c8b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java @@ -7,12 +7,12 @@ */ package de.eintosti.buildsystem.config; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.Location; public class SpawnConfig extends ConfigurationFile { - public SpawnConfig(BuildSystem plugin) { + public SpawnConfig(BuildSystemPlugin plugin) { super(plugin, "spawn.yml"); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java index b2b1c0af..0c2ba138 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java @@ -8,11 +8,12 @@ package de.eintosti.buildsystem.config; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.BuildWorldCreator; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; +import de.eintosti.buildsystem.world.CraftBuildWorldCreator; import org.bukkit.World; import java.util.ArrayList; @@ -22,19 +23,19 @@ public class WorldConfig extends ConfigurationFile { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; - public WorldConfig(BuildSystem plugin) { + public WorldConfig(BuildSystemPlugin plugin) { super(plugin, "worlds.yml"); this.plugin = plugin; } - public void saveWorlds(Collection buildWorlds) { + public void saveWorlds(Collection buildWorlds) { buildWorlds.forEach(buildWorld -> getFile().set("worlds." + buildWorld.getName(), buildWorld.serialize())); saveFile(); } - public void loadWorlds(WorldManager worldManager) { + public void loadWorlds(BuildWorldManager worldManager) { Logger logger = plugin.getLogger(); if (plugin.getConfigValues().isUnloadWorlds()) { logger.info("*** \"Unload worlds\" has been enabled in the config. Therefore worlds will not be pre-loaded ***"); @@ -46,7 +47,7 @@ public void loadWorlds(WorldManager worldManager) { List notLoaded = new ArrayList<>(); worldManager.getBuildWorlds().forEach(buildWorld -> { String worldName = buildWorld.getName(); - World world = new BuildWorldCreator(plugin, buildWorld).generateBukkitWorld(); + World world = new CraftBuildWorldCreator(plugin, buildWorld).generateBukkitWorld(); if (world == null) { notLoaded.add(buildWorld); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java index a78dd603..1931fd5e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java @@ -19,7 +19,7 @@ */ public class PlayerInventoryClearEvent extends PlayerEvent { - private static final HandlerList HANDLERS = new HandlerList(); + private static final HandlerList HANDLER_LIST = new HandlerList(); private final List navigatorSlots; @@ -28,10 +28,6 @@ public PlayerInventoryClearEvent(Player player, List navigatorSlots) { this.navigatorSlots = navigatorSlots; } - public static HandlerList getHandlerList() { - return HANDLERS; - } - public List getNavigatorSlots() { return navigatorSlots; } @@ -39,6 +35,10 @@ public List getNavigatorSlots() { @NotNull @Override public HandlerList getHandlers() { - return HANDLERS; + return HANDLER_LIST; + } + + public static HandlerList getHandlerList() { + return HANDLER_LIST; } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldEvent.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldEvent.java deleted file mode 100644 index 38295b85..00000000 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldEvent.java +++ /dev/null @@ -1,34 +0,0 @@ -package de.eintosti.buildsystem.event.world; - -import de.eintosti.buildsystem.world.BuildWorld; -import org.bukkit.event.Event; -import org.bukkit.event.HandlerList; -import org.jetbrains.annotations.NotNull; - -/** - * Represents a {@link BuildWorld} related event. - */ -public class BuildWorldEvent extends Event { - - private static final HandlerList HANDLERS = new HandlerList(); - - private final BuildWorld buildWorld; - - public BuildWorldEvent(BuildWorld buildWorld) { - this.buildWorld = buildWorld; - } - - public static HandlerList getHandlerList() { - return HANDLERS; - } - - public BuildWorld getBuildWorld() { - return buildWorld; - } - - @NotNull - @Override - public HandlerList getHandlers() { - return HANDLERS; - } -} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostLoadEvent.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostLoadEvent.java deleted file mode 100644 index 0140dcc5..00000000 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostLoadEvent.java +++ /dev/null @@ -1,13 +0,0 @@ -package de.eintosti.buildsystem.event.world; - -import de.eintosti.buildsystem.world.BuildWorld; - -/** - * Called after a {@link BuildWorld} has loaded. - */ -public class BuildWorldPostLoadEvent extends BuildWorldEvent { - - public BuildWorldPostLoadEvent(BuildWorld buildWorld) { - super(buildWorld); - } -} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostUnloadEvent.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostUnloadEvent.java deleted file mode 100644 index fcc977bc..00000000 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/world/BuildWorldPostUnloadEvent.java +++ /dev/null @@ -1,13 +0,0 @@ -package de.eintosti.buildsystem.event.world; - -import de.eintosti.buildsystem.world.BuildWorld; - -/** - * Called after a {@link BuildWorld} has unloaded. - */ -public class BuildWorldPostUnloadEvent extends BuildWorldEvent { - - public BuildWorldPostUnloadEvent(BuildWorld buildWorld) { - super(buildWorld); - } -} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java index 45995579..24c740ee 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.expansion.luckperms; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.expansion.luckperms.calculators.BuildModeCalculator; import de.eintosti.buildsystem.expansion.luckperms.calculators.RoleCalculator; import net.luckperms.api.LuckPerms; @@ -21,11 +21,11 @@ public class LuckPermsExpansion { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ContextManager contextManager; private final List> registeredCalculators; - public LuckPermsExpansion(BuildSystem plugin) { + public LuckPermsExpansion(BuildSystemPlugin plugin) { LuckPerms luckPerms = plugin.getServer().getServicesManager().load(LuckPerms.class); if (luckPerms == null) { throw new IllegalStateException("LuckPerms API not loaded."); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java index 1314315d..7ca171d3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java @@ -7,8 +7,8 @@ */ package de.eintosti.buildsystem.expansion.luckperms.calculators; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.player.BuildPlayerManager; import net.luckperms.api.context.ContextCalculator; import net.luckperms.api.context.ContextConsumer; import net.luckperms.api.context.ContextSet; @@ -21,9 +21,9 @@ public class BuildModeCalculator implements ContextCalculator { private static final String KEY = "buildsystem:build-mode"; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; - public BuildModeCalculator(BuildSystem plugin) { + public BuildModeCalculator(BuildSystemPlugin plugin) { this.playerManager = plugin.getPlayerManager(); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java index 92dbb4bc..67d3da66 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java @@ -7,9 +7,10 @@ */ package de.eintosti.buildsystem.expansion.luckperms.calculators; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import net.luckperms.api.context.ContextCalculator; import net.luckperms.api.context.ContextConsumer; import net.luckperms.api.context.ContextSet; @@ -22,9 +23,9 @@ public class RoleCalculator implements ContextCalculator { private static final String KEY = "buildsystem:role"; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public RoleCalculator(BuildSystem plugin) { + public RoleCalculator(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); } @@ -46,17 +47,17 @@ public ContextSet estimatePotentialContexts() { private enum Role { /** - * The creator of a {@link BuildWorld}. + * The creator of a {@link CraftBuildWorld}. */ CREATOR, /** - * A player which has been added to the list of trusted players and is therefore allowed to build in a {@link BuildWorld}. + * A player which has been added to the list of trusted players and is therefore allowed to build in a {@link CraftBuildWorld}. */ BUILDER, /** - * A player which is neither the {@link #CREATOR} nor a {@link #BUILDER} in a {@link BuildWorld}. + * A player which is neither the {@link #CREATOR} nor a {@link #BUILDER} in a {@link CraftBuildWorld}. */ GUEST; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java index 04bf81cb..eb4be9a0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java @@ -7,13 +7,13 @@ */ package de.eintosti.buildsystem.expansion.placeholderapi; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import me.clip.placeholderapi.expansion.PlaceholderExpansion; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; @@ -23,11 +23,11 @@ public class PlaceholderApiExpansion extends PlaceholderExpansion { private static final String SETTINGS_KEY = "settings"; - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final SettingsManager settingsManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public PlaceholderApiExpansion(BuildSystem plugin) { + public PlaceholderApiExpansion(BuildSystemPlugin plugin) { this.plugin = plugin; this.settingsManager = plugin.getSettingsManager(); this.worldManager = plugin.getWorldManager(); @@ -126,7 +126,7 @@ public String onPlaceholderRequest(Player player, @NotNull String identifier) { */ @Nullable private String parseSettingsPlaceholder(Player player, String identifier) { - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); String settingIdentifier = identifier.split("_")[1]; switch (settingIdentifier.toLowerCase()) { @@ -186,7 +186,7 @@ private String parseBuildWorldPlaceholder(Player player, String identifier) { identifier = splitString[0]; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { return "-"; } @@ -232,11 +232,11 @@ private String parseBuildWorldPlaceholder(Player player, String identifier) { case "spawn": return worldData.customSpawn().get(); case "status": - return worldData.status().get().getName(); + return Messages.getDataString(worldData.status().get().getKey()); case "time": return buildWorld.getWorldTime(); case "type": - return buildWorld.getType().getName(); + return Messages.getDataString(buildWorld.getType().getKey()); case "world": return buildWorld.getName(); default: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java index 0a31f34f..3434c974 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.internal; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.version.customblocks.CustomBlocks; import de.eintosti.buildsystem.version.gamerules.GameRules; @@ -52,7 +52,7 @@ public enum ServerVersion { private final Class customBlocks; private final Class gameRules; - private final BuildSystem plugin = JavaPlugin.getPlugin(BuildSystem.class); + private final BuildSystemPlugin plugin = JavaPlugin.getPlugin(BuildSystemPlugin.class); ServerVersion(int dataVersion, Class customBlocks, Class gameRules) { this.dataVersion = dataVersion; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java index 337adb85..45bf3941 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.util.RGBUtils; import org.bukkit.ChatColor; import org.bukkit.entity.Player; @@ -17,7 +17,7 @@ public class AsyncPlayerChatListener implements Listener { - public AsyncPlayerChatListener(BuildSystem plugin) { + public AsyncPlayerChatListener(BuildSystemPlugin plugin) { plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java index 522f26ea..af192b24 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java @@ -7,14 +7,14 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.player.BuildPlayer; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.player.BuildPlayerManager; +import de.eintosti.buildsystem.player.CraftBuildPlayer; import de.eintosti.buildsystem.player.LogoutLocation; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.settings.Settings; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.settings.CraftSettings; +import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.SpawnManager; -import de.eintosti.buildsystem.world.WorldManager; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -24,12 +24,12 @@ public class AsyncPlayerPreLoginListener implements Listener { - private final BuildSystem plugin; - private final PlayerManager playerManager; + private final BuildSystemPlugin plugin; + private final BuildPlayerManager playerManager; private final SpawnManager spawnManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public AsyncPlayerPreLoginListener(BuildSystem plugin) { + public AsyncPlayerPreLoginListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.playerManager = plugin.getPlayerManager(); this.spawnManager = plugin.getSpawnManager(); @@ -40,12 +40,12 @@ public AsyncPlayerPreLoginListener(BuildSystem plugin) { @EventHandler public void onAsyncPlayerPreLogin(AsyncPlayerPreLoginEvent event) { UUID uuid = event.getUniqueId(); - BuildPlayer buildPlayer = playerManager.getBuildPlayer(uuid); + CraftBuildPlayer buildPlayer = playerManager.getBuildPlayer(uuid); if (buildPlayer == null) { return; } - Settings settings = buildPlayer.getSettings(); + CraftSettings settings = buildPlayer.getSettings(); if (settings.isSpawnTeleport() && spawnManager.spawnExists()) { return; } @@ -59,7 +59,7 @@ public void onAsyncPlayerPreLogin(AsyncPlayerPreLoginEvent event) { if (buildWorld == null) { buildPlayer.setLogoutLocation(null); } else { - Bukkit.getScheduler().runTask(plugin, () -> buildWorld.load()); + Bukkit.getScheduler().runTask(plugin, buildWorld::load); } } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java index 13ab26d8..f539627c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java @@ -8,9 +8,9 @@ package de.eintosti.buildsystem.listener; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.block.Block; @@ -36,9 +36,9 @@ public class BlockPhysicsListener implements Listener { - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public BlockPhysicsListener(BuildSystem plugin) { + public BlockPhysicsListener(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java index b1c767a4..627014e8 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java @@ -8,11 +8,11 @@ package de.eintosti.buildsystem.listener; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.version.customblocks.CustomBlock; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -25,12 +25,12 @@ public class BlockPlaceListener implements Listener { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; private final Map blockLookup; - public BlockPlaceListener(BuildSystem plugin) { + public BlockPlaceListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); this.blockLookup = initBlockLookup(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java index 7bbdc29c..bda43673 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java @@ -7,9 +7,9 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.config.ConfigValues; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.player.BuildPlayerManager; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -20,9 +20,9 @@ public class BuildModePreventationListener implements Listener { private final ConfigValues configValues; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; - public BuildModePreventationListener(BuildSystem plugin) { + public BuildModePreventationListener(BuildSystemPlugin plugin) { this.configValues = plugin.getConfigValues(); this.playerManager = plugin.getPlayerManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java index d91d6838..f86e9b85 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java @@ -1,8 +1,8 @@ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.World; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -11,9 +11,9 @@ public class BuildWorldResetUnloadListener implements Listener { - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public BuildWorldResetUnloadListener(BuildSystem plugin) { + public BuildWorldResetUnloadListener(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); } @@ -21,7 +21,7 @@ public BuildWorldResetUnloadListener(BuildSystem plugin) { @EventHandler public void onPlayerChangedWorld(PlayerChangedWorldEvent event) { World from = event.getFrom(); - BuildWorld buildWorld = worldManager.getBuildWorld(from.getName()); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(from.getName()); if (buildWorld != null) { buildWorld.resetUnloadTask(); } @@ -30,7 +30,7 @@ public void onPlayerChangedWorld(PlayerChangedWorldEvent event) { @EventHandler public void onPlayerQuit(PlayerQuitEvent event) { World from = event.getPlayer().getWorld(); - BuildWorld buildWorld = worldManager.getBuildWorld(from.getName()); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(from.getName()); if (buildWorld != null) { buildWorld.resetUnloadTask(); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java index 00983369..b01e9d36 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java @@ -13,19 +13,19 @@ import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extent.NullExtent; import com.sk89q.worldedit.util.eventbus.Subscribe; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.Listener; public class EditSessionListener implements Listener { - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public EditSessionListener(BuildSystem plugin) { + public EditSessionListener(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); WorldEdit.getInstance().getEventBus().register(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java index ff210d38..7f3b133a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java @@ -7,10 +7,10 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.util.EntityAIManager; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.World; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -20,9 +20,9 @@ public class EntitySpawnListener implements Listener { - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public EntitySpawnListener(BuildSystem plugin) { + public EntitySpawnListener(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java index 31af7ddd..07b17cbf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java @@ -7,10 +7,10 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.World; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -19,9 +19,9 @@ public class FoodLevelChangeListener implements Listener { - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public FoodLevelChangeListener(BuildSystem plugin) { + public FoodLevelChangeListener(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java index 3291e862..ae717ae6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java @@ -8,11 +8,11 @@ package de.eintosti.buildsystem.listener; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.data.WorldStatus; -import de.eintosti.buildsystem.world.data.WorldType; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryCloseEvent; @@ -23,7 +23,7 @@ public class InventoryCloseListener implements Listener { private final InventoryUtils inventoryUtils; - public InventoryCloseListener(BuildSystem plugin) { + public InventoryCloseListener(BuildSystemPlugin plugin) { this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java index c88002cd..89174380 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.event.player.PlayerInventoryClearEvent; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; @@ -23,10 +23,10 @@ public class InventoryCreativeListener implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public InventoryCreativeListener(BuildSystem plugin) { + public InventoryCreativeListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java index 4a889cf2..48b6238a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java @@ -9,20 +9,20 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.settings.NavigatorType; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.navigator.ArmorStandManager; import de.eintosti.buildsystem.navigator.settings.NavigatorInventoryType; -import de.eintosti.buildsystem.navigator.settings.NavigatorType; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CachedValues; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.entity.ArmorStand; @@ -48,16 +48,16 @@ public class NavigatorListener implements Listener { private static final double MAX_HEIGHT = 2.074631929397583; private static final double MIN_HEIGHT = 1.4409877061843872; - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; private final ArmorStandManager armorStandManager; private final InventoryUtils inventoryUtils; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; private final SettingsManager settingsManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public NavigatorListener(BuildSystem plugin) { + public NavigatorListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); @@ -113,7 +113,7 @@ public void manageNavigatorItemInteraction(PlayerInteractEvent event) { } private void openNavigator(Player player) { - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (settings.getNavigatorType() == NavigatorType.OLD) { plugin.getNavigatorInventory().openInventory(player); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java index 1fec7fd9..7802f9b9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java @@ -8,17 +8,18 @@ package de.eintosti.buildsystem.listener; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.navigator.ArmorStandManager; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CachedValues; -import de.eintosti.buildsystem.player.PlayerManager; import de.eintosti.buildsystem.settings.SettingsManager; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldStatus; -import de.eintosti.buildsystem.world.data.WorldType; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Material; @@ -42,15 +43,15 @@ public class PlayerChangedWorldListener implements Listener { private final ConfigValues configValues; private final ArmorStandManager armorStandManager; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; private final SettingsManager settingsManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; private final Map playerGamemode; private final Map playerInventory; private final Map playerArmor; - public PlayerChangedWorldListener(BuildSystem plugin) { + public PlayerChangedWorldListener(BuildSystemPlugin plugin) { this.configValues = plugin.getConfigValues(); this.armorStandManager = plugin.getArmorStandManager(); @@ -70,12 +71,12 @@ public void onPlayerChangedWorld(PlayerChangedWorldEvent event) { Player player = event.getPlayer(); String worldName = player.getWorld().getName(); - BuildWorld oldWorld = worldManager.getBuildWorld(event.getFrom().getName()); + CraftBuildWorld oldWorld = worldManager.getBuildWorld(event.getFrom().getName()); if (oldWorld != null && configValues.isUnloadWorlds()) { oldWorld.resetUnloadTask(); } - BuildWorld newWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld newWorld = worldManager.getBuildWorld(worldName); if (newWorld != null && !newWorld.getData().physics().get() && player.hasPermission("buildsystem.physics.message")) { Messages.sendMessage(player, "physics_deactivated_in_world", new AbstractMap.SimpleEntry<>("%world%", newWorld.getName())); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java index ced6b0f6..2d590c62 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java @@ -8,15 +8,15 @@ package de.eintosti.buildsystem.listener; import com.google.common.collect.Sets; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.event.player.PlayerInventoryClearEvent; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -207,13 +207,13 @@ public class PlayerCommandPreprocessListener implements Listener { "/vr--" ); - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; private final InventoryUtils inventoryUtils; private final SettingsManager settingsManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public PlayerCommandPreprocessListener(BuildSystem plugin) { + public PlayerCommandPreprocessListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); @@ -255,10 +255,7 @@ public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { } BuildWorld buildWorld = worldManager.getBuildWorld(player.getWorld().getName()); - if (buildWorld == null) { - return; - } - if (disableArchivedWorlds(buildWorld, player, event)) { + if (buildWorld == null || disableArchivedWorlds(buildWorld, player, event)) { return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java index d05ab621..aa6bc600 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java @@ -7,10 +7,10 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.event.player.PlayerInventoryClearEvent; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.entity.Player; @@ -21,11 +21,11 @@ public class PlayerInventoryClearListener implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; private final SettingsManager settingsManager; - public PlayerInventoryClearListener(BuildSystem plugin) { + public PlayerInventoryClearListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); this.settingsManager = plugin.getSettingsManager(); @@ -36,7 +36,7 @@ public PlayerInventoryClearListener(BuildSystem plugin) { @EventHandler public void onPlayerInventoryClear(PlayerInventoryClearEvent event) { Player player = event.getPlayer(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (!settings.isKeepNavigator() || !player.hasPermission("buildsystem.navigator.item")) { return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java index beb9d1aa..6ecdb40d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java @@ -7,21 +7,20 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; -import de.eintosti.buildsystem.player.BuildPlayer; +import de.eintosti.buildsystem.player.BuildPlayerManager; +import de.eintosti.buildsystem.player.CraftBuildPlayer; import de.eintosti.buildsystem.player.LogoutLocation; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; -import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.UpdateChecker; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.SpawnManager; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldStatus; import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -36,20 +35,18 @@ public class PlayerJoinListener implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; - private final InventoryUtils inventoryUtils; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; private final SettingsManager settingsManager; private final SpawnManager spawnManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public PlayerJoinListener(BuildSystem plugin) { + public PlayerJoinListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); - this.inventoryUtils = plugin.getInventoryUtil(); this.playerManager = plugin.getPlayerManager(); this.settingsManager = plugin.getSettingsManager(); this.spawnManager = plugin.getSpawnManager(); @@ -71,10 +68,10 @@ public void onPlayerJoin(PlayerJoinEvent event) { Player player = event.getPlayer(); plugin.getSkullCache().cacheSkull(player.getName()); - BuildPlayer buildPlayer = playerManager.createBuildPlayer(player); + CraftBuildPlayer buildPlayer = playerManager.createBuildPlayer(player); manageHidePlayer(player, buildPlayer); - Settings settings = buildPlayer.getSettings(); + CraftSettings settings = buildPlayer.getSettings(); if (settings.isNoClip()) { plugin.getNoClipManager().startNoClip(player); } @@ -116,7 +113,7 @@ public void onPlayerJoin(PlayerJoinEvent event) { } @SuppressWarnings("deprecation") - private void manageHidePlayer(Player player, BuildPlayer buildPlayer) { + private void manageHidePlayer(Player player, CraftBuildPlayer buildPlayer) { // Hide all players to player if (buildPlayer.getSettings().isHidePlayers()) { Bukkit.getOnlinePlayers().forEach(player::hidePlayer); @@ -136,7 +133,7 @@ private void performUpdateCheck(Player player) { return; } - UpdateChecker.init(plugin, BuildSystem.SPIGOT_ID) + UpdateChecker.init(plugin, BuildSystemPlugin.SPIGOT_ID) .requestUpdateCheck() .whenComplete((result, e) -> { if (result.requiresUpdate()) { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java index f54c69a0..dd009cae 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java @@ -7,10 +7,10 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.navigator.settings.NavigatorType; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.settings.NavigatorType; +import de.eintosti.buildsystem.api.settings.Settings; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.settings.SettingsManager; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -21,11 +21,11 @@ public class PlayerMoveListener implements Listener { - private final BuildSystem plugin; - private final PlayerManager playerManager; + private final BuildSystemPlugin plugin; + private final BuildPlayerManager playerManager; private final SettingsManager settingsManager; - public PlayerMoveListener(BuildSystem plugin) { + public PlayerMoveListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.playerManager = plugin.getPlayerManager(); this.settingsManager = plugin.getSettingsManager(); @@ -40,7 +40,7 @@ public void onPlayerMove(PlayerMoveEvent event) { } Settings settings = settingsManager.getSettings(player); - if (!settings.getNavigatorType().equals(NavigatorType.NEW)) { + if (settings.getNavigatorType() != NavigatorType.NEW) { return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java index 655b6770..2c8507d9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java @@ -7,13 +7,13 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.player.BuildPlayer; +import de.eintosti.buildsystem.api.settings.Settings; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CachedValues; +import de.eintosti.buildsystem.player.CraftBuildPlayer; import de.eintosti.buildsystem.player.LogoutLocation; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.settings.Settings; import de.eintosti.buildsystem.settings.SettingsManager; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -26,11 +26,11 @@ public class PlayerQuitListener implements Listener { - private final BuildSystem plugin; - private final PlayerManager playerManager; + private final BuildSystemPlugin plugin; + private final BuildPlayerManager playerManager; private final SettingsManager settingsManager; - public PlayerQuitListener(BuildSystem plugin) { + public PlayerQuitListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.playerManager = plugin.getPlayerManager(); this.settingsManager = plugin.getSettingsManager(); @@ -62,7 +62,7 @@ public void onPlayerQuit(PlayerQuitEvent event) { player.getInventory().clear(); } - BuildPlayer buildPlayer = playerManager.getBuildPlayer(player); + CraftBuildPlayer buildPlayer = playerManager.getBuildPlayer(player); buildPlayer.setLogoutLocation(new LogoutLocation( player.getWorld().getName(), player.getLocation() diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java index c74ec10b..162f8c5d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java @@ -7,8 +7,8 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.world.SpawnManager; import org.bukkit.entity.Player; @@ -21,7 +21,7 @@ public class PlayerRespawnListener implements Listener { private final SettingsManager settingsManager; private final SpawnManager spawnManager; - public PlayerRespawnListener(BuildSystem plugin) { + public PlayerRespawnListener(BuildSystemPlugin plugin) { this.settingsManager = plugin.getSettingsManager(); this.spawnManager = plugin.getSpawnManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); @@ -30,7 +30,7 @@ public PlayerRespawnListener(BuildSystem plugin) { @EventHandler public void onPlayerRespawn(PlayerRespawnEvent event) { Player player = event.getPlayer(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (settings.isSpawnTeleport() && spawnManager.spawnExists()) { event.setRespawnLocation(spawnManager.getSpawn()); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java index c4d69ec2..01d2b9ac 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java @@ -7,11 +7,11 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.player.BuildPlayerManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; @@ -22,10 +22,10 @@ public class PlayerTeleportListener implements Listener { - private final PlayerManager playerManager; - private final WorldManager worldManager; + private final BuildPlayerManager playerManager; + private final BuildWorldManager worldManager; - public PlayerTeleportListener(BuildSystem plugin) { + public PlayerTeleportListener(BuildSystemPlugin plugin) { this.playerManager = plugin.getPlayerManager(); this.worldManager = plugin.getWorldManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java index 648054a9..2a3669a5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java @@ -10,18 +10,19 @@ import com.cryptomorin.xseries.XBlock; import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XTag; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.player.BuildPlayerManager; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.version.customblocks.CustomBlocks; import de.eintosti.buildsystem.version.util.DirectionUtil; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.Builder; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; +import de.eintosti.buildsystem.world.CraftBuilder; import org.bukkit.Bukkit; import org.bukkit.DyeColor; import org.bukkit.Material; @@ -48,13 +49,13 @@ public class SettingsInteractListener implements Listener { private final ConfigValues configValues; private final CustomBlocks customBlocks; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; private final SettingsManager settingsManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; private final Set cachePlayers; - public SettingsInteractListener(BuildSystem plugin) { + public SettingsInteractListener(BuildSystemPlugin plugin) { this.configValues = plugin.getConfigValues(); this.customBlocks = plugin.getCustomBlocks(); @@ -84,7 +85,7 @@ public void manageIronDoorSetting(PlayerInteractEvent event) { } Player player = event.getPlayer(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (!settings.isTrapDoor()) { return; } @@ -119,7 +120,7 @@ public void manageSlabSetting(PlayerInteractEvent event) { Player player = event.getPlayer(); Action action = event.getAction(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (settings.isSlabBreaking() && action == Action.LEFT_CLICK_BLOCK) { customBlocks.modifySlab(event); } @@ -146,7 +147,7 @@ public void managePlacePlantsSetting(PlayerInteractEvent event) { } Player player = event.getPlayer(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (!settings.isPlacePlants()) { return; } @@ -162,7 +163,7 @@ public void manageInstantPlaceSignsSetting(PlayerInteractEvent event) { } Player player = event.getPlayer(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (!settings.isInstantPlaceSigns()) { return; } @@ -245,7 +246,7 @@ public void manageDisabledInteractSetting(PlayerInteractEvent event) { return; } - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); if (!settings.isDisableInteract()) { return; } @@ -299,13 +300,13 @@ public void manageDisabledInteractSetting(PlayerInteractEvent event) { } /** - * Not every player can always interact with the {@link BuildWorld} they are in. + * Not every player can always interact with the {@link CraftBuildWorld} they are in. *

* Reasons an interaction could be cancelled: *

    *
  • The world has its {@link WorldStatus} set to archived
  • *
  • The world has a setting enabled which disallows certain events
  • - *
  • The world only allows {@link Builder}s to build and the player is not such a builder
  • + *
  • The world only allows {@link CraftBuilder}s to build and the player is not such a builder
  • *
*

* However, a player can override these reasons if: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java index 71df9f4d..5f9352ec 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.util.RGBUtils; import org.bukkit.ChatColor; import org.bukkit.entity.Player; @@ -17,7 +17,7 @@ public class SignChangeListener implements Listener { - public SignChangeListener(BuildSystem plugin) { + public SignChangeListener(BuildSystemPlugin plugin) { plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java index 913c2488..d0f4ad57 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.listener; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.config.ConfigValues; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -19,7 +19,7 @@ public class WeatherChangeListener implements Listener { private final ConfigValues configValues; - public WeatherChangeListener(BuildSystem plugin) { + public WeatherChangeListener(BuildSystemPlugin plugin) { this.configValues = plugin.getConfigValues(); plugin.getServer().getPluginManager().registerEvents(this, plugin); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java index d16dd1aa..dd2dda9e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java @@ -8,12 +8,13 @@ package de.eintosti.buildsystem.listener; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.Builder; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; +import de.eintosti.buildsystem.world.CraftBuilder; import org.bukkit.entity.ArmorStand; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; @@ -31,10 +32,10 @@ public class WorldManipulateListener implements Listener { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; - public WorldManipulateListener(BuildSystem plugin) { + public WorldManipulateListener(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); plugin.getServer().getPluginManager().registerEvents(this, plugin); @@ -130,13 +131,13 @@ public void onPlayerInteract(PlayerInteractEvent event) { } /** - * Not every player can always interact with the {@link BuildWorld} they are in. + * Not every player can always interact with the {@link CraftBuildWorld} they are in. *

* Reasons an interaction could be cancelled: *

    *
  • The world has its {@link WorldStatus} set to archived;
  • *
  • The world has a setting enabled which disallows certain events;
  • - *
  • The world only allows {@link Builder}s to build and the player is not such a builder.
  • + *
  • The world only allows {@link CraftBuilder}s to build and the player is not such a builder.
  • *
*

* However, a player can override these reasons if: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java index 3da6583e..a41b4d8e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java @@ -8,18 +8,19 @@ package de.eintosti.buildsystem.navigator.inventory; import com.google.common.collect.Sets; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.data.WorldStatus; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; public class ArchiveInventory extends FilteredWorldsInventory { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public ArchiveInventory(BuildSystem plugin) { + public ArchiveInventory(BuildSystemPlugin plugin) { super(plugin, "archive_title", "archive_no_worlds", Visibility.IGNORE, Sets.newHashSet(WorldStatus.ARCHIVE) ); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java index e8a767cc..9eb2f18a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java @@ -9,20 +9,22 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.navigator.settings.WorldDisplay; -import de.eintosti.buildsystem.navigator.settings.WorldFilter; -import de.eintosti.buildsystem.navigator.settings.WorldSort; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.api.settings.WorldDisplay; +import de.eintosti.buildsystem.api.settings.WorldFilter; +import de.eintosti.buildsystem.api.settings.WorldSort; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.navigator.settings.BuildWorldFilter; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.PaginatedInventory; import de.eintosti.buildsystem.util.PlayerChatInput; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.modification.CreateInventory; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -41,17 +43,17 @@ public class FilteredWorldsInventory extends PaginatedInventory implements Liste private static final int MAX_WORLDS = 36; - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; private final SettingsManager settingsManager; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; private final String inventoryName; private final String noWorldsText; private final Visibility visibility; private final Set validStatus; - public FilteredWorldsInventory(BuildSystem plugin, String inventoryName, String noWorldsText, Visibility visibility, Set validStatus) { + public FilteredWorldsInventory(BuildSystemPlugin plugin, String inventoryName, String noWorldsText, Visibility visibility, Set validStatus) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); this.settingsManager = plugin.getSettingsManager(); @@ -139,13 +141,13 @@ private void addWorlds(Player player) { } private void addWorldSortItem(Inventory inventory, Player player) { - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); WorldSort worldSort = settings.getWorldDisplay().getWorldSort(); - inventoryUtils.addItemStack(inventory, 45, XMaterial.BOOK, Messages.getString("world_sort_title"), worldSort.getItemLore()); + inventoryUtils.addItemStack(inventory, 45, XMaterial.BOOK, Messages.getString("world_sort_title"), Messages.getStringList(worldSort.getLoreKey())); } private void addWorldFilterItem(Inventory inventory, Player player) { - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); WorldFilter worldFilter = settings.getWorldDisplay().getWorldFilter(); List lore = new ArrayList<>(); @@ -180,7 +182,7 @@ private boolean isValidWorld(Player player, BuildWorld buildWorld) { return false; } - if (player.hasPermission(BuildSystem.ADMIN_PERMISSION)) { + if (player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION)) { return true; } @@ -208,7 +210,7 @@ public void onInventoryClick(InventoryClickEvent event) { } Player player = (Player) event.getWhoClicked(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); WorldDisplay worldDisplay = settings.getWorldDisplay(); switch (event.getSlot()) { @@ -221,7 +223,7 @@ public void onInventoryClick(InventoryClickEvent event) { WorldFilter worldFilter = worldDisplay.getWorldFilter(); WorldFilter.Mode currentMode = worldFilter.getMode(); if (event.isShiftClick()) { - worldFilter.setMode(WorldFilter.Mode.NONE); + worldFilter.setMode(BuildWorldFilter.Mode.NONE); worldFilter.setText(""); openInventory(player); } else if (event.isLeftClick()) { @@ -255,14 +257,4 @@ public void onInventoryClick(InventoryClickEvent event) { inventoryUtils.manageInventoryClick(event, player, itemStack); } - - public enum Visibility { - PRIVATE, - PUBLIC, - IGNORE; - - public static Visibility matchVisibility(boolean isPrivateWorld) { - return isPrivateWorld ? PRIVATE : PUBLIC; - } - } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java index 9e490788..d14f7517 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.navigator.inventory; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; @@ -20,10 +20,10 @@ public class NavigatorInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public NavigatorInventory(BuildSystem plugin) { + public NavigatorInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java index cf7928d5..40a3be3f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java @@ -8,21 +8,22 @@ package de.eintosti.buildsystem.navigator.inventory; import com.google.common.collect.Sets; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.data.WorldStatus; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; public class PrivateInventory extends FilteredWorldsInventory { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; - public PrivateInventory(BuildSystem plugin) { + public PrivateInventory(BuildSystemPlugin plugin) { super(plugin, "private_title", "private_no_worlds", Visibility.PRIVATE, Sets.newHashSet(WorldStatus.NOT_STARTED, WorldStatus.IN_PROGRESS, WorldStatus.ALMOST_FINISHED, WorldStatus.FINISHED) ); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java index f3a8ce0a..c00619bf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java @@ -8,21 +8,22 @@ package de.eintosti.buildsystem.navigator.inventory; import com.google.common.collect.Sets; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.data.WorldStatus; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; public class WorldsInventory extends FilteredWorldsInventory { - private final BuildSystem plugin; - private final PlayerManager playerManager; + private final BuildSystemPlugin plugin; + private final BuildPlayerManager playerManager; private final InventoryUtils inventoryUtils; - public WorldsInventory(BuildSystem plugin) { + public WorldsInventory(BuildSystemPlugin plugin) { super(plugin, "world_navigator_title", "world_navigator_no_worlds", Visibility.PUBLIC, Sets.newHashSet(WorldStatus.NOT_STARTED, WorldStatus.IN_PROGRESS, WorldStatus.ALMOST_FINISHED, WorldStatus.FINISHED) ); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldDisplay.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java similarity index 68% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldDisplay.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java index f0a4dd7b..d54ce6d5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldDisplay.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java @@ -7,36 +7,41 @@ */ package de.eintosti.buildsystem.navigator.settings; +import de.eintosti.buildsystem.api.settings.WorldDisplay; +import de.eintosti.buildsystem.api.settings.WorldSort; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.jetbrains.annotations.NotNull; import java.util.HashMap; import java.util.Map; -public class WorldDisplay implements ConfigurationSerializable { +public class BuildWorldDisplay implements WorldDisplay, ConfigurationSerializable { private WorldSort worldSort; - private final WorldFilter worldFilter; + private final BuildWorldFilter worldFilter; - public WorldDisplay() { + public BuildWorldDisplay() { this.worldSort = WorldSort.NAME_A_TO_Z; - this.worldFilter = new WorldFilter(); + this.worldFilter = new BuildWorldFilter(); } - public WorldDisplay(WorldSort worldSort, WorldFilter worldFilter) { + public BuildWorldDisplay(WorldSort worldSort, BuildWorldFilter worldFilter) { this.worldSort = worldSort; this.worldFilter = worldFilter; } + @Override public WorldSort getWorldSort() { return worldSort; } + @Override public void setWorldSort(WorldSort worldSort) { this.worldSort = worldSort; } - public WorldFilter getWorldFilter() { + @Override + public BuildWorldFilter getWorldFilter() { return worldFilter; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldFilter.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java similarity index 62% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldFilter.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java index e1c6fb57..8dfe485e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/WorldFilter.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java @@ -7,7 +7,8 @@ */ package de.eintosti.buildsystem.navigator.settings; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.api.settings.WorldFilter; +import de.eintosti.buildsystem.api.world.BuildWorld; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.jetbrains.annotations.NotNull; @@ -15,67 +16,42 @@ import java.util.Map; import java.util.function.Predicate; -public class WorldFilter implements ConfigurationSerializable { +public class BuildWorldFilter implements WorldFilter, ConfigurationSerializable { private Mode mode; private String text; - public WorldFilter() { + public BuildWorldFilter() { this.mode = Mode.NONE; this.text = ""; } - public WorldFilter(Mode mode, String text) { + public BuildWorldFilter(Mode mode, String text) { this.mode = mode; this.text = text; } - public enum Mode { - NONE("world_filter_mode_none"), - STARTS_WITH("world_filter_mode_starts_with"), - CONTAINS("world_filter_mode_contains"), - MATCHES("world_filter_mode_matches"); - - private final String loreKey; - - Mode(String loreKey) { - this.loreKey = loreKey; - } - - public String getLoreKey() { - return loreKey; - } - - public Mode getNext() { - switch (this) { - default: // NONE - return STARTS_WITH; - case STARTS_WITH: - return CONTAINS; - case CONTAINS: - return MATCHES; - case MATCHES: - return NONE; - } - } - } - + @Override public Mode getMode() { return mode; } + @Override public void setMode(Mode mode) { this.mode = mode; } + @Override public String getText() { return text; } + @Override public void setText(String text) { this.text = text; } + @Override public Predicate apply() { switch (mode) { case STARTS_WITH: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java index 3c695770..2bcec47c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java @@ -7,10 +7,11 @@ */ package de.eintosti.buildsystem.navigator.settings; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.Builder; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldStatus; +import de.eintosti.buildsystem.api.settings.NavigatorType; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Builder; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; import org.bukkit.entity.Player; import org.jetbrains.annotations.Nullable; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java index ddc2595c..97781d07 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.player; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.version.customblocks.CustomBlock; @@ -26,10 +26,10 @@ public class BlocksInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public BlocksInventory(BuildSystem plugin) { + public BlocksInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/PlayerManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java similarity index 78% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/player/PlayerManager.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java index 4ad505c3..42beac7a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/PlayerManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java @@ -10,22 +10,24 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.ActionBar; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.player.BuildPlayer; +import de.eintosti.buildsystem.api.player.PlayerManager; +import de.eintosti.buildsystem.api.settings.DesignColor; +import de.eintosti.buildsystem.api.settings.NavigatorType; +import de.eintosti.buildsystem.api.settings.WorldSort; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Visibility; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.config.PlayersConfig; -import de.eintosti.buildsystem.navigator.inventory.FilteredWorldsInventory.Visibility; +import de.eintosti.buildsystem.navigator.settings.BuildWorldDisplay; +import de.eintosti.buildsystem.navigator.settings.BuildWorldFilter; import de.eintosti.buildsystem.navigator.settings.NavigatorInventoryType; -import de.eintosti.buildsystem.navigator.settings.NavigatorType; -import de.eintosti.buildsystem.navigator.settings.WorldDisplay; -import de.eintosti.buildsystem.navigator.settings.WorldFilter; -import de.eintosti.buildsystem.navigator.settings.WorldSort; -import de.eintosti.buildsystem.settings.DesignColor; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; @@ -42,6 +44,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -49,21 +52,21 @@ import java.util.Set; import java.util.UUID; -public class PlayerManager { +public class BuildPlayerManager implements PlayerManager { private static final double MIN_HEIGHT = -0.16453003708696978; private static final double MAX_HEIGHT = 0.16481381407766063; - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final PlayersConfig playersConfig; private final ConfigValues configValues; - private final Map buildPlayers; + private final Map buildPlayers; private final Set openNavigator; private final Set buildModePlayers; - public PlayerManager(BuildSystem plugin) { + public BuildPlayerManager(BuildSystemPlugin plugin) { this.plugin = plugin; this.playersConfig = new PlayersConfig(plugin); this.configValues = plugin.getConfigValues(); @@ -76,25 +79,28 @@ public PlayerManager(BuildSystem plugin) { initEntityChecker(); } - public BuildPlayer createBuildPlayer(UUID uuid, Settings settings) { - BuildPlayer buildPlayer = this.buildPlayers.getOrDefault(uuid, new BuildPlayer(uuid, settings)); + public CraftBuildPlayer createBuildPlayer(UUID uuid, CraftSettings settings) { + CraftBuildPlayer buildPlayer = this.buildPlayers.getOrDefault(uuid, new CraftBuildPlayer(uuid, settings)); this.buildPlayers.put(uuid, buildPlayer); return buildPlayer; } - public BuildPlayer createBuildPlayer(Player player) { - return createBuildPlayer(player.getUniqueId(), new Settings()); + public CraftBuildPlayer createBuildPlayer(Player player) { + return createBuildPlayer(player.getUniqueId(), new CraftSettings()); } + @Override public Collection getBuildPlayers() { - return this.buildPlayers.values(); + return new ArrayList<>(buildPlayers.values()); } - public BuildPlayer getBuildPlayer(UUID uuid) { + @Override + public CraftBuildPlayer getBuildPlayer(UUID uuid) { return this.buildPlayers.get(uuid); } - public BuildPlayer getBuildPlayer(Player player) { + @Override + public CraftBuildPlayer getBuildPlayer(Player player) { return this.buildPlayers.get(player.getUniqueId()); } @@ -116,55 +122,33 @@ public Set getOpenNavigator() { return openNavigator; } + @Override public Set getBuildModePlayers() { return buildModePlayers; } + @Override public boolean isInBuildMode(Player player) { return buildModePlayers.contains(player.getUniqueId()); } - /** - * Gets whether the given player is allowed to create a new {@link BuildWorld}.
- * This depends on the following factors: - *

    - *
  • Is the maximum amount of worlds set by the config less than the amount of existing worlds?
  • - *
  • Is the maximum amount of worlds created by the player less than the amount of worlds said player is allowed to create?
  • - *
      - * - * @param player The player trying to create a world - * @param visibility The visibility of the world trying to be created - * @return {@code true} if the player is allowed to create a world, otherwise {@code false} - */ + @Override public boolean canCreateWorld(Player player, Visibility visibility) { - boolean showPrivateWorlds = visibility == Visibility.PRIVATE; - WorldManager worldManager = plugin.getWorldManager(); + BuildWorldManager worldManager = plugin.getWorldManager(); - int maxWorldAmountConfig = configValues.getMaxWorldAmount(showPrivateWorlds); + int maxWorldAmountConfig = configValues.getMaxWorldAmount(visibility); if (maxWorldAmountConfig >= 0 && worldManager.getBuildWorlds().size() >= maxWorldAmountConfig) { return false; } - int maxWorldAmountPlayer = getMaxWorlds(player, showPrivateWorlds); + int maxWorldAmountPlayer = getMaxWorlds(player, visibility); return maxWorldAmountPlayer < 0 || worldManager.getBuildWorldsCreatedByPlayer(player, visibility).size() < maxWorldAmountPlayer; } - /** - * Returns the maximum amount of {@link BuildWorld}s a player can create.
      - * If the player has the permission {@code buildsystem.admin}, unlimited worlds can be created.
      - * Otherwise, there are two different permissions to set said amount:
      - * To set the maximum of... - *
        - *
      • ...public worlds, use {@literal buildsystem.create.public.}
      • - *
      • ...private worlds, use {@literal buildsystem.create.private.}
      • - *
          - * - * @param player The player object - * @return If set, the maximum amount of worlds a player can create, otherwise -1 - */ - public int getMaxWorlds(Player player, boolean privateWorld) { + @Override + public int getMaxWorlds(Player player, Visibility visibility) { int max = -1; - if (player.hasPermission(BuildSystem.ADMIN_PERMISSION)) { + if (player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION)) { return max; } @@ -180,8 +164,7 @@ public int getMaxWorlds(Player player, boolean privateWorld) { continue; } - String worldVisibility = privateWorld ? "private" : "public"; - if (!splitPermission[2].equalsIgnoreCase(worldVisibility)) { + if (!splitPermission[2].equalsIgnoreCase(visibility.name().toLowerCase())) { continue; } @@ -247,13 +230,12 @@ public void giveNavigator(Player player) { } } - public void closeNavigator(Player player) { if (!openNavigator.contains(player)) { return; } - BuildPlayer buildPlayer = getBuildPlayer(player.getUniqueId()); + CraftBuildPlayer buildPlayer = getBuildPlayer(player.getUniqueId()); buildPlayer.setLastLookedAt(null); plugin.getArmorStandManager().removeArmorStands(player); @@ -292,7 +274,7 @@ private void checkForEntity() { continue; } - BuildPlayer buildPlayer = getBuildPlayer(player.getUniqueId()); + CraftBuildPlayer buildPlayer = getBuildPlayer(player.getUniqueId()); double lookedPosition = player.getEyeLocation().getDirection().getY(); if (lookedPosition >= MIN_HEIGHT && lookedPosition <= MAX_HEIGHT) { NavigatorInventoryType inventoryType = NavigatorInventoryType.matchInventoryType(player, getEntityName(player)); @@ -377,7 +359,7 @@ private void sendTypeInfo(Player player, NavigatorInventoryType inventoryType) { } public void save() { - playersConfig.savePlayers(getBuildPlayers()); + playersConfig.savePlayers(this.buildPlayers.values()); } public void load() { @@ -389,7 +371,7 @@ public void load() { Set uuids = configurationSection.getKeys(false); uuids.forEach(uuid -> { - BuildPlayer buildPlayer = createBuildPlayer( + CraftBuildPlayer buildPlayer = createBuildPlayer( UUID.fromString(uuid), loadSettings(configuration, "players." + uuid + ".settings.") ); @@ -419,10 +401,10 @@ private LogoutLocation loadLogoutLocation(FileConfiguration configuration, Strin return new LogoutLocation(worldName, x, y, z, yaw, pitch); } - private Settings loadSettings(FileConfiguration configuration, String pathPrefix) { + private CraftSettings loadSettings(FileConfiguration configuration, String pathPrefix) { NavigatorType navigatorType = NavigatorType.valueOf(configuration.getString(pathPrefix + "type")); DesignColor glassColor = DesignColor.matchColor(configuration.getString(pathPrefix + "glass")); - WorldDisplay worldDisplay = loadWorldDisplay(configuration, pathPrefix + "world-display."); + BuildWorldDisplay worldDisplay = loadWorldDisplay(configuration, pathPrefix + "world-display."); boolean clearInventory = configuration.getBoolean(pathPrefix + "clear-inventory", false); boolean disableInteract = configuration.getBoolean(pathPrefix + "disable-interact", false); boolean hidePlayers = configuration.getBoolean(pathPrefix + "hide-players", false); @@ -436,16 +418,16 @@ private Settings loadSettings(FileConfiguration configuration, String pathPrefix boolean spawnTeleport = configuration.getBoolean(pathPrefix + "spawn-teleport", true); boolean trapDoor = configuration.getBoolean(pathPrefix + "trapdoor", false); - return new Settings( + return new CraftSettings( navigatorType, glassColor, worldDisplay, clearInventory, disableInteract, hidePlayers, instantPlaceSigns, keepNavigator, nightVision, noClip, placePlants, scoreboard, slabBreaking, spawnTeleport, trapDoor ); } - private WorldDisplay loadWorldDisplay(FileConfiguration configuration, String pathPrefix) { + private BuildWorldDisplay loadWorldDisplay(FileConfiguration configuration, String pathPrefix) { WorldSort worldSort = WorldSort.matchWorldSort(configuration.getString(pathPrefix + "sort", WorldSort.NAME_A_TO_Z.name())); - WorldFilter.Mode filterMode = WorldFilter.Mode.valueOf(configuration.getString(pathPrefix + "filter.mode", WorldFilter.Mode.NONE.name())); + BuildWorldFilter.Mode filterMode = BuildWorldFilter.Mode.valueOf(configuration.getString(pathPrefix + "filter.mode", BuildWorldFilter.Mode.NONE.name())); String filterText = configuration.getString(pathPrefix + "filter.text", ""); - return new WorldDisplay(worldSort, new WorldFilter(filterMode, filterText)); + return new BuildWorldDisplay(worldSort, new BuildWorldFilter(filterMode, filterText)); } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java index a6987ce8..43b98fde 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java @@ -11,10 +11,6 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -/** - * @author einTosti - * @since 2.21.0 - */ public class CachedValues { private GameMode gameMode; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayer.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java similarity index 83% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayer.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java index f904e741..05dacb85 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayer.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java @@ -7,9 +7,10 @@ */ package de.eintosti.buildsystem.player; +import de.eintosti.buildsystem.api.player.BuildPlayer; import de.eintosti.buildsystem.navigator.settings.NavigatorInventoryType; -import de.eintosti.buildsystem.settings.Settings; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.settings.CraftSettings; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Location; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.jetbrains.annotations.NotNull; @@ -19,42 +20,30 @@ import java.util.Map; import java.util.UUID; -/** - * @author einTosti - * @since 2.21.0 - */ -public class BuildPlayer implements ConfigurationSerializable { +public class CraftBuildPlayer implements BuildPlayer, ConfigurationSerializable { private final UUID uuid; - private final Settings settings; + private final CraftSettings settings; private final CachedValues cachedValues; - private BuildWorld cachedWorld; + private CraftBuildWorld cachedWorld; private LogoutLocation logoutLocation; private Location previousLocation; private NavigatorInventoryType lastLookedAt; - public BuildPlayer(UUID uuid, Settings settings) { + public CraftBuildPlayer(UUID uuid, CraftSettings settings) { this.uuid = uuid; this.settings = settings; this.cachedValues = new CachedValues(); } - /** - * Gets the unique-id of the player. - * - * @return The player's UUID - */ + @Override public UUID getUniqueId() { return uuid; } - /** - * Gets the player's per-player settings. - * - * @return The player's settings - */ - public Settings getSettings() { + @Override + public CraftSettings getSettings() { return settings; } @@ -73,7 +62,7 @@ public CachedValues getCachedValues() { * @return The cached world, if any */ @Nullable - public BuildWorld getCachedWorld() { + public CraftBuildWorld getCachedWorld() { return cachedWorld; } @@ -82,7 +71,7 @@ public BuildWorld getCachedWorld() { * * @param buildWorld The world to select. */ - public void setCachedWorld(BuildWorld buildWorld) { + public void setCachedWorld(CraftBuildWorld buildWorld) { this.cachedWorld = buildWorld; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java index 573783cc..edc1bf3c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java @@ -10,10 +10,6 @@ import org.bukkit.Bukkit; import org.bukkit.Location; -/** - * @author einTosti - * @since 2.21.0 - */ public class LogoutLocation { private final String worldName; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/Settings.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java similarity index 75% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/Settings.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java index 2bd94574..da38ed9b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/Settings.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java @@ -7,8 +7,11 @@ */ package de.eintosti.buildsystem.settings; -import de.eintosti.buildsystem.navigator.settings.NavigatorType; -import de.eintosti.buildsystem.navigator.settings.WorldDisplay; +import de.eintosti.buildsystem.api.settings.DesignColor; +import de.eintosti.buildsystem.api.settings.NavigatorType; +import de.eintosti.buildsystem.api.settings.Settings; +import de.eintosti.buildsystem.api.settings.WorldDisplay; +import de.eintosti.buildsystem.navigator.settings.BuildWorldDisplay; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.scheduler.BukkitTask; import org.jetbrains.annotations.NotNull; @@ -16,11 +19,11 @@ import java.util.HashMap; import java.util.Map; -public class Settings implements ConfigurationSerializable { +public class CraftSettings implements Settings, ConfigurationSerializable { private DesignColor designColor; private NavigatorType navigatorType; - private WorldDisplay worldDisplay; + private BuildWorldDisplay worldDisplay; private boolean clearInventory; private boolean disableInteract; private boolean hidePlayers; @@ -36,10 +39,10 @@ public class Settings implements ConfigurationSerializable { private BukkitTask scoreboardTask; - public Settings() { + public CraftSettings() { this.navigatorType = NavigatorType.OLD; this.designColor = DesignColor.BLACK; - this.worldDisplay = new WorldDisplay(); + this.worldDisplay = new BuildWorldDisplay(); this.clearInventory = false; this.disableInteract = false; this.hidePlayers = false; @@ -54,10 +57,10 @@ public Settings() { this.trapDoor = false; } - public Settings( + public CraftSettings( NavigatorType navigatorType, DesignColor designColor, - WorldDisplay worldDisplay, + BuildWorldDisplay worldDisplay, boolean clearInventory, boolean disableInteract, boolean hidePlayers, @@ -88,122 +91,152 @@ public Settings( this.trapDoor = trapDoor; } + @Override public NavigatorType getNavigatorType() { return navigatorType; } + @Override public void setNavigatorType(NavigatorType navigatorType) { this.navigatorType = navigatorType; } + @Override public DesignColor getDesignColor() { return designColor; } + @Override public void setDesignColor(DesignColor designColor) { this.designColor = designColor; } + @Override public WorldDisplay getWorldDisplay() { return worldDisplay; } + @Override public void setWorldDisplay(WorldDisplay worldDisplay) { - this.worldDisplay = worldDisplay; + this.worldDisplay = (BuildWorldDisplay) worldDisplay; } + @Override public boolean isClearInventory() { return clearInventory; } + @Override public void setClearInventory(boolean clearInventory) { this.clearInventory = clearInventory; } + @Override public boolean isDisableInteract() { return disableInteract; } + @Override public void setDisableInteract(boolean disableInteract) { this.disableInteract = disableInteract; } + @Override public boolean isHidePlayers() { return hidePlayers; } + @Override public void setHidePlayers(boolean hidePlayers) { this.hidePlayers = hidePlayers; } + @Override public boolean isInstantPlaceSigns() { return instantPlaceSigns; } + @Override public void setInstantPlaceSigns(boolean instantPlaceSigns) { this.instantPlaceSigns = instantPlaceSigns; } + @Override public boolean isKeepNavigator() { return keepNavigator; } + @Override public void setKeepNavigator(boolean keepNavigator) { this.keepNavigator = keepNavigator; } + @Override public boolean isNightVision() { return nightVision; } + @Override public void setNightVision(boolean nightVision) { this.nightVision = nightVision; } + @Override public boolean isNoClip() { return noClip; } + @Override public void setNoClip(boolean noClip) { this.noClip = noClip; } + @Override public boolean isPlacePlants() { return placePlants; } + @Override public void setPlacePlants(boolean placePlants) { this.placePlants = placePlants; } + @Override public boolean isScoreboard() { return scoreboard; } + @Override public void setScoreboard(boolean scoreboard) { this.scoreboard = scoreboard; } + @Override public boolean isSlabBreaking() { return slabBreaking; } + @Override public void setSlabBreaking(boolean slabBreaking) { this.slabBreaking = slabBreaking; } + @Override public boolean isSpawnTeleport() { return spawnTeleport; } + @Override public void setSpawnTeleport(boolean spawnTeleport) { this.spawnTeleport = spawnTeleport; } + @Override public boolean isTrapDoor() { return trapDoor; } + @Override public void setTrapDoor(boolean trapDoor) { this.trapDoor = trapDoor; } @@ -220,21 +253,21 @@ public void setScoreboardTask(BukkitTask scoreboardTask) { public @NotNull Map serialize() { Map settings = new HashMap<>(); - settings.put("type", getNavigatorType().toString()); - settings.put("glass", getDesignColor().toString()); - settings.put("world-display", getWorldDisplay().serialize()); - settings.put("slab-breaking", isSlabBreaking()); - settings.put("no-clip", isNoClip()); - settings.put("trapdoor", isTrapDoor()); - settings.put("nightvision", isNightVision()); - settings.put("scoreboard", isScoreboard()); - settings.put("keep-navigator", isKeepNavigator()); - settings.put("disable-interact", isDisableInteract()); - settings.put("spawn-teleport", isSpawnTeleport()); - settings.put("clear-inventory", isClearInventory()); - settings.put("instant-place-signs", isInstantPlaceSigns()); - settings.put("hide-players", isHidePlayers()); - settings.put("place-plants", isPlacePlants()); + settings.put("type", navigatorType.toString()); + settings.put("glass", designColor.toString()); + settings.put("world-display", worldDisplay.serialize()); + settings.put("slab-breaking", slabBreaking); + settings.put("no-clip", noClip); + settings.put("trapdoor", trapDoor); + settings.put("nightvision", nightVision); + settings.put("scoreboard", scoreboard); + settings.put("keep-navigator", keepNavigator); + settings.put("disable-interact", disableInteract); + settings.put("spawn-teleport", spawnTeleport); + settings.put("clear-inventory", clearInventory); + settings.put("instant-place-signs", instantPlaceSigns); + settings.put("hide-players", hidePlayers); + settings.put("place-plants", placePlants); return settings; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java index b98e5f2e..265e116f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java @@ -8,10 +8,12 @@ package de.eintosti.buildsystem.settings; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.settings.DesignColor; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -24,10 +26,10 @@ public class DesignInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public DesignInventory(BuildSystem plugin) { + public DesignInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); @@ -73,9 +75,9 @@ private void fillGuiWithGlass(Inventory inventory, Player player) { private void setItem(Player player, Inventory inventory, int position, XMaterial material, String displayName, DesignColor color) { SettingsManager settingsManager = plugin.getSettingsManager(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); - ItemStack itemStack = inventoryUtils.getItemStack(material, settings.getDesignColor() == color ? "§a" + displayName : "§7" + displayName); + ItemStack itemStack = inventoryUtils.getItemStack(material, settings.getDesignColor() == color ? ChatColor.GREEN + displayName : ChatColor.GRAY + displayName); ItemMeta itemMeta = itemStack.getItemMeta(); if (itemMeta != null) { itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS); @@ -96,7 +98,7 @@ public void onInventoryClick(InventoryClickEvent event) { } Player player = (Player) event.getWhoClicked(); - Settings settings = plugin.getSettingsManager().getSettings(player); + CraftSettings settings = plugin.getSettingsManager().getSettings(player); ItemStack itemStack = event.getCurrentItem(); if (itemStack.getType().toString().contains("STAINED_GLASS_PANE")) { plugin.getSettingsInventory().openInventory(player); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java index aec01d0f..d55479fe 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.settings; import com.google.common.collect.Sets; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Location; @@ -26,11 +26,11 @@ public class NoClipManager { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final Map previousGameMode; private final Set noClipPlayers; - public NoClipManager(BuildSystem plugin) { + public NoClipManager(BuildSystemPlugin plugin) { this.plugin = plugin; this.noClipPlayers = new HashSet<>(); this.previousGameMode = new HashMap<>(); @@ -110,12 +110,12 @@ public boolean isNoClip(UUID uuid) { } /** - * Only add a player to the list of No-Clip players if {@link Settings#isNoClip} is equal to {@code true}. + * Only add a player to the list of No-Clip players if {@link CraftSettings#isNoClip} is equal to {@code true}. * * @param player The player to add * @param settings The player's settings */ - public void startNoClip(Player player, Settings settings) { + public void startNoClip(Player player, CraftSettings settings) { if (!settings.isNoClip()) { noClipPlayers.remove(player.getUniqueId()); return; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java index 3bf90a95..c9672028 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java @@ -9,10 +9,10 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.settings.NavigatorType; import de.eintosti.buildsystem.config.ConfigValues; -import de.eintosti.buildsystem.navigator.settings.NavigatorType; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; import org.bukkit.enchantments.Enchantment; @@ -31,13 +31,13 @@ public class SettingsInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; private final InventoryUtils inventoryUtils; private final SettingsManager settingsManager; - public SettingsInventory(BuildSystem plugin) { + public SettingsInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); @@ -50,7 +50,7 @@ private Inventory getInventory(Player player) { Inventory inventory = Bukkit.createInventory(null, 45, Messages.getString("settings_title")); fillGuiWithGlass(player, inventory); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); addDesignItem(inventory, player); addClearInventoryItem(inventory, player); addSettingsItem(inventory, 13, XMaterial.DIAMOND_AXE, settings.isDisableInteract(), Messages.getString("settings_disableinteract_item"), Messages.getStringList("settings_disableinteract_lore")); @@ -101,7 +101,7 @@ private void addSettingsItem(Inventory inventory, int position, XMaterial materi } private void addClearInventoryItem(Inventory inventory, Player player) { - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); XMaterial xMaterial = settings.isClearInventory() ? XMaterial.MINECART : XMaterial.CHEST_MINECART; addSettingsItem(inventory, 12, xMaterial, settings.isClearInventory(), Messages.getString("settings_clear_inventory_item"), Messages.getStringList("settings_clear_inventory_lore")); } @@ -126,7 +126,7 @@ public void onInventoryClick(InventoryClickEvent event) { } Player player = (Player) event.getWhoClicked(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); switch (event.getSlot()) { case 11: @@ -218,7 +218,7 @@ public void onInventoryClick(InventoryClickEvent event) { } @SuppressWarnings("deprecation") - private void toggleHidePlayers(Player player, Settings settings) { + private void toggleHidePlayers(Player player, CraftSettings settings) { if (settings.isHidePlayers()) { Bukkit.getOnlinePlayers().forEach(player::hidePlayer); } else { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java index e08e7a60..1aaf71fa 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java @@ -7,15 +7,16 @@ */ package de.eintosti.buildsystem.settings; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.version.util.MinecraftVersion; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.world.BuildWorldManager; import fr.mrmicky.fastboard.FastBoard; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitTask; @@ -28,16 +29,16 @@ public class SettingsManager { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; - private final WorldManager worldManager; + private final BuildWorldManager worldManager; private final Map boards; private final String scoreboardTitle; private final List scoreboardBody; - public SettingsManager(BuildSystem plugin) { + public SettingsManager(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); this.worldManager = plugin.getWorldManager(); @@ -48,21 +49,21 @@ public SettingsManager(BuildSystem plugin) { this.scoreboardBody = Messages.getStringList("body"); } - public Settings getSettings(UUID uuid) { + public CraftSettings getSettings(UUID uuid) { return plugin.getPlayerManager().getBuildPlayer(uuid).getSettings(); } - public Settings getSettings(Player player) { + public CraftSettings getSettings(Player player) { return getSettings(player.getUniqueId()); } /** - * Only set a player's scoreboard if {@link Settings#isScoreboard} is equal to {@code true}. + * Only set a player's scoreboard if {@link CraftSettings#isScoreboard} is equal to {@code true}. * * @param player The player object * @param settings The player's settings */ - public void startScoreboard(Player player, Settings settings) { + public void startScoreboard(Player player, CraftSettings settings) { if (!settings.isScoreboard()) { stopScoreboard(player, settings); return; @@ -72,7 +73,7 @@ public void startScoreboard(Player player, Settings settings) { } /** - * Only set a player's scoreboard if {@link Settings#isScoreboard} is equal to {@code true}. + * Only set a player's scoreboard if {@link CraftSettings#isScoreboard} is equal to {@code true}. * * @param player The player object */ @@ -81,7 +82,7 @@ public void startScoreboard(Player player) { return; } - Settings settings = getSettings(player); + CraftSettings settings = getSettings(player); FastBoard board = new FastBoard(player); this.boards.put(player.getUniqueId(), board); @@ -96,7 +97,7 @@ public void startScoreboard(Player player) { } /** - * Set each player's scoreboard if they have {@link Settings#isScoreboard} enabled. + * Set each player's scoreboard if they have {@link CraftSettings#isScoreboard} enabled. */ public void startScoreboard() { if (!configValues.isScoreboard()) { @@ -151,13 +152,13 @@ private String injectPlaceholders(String originalString, Player player) { // Is there an easier way of doing this? private String parseWorldInformation(BuildWorld buildWorld, String input) { if (buildWorld == null) { - return "§f-"; + return ChatColor.WHITE + "-"; } WorldData worldData = buildWorld.getData(); switch (input) { case "%status%": - return worldData.status().get().getName(); + return Messages.getDataString(worldData.status().get().getKey()); case "%permission%": return worldData.permission().get(); case "%project%": @@ -173,11 +174,11 @@ private String parseWorldInformation(BuildWorld buildWorld, String input) { case "%lastunloaded%": return Messages.formatDate(worldData.lastUnloaded().get()); default: - return "§f-"; + return ChatColor.WHITE + "-"; } } - private void stopScoreboard(Player player, Settings settings) { + private void stopScoreboard(Player player, CraftSettings settings) { BukkitTask scoreboardTask = settings.getScoreboardTask(); if (scoreboardTask != null) { scoreboardTask.cancel(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java index 7d6bbc56..370e330b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.settings; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; @@ -22,10 +22,10 @@ public class SpeedInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public SpeedInventory(BuildSystem plugin) { + public SpeedInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java index 1d0937a0..75d5581a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -20,7 +20,7 @@ public class BuildTabComplete extends ArgumentSorter implements TabCompleter { - public BuildTabComplete(BuildSystem plugin) { + public BuildTabComplete(BuildSystemPlugin plugin) { plugin.getCommand("build").setTabCompleter(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java index 76ede389..99b311e7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; @@ -18,7 +18,7 @@ public class ConfigTabComplete implements TabCompleter { - public ConfigTabComplete(BuildSystem plugin) { + public ConfigTabComplete(BuildSystemPlugin plugin) { plugin.getCommand("config").setTabCompleter(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java index 27fa9d55..076c9130 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; @@ -23,7 +23,7 @@ */ public class EmptyTabComplete implements TabCompleter { - public EmptyTabComplete(BuildSystem plugin) { + public EmptyTabComplete(BuildSystemPlugin plugin) { plugin.getCommand("back").setTabCompleter(this); plugin.getCommand("blocks").setTabCompleter(this); plugin.getCommand("buildsystem").setTabCompleter(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java index e3f903ae..185ffa0f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.command.Command; @@ -21,7 +21,7 @@ public class GamemodeTabComplete extends ArgumentSorter implements TabCompleter { - public GamemodeTabComplete(BuildSystem plugin) { + public GamemodeTabComplete(BuildSystemPlugin plugin) { plugin.getCommand("gamemode").setTabCompleter(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java index 99014f6e..80ff8117 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java @@ -7,8 +7,8 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; @@ -20,9 +20,9 @@ public class PhysicsTabComplete extends ArgumentSorter implements TabCompleter { - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public PhysicsTabComplete(BuildSystem plugin) { + public PhysicsTabComplete(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); plugin.getCommand("physics").setTabCompleter(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java index fd5af5d2..00f35750 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; @@ -19,7 +19,7 @@ public class SpawnTabComplete extends ArgumentSorter implements TabCompleter { - public SpawnTabComplete(BuildSystem plugin) { + public SpawnTabComplete(BuildSystemPlugin plugin) { plugin.getCommand("spawn").setTabCompleter(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java index 525c71b7..9a864ed5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java @@ -7,7 +7,7 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; @@ -18,7 +18,7 @@ public class SpeedTabComplete implements TabCompleter { - public SpeedTabComplete(BuildSystem plugin) { + public SpeedTabComplete(BuildSystemPlugin plugin) { plugin.getCommand("speed").setTabCompleter(this); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java index 429b0b5f..b715de78 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java @@ -7,8 +7,8 @@ */ package de.eintosti.buildsystem.tabcomplete; -import de.eintosti.buildsystem.BuildSystem; -import de.eintosti.buildsystem.world.WorldManager; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; @@ -20,9 +20,9 @@ public class TimeTabComplete extends ArgumentSorter implements TabCompleter { - private final WorldManager worldManager; + private final BuildWorldManager worldManager; - public TimeTabComplete(BuildSystem plugin) { + public TimeTabComplete(BuildSystemPlugin plugin) { this.worldManager = plugin.getWorldManager(); plugin.getCommand("day").setTabCompleter(this); plugin.getCommand("night").setTabCompleter(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java index d1c3ea95..838fd3ec 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java @@ -8,10 +8,10 @@ package de.eintosti.buildsystem.tabcomplete; import com.google.common.collect.Lists; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.generator.Generator; import de.eintosti.buildsystem.command.subcommand.Argument; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.generator.Generator; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -30,10 +30,10 @@ public class WorldsTabComplete extends ArgumentSorter implements TabCompleter { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; - public WorldsTabComplete(BuildSystem plugin) { + public WorldsTabComplete(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); plugin.getCommand("worlds").setTabCompleter(this); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java index 2e968c2e..48520c1c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java @@ -10,25 +10,26 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.settings.WorldDisplay; +import de.eintosti.buildsystem.api.settings.WorldSort; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Builder; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.config.SetupConfig; import de.eintosti.buildsystem.navigator.inventory.FilteredWorldsInventory; import de.eintosti.buildsystem.navigator.inventory.NavigatorInventory; -import de.eintosti.buildsystem.navigator.settings.WorldDisplay; -import de.eintosti.buildsystem.navigator.settings.WorldFilter; -import de.eintosti.buildsystem.navigator.settings.WorldSort; -import de.eintosti.buildsystem.player.PlayerManager; -import de.eintosti.buildsystem.settings.Settings; +import de.eintosti.buildsystem.navigator.settings.BuildWorldFilter; +import de.eintosti.buildsystem.player.BuildPlayerManager; +import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.Builder; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldStatus; -import de.eintosti.buildsystem.world.data.WorldType; +import de.eintosti.buildsystem.world.BuildWorldManager; +import de.eintosti.buildsystem.world.CraftBuildWorld; import de.eintosti.buildsystem.world.modification.EditInventory; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; @@ -55,17 +56,17 @@ public class InventoryUtils { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; private final SetupConfig setupConfig; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; private XMaterial normalCreateItem, flatCreateItem, netherCreateItem, endCreateItem, voidCreateItem, customCreateItem; private XMaterial normalDefaultItem, flatDefaultItem, netherDefaultItem, endDefaultItem, voidDefaultItem, importedDefaultItem; private XMaterial notStartedItem, inProgressItem, almostFinishedItem, finishedItem, archivedItem, hiddenItem; - public InventoryUtils(BuildSystem plugin) { + public InventoryUtils(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); this.setupConfig = new SetupConfig(plugin); @@ -167,7 +168,7 @@ public void addItemStack(Inventory inventory, int position, XMaterial material, addItemStack(inventory, position, material, displayName, Arrays.asList(lore)); } - public void addGlassPane(BuildSystem plugin, Player player, Inventory inventory, int position) { + public void addGlassPane(BuildSystemPlugin plugin, Player player, Inventory inventory, int position) { addItemStack(inventory, position, getColouredGlassPane(plugin, player), " "); } @@ -248,7 +249,7 @@ public void addWorldItem(Player player, Inventory inventory, int position, Build /** * Manage clicking in a {@link FilteredWorldsInventory}. *

          - * If the clicked item is the icon of a {@link BuildWorld}, the click is managed by {@link InventoryUtils#manageWorldItemClick(InventoryClickEvent, Player, ItemMeta, BuildWorld)}. + * If the clicked item is the icon of a {@link CraftBuildWorld}, the click is managed by {@link InventoryUtils#manageWorldItemClick(InventoryClickEvent, Player, ItemMeta, CraftBuildWorld)}. * Otherwise, the {@link NavigatorInventory} is opened if the glass pane at the bottom of the inventory is clicked. * * @param event The click event object to modify @@ -272,7 +273,7 @@ public void manageInventoryClick(InventoryClickEvent event, Player player, ItemS } if (slot >= 9 && slot <= 44) { - BuildWorld buildWorld = plugin.getWorldManager().getBuildWorld(getWorldName(displayName)); + CraftBuildWorld buildWorld = plugin.getWorldManager().getBuildWorld(getWorldName(displayName)); manageWorldItemClick(event, player, itemMeta, buildWorld); return; } @@ -284,12 +285,12 @@ public void manageInventoryClick(InventoryClickEvent event, Player player, ItemS } /** - * Manage the clicking of an {@link ItemStack} that represents a {@link BuildWorld}. + * Manage the clicking of an {@link ItemStack} that represents a {@link CraftBuildWorld}. *

          * If the click is a... *

            * ...left click, the world is loaded (if previously unloaded) and the player is teleported to said world. - *
          • ...right click and the player is permitted to edit the world {@link WorldManager#isPermitted(Player, String, String)}, + *
          • ...right click and the player is permitted to edit the world {@link BuildWorldManager#isPermitted(Player, String, String)}, * the {@link EditInventory} for the world is opened for said player. * If the player does not the the required permission the click is handled as a normal left click.
          • *
          @@ -299,7 +300,7 @@ public void manageInventoryClick(InventoryClickEvent event, Player player, ItemS * @param itemMeta The item meta of the clicked item * @param buildWorld The world represents by the clicked item */ - private void manageWorldItemClick(InventoryClickEvent event, Player player, ItemMeta itemMeta, BuildWorld buildWorld) { + private void manageWorldItemClick(InventoryClickEvent event, Player player, ItemMeta itemMeta, CraftBuildWorld buildWorld) { if (event.isLeftClick() || !plugin.getWorldManager().isPermitted(player, WorldsTabComplete.WorldsArgument.EDIT.getPermission(), buildWorld.getName())) { performNonEditClick(player, itemMeta); return; @@ -328,8 +329,8 @@ private void performNonEditClick(Player player, ItemMeta itemMeta) { } private void teleport(Player player, String worldName) { - WorldManager worldManager = plugin.getWorldManager(); - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + BuildWorldManager worldManager = plugin.getWorldManager(); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { return; } @@ -349,13 +350,13 @@ private String getWorldName(String input) { /** * Gets the worlds in the order they are to be displayed. - * First, the {@link WorldFilter} is applied. Then, the list of worlds is sorted using the {@link WorldSort}. + * First, the {@link BuildWorldFilter} is applied. Then, the list of worlds is sorted using the {@link WorldSort}. * * @param worldManager The world manager object * @param settings The settings that provide the sorting method * @return The list of sorted worlds */ - public List getDisplayOrder(WorldManager worldManager, Settings settings) { + public List getDisplayOrder(BuildWorldManager worldManager, CraftSettings settings) { WorldDisplay worldDisplay = settings.getWorldDisplay(); List buildWorlds = worldManager.getBuildWorlds().stream() .filter(worldDisplay.getWorldFilter().apply()) @@ -403,7 +404,7 @@ private List getLore(Player player, BuildWorld buildWorld) { WorldData worldData = buildWorld.getData(); @SuppressWarnings("unchecked") Map.Entry[] placeholders = new Map.Entry[]{ - new AbstractMap.SimpleEntry<>("%status%", worldData.status().get().getName()), + new AbstractMap.SimpleEntry<>("%status%", Messages.getDataString(worldData.status().get().getKey())), new AbstractMap.SimpleEntry<>("%project%", worldData.project().get()), new AbstractMap.SimpleEntry<>("%permission%", worldData.permission().get()), new AbstractMap.SimpleEntry<>("%creator%", buildWorld.hasCreator() ? buildWorld.getCreator() : "-"), @@ -450,7 +451,7 @@ private List getLore(Player player, BuildWorld buildWorld) { * * @param buildWorld The world which provides the builders * @return The formatted list of builders which have been added to the given world - * @see BuildWorld#getBuildersInfo() + * @see CraftBuildWorld#getBuildersInfo() */ private List formatBuilders(BuildWorld buildWorld) { String template = Messages.getString("world_item_builders_builder_template"); @@ -479,7 +480,7 @@ private List formatBuilders(BuildWorld buildWorld) { return builderNames; } - public void fillMultiInvWithGlass(BuildSystem plugin, Inventory inventory, Player player, int currentPage, int numOfPages) { + public void fillMultiInvWithGlass(BuildSystemPlugin plugin, Inventory inventory, Player player, int currentPage, int numOfPages) { for (int i = 0; i <= 8; i++) { addGlassPane(plugin, player, inventory, i); } @@ -489,17 +490,17 @@ public void fillMultiInvWithGlass(BuildSystem plugin, Inventory inventory, Playe } } - public XMaterial getColouredGlass(BuildSystem plugin, Player player) { + public XMaterial getColouredGlass(BuildSystemPlugin plugin, Player player) { SettingsManager settingsManager = plugin.getSettingsManager(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); Optional glass = XMaterial.matchXMaterial(settings.getDesignColor().name() + "_STAINED_GLASS"); return glass.orElse(XMaterial.BLACK_STAINED_GLASS); } - public XMaterial getColouredGlassPane(BuildSystem plugin, Player player) { + public XMaterial getColouredGlassPane(BuildSystemPlugin plugin, Player player) { SettingsManager settingsManager = plugin.getSettingsManager(); - Settings settings = settingsManager.getSettings(player); + CraftSettings settings = settingsManager.getSettings(player); Optional glass = XMaterial.matchXMaterial(settings.getDesignColor().name() + "_STAINED_GLASS_PANE"); return glass.orElse(XMaterial.BLACK_STAINED_GLASS_PANE); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java index bc9a334f..56ad1557 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java @@ -9,7 +9,7 @@ import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -26,7 +26,7 @@ public class PlayerChatInput implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final BukkitTask taskId; private final InputRunnable runWhenComplete; @@ -35,7 +35,7 @@ public class PlayerChatInput implements Listener { private final Map inputs = new HashMap<>(); - public PlayerChatInput(BuildSystem plugin, Player player, String titleKey, InputRunnable runWhenComplete) { + public PlayerChatInput(BuildSystemPlugin plugin, Player player, String titleKey, InputRunnable runWhenComplete) { this.plugin = plugin; String title = Messages.getString(titleKey); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java index a11555ad..b37eebc9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.util; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.plugin.java.JavaPlugin; @@ -53,7 +53,7 @@ private Object getNmsSkull(String name) throws Exception { public void cacheSkull(String name) { try { skullCache.put(name, getNmsSkull(name)); - JavaPlugin.getPlugin(BuildSystem.class).getLogger().info("Cached skull for: " + name); + JavaPlugin.getPlugin(BuildSystemPlugin.class).getLogger().info("Cached skull for: " + name); } catch (Exception e) { e.printStackTrace(); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/WorldManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java similarity index 84% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/WorldManager.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java index 4210f9c4..d9daf6cb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/WorldManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java @@ -10,19 +10,23 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Builder; +import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.WorldManager; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.api.world.generator.CustomGenerator; +import de.eintosti.buildsystem.api.world.generator.Generator; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.config.WorldConfig; -import de.eintosti.buildsystem.navigator.inventory.FilteredWorldsInventory.Visibility; import de.eintosti.buildsystem.util.FileUtils; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldStatus; -import de.eintosti.buildsystem.world.data.WorldType; -import de.eintosti.buildsystem.world.generator.CustomGenerator; -import de.eintosti.buildsystem.world.generator.Generator; +import de.eintosti.buildsystem.world.data.BuildWorldData; +import de.eintosti.buildsystem.world.generator.CustomGeneratorImpl; import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; import org.bukkit.Chunk; @@ -39,7 +43,6 @@ import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitRunnable; import org.jetbrains.annotations.Nullable; -import org.jetbrains.annotations.Unmodifiable; import java.io.File; import java.util.AbstractMap; @@ -57,17 +60,17 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; -public class WorldManager { +public class BuildWorldManager implements WorldManager { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; private final WorldConfig worldConfig; - private final Map buildWorlds; + private final Map buildWorlds; private static boolean importingAllWorlds = false; - public WorldManager(BuildSystem plugin) { + public BuildWorldManager(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); this.worldConfig = new WorldConfig(plugin); @@ -75,23 +78,13 @@ public WorldManager(BuildSystem plugin) { this.buildWorlds = new HashMap<>(); } - /** - * Gets the {@link BuildWorld} by the given name. - * - * @param worldName The name of the world - * @return The world object if one was found, {@code null} otherwise - */ - public BuildWorld getBuildWorld(String worldName) { + @Override + public CraftBuildWorld getBuildWorld(String worldName) { return this.buildWorlds.get(worldName); } - /** - * Gets the {@link BuildWorld} by the given {@link World}. - * - * @param world The bukkit world object - * @return The world object if one was found, {@code null} otherwise - */ - public BuildWorld getBuildWorld(World world) { + @Override + public CraftBuildWorld getBuildWorld(World world) { return getBuildWorld(world.getName()); } @@ -100,7 +93,7 @@ public BuildWorld getBuildWorld(World world) { * * @param buildWorld The world to add */ - public void addBuildWorld(BuildWorld buildWorld) { + public void addBuildWorld(CraftBuildWorld buildWorld) { this.buildWorlds.put(buildWorld.getName(), buildWorld); } @@ -113,35 +106,23 @@ public void removeBuildWorld(BuildWorld buildWorld) { this.buildWorlds.remove(buildWorld.getName()); } - /** - * Gets a list of all {@link BuildWorld}s. - * - * @return A list of all worlds - */ - @Unmodifiable + public Collection getCraftBuildWorlds() { + return this.buildWorlds.values(); + } + + @Override public Collection getBuildWorlds() { return Collections.unmodifiableCollection(buildWorlds.values()); } - /** - * Gets a list of all {@link BuildWorld}s created by the given player. - * - * @param player The player who created the world - * @return A list of all worlds created by the given player. - */ + @Override public List getBuildWorldsCreatedByPlayer(Player player) { return getBuildWorlds().stream() .filter(buildWorld -> buildWorld.isCreator(player)) .collect(Collectors.toList()); } - /** - * Gets a list of all {@link BuildWorld}s created by the given player. - * - * @param player The player who created the world - * @param visibility The visibility the world should have - * @return A list of all worlds created by the given player. - */ + @Override public List getBuildWorldsCreatedByPlayer(Player player, Visibility visibility) { return getBuildWorldsCreatedByPlayer(player).stream() .filter(buildWorld -> isCorrectVisibility(buildWorld.getData().privateWorld().get(), visibility)) @@ -149,7 +130,7 @@ public List getBuildWorldsCreatedByPlayer(Player player, Visibility } /** - * Gets if a {@link BuildWorld}'s visibility is equal to the given visibility. + * Gets if a {@link CraftBuildWorld}'s visibility is equal to the given visibility. * * @param privateWorld Whether the world is private * @param visibility The visibility the world should have @@ -169,7 +150,7 @@ public boolean isCorrectVisibility(boolean privateWorld, Visibility visibility) } /** - * Gets the name (and in doing so removes all illegal characters) of the {@link BuildWorld} the player is trying to create. + * Gets the name (and in doing so removes all illegal characters) of the {@link CraftBuildWorld} the player is trying to create. * If the world is going to be a private world, its name will be equal to the player's name. * * @param player The player who is creating the world @@ -215,14 +196,14 @@ private void startCustomGeneratorInput(Player player, String worldName, String t return; } - CustomGenerator customGenerator = new CustomGenerator(generatorInfo[0], chunkGenerator); + CustomGeneratorImpl customGenerator = new CustomGeneratorImpl(generatorInfo[0], chunkGenerator); plugin.getLogger().info("Using custom world generator: " + customGenerator.getName()); createWorld(player, worldName, WorldType.CUSTOM, customGenerator, template, privateWorld); }); } private void createWorld(Player player, String worldName, WorldType worldType, CustomGenerator customGenerator, String template, boolean privateWorld) { - new BuildWorldCreator(plugin, worldName) + new CraftBuildWorldCreator(plugin, worldName) .setType(worldType) .setTemplate(template) .setPrivate(privateWorld) @@ -230,17 +211,15 @@ private void createWorld(Player player, String worldName, WorldType worldType, C .createWorld(player); } - /** - * Checks if a world with the given name already exists. - * - * @param player The player who is creating the world - * @param worldName The name of the world - * @return Whether if a world with the given name already exists - */ - public boolean worldExists(Player player, String worldName) { + @Override + public boolean worldExists(String worldName) { boolean worldExists = getBuildWorld(worldName) != null; File worldFile = new File(Bukkit.getWorldContainer(), worldName); - if (worldExists || worldFile.exists()) { + return worldExists || worldFile.exists(); + } + + public boolean worldExists(Player player, String worldName) { + if (worldExists(worldName)) { Messages.sendMessage(player, "worlds_world_exists"); XSound.ENTITY_ITEM_BREAK.play(player); return true; @@ -248,20 +227,13 @@ public boolean worldExists(Player player, String worldName) { return false; } - /** - * Gets the {@link ChunkGenerator} for the generation of a {@link BuildWorld} with {@link WorldType#CUSTOM} - * - * @param generator The plugin's (generator) name - * @param generatorId Unique ID, if any, that was specified to indicate which generator was requested - * @param worldName Name of the world that the chunk generator should be applied to. - */ - @Nullable - public ChunkGenerator getChunkGenerator(String generator, String generatorId, String worldName) { - if (generator == null) { + @Override + public ChunkGenerator getChunkGenerator(String pluginName, String generatorId, String worldName) { + if (pluginName == null) { return null; } - Plugin plugin = Bukkit.getPluginManager().getPlugin(generator); + Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName); if (plugin == null) { return null; } @@ -269,6 +241,11 @@ public ChunkGenerator getChunkGenerator(String generator, String generatorId, St return plugin.getDefaultWorldGenerator(worldName, generatorId); } + @Override + public boolean importWorld(String worldName, Builder creator, Generator generator, String generatorName) { + return importWorld(null, worldName, creator, generator, generatorName, true); + } + /** * Import a {@link BuildWorld} from a world directory. * @@ -295,10 +272,10 @@ public boolean importWorld(Player player, String worldName, Builder creator, Gen } } - BuildWorldCreator worldCreator = new BuildWorldCreator(plugin, worldName) + CraftBuildWorldCreator worldCreator = new CraftBuildWorldCreator(plugin, worldName) .setType(WorldType.IMPORTED) .setCreator(creator) - .setCustomGenerator(new CustomGenerator(generatorName, chunkGenerator)) + .setCustomGenerator(new CustomGeneratorImpl(generatorName, chunkGenerator)) .setPrivate(false) .setCreationDate(FileUtils.getDirectoryCreation(new File(Bukkit.getWorldContainer(), worldName))); @@ -313,13 +290,13 @@ public boolean importWorld(Player player, String worldName, Builder creator, Gen } /** - * Import all {@link BuildWorld} from a given list of world names. + * Import all {@link CraftBuildWorld} from a given list of world names. * * @param player The player who is creating the world * @param creator The player who should be set as the creator of the world * @param worldList The list of world to be imported */ - public void importWorlds(Player player, String[] worldList, Generator generator, Builder creator) { + public void importWorlds(Player player, String[] worldList, Generator generator, CraftBuilder creator) { int worlds = worldList.length; int delay = configValues.getImportDelay(); @@ -368,15 +345,13 @@ public boolean isImportingAllWorlds() { return importingAllWorlds; } - /** - * Delete an existing {@link BuildWorld}. - * In comparison to {@link #unimportWorld(BuildWorld, boolean)}, deleting a world deletes the world's directory. - * - * @param player The player who issued the deletion - * @param buildWorld The world to be deleted - */ + @Override + public void deleteWorld(BuildWorld buildWorld) { + deleteWorld(null, buildWorld); + } + public void deleteWorld(Player player, BuildWorld buildWorld) { - if (!buildWorlds.containsValue(buildWorld)) { + if (!buildWorlds.containsKey(buildWorld.getName())) { Messages.sendMessage(player, "worlds_delete_unknown_world"); return; } @@ -397,13 +372,7 @@ public void deleteWorld(Player player, BuildWorld buildWorld) { }, 20L); } - /** - * Unimport an existing {@link BuildWorld}. - * In comparison to {@link #deleteWorld(Player, BuildWorld)}, unimporting a world does not delete the world's directory. - * - * @param buildWorld The build world object - * @param save Should the world be saved before unimporting - */ + @Override public void unimportWorld(BuildWorld buildWorld, boolean save) { buildWorld.forceUnload(save); this.buildWorlds.remove(buildWorld.getName()); @@ -457,44 +426,15 @@ private List removePlayersFromWorld(String worldName, String message) { return players; } - /** - * Change the name of a {@link BuildWorld} to a given name. - * - * @param player The player who issued the world rename - * @param buildWorld The build world object - * @param newName The name the world should be renamed to - */ - public void renameWorld(Player player, BuildWorld buildWorld, String newName) { - player.closeInventory(); - - String oldName = buildWorld.getName(); - if (oldName.equalsIgnoreCase(newName)) { - Messages.sendMessage(player, "worlds_rename_same_name"); - return; + @Override + public void renameWorld(BuildWorld buildWorld, String newName) { + CraftBuildWorld impl = getBuildWorld(buildWorld.getName()); + String oldName = impl.getName(); + if (Bukkit.getWorld(oldName) == null && !impl.isLoaded()) { + impl.load(); } - if (Arrays.stream(newName.split("")).anyMatch(c -> c.matches("[^A-Za-z\\d/_-]") || c.matches(configValues.getInvalidNameCharacters()))) { - Messages.sendMessage(player, "worlds_world_creation_invalid_characters"); - } - String parsedNewName = newName - .replaceAll("[^A-Za-z\\d/_-]", "") - .replaceAll(configValues.getInvalidNameCharacters(), "") - .replace(" ", "_") - .trim(); - if (parsedNewName.isEmpty()) { - Messages.sendMessage(player, "worlds_world_creation_name_bank"); - return; - } - - if (Bukkit.getWorld(oldName) == null && !buildWorld.isLoaded()) { - buildWorld.load(); - } - - World oldWorld = Bukkit.getWorld(oldName); - if (oldWorld == null) { - Messages.sendMessage(player, "worlds_rename_unknown_world"); - return; - } + World oldWorld = impl.getWorld(); List removedPlayers = removePlayersFromWorld(oldName, Messages.getString("worlds_rename_players_world")); for (Chunk chunk : oldWorld.getLoadedChunks()) { @@ -505,18 +445,18 @@ public void renameWorld(Player player, BuildWorld buildWorld, String newName) { this.buildWorlds.remove(oldName); Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> { - worldConfig.getFile().set("worlds." + parsedNewName, worldConfig.getFile().getConfigurationSection("worlds." + buildWorld.getName())); + worldConfig.getFile().set("worlds." + newName, worldConfig.getFile().getConfigurationSection("worlds." + buildWorld.getName())); worldConfig.getFile().set("worlds." + oldName, null); }); File oldWorldFile = new File(Bukkit.getWorldContainer(), oldName); - File newWorldFile = new File(Bukkit.getWorldContainer(), parsedNewName); + File newWorldFile = new File(Bukkit.getWorldContainer(), newName); FileUtils.copy(oldWorldFile, newWorldFile); FileUtils.deleteDirectory(oldWorldFile); - buildWorld.setName(parsedNewName); - this.addBuildWorld(buildWorld); - World newWorld = new BuildWorldCreator(plugin, buildWorld).generateBukkitWorld(false); + impl.setName(newName); + this.addBuildWorld(impl); + World newWorld = new CraftBuildWorldCreator(plugin, impl).generateBukkitWorld(false); Location spawnLocation = oldWorld.getSpawnLocation(); spawnLocation.setWorld(newWorld); @@ -530,6 +470,40 @@ public void renameWorld(Player player, BuildWorld buildWorld, String newName) { Location newSpawn = new Location(spawnLocation.getWorld(), oldSpawn.getX(), oldSpawn.getY(), oldSpawn.getZ(), oldSpawn.getYaw(), oldSpawn.getPitch()); spawnManager.set(newSpawn, newSpawn.getWorld().getName()); } + } + + public void renameWorld(Player player, BuildWorld buildWorld, String newName) { + player.closeInventory(); + + String oldName = buildWorld.getName(); + if (oldName.equalsIgnoreCase(newName)) { + Messages.sendMessage(player, "worlds_rename_same_name"); + return; + } + + if (Arrays.stream(newName.split("")).anyMatch(c -> c.matches("[^A-Za-z\\d/_-]") || c.matches(configValues.getInvalidNameCharacters()))) { + Messages.sendMessage(player, "worlds_world_creation_invalid_characters"); + } + String parsedNewName = newName + .replaceAll("[^A-Za-z\\d/_-]", "") + .replaceAll(configValues.getInvalidNameCharacters(), "") + .replace(" ", "_") + .trim(); + if (parsedNewName.isEmpty()) { + Messages.sendMessage(player, "worlds_world_creation_name_bank"); + return; + } + + if (Bukkit.getWorld(oldName) == null && !buildWorld.isLoaded()) { + buildWorld.load(); + } + World oldWorld = Bukkit.getWorld(oldName); + if (oldWorld == null) { + Messages.sendMessage(player, "worlds_rename_unknown_world"); + return; + } + + renameWorld(buildWorld, newName); Messages.sendMessage(player, "worlds_rename_set", new AbstractMap.SimpleEntry<>("%oldName%", oldName), @@ -537,13 +511,12 @@ public void renameWorld(Player player, BuildWorld buildWorld, String newName) { ); } - /** - * Teleport a player to a {@link BuildWorld}. - * - * @param player The player to be teleported - * @param buildWorld The build world object - */ - public void teleport(Player player, BuildWorld buildWorld) { + @Override + public void teleport(Player player, String worldName) { + teleport(player, getBuildWorld(worldName)); + } + + public void teleport(Player player, CraftBuildWorld buildWorld) { boolean hadToLoad = false; if (configValues.isUnloadWorlds() && !buildWorld.isLoaded()) { buildWorld.load(player); @@ -611,7 +584,7 @@ public boolean isSafeLocation(Location location) { } public boolean canEnter(Player player, BuildWorld buildWorld) { - if (player.hasPermission(BuildSystem.ADMIN_PERMISSION)) { + if (player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION)) { return true; } @@ -628,7 +601,7 @@ public boolean canEnter(Player player, BuildWorld buildWorld) { } public boolean canBypassBuildRestriction(Player player) { - return player.hasPermission(BuildSystem.ADMIN_PERMISSION) + return player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION) || player.hasPermission("buildsystem.bypass.archive") || plugin.getPlayerManager().isInBuildMode(player); } @@ -647,7 +620,7 @@ public boolean canBypassBuildRestriction(Player player) { * @return {@code true} if the player is allowed to run the command, {@code false} otherwise */ public boolean isPermitted(Player player, String permission, String worldName) { - if (player.hasPermission(BuildSystem.ADMIN_PERMISSION)) { + if (player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION)) { return true; } @@ -666,7 +639,7 @@ public boolean isPermitted(Player player, String permission, String worldName) { } public void save() { - worldConfig.saveWorlds(getBuildWorlds()); + worldConfig.saveWorlds(this.buildWorlds.values()); } public void load() { @@ -698,13 +671,13 @@ public void loadWorld(String worldName) { String creator = configuration.isString("worlds." + worldName + ".creator") ? configuration.getString("worlds." + worldName + ".creator") : "-"; UUID creatorId = parseCreatorId(configuration, worldName, creator); WorldType worldType = configuration.isString("worlds." + worldName + ".type") ? WorldType.valueOf(configuration.getString("worlds." + worldName + ".type")) : WorldType.UNKNOWN; - WorldData worldData = parseWorldData(configuration, worldName); + BuildWorldData worldData = parseWorldData(configuration, worldName); long creationDate = configuration.isLong("worlds." + worldName + ".date") ? configuration.getLong("worlds." + worldName + ".date") : -1; List builders = parseBuilders(configuration, worldName); String generatorName = configuration.getString("worlds." + worldName + ".chunk-generator"); - CustomGenerator customGenerator = new CustomGenerator(generatorName, parseChunkGenerator(worldName, generatorName)); + CustomGeneratorImpl customGenerator = new CustomGeneratorImpl(generatorName, parseChunkGenerator(worldName, generatorName)); - this.addBuildWorld(new BuildWorld( + this.addBuildWorld(new CraftBuildWorld( worldName, creator, creatorId, @@ -716,7 +689,7 @@ public void loadWorld(String worldName) { )); } - private WorldData parseWorldData(FileConfiguration configuration, String worldName) { + private BuildWorldData parseWorldData(FileConfiguration configuration, String worldName) { final String path = "worlds." + worldName + ".data"; // Load legacy configurations if (configuration.getString(path) == null) { @@ -737,7 +710,7 @@ private WorldData parseWorldData(FileConfiguration configuration, String worldNa boolean physics = configuration.getBoolean("worlds." + worldName + ".physics"); boolean privateWorld = configuration.isBoolean("worlds." + worldName + ".private") && configuration.getBoolean("worlds." + worldName + ".private"); - return new WorldData( + return new BuildWorldData( customSpawn, permission, project, difficulty, material, worldStatus, blockBreaking, blockInteractions, blockPlacement, buildersEnabled, explosions, mobAi, physics, privateWorld, -1, -1, -1 ); @@ -764,7 +737,7 @@ private WorldData parseWorldData(FileConfiguration configuration, String worldNa long lastLoaded = configuration.getLong(path + ".last-loaded"); long lastUnloaded = configuration.getLong(path + ".last-unloaded"); - return new WorldData( + return new BuildWorldData( customSpawn, permission, project, difficulty, material, worldStatus, blockBreaking, blockInteractions, blockPlacement, buildersEnabled, explosions, mobAi, physics, privateWorld, lastEdited, lastLoaded, lastUnloaded ); @@ -811,7 +784,7 @@ private List parseBuilders(FileConfiguration configuration, String worl String[] splitBuilders = buildersString.split(";"); for (String builder : splitBuilders) { String[] information = builder.split(","); - builders.add(new Builder(UUID.fromString(information[0]), information[1])); + builders.add(new CraftBuilder(UUID.fromString(information[0]), information[1])); } } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorld.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java similarity index 71% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorld.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java index 7905807f..04d75d80 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorld.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java @@ -9,18 +9,21 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.messages.Titles; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.event.world.BuildWorldLoadEvent; +import de.eintosti.buildsystem.api.event.world.BuildWorldPostLoadEvent; +import de.eintosti.buildsystem.api.event.world.BuildWorldPostUnloadEvent; +import de.eintosti.buildsystem.api.event.world.BuildWorldUnloadEvent; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Builder; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.config.ConfigValues; -import de.eintosti.buildsystem.event.world.BuildWorldLoadEvent; -import de.eintosti.buildsystem.event.world.BuildWorldPostLoadEvent; -import de.eintosti.buildsystem.event.world.BuildWorldPostUnloadEvent; -import de.eintosti.buildsystem.event.world.BuildWorldUnloadEvent; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.data.WorldData; -import de.eintosti.buildsystem.world.data.WorldType; -import de.eintosti.buildsystem.world.generator.CustomGenerator; +import de.eintosti.buildsystem.world.data.BuildWorldData; +import de.eintosti.buildsystem.world.generator.CustomGeneratorImpl; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.Difficulty; @@ -41,9 +44,9 @@ import java.util.UUID; import java.util.stream.Collectors; -public class BuildWorld implements ConfigurationSerializable { +public class CraftBuildWorld implements BuildWorld, ConfigurationSerializable { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; private String name; @@ -51,32 +54,32 @@ public class BuildWorld implements ConfigurationSerializable { private UUID creatorId; private final WorldType worldType; - private final WorldData worldData; + private final BuildWorldData worldData; private final long creationDate; - private final CustomGenerator customGenerator; + private final de.eintosti.buildsystem.api.world.generator.CustomGenerator customGenerator; private final List builders; private long seconds; private boolean loaded; private BukkitTask unloadTask; - public BuildWorld( + public CraftBuildWorld( String name, String creator, UUID creatorId, WorldType worldType, long creationDate, boolean privateWorld, - CustomGenerator customGenerator + de.eintosti.buildsystem.api.world.generator.CustomGenerator customGenerator ) { - this.plugin = JavaPlugin.getPlugin(BuildSystem.class); + this.plugin = JavaPlugin.getPlugin(BuildSystemPlugin.class); this.configValues = plugin.getConfigValues(); this.name = name; this.creator = creator; this.creatorId = creatorId; this.worldType = worldType; - this.worldData = new WorldData( + this.worldData = new BuildWorldData( name, configValues, privateWorld @@ -121,17 +124,17 @@ public BuildWorld( manageUnload(); } - public BuildWorld( + public CraftBuildWorld( String name, String creator, UUID creatorId, WorldType worldType, - WorldData worldData, + BuildWorldData worldData, long creationDate, - CustomGenerator customGenerator, + CustomGeneratorImpl customGenerator, List builders ) { - this.plugin = JavaPlugin.getPlugin(BuildSystem.class); + this.plugin = JavaPlugin.getPlugin(BuildSystemPlugin.class); this.configValues = plugin.getConfigValues(); this.name = name; @@ -146,90 +149,49 @@ public BuildWorld( manageUnload(); } - /** - * Get the world linked to this object. - * - * @return The bukkit world - */ + @Override public World getWorld() { return Bukkit.getWorld(name); } - /** - * Get the name of the world. - * - * @return The world's name - */ + @Override public String getName() { return name; } - /** - * Set the name of the world. - * - * @param name The name to set to - */ + @Override public void setName(String name) { this.name = name; } - /** - * Gets whether the world has a creator - * - * @return {@code true} if the world has a creator, {@code false} otherwise - */ + @Override public boolean hasCreator() { return getCreator() != null; } - /** - * Get the name of the player who created the world. - *

          - * In older versions of the plugin, the creator was not saved which is why {@code null} can be returned. - * - * @return The name of the player who created the world - */ + @Override @Nullable public String getCreator() { return creator; } - /** - * Set the name of the creator. - * - * @param creator The name of the creator - */ + @Override public void setCreator(String creator) { this.creator = creator; } - /** - * Get the unique-id of the player who created the world. - *

          - * In older versions of the plugin, the creator was not saved which is why {@code null} can be returned. - * - * @return The unique-id of the player who created the world - */ + @Override @Nullable public UUID getCreatorId() { return creatorId; } - /** - * Set the unique-id of the creator. - * - * @param creatorId The unique-id of the creator - */ + @Override public void setCreatorId(UUID creatorId) { this.creatorId = creatorId; } - /** - * Gets whether the given player is the creator of the world. - * - * @param player The player to check - * @return {@code true} if the player is the creator, {@code false} otherwise - */ + @Override public boolean isCreator(Player player) { return creatorId != null && creatorId.equals(player.getUniqueId()); } @@ -253,40 +215,24 @@ private String saveCreatorId() { } } - /** - * Get world's type. - * - * @return The {@link WorldType} of the world - */ + @Override public WorldType getType() { return worldType; } - /** - * Gets the world's data. - * - * @return The {@link WorldData} of the world - */ + @Override public WorldData getData() { return worldData; } - /** - * Get the creation date of the world. - * - * @return The amount of milliseconds that have passed since {@code January 1, 1970 UTC}, until the world was created. - */ + @Override public long getCreationDate() { return creationDate; } - /** - * Get the custom chunk generator used to generate the world. - * - * @return The custom chunk generator used to generate the world. - */ + @Override @Nullable - public CustomGenerator getCustomGenerator() { + public de.eintosti.buildsystem.api.world.generator.CustomGenerator getCustomGenerator() { return customGenerator; } @@ -294,7 +240,7 @@ public CustomGenerator getCustomGenerator() { * Get the display name of a {@link Difficulty}. * * @return the difficulty's display name - * @see WorldData#difficulty() + * @see BuildWorldData#difficulty() */ public String getDifficultyName() { switch (worldData.difficulty().get()) { @@ -311,9 +257,7 @@ public String getDifficultyName() { } } - /** - * Cycles to the next {@link Difficulty}. - */ + @Override public void cycleDifficulty() { switch (worldData.difficulty().get()) { case PEACEFUL: @@ -331,11 +275,7 @@ public void cycleDifficulty() { } } - /** - * Get a list of all builders who can modify the world. - * - * @return the list of all builders - */ + @Override public List getBuilders() { return builders; } @@ -362,82 +302,50 @@ public String getBuildersInfo() { return string.substring(0, string.length() - 1); } - /** - * Get a list of all {@link Builder} names - * - * @return A list of all builder names - */ + @Override public List getBuilderNames() { return getBuilders().stream() .map(Builder::getName) .collect(Collectors.toList()); } - /** - * Get a builder by the given uuid. - * - * @param uuid The player's unique-id - * @return The builder object, if any, or {@code null} - */ + @Override @Nullable public Builder getBuilder(UUID uuid) { - return this.builders.parallelStream() + return this.builders.stream() .filter(builder -> builder.getUuid().equals(uuid)) .findFirst() .orElse(null); } - /** - * Get whether the given uuid matches that of an added builder. - * - * @param uuid The unique-id of the player to be checked - * @return Whether the player is a builder - */ + @Override public boolean isBuilder(UUID uuid) { - return this.builders.parallelStream().anyMatch(builder -> builder.getUuid().equals(uuid)); + return this.builders.stream().anyMatch(builder -> builder.getUuid().equals(uuid)); } - /** - * Get whether the given player has been added as a {@link Builder}. - * - * @param player The player to be checked - * @return Whether the {@link Player} is a builder - * @see BuildWorld#isBuilder(UUID) - */ + @Override public boolean isBuilder(Player player) { return isBuilder(player.getUniqueId()); } - /** - * Add a {@link Builder} to the current list of builders - * - * @param builder The builder object - */ + @Override public void addBuilder(Builder builder) { this.builders.add(builder); } - /** - * Remove a {@link Builder} from the current list of builders - * - * @param builder The builder object - */ - private void removeBuilder(Builder builder) { + + @Override + public void removeBuilder(Builder builder) { this.builders.remove(builder); } - /** - * Add a {@link Builder} to the current list of builders - * - * @param uuid The builder's unique ID - * @see BuildWorld#removeBuilder(Builder) - */ + @Override public void removeBuilder(UUID uuid) { removeBuilder(getBuilder(uuid)); } /*** - * Save the list of {@link Builder}s in a string which is suitable to be stored. + * Save the list of {@link CraftBuilder}s in a string which is suitable to be stored. * * @return The list of builders as a string */ @@ -462,11 +370,7 @@ public String getWorldTime() { return String.valueOf(bukkitWorld.getTime()); } - /** - * Get whether the world has been loaded, allowing a player to enter it. - * - * @return {@code true} if the world is loaded, otherwise {@code false} - */ + @Override public boolean isLoaded() { return loaded; } @@ -498,7 +402,8 @@ public void resetUnloadTask() { startUnloadTask(); } - private void unload() { + @Override + public void unload() { World bukkitWorld = getWorld(); if (bukkitWorld == null) { return; @@ -512,6 +417,7 @@ private void unload() { forceUnload(true); } + @Override public void forceUnload(boolean save) { World bukkitWorld = getWorld(); if (bukkitWorld == null) { @@ -563,6 +469,7 @@ public void load(Player player) { load(); } + @Override public void load() { if (isLoaded()) { return; @@ -575,7 +482,7 @@ public void load() { } plugin.getLogger().info("*** Loading world \"" + name + "\" ***"); - World world = new BuildWorldCreator(plugin, this).generateBukkitWorld(); + World world = new CraftBuildWorldCreator(plugin, this).generateBukkitWorld(); if (world == null) { return; } @@ -592,11 +499,11 @@ public void load() { public @NotNull Map serialize() { Map world = new HashMap<>(); - world.put("creator", getCreator()); + world.put("creator", creator); world.put("creator-id", saveCreatorId()); - world.put("type", getType().name()); - world.put("data", getData().serialize()); - world.put("date", getCreationDate()); + world.put("type", worldType.name()); + world.put("data", worldData.serialize()); + world.put("date", creationDate); world.put("builders", saveBuilders()); if (customGenerator != null) { world.put("chunk-generator", customGenerator.getName()); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldCreator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java similarity index 84% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldCreator.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java index a4a892cb..a71c5de0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldCreator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java @@ -8,12 +8,15 @@ package de.eintosti.buildsystem.world; import com.cryptomorin.xseries.XMaterial; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.BuildWorldCreator; +import de.eintosti.buildsystem.api.world.Builder; +import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.api.world.generator.CustomGenerator; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.util.FileUtils; -import de.eintosti.buildsystem.world.data.WorldType; -import de.eintosti.buildsystem.world.generator.CustomGenerator; import de.eintosti.buildsystem.world.generator.voidgenerator.DeprecatedVoidGenerator; import de.eintosti.buildsystem.world.generator.voidgenerator.ModernVoidGenerator; import dev.dewy.nbt.Nbt; @@ -34,14 +37,10 @@ import java.io.IOException; import java.util.AbstractMap; -/** - * @author Trichtern - * @since 2.21.0 - */ -public class BuildWorldCreator { +public class CraftBuildWorldCreator implements BuildWorldCreator { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; private String worldName; private Builder creator; @@ -52,7 +51,7 @@ public class BuildWorldCreator { private String template = null; private Difficulty difficulty; - public BuildWorldCreator(BuildSystem plugin, @NotNull String name) { + public CraftBuildWorldCreator(BuildSystemPlugin plugin, @NotNull String name) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); @@ -60,7 +59,7 @@ public BuildWorldCreator(BuildSystem plugin, @NotNull String name) { setDifficulty(plugin.getConfigValues().getWorldDifficulty()); } - public BuildWorldCreator(BuildSystem plugin, BuildWorld buildWorld) { + public CraftBuildWorldCreator(BuildSystemPlugin plugin, BuildWorld buildWorld) { this(plugin, buildWorld.getName()); setDifficulty(buildWorld.getData().difficulty().get()); @@ -70,52 +69,61 @@ public BuildWorldCreator(BuildSystem plugin, BuildWorld buildWorld) { setPrivate(buildWorld.getData().privateWorld().get()); } - public BuildWorldCreator setName(String name) { + @Override + public CraftBuildWorldCreator setName(String name) { this.worldName = name; return this; } - public BuildWorldCreator setCreator(Builder creator) { + @Override + public CraftBuildWorldCreator setCreator(Builder creator) { this.creator = creator; return this; } - public BuildWorldCreator setTemplate(String template) { + @Override + public CraftBuildWorldCreator setTemplate(String template) { this.template = ChatColor.stripColor(template); return this; } - public BuildWorldCreator setType(WorldType type) { + @Override + public CraftBuildWorldCreator setType(WorldType type) { this.worldType = type; return this; } - public BuildWorldCreator setCustomGenerator(CustomGenerator customGenerator) { + @Override + public CraftBuildWorldCreator setCustomGenerator(CustomGenerator customGenerator) { this.customGenerator = customGenerator; return this; } - public BuildWorldCreator setPrivate(boolean privateWorld) { + @Override + public CraftBuildWorldCreator setPrivate(boolean privateWorld) { this.privateWorld = privateWorld; return this; } - public BuildWorldCreator setDifficulty(Difficulty difficulty) { + @Override + public CraftBuildWorldCreator setDifficulty(Difficulty difficulty) { this.difficulty = difficulty; return this; } - public BuildWorldCreator setCreationDate(long creationDate) { + @Override + public CraftBuildWorldCreator setCreationDate(long creationDate) { this.creationDate = creationDate; return this; } /** - * Depending on the {@link BuildWorld}'s {@link WorldType}, the corresponding {@link World} will be generated in a different way. + * Depending on the {@link CraftBuildWorld}'s {@link WorldType}, the corresponding {@link World} will be generated in a different way. * Then, if the creation of the world was successful and the config is set accordingly, the player is teleported to the world. * * @param player The player who is creating the world */ + @Override public void createWorld(Player player) { switch (worldType) { case TEMPLATE: @@ -127,8 +135,8 @@ public void createWorld(Player player) { } } - private BuildWorld createBuildWorldObject(Player player) { - BuildWorld buildWorld = new BuildWorld( + private CraftBuildWorld createBuildWorldObject(Player player) { + CraftBuildWorld buildWorld = new CraftBuildWorld( worldName, creator == null ? player.getName() : creator.getName(), creator == null ? player.getUniqueId() : creator.getUuid(), @@ -142,7 +150,7 @@ private BuildWorld createBuildWorldObject(Player player) { } /** - * Generate a {@link BuildWorld} with a predefined or custom generator. + * Generate a {@link CraftBuildWorld} with a predefined or custom generator. * * @param player The player who is creating the world */ @@ -151,12 +159,12 @@ private void createPredefinedOrCustomWorld(Player player) { return; } - BuildWorld buildWorld = createBuildWorldObject(player); + CraftBuildWorld buildWorld = createBuildWorldObject(player); worldManager.addBuildWorld(buildWorld); Messages.sendMessage(player, "worlds_world_creation_started", new AbstractMap.SimpleEntry<>("%world%", worldName), - new AbstractMap.SimpleEntry<>("%type%", worldType.getName()) + new AbstractMap.SimpleEntry<>("%type%", Messages.getDataString(worldType.getKey())) ); finishPreparationsAndGenerate(buildWorld); teleportAfterCreation(player); @@ -164,13 +172,13 @@ private void createPredefinedOrCustomWorld(Player player) { } /** - * Imports an existing world as a {@link BuildWorld}. + * Imports an existing world as a {@link CraftBuildWorld}. * * @param player The player who is importing the world * @param teleport Should the player be teleported to the world after importing is finished */ public void importWorld(Player player, boolean teleport) { - BuildWorld buildWorld = createBuildWorldObject(player); + CraftBuildWorld buildWorld = createBuildWorldObject(player); worldManager.addBuildWorld(buildWorld); finishPreparationsAndGenerate(buildWorld); if (teleport) { @@ -179,7 +187,7 @@ public void importWorld(Player player, boolean teleport) { } /** - * Generate a {@link BuildWorld} with a template. + * Generate a {@link CraftBuildWorld} with a template. * * @param player The player who is creating the world */ @@ -195,7 +203,7 @@ private void createTemplateWorld(Player player) { return; } - BuildWorld buildWorld = createBuildWorldObject(player); + CraftBuildWorld buildWorld = createBuildWorldObject(player); worldManager.addBuildWorld(buildWorld); Messages.sendMessage(player, "worlds_template_creation_started", @@ -244,7 +252,7 @@ public World generateBukkitWorld() { } /** - * Generate the {@link World} linked to a {@link BuildWorld}. + * Generate the {@link World} linked to a {@link CraftBuildWorld}. * * @param checkVersion Should the world version be checked * @return The world object @@ -390,7 +398,7 @@ private void teleportAfterCreation(Player player) { return; } - BuildWorld buildWorld = worldManager.getBuildWorld(worldName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/Builder.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java similarity index 77% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/Builder.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java index f71c21a2..22e23cf6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/Builder.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java @@ -7,33 +7,37 @@ */ package de.eintosti.buildsystem.world; +import de.eintosti.buildsystem.api.world.Builder; import org.bukkit.entity.Player; import java.util.UUID; -public class Builder { +public class CraftBuilder implements Builder { private final UUID uuid; private String name; - public Builder(Player player) { + public CraftBuilder(Player player) { this.uuid = player.getUniqueId(); this.name = player.getName(); } - public Builder(UUID uuid, String name) { + public CraftBuilder(UUID uuid, String name) { this.uuid = uuid; this.name = name; } + @Override public UUID getUuid() { return uuid; } + @Override public String getName() { return name; } + @Override public void setName(String name) { this.name = name; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java index 1c2a23f1..5c2e55e6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java @@ -8,7 +8,8 @@ package de.eintosti.buildsystem.world; import com.cryptomorin.xseries.messages.Titles; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.config.SpawnConfig; import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; @@ -19,14 +20,14 @@ public class SpawnManager { - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; private final SpawnConfig spawnConfig; private String spawnName; private Location spawn; - public SpawnManager(BuildSystem plugin) { + public SpawnManager(BuildSystemPlugin plugin) { this.plugin = plugin; this.worldManager = plugin.getWorldManager(); this.spawnConfig = new SpawnConfig(plugin); @@ -37,7 +38,7 @@ public boolean teleport(Player player) { return false; } - BuildWorld buildWorld = worldManager.getBuildWorld(spawnName); + CraftBuildWorld buildWorld = worldManager.getBuildWorld(spawnName); if (buildWorld != null) { if (!buildWorld.isLoaded()) { buildWorld.load(player); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldData.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java similarity index 52% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldData.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java index f635b153..7faf6c48 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/WorldData.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java @@ -8,6 +8,8 @@ package de.eintosti.buildsystem.world.data; import com.cryptomorin.xseries.XMaterial; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; import org.bukkit.Difficulty; import org.bukkit.configuration.serialization.ConfigurationSerializable; @@ -17,41 +19,41 @@ import java.util.Map; import java.util.stream.Collectors; -public class WorldData implements ConfigurationSerializable { +public class BuildWorldData implements WorldData, ConfigurationSerializable { - private final Map> data = new HashMap<>(); + private final Map> data = new HashMap<>(); - private final Type customSpawn = register("spawn"); - private final Type permission = register("permission"); - private final Type project = register("project"); + private final DataType customSpawn = register("spawn"); + private final DataType permission = register("permission"); + private final DataType project = register("project"); - private final Type difficulty = register("difficulty", new DifficultyType()); - private final Type material = register("material", new MaterialType()); - private final Type status = register("status", new StatusType()); + private final DataType difficulty = register("difficulty", new DifficultyType()); + private final DataType material = register("material", new MaterialType()); + private final DataType status = register("status", new StatusType()); - private final Type blockBreaking = register("block-breaking"); - private final Type blockInteractions = register("block-interactions"); - private final Type blockPlacement = register("block-placement"); - private final Type buildersEnabled = register("builders-enabled"); - private final Type explosions = register("explosions"); - private final Type mobAi = register("mob-ai"); - private final Type physics = register("physics"); - private final Type privateWorld = register("private"); + private final DataType blockBreaking = register("block-breaking"); + private final DataType blockInteractions = register("block-interactions"); + private final DataType blockPlacement = register("block-placement"); + private final DataType buildersEnabled = register("builders-enabled"); + private final DataType explosions = register("explosions"); + private final DataType mobAi = register("mob-ai"); + private final DataType physics = register("physics"); + private final DataType privateWorld = register("private"); - private final Type lastEdited = register("last-edited"); - private final Type lastLoaded = register("last-loaded"); - private final Type lastUnloaded = register("last-unloaded"); + private final DataType lastEdited = register("last-edited"); + private final DataType lastLoaded = register("last-loaded"); + private final DataType lastUnloaded = register("last-unloaded"); - public Type register(@NotNull String key) { - return register(key, new Type<>()); + public DataType register(@NotNull String key) { + return register(key, new DataType<>()); } - public Type register(@NotNull String key, Type type) { + public DataType register(@NotNull String key, DataType type) { this.data.put(key, type); return type; } - public WorldData(String name, ConfigValues configValues, boolean privateWorld) { + public BuildWorldData(String name, ConfigValues configValues, boolean privateWorld) { this.customSpawn.set(null); this.permission.set(configValues.getDefaultPermission(privateWorld).replace("%world%", name)); this.project.set("-"); @@ -73,7 +75,7 @@ public WorldData(String name, ConfigValues configValues, boolean privateWorld) { this.lastUnloaded.set((long) -1); } - public WorldData(String customSpawn, String permission, String project, Difficulty difficulty, XMaterial material, WorldStatus worldStatus, boolean blockBreaking, boolean blockInteractions, boolean blockPlacement, boolean buildersEnabled, boolean explosions, boolean mobAi, boolean physics, boolean privateWorld, long lastLoaded, long lastUnloaded, long lastEdited) { + public BuildWorldData(String customSpawn, String permission, String project, Difficulty difficulty, XMaterial material, WorldStatus worldStatus, boolean blockBreaking, boolean blockInteractions, boolean blockPlacement, boolean buildersEnabled, boolean explosions, boolean mobAi, boolean physics, boolean privateWorld, long lastLoaded, long lastUnloaded, long lastEdited) { this.customSpawn.set(customSpawn); this.permission.set(permission); this.project.set(project); @@ -96,71 +98,88 @@ public WorldData(String customSpawn, String permission, String project, Difficul this.lastUnloaded.set(lastUnloaded); } - public Type customSpawn() { + @Override + public DataType customSpawn() { return customSpawn; } - public Type permission() { + @Override + public DataType permission() { return permission; } - public Type project() { + @Override + public DataType project() { return project; } - public Type difficulty() { + @Override + public DataType difficulty() { return difficulty; } - public Type material() { + @Override + public DataType material() { return material; } - public Type status() { + @Override + public DataType status() { return status; } - public Type blockBreaking() { + @Override + public DataType blockBreaking() { return blockBreaking; } - public Type blockInteractions() { + @Override + public DataType blockInteractions() { return blockInteractions; } - public Type blockPlacement() { + @Override + public DataType blockPlacement() { return blockPlacement; } - public Type buildersEnabled() { + @Override + public DataType buildersEnabled() { return buildersEnabled; } - public Type explosions() { + @Override + public DataType explosions() { return explosions; } - public Type mobAi() { + @Override + public DataType mobAi() { return mobAi; } - public Type physics() { + @Override + public DataType physics() { return physics; } - public Type privateWorld() { + @Override + public DataType privateWorld() { return privateWorld; } - public Type lastEdited() { + @Override + public DataType lastEdited() { return lastEdited; } - public Type lastLoaded() { + @Override + public DataType lastLoaded() { return lastLoaded; } - public Type lastUnloaded() { + @Override + public DataType lastUnloaded() { return lastUnloaded; } @@ -171,13 +190,15 @@ public Type lastUnloaded() { .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().getConfigFormat())); } - public static class Type { + public static class DataType implements Type { private T value; + @Override public T get() { return value; } + @Override public void set(T value) { this.value = value; } @@ -187,21 +208,21 @@ protected Object getConfigFormat() { } } - public static class DifficultyType extends Type { + public static class DifficultyType extends DataType { @Override protected Object getConfigFormat() { return super.get().name(); } } - public static class MaterialType extends Type { + public static class MaterialType extends DataType { @Override protected Object getConfigFormat() { return super.get().name(); } } - public static class StatusType extends Type { + public static class StatusType extends DataType { @Override protected Object getConfigFormat() { return super.get().name(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/StatusInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/StatusInventory.java index 55067b90..85a2202c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/StatusInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/StatusInventory.java @@ -9,11 +9,13 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; @@ -30,11 +32,11 @@ public class StatusInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; - public StatusInventory(BuildSystem plugin) { + public StatusInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); this.playerManager = plugin.getPlayerManager(); @@ -84,7 +86,7 @@ private void addItem(Player player, Inventory inventory, int position, XMaterial } itemStack.setItemMeta(itemMeta); - BuildWorld cachedWorld = playerManager.getBuildPlayer(player).getCachedWorld(); + CraftBuildWorld cachedWorld = playerManager.getBuildPlayer(player).getCachedWorld(); if (cachedWorld != null && cachedWorld.getData().status().get() == worldStatus) { itemStack.addUnsafeEnchantment(Enchantment.DURABILITY, 1); } @@ -116,7 +118,7 @@ public void onInventoryClick(InventoryClickEvent event) { return; } - BuildWorld buildWorld = playerManager.getBuildPlayer(player).getCachedWorld(); + CraftBuildWorld buildWorld = playerManager.getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { player.closeInventory(); Messages.sendMessage(player, "worlds_setstatus_error"); @@ -155,7 +157,7 @@ public void onInventoryClick(InventoryClickEvent event) { XSound.ENTITY_CHICKEN_EGG.play(player); Messages.sendMessage(player, "worlds_setstatus_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName()), - new AbstractMap.SimpleEntry<>("%status%", buildWorld.getData().status().get().getName()) + new AbstractMap.SimpleEntry<>("%status%", Messages.getDataString(buildWorld.getData().status().get().getKey())) ); playerManager.getBuildPlayer(player).setCachedWorld(null); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java similarity index 71% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGenerator.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java index 6259201a..14946069 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java @@ -7,22 +7,25 @@ */ package de.eintosti.buildsystem.world.generator; +import de.eintosti.buildsystem.api.world.generator.CustomGenerator; import org.bukkit.generator.ChunkGenerator; -public class CustomGenerator { +public class CustomGeneratorImpl implements CustomGenerator { private final String name; private final ChunkGenerator chunkGenerator; - public CustomGenerator(String name, ChunkGenerator chunkGenerator) { + public CustomGeneratorImpl(String name, ChunkGenerator chunkGenerator) { this.name = name; this.chunkGenerator = chunkGenerator; } + @Override public String getName() { return name; } + @Override public ChunkGenerator getChunkGenerator() { return chunkGenerator; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/Generator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/Generator.java deleted file mode 100644 index 8323f8d6..00000000 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/Generator.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ -package de.eintosti.buildsystem.world.generator; - -import de.eintosti.buildsystem.world.data.WorldType; - -public enum Generator { - NORMAL(WorldType.NORMAL), - FLAT(WorldType.FLAT), - VOID(WorldType.VOID), - CUSTOM(WorldType.IMPORTED); - - private final WorldType worldType; - - Generator(WorldType worldType) { - this.worldType = worldType; - } - - public WorldType getWorldType() { - return worldType; - } -} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java index e4375fcd..77fd711c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java @@ -15,9 +15,6 @@ /** * The {@link VoidGenerator} that is used for servers which run on Spigot 1.13-1.16. - * - * @author einTosti - * @since 2.18.2 */ @SuppressWarnings("deprecation") public class DeprecatedVoidGenerator extends VoidGenerator { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java index e5d161b9..6f66c5d2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java @@ -18,9 +18,6 @@ /** * The {@link VoidGenerator} that is used for servers which run on Spigot 1.17+ - * - * @author einTosti - * @since 2.18.2 */ public class ModernVoidGenerator extends VoidGenerator { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java index dd9355d1..10f99b8c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java @@ -9,15 +9,16 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Builder; import de.eintosti.buildsystem.command.subcommand.worlds.AddBuilderSubCommand; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.PaginatedInventory; import de.eintosti.buildsystem.util.StringUtils; import de.eintosti.buildsystem.util.UUIDFetcher; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.Builder; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -36,12 +37,12 @@ public class BuilderInventory extends PaginatedInventory implements Listener { private static final int MAX_BUILDERS = 9; - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; private int numBuilders = 0; - public BuilderInventory(BuildSystem plugin) { + public BuilderInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); @@ -72,7 +73,7 @@ private void addCreatorInfoItem(Inventory inventory, BuildWorld buildWorld) { private void addBuilderAddItem(Inventory inventory, BuildWorld buildWorld, Player player) { UUID creatorId = buildWorld.getCreatorId(); - if ((creatorId != null && creatorId.equals(player.getUniqueId())) || player.hasPermission(BuildSystem.ADMIN_PERMISSION)) { + if ((creatorId != null && creatorId.equals(player.getUniqueId())) || player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION)) { inventoryUtils.addUrlSkull(inventory, 22, Messages.getString("worldeditor_builders_add_builder_item"), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"); } else { @@ -131,7 +132,7 @@ public void onInventoryClick(InventoryClickEvent event) { } Player player = (Player) event.getWhoClicked(); - BuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); + CraftBuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { player.closeInventory(); Messages.sendMessage(player, "worlds_addbuilder_error"); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java index 4439e893..b117187b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java @@ -9,13 +9,13 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.navigator.inventory.FilteredWorldsInventory.Visibility; +import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.PaginatedInventory; -import de.eintosti.buildsystem.world.WorldManager; -import de.eintosti.buildsystem.world.data.WorldType; +import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.enchantments.Enchantment; @@ -34,15 +34,15 @@ public class CreateInventory extends PaginatedInventory implements Listener { private static final int MAX_TEMPLATES = 5; - private final BuildSystem plugin; - private final WorldManager worldManager; + private final BuildSystemPlugin plugin; + private final BuildWorldManager worldManager; private final InventoryUtils inventoryUtils; private int numTemplates = 0; private Visibility visibility; private boolean createPrivateWorld; - public CreateInventory(BuildSystem plugin) { + public CreateInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); this.worldManager = plugin.getWorldManager(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java index 34cc28b2..0e5b0e46 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java @@ -9,10 +9,10 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.BuildWorld; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -24,10 +24,10 @@ public class DeleteInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public DeleteInventory(BuildSystem plugin) { + public DeleteInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java index c1996861..a063df5a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java @@ -10,16 +10,17 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import com.google.common.collect.Sets; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.command.subcommand.worlds.SetPermissionSubCommand; import de.eintosti.buildsystem.command.subcommand.worlds.SetProjectSubCommand; import de.eintosti.buildsystem.config.ConfigValues; -import de.eintosti.buildsystem.navigator.inventory.FilteredWorldsInventory.Visibility; -import de.eintosti.buildsystem.player.PlayerManager; +import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.BuildWorld; -import de.eintosti.buildsystem.world.data.WorldData; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.World; @@ -43,12 +44,12 @@ public class EditInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final ConfigValues configValues; private final InventoryUtils inventoryUtils; - private final PlayerManager playerManager; + private final BuildPlayerManager playerManager; - public EditInventory(BuildSystem plugin) { + public EditInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.configValues = plugin.getConfigValues(); this.inventoryUtils = plugin.getInventoryUtil(); @@ -56,7 +57,7 @@ public EditInventory(BuildSystem plugin) { plugin.getServer().getPluginManager().registerEvents(this, plugin); } - public Inventory getInventory(Player player, BuildWorld buildWorld) { + public Inventory getInventory(Player player, CraftBuildWorld buildWorld) { Inventory inventory = Bukkit.createInventory(null, 54, Messages.getString("worldeditor_title")); WorldData worldData = buildWorld.getData(); @@ -82,7 +83,7 @@ public Inventory getInventory(Player player, BuildWorld buildWorld) { return inventory; } - public void openInventory(Player player, BuildWorld buildWorld) { + public void openInventory(Player player, CraftBuildWorld buildWorld) { player.openInventory(getInventory(player, buildWorld)); } @@ -147,26 +148,26 @@ private void addTimeItem(Inventory inventory, BuildWorld buildWorld) { ); } - public BuildWorld.Time getWorldTime(World bukkitWorld) { + public CraftBuildWorld.Time getWorldTime(World bukkitWorld) { if (bukkitWorld == null) { - return BuildWorld.Time.UNKNOWN; + return CraftBuildWorld.Time.UNKNOWN; } int worldTime = (int) bukkitWorld.getTime(); int noonTime = plugin.getConfigValues().getNoonTime(); if (worldTime >= 0 && worldTime < noonTime) { - return BuildWorld.Time.SUNRISE; + return CraftBuildWorld.Time.SUNRISE; } else if (worldTime >= noonTime && worldTime < 13000) { - return BuildWorld.Time.NOON; + return CraftBuildWorld.Time.NOON; } else { - return BuildWorld.Time.NIGHT; + return CraftBuildWorld.Time.NIGHT; } } private void addBuildersItem(Inventory inventory, BuildWorld buildWorld, Player player) { UUID creatorId = buildWorld.getCreatorId(); - if ((creatorId != null && creatorId.equals(player.getUniqueId())) || player.hasPermission(BuildSystem.ADMIN_PERMISSION)) { + if ((creatorId != null && creatorId.equals(player.getUniqueId())) || player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION)) { addSettingsItem(inventory, 30, XMaterial.IRON_PICKAXE, buildWorld.getData().buildersEnabled().get(), Messages.getString("worldeditor_builders_item"), Messages.getStringList("worldeditor_builders_lore")); } else { inventoryUtils.addItemStack(inventory, 30, XMaterial.BARRIER, Messages.getString("worldeditor_builders_not_creator_item"), Messages.getStringList("worldeditor_builders_not_creator_lore")); @@ -194,7 +195,7 @@ private void addVisibilityItem(Inventory inventory, BuildWorld buildWorld, Playe inventoryUtils.addItemStack(inventory, slot, xMaterial, displayName, lore); } - private void addDifficultyItem(Inventory inventory, BuildWorld buildWorld) { + private void addDifficultyItem(Inventory inventory, CraftBuildWorld buildWorld) { XMaterial xMaterial; switch (buildWorld.getData().difficulty().get()) { @@ -221,7 +222,7 @@ private void addDifficultyItem(Inventory inventory, BuildWorld buildWorld) { private List getStatusLore(BuildWorld buildWorld) { List lore = new ArrayList<>(); for (String line : Messages.getStringList("worldeditor_status_lore")) { - lore.add(line.replace("%status%", buildWorld.getData().status().get().getName())); + lore.add(line.replace("%status%", Messages.getDataString(buildWorld.getData().status().get().getKey()))); } return lore; } @@ -254,7 +255,7 @@ public void onInventoryClick(InventoryClickEvent event) { } Player player = (Player) event.getWhoClicked(); - BuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); + CraftBuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { player.closeInventory(); Messages.sendMessage(player, "worlds_edit_error"); @@ -380,13 +381,13 @@ private boolean hasPermission(Player player, String permission) { return false; } - private void changeTime(Player player, BuildWorld buildWorld) { + private void changeTime(Player player, CraftBuildWorld buildWorld) { World bukkitWorld = Bukkit.getWorld(buildWorld.getName()); if (bukkitWorld == null) { return; } - BuildWorld.Time time = getWorldTime(bukkitWorld); + CraftBuildWorld.Time time = getWorldTime(bukkitWorld); switch (time) { case SUNRISE: bukkitWorld.setTime(configValues.getNoonTime()); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java index 264025f2..facb5991 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java @@ -9,11 +9,12 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.version.gamerules.GameRules; -import de.eintosti.buildsystem.world.BuildWorld; +import de.eintosti.buildsystem.world.CraftBuildWorld; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.entity.Player; @@ -27,10 +28,10 @@ public class GameRuleInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public GameRuleInventory(BuildSystem plugin) { + public GameRuleInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); @@ -81,7 +82,7 @@ public void onInventoryClick(InventoryClickEvent event) { } Player player = (Player) event.getWhoClicked(); - BuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); + CraftBuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { player.closeInventory(); Messages.sendMessage(player, "worlds_edit_error"); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java index 9f4b4544..e2406a0e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java @@ -7,11 +7,11 @@ */ package de.eintosti.buildsystem.world.modification; -import de.eintosti.buildsystem.BuildSystem; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.util.InventoryUtils; -import de.eintosti.buildsystem.world.data.WorldStatus; -import de.eintosti.buildsystem.world.data.WorldType; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -24,10 +24,10 @@ public class SetupInventory implements Listener { - private final BuildSystem plugin; + private final BuildSystemPlugin plugin; private final InventoryUtils inventoryUtils; - public SetupInventory(BuildSystem plugin) { + public SetupInventory(BuildSystemPlugin plugin) { this.plugin = plugin; this.inventoryUtils = plugin.getInventoryUtil(); plugin.getServer().getPluginManager().registerEvents(this, plugin); diff --git a/buildsystem-core/src/main/resources/plugin.yml b/buildsystem-core/src/main/resources/plugin.yml index 525102c0..73e04112 100644 --- a/buildsystem-core/src/main/resources/plugin.yml +++ b/buildsystem-core/src/main/resources/plugin.yml @@ -2,7 +2,7 @@ name: BuildSystem version: ${version} api-version: "1.13" author: einTosti -main: de.eintosti.buildsystem.BuildSystem +main: de.eintosti.buildsystem.BuildSystemPlugin description: Powerful, easy to use system for builders website: https://buildsystem.eintosti.de softdepend: [ LuckPerms, PlaceholderAPI, WorldEdit ] diff --git a/settings.gradle.kts b/settings.gradle.kts index 667a3bd9..f170ed95 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,7 @@ rootProject.name = "BuildSystem" include("buildsystem-core") +include("buildsystem-api") include("buildsystem-abstraction:adapter-1_12") include("buildsystem-abstraction:adapter-1_13") From 07dab0353a9c414990a0ced61ae60218ad7a6030 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 16 Jun 2023 17:46:21 +0200 Subject: [PATCH 03/14] Use interface objects in javadocs --- .../luckperms/calculators/RoleCalculator.java | 7 +++---- .../buildsystem/listener/SettingsInteractListener.java | 7 +++---- .../buildsystem/listener/WorldManipulateListener.java | 7 +++---- .../eintosti/buildsystem/settings/NoClipManager.java | 3 ++- .../eintosti/buildsystem/settings/SettingsManager.java | 7 ++++--- .../de/eintosti/buildsystem/util/InventoryUtils.java | 4 ++-- .../eintosti/buildsystem/world/BuildWorldManager.java | 6 +++--- .../de/eintosti/buildsystem/world/CraftBuildWorld.java | 2 +- .../buildsystem/world/CraftBuildWorldCreator.java | 10 +++++----- 9 files changed, 26 insertions(+), 27 deletions(-) diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java index 67d3da66..30e5d6ed 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java @@ -10,7 +10,6 @@ import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.world.BuildWorldManager; -import de.eintosti.buildsystem.world.CraftBuildWorld; import net.luckperms.api.context.ContextCalculator; import net.luckperms.api.context.ContextConsumer; import net.luckperms.api.context.ContextSet; @@ -47,17 +46,17 @@ public ContextSet estimatePotentialContexts() { private enum Role { /** - * The creator of a {@link CraftBuildWorld}. + * The creator of a {@link BuildWorld}. */ CREATOR, /** - * A player which has been added to the list of trusted players and is therefore allowed to build in a {@link CraftBuildWorld}. + * A player which has been added to the list of trusted players and is therefore allowed to build in a {@link BuildWorld}. */ BUILDER, /** - * A player which is neither the {@link #CREATOR} nor a {@link #BUILDER} in a {@link CraftBuildWorld}. + * A player which is neither the {@link #CREATOR} nor a {@link #BUILDER} in a {@link BuildWorld}. */ GUEST; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java index 2a3669a5..8a555a41 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java @@ -12,6 +12,7 @@ import com.cryptomorin.xseries.XTag; import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Builder; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; @@ -21,8 +22,6 @@ import de.eintosti.buildsystem.version.customblocks.CustomBlocks; import de.eintosti.buildsystem.version.util.DirectionUtil; import de.eintosti.buildsystem.world.BuildWorldManager; -import de.eintosti.buildsystem.world.CraftBuildWorld; -import de.eintosti.buildsystem.world.CraftBuilder; import org.bukkit.Bukkit; import org.bukkit.DyeColor; import org.bukkit.Material; @@ -300,13 +299,13 @@ public void manageDisabledInteractSetting(PlayerInteractEvent event) { } /** - * Not every player can always interact with the {@link CraftBuildWorld} they are in. + * Not every player can always interact with the {@link BuildWorld} they are in. *

          * Reasons an interaction could be cancelled: *

            *
          • The world has its {@link WorldStatus} set to archived
          • *
          • The world has a setting enabled which disallows certain events
          • - *
          • The world only allows {@link CraftBuilder}s to build and the player is not such a builder
          • + *
          • The world only allows {@link Builder}s to build and the player is not such a builder
          • *
          *

          * However, a player can override these reasons if: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java index dd2dda9e..2d2f5d90 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java @@ -10,11 +10,10 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.Builder; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.world.BuildWorldManager; -import de.eintosti.buildsystem.world.CraftBuildWorld; -import de.eintosti.buildsystem.world.CraftBuilder; import org.bukkit.entity.ArmorStand; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; @@ -131,13 +130,13 @@ public void onPlayerInteract(PlayerInteractEvent event) { } /** - * Not every player can always interact with the {@link CraftBuildWorld} they are in. + * Not every player can always interact with the {@link BuildWorld} they are in. *

          * Reasons an interaction could be cancelled: *

            *
          • The world has its {@link WorldStatus} set to archived;
          • *
          • The world has a setting enabled which disallows certain events;
          • - *
          • The world only allows {@link CraftBuilder}s to build and the player is not such a builder.
          • + *
          • The world only allows {@link Builder}s to build and the player is not such a builder.
          • *
          *

          * However, a player can override these reasons if: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java index d55479fe..c7ffe75f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java @@ -9,6 +9,7 @@ import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; +import de.eintosti.buildsystem.api.settings.Settings; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Location; @@ -110,7 +111,7 @@ public boolean isNoClip(UUID uuid) { } /** - * Only add a player to the list of No-Clip players if {@link CraftSettings#isNoClip} is equal to {@code true}. + * Only add a player to the list of No-Clip players if {@link Settings#isNoClip} is equal to {@code true}. * * @param player The player to add * @param settings The player's settings diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java index 1aaf71fa..1d6991af 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java @@ -9,6 +9,7 @@ import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.api.settings.Settings; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.config.ConfigValues; @@ -58,7 +59,7 @@ public CraftSettings getSettings(Player player) { } /** - * Only set a player's scoreboard if {@link CraftSettings#isScoreboard} is equal to {@code true}. + * Only set a player's scoreboard if {@link Settings#isScoreboard} is equal to {@code true}. * * @param player The player object * @param settings The player's settings @@ -73,7 +74,7 @@ public void startScoreboard(Player player, CraftSettings settings) { } /** - * Only set a player's scoreboard if {@link CraftSettings#isScoreboard} is equal to {@code true}. + * Only set a player's scoreboard if {@link Settings#isScoreboard} is equal to {@code true}. * * @param player The player object */ @@ -97,7 +98,7 @@ public void startScoreboard(Player player) { } /** - * Set each player's scoreboard if they have {@link CraftSettings#isScoreboard} enabled. + * Set each player's scoreboard if they have {@link Settings#isScoreboard} enabled. */ public void startScoreboard() { if (!configValues.isScoreboard()) { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java index 48520c1c..65166da5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java @@ -249,7 +249,7 @@ public void addWorldItem(Player player, Inventory inventory, int position, Build /** * Manage clicking in a {@link FilteredWorldsInventory}. *

          - * If the clicked item is the icon of a {@link CraftBuildWorld}, the click is managed by {@link InventoryUtils#manageWorldItemClick(InventoryClickEvent, Player, ItemMeta, CraftBuildWorld)}. + * If the clicked item is the icon of a {@link BuildWorld}, the click is managed by {@link InventoryUtils#manageWorldItemClick(InventoryClickEvent, Player, ItemMeta, CraftBuildWorld)}. * Otherwise, the {@link NavigatorInventory} is opened if the glass pane at the bottom of the inventory is clicked. * * @param event The click event object to modify @@ -285,7 +285,7 @@ public void manageInventoryClick(InventoryClickEvent event, Player player, ItemS } /** - * Manage the clicking of an {@link ItemStack} that represents a {@link CraftBuildWorld}. + * Manage the clicking of an {@link ItemStack} that represents a {@link BuildWorld}. *

          * If the click is a... *

            diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java index d9daf6cb..255da874 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java @@ -130,7 +130,7 @@ public List getBuildWorldsCreatedByPlayer(Player player, Visibility } /** - * Gets if a {@link CraftBuildWorld}'s visibility is equal to the given visibility. + * Gets if a {@link BuildWorld}'s visibility is equal to the given visibility. * * @param privateWorld Whether the world is private * @param visibility The visibility the world should have @@ -150,7 +150,7 @@ public boolean isCorrectVisibility(boolean privateWorld, Visibility visibility) } /** - * Gets the name (and in doing so removes all illegal characters) of the {@link CraftBuildWorld} the player is trying to create. + * Gets the name (and in doing so removes all illegal characters) of the {@link BuildWorld} the player is trying to create. * If the world is going to be a private world, its name will be equal to the player's name. * * @param player The player who is creating the world @@ -290,7 +290,7 @@ public boolean importWorld(Player player, String worldName, Builder creator, Gen } /** - * Import all {@link CraftBuildWorld} from a given list of world names. + * Import all {@link BuildWorld} from a given list of world names. * * @param player The player who is creating the world * @param creator The player who should be set as the creator of the world diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java index 04d75d80..3d69f785 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java @@ -345,7 +345,7 @@ public void removeBuilder(UUID uuid) { } /*** - * Save the list of {@link CraftBuilder}s in a string which is suitable to be stored. + * Save the list of {@link Builder}s in a string which is suitable to be stored. * * @return The list of builders as a string */ diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java index a71c5de0..2add11ef 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java @@ -118,7 +118,7 @@ public CraftBuildWorldCreator setCreationDate(long creationDate) { } /** - * Depending on the {@link CraftBuildWorld}'s {@link WorldType}, the corresponding {@link World} will be generated in a different way. + * Depending on the {@link BuildWorld}'s {@link WorldType}, the corresponding {@link World} will be generated in a different way. * Then, if the creation of the world was successful and the config is set accordingly, the player is teleported to the world. * * @param player The player who is creating the world @@ -150,7 +150,7 @@ private CraftBuildWorld createBuildWorldObject(Player player) { } /** - * Generate a {@link CraftBuildWorld} with a predefined or custom generator. + * Generate a {@link BuildWorld} with a predefined or custom generator. * * @param player The player who is creating the world */ @@ -172,7 +172,7 @@ private void createPredefinedOrCustomWorld(Player player) { } /** - * Imports an existing world as a {@link CraftBuildWorld}. + * Imports an existing world as a {@link BuildWorld}. * * @param player The player who is importing the world * @param teleport Should the player be teleported to the world after importing is finished @@ -187,7 +187,7 @@ public void importWorld(Player player, boolean teleport) { } /** - * Generate a {@link CraftBuildWorld} with a template. + * Generate a {@link BuildWorld} with a template. * * @param player The player who is creating the world */ @@ -252,7 +252,7 @@ public World generateBukkitWorld() { } /** - * Generate the {@link World} linked to a {@link CraftBuildWorld}. + * Generate the {@link World} linked to a {@link BuildWorld}. * * @param checkVersion Should the world version be checked * @return The world object From d5a17589fb4ddff0e4464533c0d7e4cd82a3290e Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 16 Jun 2023 18:41:22 +0200 Subject: [PATCH 04/14] Add more javadocs --- README.md | 2 +- .../buildsystem/api/player/PlayerManager.java | 2 +- .../buildsystem/api/settings/Settings.java | 161 +++++++++++++++++- .../api/settings/WorldDisplay.java | 17 ++ .../buildsystem/api/settings/WorldFilter.java | 25 +++ .../buildsystem/api/world/WorldManager.java | 1 + .../api/world/{ => data}/Visibility.java | 2 +- .../buildsystem/BuildSystemPlugin.java | 2 +- .../buildsystem/config/ConfigValues.java | 2 +- .../PlaceholderApiExpansion.java | 2 +- .../listener/SettingsInteractListener.java | 2 +- .../navigator/inventory/ArchiveInventory.java | 2 +- .../inventory/FilteredWorldsInventory.java | 2 +- .../navigator/inventory/PrivateInventory.java | 2 +- .../navigator/inventory/WorldsInventory.java | 2 +- .../player/BuildPlayerManager.java | 2 +- .../buildsystem/settings/CraftSettings.java | 6 +- .../settings/SettingsInventory.java | 4 +- .../buildsystem/world/BuildWorldManager.java | 2 +- .../world/modification/CreateInventory.java | 2 +- .../world/modification/EditInventory.java | 2 +- .../StatusInventory.java | 2 +- 22 files changed, 222 insertions(+), 24 deletions(-) rename buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/{ => data}/Visibility.java (93%) rename buildsystem-core/src/main/java/de/eintosti/buildsystem/world/{data => modification}/StatusInventory.java (99%) diff --git a/README.md b/README.md index 01a7fab3..b2552ce7 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ not to forget: let each player decide which settings whey think are best for the ```xml - eintosti + eintosti-release https://repo.eintosti.de/release ``` diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java index b9a29436..4966c2e3 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java @@ -8,7 +8,7 @@ package de.eintosti.buildsystem.api.player; import de.eintosti.buildsystem.api.world.BuildWorld; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import org.bukkit.entity.Player; import org.jetbrains.annotations.Unmodifiable; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java index e89f220f..a23aaf40 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java @@ -7,65 +7,220 @@ */ package de.eintosti.buildsystem.api.settings; +import org.bukkit.GameMode; +import org.bukkit.potion.PotionEffectType; + public interface Settings { + /** + * Gets the mode the navigator is set to. + * + * @return The navigator type + */ NavigatorType getNavigatorType(); + /** + * Sets the navigator type. + *

            + * The {@link NavigatorType#OLD} is the classic chest menu, whereas {@link NavigatorType#NEW} is a new 3D selector. + * + * @param navigatorType The navigator type + */ void setNavigatorType(NavigatorType navigatorType); + /** + * Gets the design color used in menus. + * + * @return The design color + */ DesignColor getDesignColor(); + /** + * Sets the design color used in menus. + * + * @param designColor The design color + */ void setDesignColor(DesignColor designColor); + /** + * Gets the set of rules by which worlds are displayed in the navigator. + * + * @return The world display rules + */ WorldDisplay getWorldDisplay(); + /** + * Sets the world display rule set + * + * @param worldDisplay The world display + */ void setWorldDisplay(WorldDisplay worldDisplay); + /** + * Gets whether the player's inventory is to be cleared when joining the server. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isClearInventory(); + /** + * Sets whether the player's inventory is to be cleared when joining the server. + * + * @param clearInventory If the inventory is to be cleared + */ void setClearInventory(boolean clearInventory); + /** + * Gets whether the interaction with blocks is disabled. + * + * @return {@code true} if disabled, otherwise {@code false} + */ boolean isDisableInteract(); + /** + * Sets whether the interaction with blocks should be disabled. + * + * @param disableInteract If the interaction with blocks is to be disabled + */ void setDisableInteract(boolean disableInteract); + /** + * Gets whether all online players are to be hidden. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isHidePlayers(); + /** + * Sets whether all online players are to be hidden. + * + * @param hidePlayers If the players are to be hidden + */ void setHidePlayers(boolean hidePlayers); + /** + * Gets whether signs should be placed without opening the text input. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isInstantPlaceSigns(); + /** + * Sets whether signs should be placed without opening the text input. + * + * @param instantPlaceSigns If signs are to be placed instantly + */ void setInstantPlaceSigns(boolean instantPlaceSigns); + /** + * Gets whether the navigator is kept in the player's inventory after a clear. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isKeepNavigator(); + /** + * Sets whether the navigator is kept in the player's inventory after a clear. + * + * @param keepNavigator If the navigator is to kept + */ void setKeepNavigator(boolean keepNavigator); + /** + * Gets whether the player has permanent {@link PotionEffectType#NIGHT_VISION}. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isNightVision(); + /** + * Sets whether the player has permanent {@link PotionEffectType#NIGHT_VISION}. + * + * @param nightVision If the night vision is to be enabled + */ void setNightVision(boolean nightVision); + /** + * Gets whether fling against a wall puts the player in {@link GameMode#SPECTATOR}. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isNoClip(); + /** + * Sets whether fling against a wall puts the player in {@link GameMode#SPECTATOR}. + * + * @param noClip If no-clip is to be enabled + */ void setNoClip(boolean noClip); + /** + * Gets whether plants can be placed anywhere. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isPlacePlants(); + /** + * Sets whether plants can be placed anywhere. + * + * @param placePlants If plants are to be placed anywhere + */ void setPlacePlants(boolean placePlants); + /** + * Gets whether the scoreboard is enabled. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isScoreboard(); + /** + * Sets whether the scoreboard is enabled. + * + * @param scoreboard If the scoreboard is to be enabled + */ void setScoreboard(boolean scoreboard); + /** + * Gets whether only one half of a slab will be broken when breaking double slabs. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isSlabBreaking(); + /** + * Sets whether only one half of a slab will be broken when breaking double slabs. + * + * @param slabBreaking If precise slab breaking is to be enabled + */ void setSlabBreaking(boolean slabBreaking); + /** + * Gets whether the player will be teleported to the spawn, if set, when joining the server. + * + * @return {@code true} if enabled, otherwise {@code false} + */ boolean isSpawnTeleport(); + /** + * Sets whether the player will be teleported to the spawn, if set, when joining the server. + * + * @param spawnTeleport If the player is to be teleported to the spawn + */ void setSpawnTeleport(boolean spawnTeleport); - boolean isTrapDoor(); - - void setTrapDoor(boolean trapDoor); + /** + * Gets whether right-clicking iron (trap-)doors will be open/close them. + * + * @return {@code true} if enabled, otherwise {@code false} + */ + boolean isOpenTrapDoors(); + + /** + * Sets whether right-clicking iron (trap-)doors will be open/close them. + * + * @param openTrapDoors If the iron (trap-)doors are to be opened/closed via right-click + */ + void setOpenTrapDoors(boolean openTrapDoors); } \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java index f1b529e9..5589a8e3 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java @@ -7,11 +7,28 @@ */ package de.eintosti.buildsystem.api.settings; +import de.eintosti.buildsystem.api.world.BuildWorld; + public interface WorldDisplay { + /** + * Gets the order in which the {@link BuildWorld}s are sorted. + * + * @return The world sort order + */ WorldSort getWorldSort(); + /** + * Sets the order in which the {@link BuildWorld}s are sorted. + * + * @param worldSort The world sort order + */ void setWorldSort(WorldSort worldSort); + /** + * Gets the filter which removed non-matching {@link BuildWorld}s from the navigator + * + * @return The world filter + */ WorldFilter getWorldFilter(); } \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java index 07d21124..9ecd275e 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java @@ -43,13 +43,38 @@ public Mode getNext() { } } + /** + * Gets the current mode. + * + * @return The mode + */ Mode getMode(); + /** + * Sets the current mode. + * + * @param mode The mode + */ void setMode(Mode mode); + /** + * Gets the text which the filter is applied to. + * + * @return The text the filter is applied to + */ String getText(); + /** + * Sets the text which the filter is applied to. + * + * @param text The text + */ void setText(String text); + /** + * Apply the filter to a {@link BuildWorld}. + * + * @return The filter predicate + */ Predicate apply(); } \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java index 4c62bd0e..15baac04 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java @@ -7,6 +7,7 @@ */ package de.eintosti.buildsystem.api.world; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.api.world.generator.Generator; import org.bukkit.World; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Visibility.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java similarity index 93% rename from buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Visibility.java rename to buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java index b74e628b..ef12af40 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Visibility.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java @@ -5,7 +5,7 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -package de.eintosti.buildsystem.api.world; +package de.eintosti.buildsystem.api.world.data; public enum Visibility { /** diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java index 18f1ca4c..86f71cea 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java @@ -64,13 +64,13 @@ import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; import de.eintosti.buildsystem.world.SpawnManager; -import de.eintosti.buildsystem.world.data.StatusInventory; import de.eintosti.buildsystem.world.modification.BuilderInventory; import de.eintosti.buildsystem.world.modification.CreateInventory; import de.eintosti.buildsystem.world.modification.DeleteInventory; import de.eintosti.buildsystem.world.modification.EditInventory; import de.eintosti.buildsystem.world.modification.GameRuleInventory; import de.eintosti.buildsystem.world.modification.SetupInventory; +import de.eintosti.buildsystem.world.modification.StatusInventory; import org.bstats.bukkit.Metrics; import org.bstats.charts.AdvancedPie; import org.bstats.charts.SimplePie; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java index d957a2cb..7ec3b38c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java @@ -9,7 +9,7 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import org.bukkit.Difficulty; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java index eb4be9a0..f9d8b5e1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java @@ -159,7 +159,7 @@ private String parseSettingsPlaceholder(Player player, String identifier) { case "spawnteleport": return String.valueOf(settings.isSpawnTeleport()); case "opentrapdoors": - return String.valueOf(settings.isTrapDoor()); + return String.valueOf(settings.isOpenTrapDoors()); default: return null; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java index 8a555a41..8a81c5db 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java @@ -85,7 +85,7 @@ public void manageIronDoorSetting(PlayerInteractEvent event) { Player player = event.getPlayer(); CraftSettings settings = settingsManager.getSettings(player); - if (!settings.isTrapDoor()) { + if (!settings.isOpenTrapDoors()) { return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java index a41b4d8e..d903e6db 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java @@ -9,7 +9,7 @@ import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.entity.Player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java index 9eb2f18a..a8f52f16 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java @@ -15,7 +15,7 @@ import de.eintosti.buildsystem.api.settings.WorldFilter; import de.eintosti.buildsystem.api.settings.WorldSort; import de.eintosti.buildsystem.api.world.BuildWorld; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.navigator.settings.BuildWorldFilter; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java index 40a3be3f..3d2e60a6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java @@ -10,7 +10,7 @@ import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java index c00619bf..497671d3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java @@ -10,7 +10,7 @@ import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java index 42beac7a..0d5860ff 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java @@ -18,7 +18,7 @@ import de.eintosti.buildsystem.api.settings.NavigatorType; import de.eintosti.buildsystem.api.settings.WorldSort; import de.eintosti.buildsystem.api.world.BuildWorld; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.config.PlayersConfig; import de.eintosti.buildsystem.navigator.settings.BuildWorldDisplay; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java index da38ed9b..793b5457 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java @@ -232,13 +232,13 @@ public void setSpawnTeleport(boolean spawnTeleport) { } @Override - public boolean isTrapDoor() { + public boolean isOpenTrapDoors() { return trapDoor; } @Override - public void setTrapDoor(boolean trapDoor) { - this.trapDoor = trapDoor; + public void setOpenTrapDoors(boolean openTrapDoors) { + this.trapDoor = openTrapDoors; } public BukkitTask getScoreboardTask() { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java index c9672028..e25d2e71 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java @@ -60,7 +60,7 @@ private Inventory getInventory(Player player) { addSettingsItem(inventory, 21, configValues.getNavigatorItem(), settings.getNavigatorType().equals(NavigatorType.NEW), Messages.getString("settings_new_navigator_item"), Messages.getStringList("settings_new_navigator_lore")); addSettingsItem(inventory, 22, XMaterial.GOLDEN_CARROT, settings.isNightVision(), Messages.getString("settings_nightvision_item"), Messages.getStringList("settings_nightvision_lore")); addSettingsItem(inventory, 23, XMaterial.BRICKS, settings.isNoClip(), Messages.getString("settings_no_clip_item"), Messages.getStringList("settings_no_clip_lore")); - addSettingsItem(inventory, 24, XMaterial.IRON_TRAPDOOR, settings.isTrapDoor(), Messages.getString("settings_open_trapdoors_item"), Messages.getStringList("settings_open_trapdoors_lore")); + addSettingsItem(inventory, 24, XMaterial.IRON_TRAPDOOR, settings.isOpenTrapDoors(), Messages.getString("settings_open_trapdoors_item"), Messages.getStringList("settings_open_trapdoors_lore")); addSettingsItem(inventory, 29, XMaterial.FERN, settings.isPlacePlants(), Messages.getString("settings_placeplants_item"), Messages.getStringList("settings_placeplants_lore")); addSettingsItem(inventory, 30, XMaterial.PAPER, settings.isScoreboard(), configValues.isScoreboard() ? Messages.getString("settings_scoreboard_item") : Messages.getString("settings_scoreboard_disabled_item"), configValues.isScoreboard() ? Messages.getStringList("settings_scoreboard_lore") : Messages.getStringList("settings_scoreboard_disabled_lore")); @@ -183,7 +183,7 @@ public void onInventoryClick(InventoryClickEvent event) { } break; case 24: - settings.setTrapDoor(!settings.isTrapDoor()); + settings.setOpenTrapDoors(!settings.isOpenTrapDoors()); break; case 29: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java index 255da874..bbb2f2a5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java @@ -14,8 +14,8 @@ import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.Builder; -import de.eintosti.buildsystem.api.world.Visibility; import de.eintosti.buildsystem.api.world.WorldManager; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.api.world.generator.CustomGenerator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java index b117187b..13a0234a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java @@ -11,7 +11,7 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.PaginatedInventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java index a063df5a..c54448fe 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java @@ -13,7 +13,7 @@ import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; -import de.eintosti.buildsystem.api.world.Visibility; +import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.command.subcommand.worlds.SetPermissionSubCommand; import de.eintosti.buildsystem.command.subcommand.worlds.SetProjectSubCommand; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/StatusInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java similarity index 99% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/StatusInventory.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java index 85a2202c..7850b718 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/StatusInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java @@ -5,7 +5,7 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ -package de.eintosti.buildsystem.world.data; +package de.eintosti.buildsystem.world.modification; import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; From c9b989d2586c1e8879d34ba84c0c5fe6f8bdea37 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 16 Jun 2023 19:34:34 +0200 Subject: [PATCH 05/14] Add publish-to-maven action --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/pull_request_template.md | 6 ------ .github/workflows/build.yml | 11 ++--------- .github/workflows/publish-to-maven.yml | 26 ++++++++++++++++++++++++++ 4 files changed, 29 insertions(+), 16 deletions(-) delete mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/publish-to-maven.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7e31d85c..038ae5cc 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,4 +2,4 @@ blank_issues_enabled: false contact_links: - name: 🗣️ Discord Chat url: https://discord.com/invite/rduPF3yk62 - about: Ask questions and discuss with others on my Discord server. \ No newline at end of file + about: Support Discord, please ask questions and seek support here. \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index f4a116a5..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,6 +0,0 @@ ------ - -- [ ] Have you explained what your changes do, and why they add value to BuildSystem? - -**Please note: we will close your Pull Request without comment if you do not check the box above and provide ALL -requested information.** diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca4c7089..bd9de989 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,21 +5,14 @@ on: [ push, pull_request ] jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - java: [ 17 ] - fail-fast: true - steps: - name: Checkout Git Repository uses: actions/checkout@v3.5.3 - - name: JDK ${{ matrix.java }} + - name: Set up JDK uses: actions/setup-java@v3.11.0 with: - java-version: ${{ matrix.java }} - cache: 'gradle' - distribution: 'temurin' + java-version: 17 - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/publish-to-maven.yml b/.github/workflows/publish-to-maven.yml new file mode 100644 index 00000000..e8bf0f2d --- /dev/null +++ b/.github/workflows/publish-to-maven.yml @@ -0,0 +1,26 @@ +name: Publish project to Maven repository + +on: + push: + branches: [ master ] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout Git Repository + uses: actions/checkout@v3.5.3 + + - name: Set up JDK + uses: actions/setup-java@v3.11.0 + with: + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Publish with Gradle + run: ./gradlew build publish + env: + MAVEN_NAME: ${{ secrets.MAVEN_NAME }} + MAVEN_SECRET: ${{ secrets.MAVEN_SECRET }} \ No newline at end of file From 1a2fcc190057f8f487538216f4d9a7c4975e500d Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 16 Jun 2023 19:35:58 +0200 Subject: [PATCH 06/14] Add jdk distribution --- .github/workflows/build.yml | 1 + .github/workflows/publish-to-maven.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd9de989..1ed201b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3.11.0 with: + distribution: 'temurin' java-version: 17 - name: Validate Gradle Wrapper diff --git a/.github/workflows/publish-to-maven.yml b/.github/workflows/publish-to-maven.yml index e8bf0f2d..0c48cd51 100644 --- a/.github/workflows/publish-to-maven.yml +++ b/.github/workflows/publish-to-maven.yml @@ -14,6 +14,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3.11.0 with: + distribution: 'temurin' java-version: 17 - name: Grant execute permission for gradlew From 7cfa4fa474a8a52a0402ce1b6733027f5575d093 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 16 Jun 2023 19:47:20 +0200 Subject: [PATCH 07/14] Rename release to releases --- README.md | 6 ++-- buildsystem-api/build.gradle.kts | 2 +- .../buildsystem/BuildSystemPlugin.java | 30 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index b2552ce7..a65441c5 100644 --- a/README.md +++ b/README.md @@ -122,8 +122,8 @@ not to forget: let each player decide which settings whey think are best for the ```xml - eintosti-release - https://repo.eintosti.de/release + eintosti-releases + https://repo.eintosti.de/releases ``` @@ -141,7 +141,7 @@ not to forget: let each player decide which settings whey think are best for the ```kotlin repositories { maven { - url = uri("https://repo.eintosti.de/release") + url = uri("https://repo.eintosti.de/releases") } } diff --git a/buildsystem-api/build.gradle.kts b/buildsystem-api/build.gradle.kts index 1d4ebce6..21dac21d 100644 --- a/buildsystem-api/build.gradle.kts +++ b/buildsystem-api/build.gradle.kts @@ -23,7 +23,7 @@ publishing { url = if (project.version.toString().endsWith("-SNAPSHOT")) { uri("https://repo.eintosti.de/snapshots") } else { - uri("https://repo.eintosti.de/release") + uri("https://repo.eintosti.de/releases") } credentials(PasswordCredentials::class) authentication { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java index 86f71cea..ab34075c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java @@ -168,10 +168,10 @@ public void onEnable() { Bukkit.getOnlinePlayers().forEach(pl -> { getSkullCache().cacheSkull(pl.getName()); - CraftBuildPlayer buildPlayer = playerManager.createBuildPlayer(pl); + CraftBuildPlayer buildPlayer = this.playerManager.createBuildPlayer(pl); CraftSettings settings = buildPlayer.getSettings(); - settingsManager.startScoreboard(pl, settings); - noClipManager.startNoClip(pl, settings); + this.settingsManager.startScoreboard(pl, settings); + this.noClipManager.startNoClip(pl, settings); }); registerStats(); @@ -183,23 +183,23 @@ public void onEnable() { @Override public void onDisable() { Bukkit.getOnlinePlayers().forEach(pl -> { - CraftBuildPlayer buildPlayer = playerManager.getBuildPlayer(pl); + CraftBuildPlayer buildPlayer = this.playerManager.getBuildPlayer(pl); buildPlayer.getCachedValues().resetCachedValues(pl); buildPlayer.setLogoutLocation(new LogoutLocation(pl.getWorld().getName(), pl.getLocation())); - settingsManager.stopScoreboard(pl); - noClipManager.stopNoClip(pl.getUniqueId()); - playerManager.closeNavigator(pl); + this.settingsManager.stopScoreboard(pl); + this.noClipManager.stopNoClip(pl.getUniqueId()); + this.playerManager.closeNavigator(pl); }); reloadConfig(); reloadConfigData(false); saveConfig(); - worldManager.save(); - playerManager.save(); - spawnManager.save(); - inventoryUtils.save(); + this.worldManager.save(); + this.playerManager.save(); + this.spawnManager.save(); + this.inventoryUtils.save(); unregisterExpansions(); @@ -253,7 +253,7 @@ private void initClasses() { private void parseServerVersion() { try { this.versionString = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3]; - getLogger().info("Detected server version: " + versionString); + getLogger().info("Detected server version: " + this.versionString); } catch (ArrayIndexOutOfBoundsException e) { getLogger().severe("Unknown server version"); } @@ -415,12 +415,12 @@ public void reloadConfigData(boolean init) { getSettingsManager().stopScoreboard(pl); } - configValues.setConfigValues(); + this.configValues.setConfigValues(); if (init) { initVersionedClasses(); - worldManager.getCraftBuildWorlds().forEach(CraftBuildWorld::manageUnload); - if (configValues.isScoreboard()) { + this.worldManager.getCraftBuildWorlds().forEach(CraftBuildWorld::manageUnload); + if (this.configValues.isScoreboard()) { getSettingsManager().startScoreboard(); } else { getSettingsManager().stopScoreboard(); From 6f4431e0d1cddc3579174432c8380117e98a6bde Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Sun, 18 Jun 2023 13:28:41 +0200 Subject: [PATCH 08/14] Add method to get `BuildWorldCreator` --- .../de/eintosti/buildsystem/api/world/WorldManager.java | 8 ++++++++ .../de/eintosti/buildsystem/world/BuildWorldManager.java | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java index 15baac04..d6ba32f8 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java @@ -89,6 +89,14 @@ public interface WorldManager { @Nullable ChunkGenerator getChunkGenerator(String plugin, String generatorId, String worldName); + /** + * Gets a builder for creating new {@link BuildWorld}s. + * + * @param worldName The name of the world to create + * @return The world creator + */ + BuildWorldCreator newWorldCreator(String worldName); + /** * Import a {@link BuildWorld} from a world directory. * diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java index bbb2f2a5..8ce001f6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java @@ -13,6 +13,7 @@ import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.api.world.BuildWorldCreator; import de.eintosti.buildsystem.api.world.Builder; import de.eintosti.buildsystem.api.world.WorldManager; import de.eintosti.buildsystem.api.world.data.Visibility; @@ -202,8 +203,13 @@ private void startCustomGeneratorInput(Player player, String worldName, String t }); } + @Override + public BuildWorldCreator newWorldCreator(String worldName) { + return new CraftBuildWorldCreator(plugin, worldName); + } + private void createWorld(Player player, String worldName, WorldType worldType, CustomGenerator customGenerator, String template, boolean privateWorld) { - new CraftBuildWorldCreator(plugin, worldName) + newWorldCreator(worldName) .setType(worldType) .setTemplate(template) .setPrivate(privateWorld) From 1319a0f928c02efb27f2a116f2f6370d7bb3ac05 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Sun, 18 Jun 2023 15:37:28 +0200 Subject: [PATCH 09/14] [ci skip] Change to GNU v3 license --- HEADER.txt | 15 + LICENSE | 27 - LICENSE.txt | 858 ++++++++++++++++++ README.md | 2 +- .../v1_12_R1/CustomBlocks_1_12_R1.java | 18 +- .../version/v1_12_R1/GameRules_1_12_R1.java | 18 +- .../v1_13_R1/CustomBlocks_1_13_R1.java | 18 +- .../version/v1_13_R1/GameRules_1_13_R1.java | 18 +- .../v1_14_R1/CustomBlocks_1_14_R1.java | 18 +- .../v1_17_R1/CustomBlocks_1_17_R1.java | 18 +- .../v1_20_R1/CustomBlocks_1_20_R1.java | 18 +- .../version/customblocks/CustomBlock.java | 18 +- .../version/customblocks/CustomBlocks.java | 18 +- .../gamerules/AbstractGameRulesInventory.java | 18 +- .../version/gamerules/GameRules.java | 18 +- .../version/util/DirectionUtil.java | 18 +- .../version/util/MinecraftVersion.java | 18 +- .../eintosti/buildsystem/api/BuildSystem.java | 18 +- .../buildsystem/api/BuildSystemProvider.java | 18 +- .../api/event/world/BuildWorldEvent.java | 18 +- .../api/event/world/BuildWorldLoadEvent.java | 18 +- .../event/world/BuildWorldPostLoadEvent.java | 18 +- .../world/BuildWorldPostUnloadEvent.java | 18 +- .../event/world/BuildWorldUnloadEvent.java | 18 +- .../buildsystem/api/player/BuildPlayer.java | 18 +- .../buildsystem/api/player/PlayerManager.java | 18 +- .../buildsystem/api/settings/DesignColor.java | 18 +- .../api/settings/NavigatorType.java | 18 +- .../buildsystem/api/settings/Settings.java | 18 +- .../api/settings/WorldDisplay.java | 18 +- .../buildsystem/api/settings/WorldFilter.java | 18 +- .../buildsystem/api/settings/WorldSort.java | 18 +- .../buildsystem/api/world/BuildWorld.java | 18 +- .../api/world/BuildWorldCreator.java | 18 +- .../buildsystem/api/world/Builder.java | 18 +- .../buildsystem/api/world/WorldManager.java | 18 +- .../api/world/data/Visibility.java | 18 +- .../buildsystem/api/world/data/WorldData.java | 18 +- .../api/world/data/WorldStatus.java | 18 +- .../buildsystem/api/world/data/WorldType.java | 18 +- .../api/world/generator/CustomGenerator.java | 18 +- .../api/world/generator/Generator.java | 18 +- .../buildsystem/BuildSystemPlugin.java | 18 +- .../de/eintosti/buildsystem/Messages.java | 18 +- .../buildsystem/api/BuildSystemApi.java | 18 +- .../buildsystem/command/BackCommand.java | 18 +- .../buildsystem/command/BlocksCommand.java | 18 +- .../buildsystem/command/BuildCommand.java | 18 +- .../command/BuildSystemCommand.java | 18 +- .../buildsystem/command/ConfigCommand.java | 18 +- .../command/ExplosionsCommand.java | 18 +- .../buildsystem/command/GamemodeCommand.java | 18 +- .../buildsystem/command/NoAICommand.java | 18 +- .../buildsystem/command/PagedCommand.java | 18 +- .../buildsystem/command/PhysicsCommand.java | 18 +- .../buildsystem/command/SettingsCommand.java | 18 +- .../buildsystem/command/SetupCommand.java | 18 +- .../buildsystem/command/SkullCommand.java | 18 +- .../buildsystem/command/SpawnCommand.java | 18 +- .../buildsystem/command/SpeedCommand.java | 18 +- .../buildsystem/command/TimeCommand.java | 18 +- .../buildsystem/command/TopCommand.java | 18 +- .../buildsystem/command/WorldsCommand.java | 18 +- .../command/subcommand/Argument.java | 18 +- .../command/subcommand/SubCommand.java | 18 +- .../worlds/AddBuilderSubCommand.java | 18 +- .../subcommand/worlds/BuildersSubCommand.java | 18 +- .../subcommand/worlds/DeleteSubCommand.java | 18 +- .../subcommand/worlds/EditSubCommand.java | 18 +- .../subcommand/worlds/HelpSubCommand.java | 18 +- .../worlds/ImportAllSubCommand.java | 18 +- .../subcommand/worlds/ImportSubCommand.java | 18 +- .../subcommand/worlds/InfoSubCommand.java | 18 +- .../subcommand/worlds/ItemSubCommand.java | 18 +- .../worlds/RemoveBuilderSubCommand.java | 18 +- .../worlds/RemoveSpawnSubCommand.java | 18 +- .../subcommand/worlds/RenameSubCommand.java | 18 +- .../worlds/SetCreatorSubCommand.java | 18 +- .../subcommand/worlds/SetItemSubCommand.java | 18 +- .../worlds/SetPermissionSubCommand.java | 18 +- .../worlds/SetProjectSubCommand.java | 18 +- .../subcommand/worlds/SetSpawnSubCommand.java | 18 +- .../worlds/SetStatusSubCommand.java | 18 +- .../subcommand/worlds/TeleportSubCommand.java | 18 +- .../subcommand/worlds/UnimportSubCommand.java | 18 +- .../buildsystem/config/ConfigValues.java | 18 +- .../buildsystem/config/ConfigurationFile.java | 18 +- .../buildsystem/config/PlayersConfig.java | 18 +- .../buildsystem/config/SetupConfig.java | 18 +- .../buildsystem/config/SpawnConfig.java | 18 +- .../buildsystem/config/WorldConfig.java | 18 +- .../player/PlayerInventoryClearEvent.java | 18 +- .../luckperms/LuckPermsExpansion.java | 18 +- .../calculators/BuildModeCalculator.java | 18 +- .../luckperms/calculators/RoleCalculator.java | 18 +- .../PlaceholderApiExpansion.java | 18 +- .../buildsystem/internal/ServerVersion.java | 18 +- .../listener/AsyncPlayerChatListener.java | 18 +- .../listener/AsyncPlayerPreLoginListener.java | 18 +- .../listener/BlockPhysicsListener.java | 18 +- .../listener/BlockPlaceListener.java | 18 +- .../BuildModePreventationListener.java | 18 +- .../BuildWorldResetUnloadListener.java | 17 + .../listener/EditSessionListener.java | 18 +- .../listener/EntitySpawnListener.java | 18 +- .../listener/FoodLevelChangeListener.java | 18 +- .../listener/InventoryCloseListener.java | 18 +- .../listener/InventoryCreativeListener.java | 18 +- .../listener/NavigatorListener.java | 18 +- .../listener/PlayerChangedWorldListener.java | 18 +- .../PlayerCommandPreprocessListener.java | 18 +- .../PlayerInventoryClearListener.java | 18 +- .../listener/PlayerJoinListener.java | 18 +- .../listener/PlayerMoveListener.java | 18 +- .../listener/PlayerQuitListener.java | 18 +- .../listener/PlayerRespawnListener.java | 18 +- .../listener/PlayerTeleportListener.java | 18 +- .../listener/SettingsInteractListener.java | 18 +- .../listener/SignChangeListener.java | 18 +- .../listener/WeatherChangeListener.java | 18 +- .../listener/WorldManipulateListener.java | 18 +- .../navigator/ArmorStandManager.java | 18 +- .../navigator/inventory/ArchiveInventory.java | 18 +- .../inventory/FilteredWorldsInventory.java | 18 +- .../inventory/NavigatorInventory.java | 18 +- .../navigator/inventory/PrivateInventory.java | 18 +- .../navigator/inventory/WorldsInventory.java | 18 +- .../navigator/settings/BuildWorldDisplay.java | 18 +- .../navigator/settings/BuildWorldFilter.java | 18 +- .../settings/NavigatorInventoryType.java | 18 +- .../buildsystem/player/BlocksInventory.java | 18 +- .../player/BuildPlayerManager.java | 18 +- .../buildsystem/player/CachedValues.java | 18 +- .../buildsystem/player/CraftBuildPlayer.java | 18 +- .../buildsystem/player/LogoutLocation.java | 18 +- .../buildsystem/settings/CraftSettings.java | 18 +- .../buildsystem/settings/DesignInventory.java | 18 +- .../buildsystem/settings/NoClipManager.java | 18 +- .../settings/SettingsInventory.java | 18 +- .../buildsystem/settings/SettingsManager.java | 18 +- .../buildsystem/settings/SpeedInventory.java | 18 +- .../tabcomplete/ArgumentSorter.java | 18 +- .../tabcomplete/BuildTabComplete.java | 18 +- .../tabcomplete/ConfigTabComplete.java | 18 +- .../tabcomplete/EmptyTabComplete.java | 18 +- .../tabcomplete/GamemodeTabComplete.java | 18 +- .../tabcomplete/PhysicsTabComplete.java | 18 +- .../tabcomplete/SpawnTabComplete.java | 18 +- .../tabcomplete/SpeedTabComplete.java | 18 +- .../tabcomplete/TimeTabComplete.java | 18 +- .../tabcomplete/WorldsTabComplete.java | 18 +- .../buildsystem/util/ArgumentParser.java | 18 +- .../buildsystem/util/EntityAIManager.java | 18 +- .../eintosti/buildsystem/util/FileUtils.java | 18 +- .../buildsystem/util/InventoryUtils.java | 18 +- .../eintosti/buildsystem/util/ItemSkulls.java | 18 +- .../buildsystem/util/NumberUtils.java | 18 +- .../buildsystem/util/PaginatedInventory.java | 18 +- .../buildsystem/util/PlayerChatInput.java | 18 +- .../eintosti/buildsystem/util/RGBUtils.java | 18 +- .../eintosti/buildsystem/util/SkullCache.java | 18 +- .../buildsystem/util/StringUtils.java | 18 +- .../buildsystem/util/UUIDFetcher.java | 18 +- .../buildsystem/util/UpdateChecker.java | 18 +- .../buildsystem/world/BuildWorldManager.java | 18 +- .../buildsystem/world/CraftBuildWorld.java | 18 +- .../world/CraftBuildWorldCreator.java | 18 +- .../buildsystem/world/CraftBuilder.java | 18 +- .../buildsystem/world/SpawnManager.java | 18 +- .../world/data/BuildWorldData.java | 18 +- .../world/generator/CustomGeneratorImpl.java | 18 +- .../DeprecatedVoidGenerator.java | 18 +- .../voidgenerator/ModernVoidGenerator.java | 18 +- .../voidgenerator/VoidGenerator.java | 18 +- .../world/modification/BuilderInventory.java | 18 +- .../world/modification/CreateInventory.java | 18 +- .../world/modification/DeleteInventory.java | 18 +- .../world/modification/EditInventory.java | 18 +- .../world/modification/GameRuleInventory.java | 18 +- .../world/modification/SetupInventory.java | 18 +- .../world/modification/StatusInventory.java | 18 +- 181 files changed, 3355 insertions(+), 732 deletions(-) create mode 100644 HEADER.txt delete mode 100644 LICENSE create mode 100644 LICENSE.txt diff --git a/HEADER.txt b/HEADER.txt new file mode 100644 index 00000000..7388d2ee --- /dev/null +++ b/HEADER.txt @@ -0,0 +1,15 @@ +Copyright (c) 2018-2023, Thomas Meaney +Copyright (c) contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 5bb95972..00000000 --- a/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2023, Thomas Meaney -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by einTosti. -4. Neither the name of einTosti nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..2694e496 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,858 @@ +----------------- +BuildSystem License +----------------- + +BuildSystem as a whole is licensed under: + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +---------------- +commons-lang License +---------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +---------------- +LuckPerms License +---------------- + +MIT License + +Copyright (c) lucko (Luck) +Copyright (c) contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index dc8cfb0e..f9fb9428 100644 --- a/README.md +++ b/README.md @@ -181,4 +181,4 @@ that come with them. ## License -This project is licensed under the [BSD 4-Clause License](LICENSE). +This project is licensed under the [GNU General Public License v3.0](LICENSE.txt). \ No newline at end of file diff --git a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java index 9091193c..9e129a42 100644 --- a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java +++ b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_12_R1; diff --git a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java index 2642a77d..b547e1a1 100644 --- a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java +++ b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_12_R1; diff --git a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java index f8e56a70..0b53800d 100644 --- a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java +++ b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_13_R1; diff --git a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java index edd8c4c0..d8c30470 100644 --- a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java +++ b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_13_R1; diff --git a/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java b/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java index 578b5e17..f3c7eb8d 100644 --- a/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java +++ b/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_14_R1; diff --git a/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java b/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java index 90b9bcd9..d5415b13 100644 --- a/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java +++ b/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_17_R1; diff --git a/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java b/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java index bb3f7733..3c46bdf6 100644 --- a/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java +++ b/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_20_R1; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java index 85dc75cf..1d4793b0 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.customblocks; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java index ceb02e79..2c2282b1 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.customblocks; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java index ebcbdd25..75233744 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.gamerules; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java index 8877050e..48208e51 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.gamerules; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java index 4dd1ad49..95d0ff3c 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.util; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java index 118d179b..de147732 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.util; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java index 9cd69c2e..11025ca1 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java index 3900fe7e..5976bd9f 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java index 4b6e71a0..df915a4e 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java index b2aec6db..09f981cd 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java index 7c89cf80..c31663ca 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java index aa6d1240..70d7b6d6 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java index 5bb3879e..d9c5f873 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java index 006746b7..a9e35c74 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.player; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java index 4966c2e3..e054cbff 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.player; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java index 31f55748..9d5ca5bc 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java index eb99133e..9f43d5aa 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java index a23aaf40..faabac4d 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java index 5589a8e3..bab75f3c 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java index 9ecd275e..6f6cf73a 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java index 98c09ad3..b44ffc66 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java index ad785c42..590f6cec 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java index 4cc9cac6..611beb8c 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java index 1dd1f20b..eabf42d2 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java index d6ba32f8..59f5f86a 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java index ef12af40..13a01310 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java index 682ebda0..d88244c2 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java index 827ac233..a3dec5a4 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java index f8f268be..9a0728b8 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java index 6ca789a4..cb9e9a72 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.generator; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java index f4abda4f..4d4aea35 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.generator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java index ab34075c..8b005b82 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java index ec952598..e8cce0af 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java index 55984588..8f457d5e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java index 77f0157b..b9b62697 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java index 741a95a4..be1d257f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java index 9c8e99ce..6ff5a08c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java index 70a008ba..0ac970fa 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java index 5614a330..0036836d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java index 72eb9999..1672e3fb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java index 6298b2a4..eb1b5738 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java index 091e81ca..89e50e4d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java index 5dda8e8b..70949dac 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java index f3aaead4..e38d2c45 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java index c54756cf..6214f8be 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java index 5d60390f..d0068416 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java index 8f78d497..d62f5a6e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java index 214b6e9d..481c42ac 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java index 6d0d9f79..25a51afb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java index 83fb6793..1624068c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java index 36fc04c7..499eaceb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java index 172c5290..fdd9b680 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java index fe91b494..db2bb4ca 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java index ff72b4b6..4f220425 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java index 4ab95b32..ea4db6f9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java index 8476b1d5..23fbe117 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java index 39aec856..d9a03c65 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java index 7332acab..c465fd85 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java index 8fbdb6a8..f9466a7f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java index 808e9006..32db74c2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java index a91ddac4..01fbf065 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java index be112fe0..9841a03b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java index 15dd58bf..e2d19c08 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java index 6da86984..6cc5b6fb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java index 2674b4d6..1d137ea3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java index eebc7557..f9dd960f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java index 5d60fd0e..3596b231 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java index 080db4d9..572d4597 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java index 1301d66d..086748d2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java index 07b724a7..b74697d7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java index 7bdc08bb..9a81aaf7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java index f72ea238..0c6c7349 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java index b1ac6484..f76950b8 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java index c0bed7f4..111ce8cf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java index 7ec3b38c..9af999ff 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java index 17cb75f0..351b76d8 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java index 748f0fea..84e25058 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java index 01fb6a8f..eab04691 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java index 87188c8b..e2663431 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java index 0c2ba138..9e3b60e5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java index 1931fd5e..23dbbadd 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.event.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java index 24c740ee..8caef2d1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.luckperms; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java index 7ca171d3..7b21f21b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.luckperms.calculators; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java index 30e5d6ed..3e638ba1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.luckperms.calculators; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java index f9d8b5e1..27aef790 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.placeholderapi; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java index 3434c974..79fd1f6b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.internal; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java index 45bf3941..e1e68852 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java index af192b24..518f7b6e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java index f539627c..498ad556 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java index 627014e8..738c4e16 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java index bda43673..806f9848 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java index f86e9b85..cc73c6f0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package de.eintosti.buildsystem.listener; import de.eintosti.buildsystem.BuildSystemPlugin; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java index b01e9d36..a04deb4c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java index 7f3b133a..4242db99 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java index 07b17cbf..7827e12c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java index ae717ae6..f3591ba7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java index 89174380..fa4f197c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java index 48b6238a..166ed4a8 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java index 7802f9b9..301ac58d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java index 2d590c62..6f3aa615 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java index aa6bc600..fce52c21 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java index 6ecdb40d..60389783 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java index dd009cae..345e9cbd 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java index 2c8507d9..b7a8a623 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java index 162f8c5d..480ee2fe 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java index 01d2b9ac..1ac24315 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java index 8a81c5db..4ffcdc78 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java index 5f9352ec..32e3f983 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java index d0f4ad57..ecd623cc 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java index 2d2f5d90..bd1a3a7f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java index c3fcf608..6e04e23f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java index d903e6db..9de2ca77 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java index a8f52f16..9b54108d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java index d14f7517..fb617626 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java index 3d2e60a6..c30f6355 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java index 497671d3..dbf1c781 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java index d54ce6d5..4dbd81f0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java index 8dfe485e..67feae88 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java index 2bcec47c..f86dbab1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java index 97781d07..78cf6738 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java index 0d5860ff..5cfd4692 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java index 43b98fde..d00460b9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java index 05dacb85..a96e802e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java index edc1bf3c..3f3122de 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java index 793b5457..545285e6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java index 265e116f..be5c1600 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java index c7ffe75f..61ebfcef 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java index e25d2e71..1d782564 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java index 1d6991af..7b597fcb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java index 370e330b..9d30cd2e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java index 6529d794..ab5ee911 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java index 75d5581a..d2322611 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java index 99b311e7..1d6864f3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java index 076c9130..eca24c81 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java index 185ffa0f..acb45b43 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java index 80ff8117..03c30809 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java index 00f35750..0912451a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java index 9a864ed5..9b190578 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java index b715de78..faa3e5bb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java index 838fd3ec..bbffffe2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java index 34ce41fd..4362635e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java index e6b9673d..850ecfeb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java index 30e7df19..0c524c3d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java index 65166da5..7970101f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java index a577a86b..639be040 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java index 745ad3a7..768268dc 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java index 4ea9c82f..689f0a60 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java index 56ad1557..5616a6cb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java index 0a83e51f..9bf8ddc7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java index b37eebc9..c3e0bbb7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java index 873d7355..15963d46 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java index 8e7a5b7f..65b24fe0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java index abb234aa..e7864e76 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java index 8ce001f6..0601a2fb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java index 3d69f785..d86da144 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java index 2add11ef..1709c39a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java index 22e23cf6..10bea3c0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java index 5c2e55e6..988cacae 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java index 7faf6c48..a5a457c5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.data; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java index 14946069..30dd61a5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java index 77fd711c..f3576af1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator.voidgenerator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java index 6f66c5d2..46a58ea5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator.voidgenerator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java index 8a45e309..b680d910 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator.voidgenerator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java index 10f99b8c..c58c0630 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java index 13a0234a..3e779618 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java index 0e5b0e46..9345b439 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java index c54448fe..6b20d6f3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java index facb5991..edf548cf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java index e2406a0e..ec6a1a02 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java index 7850b718..37793ceb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; From f481c91bc65f2bfd764f169c7ec1584d2330f0b8 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Sun, 18 Jun 2023 15:38:37 +0200 Subject: [PATCH 10/14] Switch to GNU v3 license (#202) [ci skip] Change to GNU v3 license --- HEADER.txt | 15 + LICENSE | 27 - LICENSE.txt | 858 ++++++++++++++++++ README.md | 2 +- .../v1_12_R1/CustomBlocks_1_12_R1.java | 18 +- .../version/v1_12_R1/GameRules_1_12_R1.java | 18 +- .../v1_13_R1/CustomBlocks_1_13_R1.java | 18 +- .../version/v1_13_R1/GameRules_1_13_R1.java | 18 +- .../v1_14_R1/CustomBlocks_1_14_R1.java | 18 +- .../v1_17_R1/CustomBlocks_1_17_R1.java | 18 +- .../v1_20_R1/CustomBlocks_1_20_R1.java | 18 +- .../version/customblocks/CustomBlock.java | 18 +- .../version/customblocks/CustomBlocks.java | 18 +- .../gamerules/AbstractGameRulesInventory.java | 18 +- .../version/gamerules/GameRules.java | 18 +- .../version/util/DirectionUtil.java | 18 +- .../version/util/MinecraftVersion.java | 18 +- .../eintosti/buildsystem/api/BuildSystem.java | 18 +- .../buildsystem/api/BuildSystemProvider.java | 18 +- .../api/event/world/BuildWorldEvent.java | 18 +- .../api/event/world/BuildWorldLoadEvent.java | 18 +- .../event/world/BuildWorldPostLoadEvent.java | 18 +- .../world/BuildWorldPostUnloadEvent.java | 18 +- .../event/world/BuildWorldUnloadEvent.java | 18 +- .../buildsystem/api/player/BuildPlayer.java | 18 +- .../buildsystem/api/player/PlayerManager.java | 18 +- .../buildsystem/api/settings/DesignColor.java | 18 +- .../api/settings/NavigatorType.java | 18 +- .../buildsystem/api/settings/Settings.java | 18 +- .../api/settings/WorldDisplay.java | 18 +- .../buildsystem/api/settings/WorldFilter.java | 18 +- .../buildsystem/api/settings/WorldSort.java | 18 +- .../buildsystem/api/world/BuildWorld.java | 18 +- .../api/world/BuildWorldCreator.java | 18 +- .../buildsystem/api/world/Builder.java | 18 +- .../buildsystem/api/world/WorldManager.java | 18 +- .../api/world/data/Visibility.java | 18 +- .../buildsystem/api/world/data/WorldData.java | 18 +- .../api/world/data/WorldStatus.java | 18 +- .../buildsystem/api/world/data/WorldType.java | 18 +- .../api/world/generator/CustomGenerator.java | 18 +- .../api/world/generator/Generator.java | 18 +- .../buildsystem/BuildSystemPlugin.java | 18 +- .../de/eintosti/buildsystem/Messages.java | 18 +- .../buildsystem/api/BuildSystemApi.java | 18 +- .../buildsystem/command/BackCommand.java | 18 +- .../buildsystem/command/BlocksCommand.java | 18 +- .../buildsystem/command/BuildCommand.java | 18 +- .../command/BuildSystemCommand.java | 18 +- .../buildsystem/command/ConfigCommand.java | 18 +- .../command/ExplosionsCommand.java | 18 +- .../buildsystem/command/GamemodeCommand.java | 18 +- .../buildsystem/command/NoAICommand.java | 18 +- .../buildsystem/command/PagedCommand.java | 18 +- .../buildsystem/command/PhysicsCommand.java | 18 +- .../buildsystem/command/SettingsCommand.java | 18 +- .../buildsystem/command/SetupCommand.java | 18 +- .../buildsystem/command/SkullCommand.java | 18 +- .../buildsystem/command/SpawnCommand.java | 18 +- .../buildsystem/command/SpeedCommand.java | 18 +- .../buildsystem/command/TimeCommand.java | 18 +- .../buildsystem/command/TopCommand.java | 18 +- .../buildsystem/command/WorldsCommand.java | 18 +- .../command/subcommand/Argument.java | 18 +- .../command/subcommand/SubCommand.java | 18 +- .../worlds/AddBuilderSubCommand.java | 18 +- .../subcommand/worlds/BuildersSubCommand.java | 18 +- .../subcommand/worlds/DeleteSubCommand.java | 18 +- .../subcommand/worlds/EditSubCommand.java | 18 +- .../subcommand/worlds/HelpSubCommand.java | 18 +- .../worlds/ImportAllSubCommand.java | 18 +- .../subcommand/worlds/ImportSubCommand.java | 18 +- .../subcommand/worlds/InfoSubCommand.java | 18 +- .../subcommand/worlds/ItemSubCommand.java | 18 +- .../worlds/RemoveBuilderSubCommand.java | 18 +- .../worlds/RemoveSpawnSubCommand.java | 18 +- .../subcommand/worlds/RenameSubCommand.java | 18 +- .../worlds/SetCreatorSubCommand.java | 18 +- .../subcommand/worlds/SetItemSubCommand.java | 18 +- .../worlds/SetPermissionSubCommand.java | 18 +- .../worlds/SetProjectSubCommand.java | 18 +- .../subcommand/worlds/SetSpawnSubCommand.java | 18 +- .../worlds/SetStatusSubCommand.java | 18 +- .../subcommand/worlds/TeleportSubCommand.java | 18 +- .../subcommand/worlds/UnimportSubCommand.java | 18 +- .../buildsystem/config/ConfigValues.java | 18 +- .../buildsystem/config/ConfigurationFile.java | 18 +- .../buildsystem/config/PlayersConfig.java | 18 +- .../buildsystem/config/SetupConfig.java | 18 +- .../buildsystem/config/SpawnConfig.java | 18 +- .../buildsystem/config/WorldConfig.java | 18 +- .../player/PlayerInventoryClearEvent.java | 18 +- .../luckperms/LuckPermsExpansion.java | 18 +- .../calculators/BuildModeCalculator.java | 18 +- .../luckperms/calculators/RoleCalculator.java | 18 +- .../PlaceholderApiExpansion.java | 18 +- .../buildsystem/internal/ServerVersion.java | 18 +- .../listener/AsyncPlayerChatListener.java | 18 +- .../listener/AsyncPlayerPreLoginListener.java | 18 +- .../listener/BlockPhysicsListener.java | 18 +- .../listener/BlockPlaceListener.java | 18 +- .../BuildModePreventationListener.java | 18 +- .../BuildWorldResetUnloadListener.java | 17 + .../listener/EditSessionListener.java | 18 +- .../listener/EntitySpawnListener.java | 18 +- .../listener/FoodLevelChangeListener.java | 18 +- .../listener/InventoryCloseListener.java | 18 +- .../listener/InventoryCreativeListener.java | 18 +- .../listener/NavigatorListener.java | 18 +- .../listener/PlayerChangedWorldListener.java | 18 +- .../PlayerCommandPreprocessListener.java | 18 +- .../PlayerInventoryClearListener.java | 18 +- .../listener/PlayerJoinListener.java | 18 +- .../listener/PlayerMoveListener.java | 18 +- .../listener/PlayerQuitListener.java | 18 +- .../listener/PlayerRespawnListener.java | 18 +- .../listener/PlayerTeleportListener.java | 18 +- .../listener/SettingsInteractListener.java | 18 +- .../listener/SignChangeListener.java | 18 +- .../listener/WeatherChangeListener.java | 18 +- .../listener/WorldManipulateListener.java | 18 +- .../navigator/ArmorStandManager.java | 18 +- .../navigator/inventory/ArchiveInventory.java | 18 +- .../inventory/FilteredWorldsInventory.java | 18 +- .../inventory/NavigatorInventory.java | 18 +- .../navigator/inventory/PrivateInventory.java | 18 +- .../navigator/inventory/WorldsInventory.java | 18 +- .../navigator/settings/BuildWorldDisplay.java | 18 +- .../navigator/settings/BuildWorldFilter.java | 18 +- .../settings/NavigatorInventoryType.java | 18 +- .../buildsystem/player/BlocksInventory.java | 18 +- .../player/BuildPlayerManager.java | 18 +- .../buildsystem/player/CachedValues.java | 18 +- .../buildsystem/player/CraftBuildPlayer.java | 18 +- .../buildsystem/player/LogoutLocation.java | 18 +- .../buildsystem/settings/CraftSettings.java | 18 +- .../buildsystem/settings/DesignInventory.java | 18 +- .../buildsystem/settings/NoClipManager.java | 18 +- .../settings/SettingsInventory.java | 18 +- .../buildsystem/settings/SettingsManager.java | 18 +- .../buildsystem/settings/SpeedInventory.java | 18 +- .../tabcomplete/ArgumentSorter.java | 18 +- .../tabcomplete/BuildTabComplete.java | 18 +- .../tabcomplete/ConfigTabComplete.java | 18 +- .../tabcomplete/EmptyTabComplete.java | 18 +- .../tabcomplete/GamemodeTabComplete.java | 18 +- .../tabcomplete/PhysicsTabComplete.java | 18 +- .../tabcomplete/SpawnTabComplete.java | 18 +- .../tabcomplete/SpeedTabComplete.java | 18 +- .../tabcomplete/TimeTabComplete.java | 18 +- .../tabcomplete/WorldsTabComplete.java | 18 +- .../buildsystem/util/ArgumentParser.java | 18 +- .../buildsystem/util/EntityAIManager.java | 18 +- .../eintosti/buildsystem/util/FileUtils.java | 18 +- .../buildsystem/util/InventoryUtils.java | 18 +- .../eintosti/buildsystem/util/ItemSkulls.java | 18 +- .../buildsystem/util/NumberUtils.java | 18 +- .../buildsystem/util/PaginatedInventory.java | 18 +- .../buildsystem/util/PlayerChatInput.java | 18 +- .../eintosti/buildsystem/util/RGBUtils.java | 18 +- .../eintosti/buildsystem/util/SkullCache.java | 18 +- .../buildsystem/util/StringUtils.java | 18 +- .../buildsystem/util/UUIDFetcher.java | 18 +- .../buildsystem/util/UpdateChecker.java | 18 +- .../buildsystem/world/BuildWorldManager.java | 18 +- .../buildsystem/world/CraftBuildWorld.java | 18 +- .../world/CraftBuildWorldCreator.java | 18 +- .../buildsystem/world/CraftBuilder.java | 18 +- .../buildsystem/world/SpawnManager.java | 18 +- .../world/data/BuildWorldData.java | 18 +- .../world/generator/CustomGeneratorImpl.java | 18 +- .../DeprecatedVoidGenerator.java | 18 +- .../voidgenerator/ModernVoidGenerator.java | 18 +- .../voidgenerator/VoidGenerator.java | 18 +- .../world/modification/BuilderInventory.java | 18 +- .../world/modification/CreateInventory.java | 18 +- .../world/modification/DeleteInventory.java | 18 +- .../world/modification/EditInventory.java | 18 +- .../world/modification/GameRuleInventory.java | 18 +- .../world/modification/SetupInventory.java | 18 +- .../world/modification/StatusInventory.java | 18 +- 181 files changed, 3355 insertions(+), 732 deletions(-) create mode 100644 HEADER.txt delete mode 100644 LICENSE create mode 100644 LICENSE.txt diff --git a/HEADER.txt b/HEADER.txt new file mode 100644 index 00000000..7388d2ee --- /dev/null +++ b/HEADER.txt @@ -0,0 +1,15 @@ +Copyright (c) 2018-2023, Thomas Meaney +Copyright (c) contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 5bb95972..00000000 --- a/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2023, Thomas Meaney -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by einTosti. -4. Neither the name of einTosti nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..2694e496 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,858 @@ +----------------- +BuildSystem License +----------------- + +BuildSystem as a whole is licensed under: + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +---------------- +commons-lang License +---------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +---------------- +LuckPerms License +---------------- + +MIT License + +Copyright (c) lucko (Luck) +Copyright (c) contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index dc8cfb0e..f9fb9428 100644 --- a/README.md +++ b/README.md @@ -181,4 +181,4 @@ that come with them. ## License -This project is licensed under the [BSD 4-Clause License](LICENSE). +This project is licensed under the [GNU General Public License v3.0](LICENSE.txt). \ No newline at end of file diff --git a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java index 9091193c..9e129a42 100644 --- a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java +++ b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/CustomBlocks_1_12_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_12_R1; diff --git a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java index 2642a77d..b547e1a1 100644 --- a/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java +++ b/buildsystem-abstraction/adapter-1_12/src/main/java/de/eintosti/buildsystem/version/v1_12_R1/GameRules_1_12_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_12_R1; diff --git a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java index f8e56a70..0b53800d 100644 --- a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java +++ b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/CustomBlocks_1_13_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_13_R1; diff --git a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java index edd8c4c0..d8c30470 100644 --- a/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java +++ b/buildsystem-abstraction/adapter-1_13/src/main/java/de/eintosti/buildsystem/version/v1_13_R1/GameRules_1_13_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_13_R1; diff --git a/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java b/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java index 578b5e17..f3c7eb8d 100644 --- a/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java +++ b/buildsystem-abstraction/adapter-1_14/src/main/java/de/eintosti/buildsystem/version/v1_14_R1/CustomBlocks_1_14_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_14_R1; diff --git a/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java b/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java index 90b9bcd9..d5415b13 100644 --- a/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java +++ b/buildsystem-abstraction/adapter-1_17/src/main/java/de/eintosti/buildsystem/version/v1_17_R1/CustomBlocks_1_17_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_17_R1; diff --git a/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java b/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java index bb3f7733..3c46bdf6 100644 --- a/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java +++ b/buildsystem-abstraction/adapter-1_20/src/main/java/de/eintosti/buildsystem/version/v1_20_R1/CustomBlocks_1_20_R1.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.v1_20_R1; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java index 85dc75cf..1d4793b0 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlock.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.customblocks; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java index ceb02e79..2c2282b1 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/customblocks/CustomBlocks.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.customblocks; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java index ebcbdd25..75233744 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/AbstractGameRulesInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.gamerules; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java index 8877050e..48208e51 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/gamerules/GameRules.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.gamerules; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java index 4dd1ad49..95d0ff3c 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/DirectionUtil.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.util; diff --git a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java index 118d179b..de147732 100644 --- a/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java +++ b/buildsystem-abstraction/common/src/main/java/de/eintosti/buildsystem/version/util/MinecraftVersion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.version.util; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java index 9cd69c2e..11025ca1 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java index 3900fe7e..5976bd9f 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java index 4b6e71a0..df915a4e 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java index b2aec6db..09f981cd 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldLoadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java index 7c89cf80..c31663ca 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostLoadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java index aa6d1240..70d7b6d6 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldPostUnloadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java index 5bb3879e..d9c5f873 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/BuildWorldUnloadEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.event.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java index 006746b7..a9e35c74 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/BuildPlayer.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.player; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java index 4966c2e3..e054cbff 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/PlayerManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.player; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java index 31f55748..9d5ca5bc 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/DesignColor.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java index eb99133e..9f43d5aa 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/NavigatorType.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java index a23aaf40..faabac4d 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/Settings.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java index 5589a8e3..bab75f3c 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldDisplay.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java index 9ecd275e..6f6cf73a 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldFilter.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java index 98c09ad3..b44ffc66 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/WorldSort.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.settings; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java index ad785c42..590f6cec 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorld.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java index 4cc9cac6..611beb8c 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/BuildWorldCreator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java index 1dd1f20b..eabf42d2 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/Builder.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java index d6ba32f8..59f5f86a 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/WorldManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java index ef12af40..13a01310 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/Visibility.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java index 682ebda0..d88244c2 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldData.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java index 827ac233..a3dec5a4 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldStatus.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java index f8f268be..9a0728b8 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/WorldType.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.data; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java index 6ca789a4..cb9e9a72 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/CustomGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.generator; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java index f4abda4f..4d4aea35 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/Generator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api.world.generator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java index ab34075c..8b005b82 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java index ec952598..e8cce0af 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java index 55984588..8f457d5e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/api/BuildSystemApi.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.api; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java index 77f0157b..b9b62697 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java index 741a95a4..be1d257f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java index 9c8e99ce..6ff5a08c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java index 70a008ba..0ac970fa 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java index 5614a330..0036836d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java index 72eb9999..1672e3fb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java index 6298b2a4..eb1b5738 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java index 091e81ca..89e50e4d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java index 5dda8e8b..70949dac 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java index f3aaead4..e38d2c45 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java index c54756cf..6214f8be 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java index 5d60390f..d0068416 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java index 8f78d497..d62f5a6e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java index 214b6e9d..481c42ac 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java index 6d0d9f79..25a51afb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java index 83fb6793..1624068c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java index 36fc04c7..499eaceb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java index 172c5290..fdd9b680 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java index fe91b494..db2bb4ca 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/Argument.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java index ff72b4b6..4f220425 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/SubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java index 4ab95b32..ea4db6f9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java index 8476b1d5..23fbe117 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java index 39aec856..d9a03c65 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java index 7332acab..c465fd85 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java index 8fbdb6a8..f9466a7f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java index 808e9006..32db74c2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java index a91ddac4..01fbf065 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java index be112fe0..9841a03b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java index 15dd58bf..e2d19c08 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java index 6da86984..6cc5b6fb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java index 2674b4d6..1d137ea3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java index eebc7557..f9dd960f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java index 5d60fd0e..3596b231 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java index 080db4d9..572d4597 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java index 1301d66d..086748d2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java index 07b724a7..b74697d7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java index 7bdc08bb..9a81aaf7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java index f72ea238..0c6c7349 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java index b1ac6484..f76950b8 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java index c0bed7f4..111ce8cf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.command.subcommand.worlds; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java index 7ec3b38c..9af999ff 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigValues.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java index 17cb75f0..351b76d8 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/ConfigurationFile.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java index 748f0fea..84e25058 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/PlayersConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java index 01fb6a8f..eab04691 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SetupConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java index 87188c8b..e2663431 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/SpawnConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java index 0c2ba138..9e3b60e5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.config; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java index 1931fd5e..23dbbadd 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/event/player/PlayerInventoryClearEvent.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.event.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java index 24c740ee..8caef2d1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/LuckPermsExpansion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.luckperms; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java index 7ca171d3..7b21f21b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/BuildModeCalculator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.luckperms.calculators; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java index 30e5d6ed..3e638ba1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/luckperms/calculators/RoleCalculator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.luckperms.calculators; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java index f9d8b5e1..27aef790 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.expansion.placeholderapi; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java index 3434c974..79fd1f6b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/ServerVersion.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.internal; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java index 45bf3941..e1e68852 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerChatListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java index af192b24..518f7b6e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/AsyncPlayerPreLoginListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java index f539627c..498ad556 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPhysicsListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java index 627014e8..738c4e16 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java index bda43673..806f9848 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildModePreventationListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java index f86e9b85..cc73c6f0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BuildWorldResetUnloadListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package de.eintosti.buildsystem.listener; import de.eintosti.buildsystem.BuildSystemPlugin; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java index b01e9d36..a04deb4c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EditSessionListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java index 7f3b133a..4242db99 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/EntitySpawnListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java index 07b17cbf..7827e12c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/FoodLevelChangeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java index ae717ae6..f3591ba7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java index 89174380..fa4f197c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCreativeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java index 48b6238a..166ed4a8 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java index 7802f9b9..301ac58d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java index 2d590c62..6f3aa615 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java index aa6bc600..fce52c21 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java index 6ecdb40d..60389783 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java index dd009cae..345e9cbd 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerMoveListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java index 2c8507d9..b7a8a623 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java index 162f8c5d..480ee2fe 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerRespawnListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java index 01d2b9ac..1ac24315 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java index 8a81c5db..4ffcdc78 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SettingsInteractListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java index 5f9352ec..32e3f983 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/SignChangeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java index d0f4ad57..ecd623cc 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WeatherChangeListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java index 2d2f5d90..bd1a3a7f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/WorldManipulateListener.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.listener; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java index c3fcf608..6e04e23f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/ArmorStandManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java index d903e6db..9de2ca77 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/ArchiveInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java index a8f52f16..9b54108d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java index d14f7517..fb617626 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java index 3d2e60a6..c30f6355 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java index 497671d3..dbf1c781 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.inventory; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java index d54ce6d5..4dbd81f0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldDisplay.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java index 8dfe485e..67feae88 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/BuildWorldFilter.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java index 2bcec47c..f86dbab1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/settings/NavigatorInventoryType.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.navigator.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java index 97781d07..78cf6738 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java index 0d5860ff..5cfd4692 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java index 43b98fde..d00460b9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValues.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java index 05dacb85..a96e802e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CraftBuildPlayer.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java index edc1bf3c..3f3122de 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/LogoutLocation.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.player; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java index 793b5457..545285e6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/CraftSettings.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java index 265e116f..be5c1600 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java index c7ffe75f..61ebfcef 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/NoClipManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java index e25d2e71..1d782564 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java index 1d6991af..7b597fcb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java index 370e330b..9d30cd2e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.settings; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java index 6529d794..ab5ee911 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ArgumentSorter.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java index 75d5581a..d2322611 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/BuildTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java index 99b311e7..1d6864f3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/ConfigTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java index 076c9130..eca24c81 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/EmptyTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java index 185ffa0f..acb45b43 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/GamemodeTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java index 80ff8117..03c30809 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/PhysicsTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java index 00f35750..0912451a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpawnTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java index 9a864ed5..9b190578 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/SpeedTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java index b715de78..faa3e5bb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/TimeTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java index 838fd3ec..bbffffe2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/tabcomplete/WorldsTabComplete.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.tabcomplete; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java index 34ce41fd..4362635e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ArgumentParser.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java index e6b9673d..850ecfeb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/EntityAIManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java index 30e7df19..0c524c3d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/FileUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java index 65166da5..7970101f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java index a577a86b..639be040 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/ItemSkulls.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java index 745ad3a7..768268dc 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/NumberUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java index 4ea9c82f..689f0a60 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PaginatedInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java index 56ad1557..5616a6cb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java index 0a83e51f..9bf8ddc7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/RGBUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java index b37eebc9..c3e0bbb7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/SkullCache.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java index 873d7355..15963d46 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/StringUtils.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java index 8e7a5b7f..65b24fe0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UUIDFetcher.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java index abb234aa..e7864e76 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/UpdateChecker.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.util; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java index 8ce001f6..0601a2fb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java index 3d69f785..d86da144 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java index 2add11ef..1709c39a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java index 22e23cf6..10bea3c0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuilder.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java index 5c2e55e6..988cacae 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/SpawnManager.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java index 7faf6c48..a5a457c5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/data/BuildWorldData.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.data; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java index 14946069..30dd61a5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/CustomGeneratorImpl.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java index 77fd711c..f3576af1 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/DeprecatedVoidGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator.voidgenerator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java index 6f66c5d2..46a58ea5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/ModernVoidGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator.voidgenerator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java index 8a45e309..b680d910 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/generator/voidgenerator/VoidGenerator.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.generator.voidgenerator; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java index 10f99b8c..c58c0630 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java index 13a0234a..3e779618 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java index 0e5b0e46..9345b439 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java index c54448fe..6b20d6f3 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java index facb5991..edf548cf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java index e2406a0e..ec6a1a02 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java index 7850b718..37793ceb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java @@ -1,9 +1,19 @@ /* - * Copyright (c) 2023, Thomas Meaney - * All rights reserved. + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package de.eintosti.buildsystem.world.modification; From cbc68259e50c64b183dcea3fd59d7f68aaf294a8 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Sun, 25 Jun 2023 23:18:24 +0200 Subject: [PATCH 11/14] Add package-info files --- buildsystem-api/build.gradle.kts | 18 ++++++++++++++- buildsystem-api/javadoc/overview.html | 11 ++++++++++ .../eintosti/buildsystem/api/BuildSystem.java | 3 +++ .../buildsystem/api/BuildSystemProvider.java | 3 +++ .../buildsystem/api/event/package-info.java | 22 +++++++++++++++++++ .../api/event/world/package-info.java | 22 +++++++++++++++++++ .../buildsystem/api/package-info.java | 22 +++++++++++++++++++ .../buildsystem/api/player/package-info.java | 22 +++++++++++++++++++ .../api/settings/package-info.java | 22 +++++++++++++++++++ .../api/world/data/package-info.java | 22 +++++++++++++++++++ .../api/world/generator/package-info.java | 22 +++++++++++++++++++ .../buildsystem/api/world/package-info.java | 22 +++++++++++++++++++ 12 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 buildsystem-api/javadoc/overview.html create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/package-info.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/package-info.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/package-info.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/package-info.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/package-info.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/package-info.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/package-info.java create mode 100644 buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/package-info.java diff --git a/buildsystem-api/build.gradle.kts b/buildsystem-api/build.gradle.kts index 21dac21d..f7e8da91 100644 --- a/buildsystem-api/build.gradle.kts +++ b/buildsystem-api/build.gradle.kts @@ -1,7 +1,7 @@ applyCommonConfiguration() plugins { - `java-library` + java `maven-publish` } @@ -16,6 +16,22 @@ java { withJavadocJar() } +tasks { + withType { + title = "BuildSystem API (v" + project.version + ")" + val opt = options as StandardJavadocDocletOptions + opt.overview("javadoc/overview.html") + opt.encoding("UTF-8") + opt.charSet("UTF-8") + opt.links("https://docs.oracle.com/javase/8/docs/api/") + opt.links("https://hub.spigotmc.org/javadocs/spigot/") + opt.links("https://javadoc.io/static/org.jetbrains/annotations/24.0.1/") + opt.isLinkSource = true + opt.isUse = true + opt.keyWords() + } +} + publishing { repositories { maven { diff --git a/buildsystem-api/javadoc/overview.html b/buildsystem-api/javadoc/overview.html new file mode 100644 index 00000000..347f3a2b --- /dev/null +++ b/buildsystem-api/javadoc/overview.html @@ -0,0 +1,11 @@ + +

            + BuildSystem is a utility plugin targeted towards build-teams. + It allows worlds to be easily managed and also provides handy tools to assist with building. +

            +

            Useful Links

            + + \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java index 11025ca1..36a31c6e 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystem.java @@ -22,6 +22,9 @@ import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.WorldManager; +/** + * The BuildSystem API. + */ public interface BuildSystem { /** diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java index 5976bd9f..66f3d4a9 100644 --- a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/BuildSystemProvider.java @@ -20,6 +20,9 @@ import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; +/** + * Provides static access to the {@link BuildSystem} API. + */ public class BuildSystemProvider { private static BuildSystem instance = null; diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/package-info.java new file mode 100644 index 00000000..ee688909 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * Main events package. + */ +package de.eintosti.buildsystem.api.event; \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/package-info.java new file mode 100644 index 00000000..97b116d0 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/event/world/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * Events relating to a {@link de.eintosti.buildsystem.api.world.BuildWorld}. + */ +package de.eintosti.buildsystem.api.event.world; \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/package-info.java new file mode 100644 index 00000000..aba7a42b --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * Main package for the {@link de.eintosti.buildsystem.api.BuildSystem} API interface. + */ +package de.eintosti.buildsystem.api; \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/package-info.java new file mode 100644 index 00000000..0af5abba --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/player/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * {@link de.eintosti.buildsystem.api.player.BuildPlayer} functionality. + */ +package de.eintosti.buildsystem.api.player; \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/package-info.java new file mode 100644 index 00000000..a22441be --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/settings/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * {@link de.eintosti.buildsystem.api.settings.Settings} functionality. + */ +package de.eintosti.buildsystem.api.settings; \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/package-info.java new file mode 100644 index 00000000..bb0a1b75 --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/data/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * Classes relevant to storing {@link de.eintosti.buildsystem.api.world.data.WorldData}. + */ +package de.eintosti.buildsystem.api.world.data; \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/package-info.java new file mode 100644 index 00000000..b51f461f --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/generator/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * Classes relevant to world generation. + */ +package de.eintosti.buildsystem.api.world.generator; \ No newline at end of file diff --git a/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/package-info.java b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/package-info.java new file mode 100644 index 00000000..ce313a6e --- /dev/null +++ b/buildsystem-api/src/main/java/de/eintosti/buildsystem/api/world/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * {@link de.eintosti.buildsystem.api.world.BuildWorld} functionality. + */ +package de.eintosti.buildsystem.api.world; \ No newline at end of file From 412c055203a7446caf945265a831a91e852d41a2 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Thu, 16 Nov 2023 11:20:45 +0100 Subject: [PATCH 12/14] Optimise imports --- .../main/java/de/eintosti/buildsystem/command/TopCommand.java | 2 +- .../main/java/de/eintosti/buildsystem/config/WorldConfig.java | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java index f0da92f8..1ca32aae 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java @@ -17,8 +17,8 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.BuildSystemPlugin; import com.cryptomorin.xseries.XSound; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.world.BuildWorldManager; import io.papermc.lib.PaperLib; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java index 94eba9bb..9dc38e0d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/config/WorldConfig.java @@ -19,8 +19,6 @@ import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.api.world.BuildWorld; -import de.eintosti.buildsystem.api.world.BuildWorldCreator; -import de.eintosti.buildsystem.api.world.WorldManager; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; import de.eintosti.buildsystem.world.CraftBuildWorldCreator; From 54ed7762f480ed5d4d9e115a6afd6779ce7ac703 Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Thu, 16 Nov 2023 14:42:33 +0100 Subject: [PATCH 13/14] Begin work for using MiniMessage --- buildsystem-core/build.gradle.kts | 10 +- .../buildsystem/BuildSystemPlugin.java | 24 +- .../buildsystem/command/BackCommand.java | 10 +- .../buildsystem/command/BlocksCommand.java | 4 +- .../buildsystem/command/BuildCommand.java | 20 +- .../command/BuildSystemCommand.java | 8 +- .../buildsystem/command/ConfigCommand.java | 8 +- .../command/ExplosionsCommand.java | 14 +- .../buildsystem/command/GamemodeCommand.java | 22 +- .../buildsystem/command/NoAICommand.java | 14 +- .../buildsystem/command/PagedCommand.java | 8 +- .../buildsystem/command/PhysicsCommand.java | 16 +- .../buildsystem/command/SettingsCommand.java | 4 +- .../buildsystem/command/SetupCommand.java | 4 +- .../buildsystem/command/SkullCommand.java | 14 +- .../buildsystem/command/SpawnCommand.java | 20 +- .../buildsystem/command/SpeedCommand.java | 12 +- .../buildsystem/command/TimeCommand.java | 20 +- .../buildsystem/command/TopCommand.java | 10 +- .../buildsystem/command/WorldsCommand.java | 6 +- .../worlds/AddBuilderSubCommand.java | 14 +- .../subcommand/worlds/BuildersSubCommand.java | 6 +- .../subcommand/worlds/DeleteSubCommand.java | 6 +- .../subcommand/worlds/EditSubCommand.java | 8 +- .../subcommand/worlds/HelpSubCommand.java | 6 +- .../worlds/ImportAllSubCommand.java | 14 +- .../subcommand/worlds/ImportSubCommand.java | 20 +- .../subcommand/worlds/InfoSubCommand.java | 20 +- .../subcommand/worlds/ItemSubCommand.java | 6 +- .../worlds/RemoveBuilderSubCommand.java | 14 +- .../worlds/RemoveSpawnSubCommand.java | 6 +- .../subcommand/worlds/RenameSubCommand.java | 6 +- .../worlds/SetCreatorSubCommand.java | 8 +- .../subcommand/worlds/SetItemSubCommand.java | 10 +- .../worlds/SetPermissionSubCommand.java | 8 +- .../worlds/SetProjectSubCommand.java | 8 +- .../subcommand/worlds/SetSpawnSubCommand.java | 6 +- .../worlds/SetStatusSubCommand.java | 6 +- .../subcommand/worlds/TeleportSubCommand.java | 10 +- .../subcommand/worlds/UnimportSubCommand.java | 8 +- .../PlaceholderApiExpansion.java | 14 +- .../internal/CraftBukkitVersion.java | 10 +- .../listener/BlockPlaceListener.java | 4 +- .../listener/InventoryCloseListener.java | 4 +- .../listener/NavigatorListener.java | 12 +- .../listener/PlayerChangedWorldListener.java | 6 +- .../PlayerCommandPreprocessListener.java | 8 +- .../PlayerInventoryClearListener.java | 4 +- .../listener/PlayerJoinListener.java | 10 +- .../listener/PlayerQuitListener.java | 7 +- .../listener/PlayerTeleportListener.java | 4 +- .../buildsystem/messages/Messages.java | 88 ++++ .../MessagesOld.java} | 10 +- .../messages/MessagesProvider.java | 158 ++++++ .../messages/OrderedProperties.java | 495 ++++++++++++++++++ .../inventory/FilteredWorldsInventory.java | 20 +- .../inventory/NavigatorInventory.java | 12 +- .../navigator/inventory/PrivateInventory.java | 4 +- .../navigator/inventory/WorldsInventory.java | 4 +- .../buildsystem/player/BlocksInventory.java | 14 +- .../player/BuildPlayerManager.java | 10 +- .../buildsystem/settings/DesignInventory.java | 6 +- .../settings/SettingsInventory.java | 12 +- .../buildsystem/settings/SettingsManager.java | 16 +- .../buildsystem/settings/SpeedInventory.java | 18 +- .../buildsystem/util/InventoryUtils.java | 34 +- .../buildsystem/util/PlayerChatInput.java | 8 +- .../buildsystem/world/BuildWorldManager.java | 48 +- .../buildsystem/world/CraftBuildWorld.java | 14 +- .../world/CraftBuildWorldCreator.java | 14 +- .../world/modification/BuilderInventory.java | 26 +- .../world/modification/CreateInventory.java | 30 +- .../world/modification/DeleteInventory.java | 16 +- .../world/modification/EditInventory.java | 60 +-- .../world/modification/GameRuleInventory.java | 8 +- .../world/modification/SetupInventory.java | 50 +- .../world/modification/StatusInventory.java | 14 +- .../main/resources/lang/messages.properties | 3 + gradle/libs.versions.toml | 6 + 79 files changed, 1250 insertions(+), 469 deletions(-) create mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java rename buildsystem-core/src/main/java/de/eintosti/buildsystem/{Messages.java => messages/MessagesOld.java} (99%) create mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java create mode 100644 buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/OrderedProperties.java create mode 100644 buildsystem-core/src/main/resources/lang/messages.properties diff --git a/buildsystem-core/build.gradle.kts b/buildsystem-core/build.gradle.kts index 5fefc934..95126e34 100644 --- a/buildsystem-core/build.gradle.kts +++ b/buildsystem-core/build.gradle.kts @@ -32,11 +32,14 @@ dependencies { compileOnly(libs.authlib) compileOnly(libs.paperlib) compileOnly(libs.luckperms) - compileOnly(libs.placeholderapi) + compileOnly(libs.placeholderapi) { isTransitive = false } compileOnly(libs.worldedit) compileOnly(libs.annotations) implementation(libs.paperlib) + implementation(libs.adventure.api) + implementation(libs.adventure.minimessage) + implementation(libs.adventure.platform) implementation(libs.xseries) { isTransitive = false } implementation(libs.fastboard) implementation(libs.nbt) { isTransitive = false } @@ -61,11 +64,12 @@ tasks { archiveFileName.set("${rootProject.name}-${project.version}.jar") val shadePath = "de.eintosti.buildsystem.util.external" - relocate("io.papermc.lib", "$shadePath.paperlib") relocate("com.cryptomorin.xseries", "$shadePath.xseries") - relocate("fr.mrmicky.fastboard", "$shadePath.fastboard") relocate("dev.dewy.nbt", "$shadePath.nbt") + relocate("fr.mrmicky.fastboard", "$shadePath.fastboard") + relocate("io.papermc.lib", "$shadePath.paperlib") relocate("org.bstats", "$shadePath.bstats") + relocate("net.kyori.adventure", "$shadePath.adventure") } processResources { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java index 158f812e..027e5ef9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java @@ -42,6 +42,8 @@ import de.eintosti.buildsystem.expansion.placeholderapi.PlaceholderApiExpansion; import de.eintosti.buildsystem.internal.CraftBukkitVersion; import de.eintosti.buildsystem.listener.*; +import de.eintosti.buildsystem.messages.MessagesOld; +import de.eintosti.buildsystem.messages.MessagesProvider; import de.eintosti.buildsystem.navigator.ArmorStandManager; import de.eintosti.buildsystem.navigator.inventory.ArchiveInventory; import de.eintosti.buildsystem.navigator.inventory.NavigatorInventory; @@ -81,6 +83,7 @@ import de.eintosti.buildsystem.world.modification.GameRuleInventory; import de.eintosti.buildsystem.world.modification.SetupInventory; import de.eintosti.buildsystem.world.modification.StatusInventory; +import net.kyori.adventure.platform.bukkit.BukkitAudiences; import org.bstats.bukkit.Metrics; import org.bstats.charts.AdvancedPie; import org.bstats.charts.SimplePie; @@ -91,6 +94,7 @@ import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.ServicePriority; import org.bukkit.plugin.java.JavaPlugin; +import org.checkerframework.checker.nullness.qual.NonNull; import java.io.File; import java.util.HashMap; @@ -137,11 +141,12 @@ public class BuildSystemPlugin extends JavaPlugin { private PlaceholderApiExpansion placeholderApiExpansion; private BuildSystemApi api; + private BukkitAudiences adventure; @Override public void onLoad() { createTemplateFolder(); - Messages.createMessageFile(); + new MessagesProvider(this).setup(); } @Override @@ -169,6 +174,8 @@ public void onEnable() { this.api.register(); getServer().getServicesManager().register(BuildSystem.class, api, this, ServicePriority.Normal); + this.adventure = BukkitAudiences.create(this); + Bukkit.getOnlinePlayers().forEach(pl -> { CraftBuildPlayer buildPlayer = playerManager.createBuildPlayer(pl); CraftSettings settings = buildPlayer.getSettings(); @@ -206,6 +213,12 @@ public void onDisable() { unregisterExpansions(); this.api.unregister(); + + if (this.adventure != null) { + this.adventure.close(); + this.adventure = null; + } + Bukkit.getConsoleSender().sendMessage(String.format("%sBuildSystem » Plugin %sdisabled%s!", ChatColor.RESET, ChatColor.RED, ChatColor.RESET)); } @@ -372,6 +385,13 @@ private void unregisterExpansions() { } } + public @NonNull BukkitAudiences adventure() { + if (this.adventure == null) { + throw new IllegalStateException("Tried to access Adventure when the plugin was disabled!"); + } + return this.adventure; + } + private void performUpdateCheck() { if (!configValues.isUpdateChecker()) { return; @@ -406,7 +426,7 @@ private void createTemplateFolder() { } public void sendPermissionMessage(CommandSender sender) { - Messages.sendMessage(sender, "no_permissions"); + MessagesOld.sendMessage(sender, "no_permissions"); } public void reloadConfigData(boolean init) { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java index 81c9a43e..93a0e8f7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BackCommand.java @@ -19,7 +19,7 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CraftBuildPlayer; import io.papermc.lib.PaperLib; @@ -46,7 +46,7 @@ public BackCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -59,7 +59,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N if (args.length == 0) { teleportBack(player); } else { - Messages.sendMessage(player, "back_usage"); + MessagesOld.sendMessage(player, "back_usage"); } return true; @@ -71,7 +71,7 @@ private void teleportBack(Player player) { Location previousLocation = buildPlayer.getPreviousLocation(); if (previousLocation == null) { - Messages.sendMessage(player, "back_failed"); + MessagesOld.sendMessage(player, "back_failed"); return; } @@ -81,7 +81,7 @@ private void teleportBack(Player player) { return; } XSound.ENTITY_ZOMBIE_INFECT.play(player); - Messages.sendMessage(player, "back_teleported"); + MessagesOld.sendMessage(player, "back_teleported"); buildPlayer.setPreviousLocation(null); }); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java index 7b9880bb..aadd501f 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BlocksCommand.java @@ -18,7 +18,7 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -37,7 +37,7 @@ public BlocksCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java index 47a5dea8..d25dc110 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildCommand.java @@ -19,7 +19,7 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CachedValues; import de.eintosti.buildsystem.player.CraftBuildPlayer; @@ -48,7 +48,7 @@ public BuildCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -72,7 +72,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N Player target = Bukkit.getPlayer(args[0]); if (target == null) { - Messages.sendMessage(player, "build_player_not_found"); + MessagesOld.sendMessage(player, "build_player_not_found"); return true; } @@ -81,7 +81,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N } default: { - Messages.sendMessage(player, "build_usage"); + MessagesOld.sendMessage(player, "build_usage"); break; } } @@ -100,11 +100,11 @@ private void toggleBuildMode(Player target, Player sender, boolean self) { XSound.ENTITY_EXPERIENCE_ORB_PICKUP.play(target); if (self) { - Messages.sendMessage(target, "build_deactivated_self"); + MessagesOld.sendMessage(target, "build_deactivated_self"); } else { XSound.ENTITY_EXPERIENCE_ORB_PICKUP.play(sender); - Messages.sendMessage(sender, "build_deactivated_other_sender", new AbstractMap.SimpleEntry<>("%target%", target.getName())); - Messages.sendMessage(target, "build_deactivated_other_target", new AbstractMap.SimpleEntry<>("%sender%", sender.getName())); + MessagesOld.sendMessage(sender, "build_deactivated_other_sender", new AbstractMap.SimpleEntry<>("%target%", target.getName())); + MessagesOld.sendMessage(target, "build_deactivated_other_target", new AbstractMap.SimpleEntry<>("%sender%", sender.getName())); } } else { playerManager.getBuildModePlayers().add(targetUuid); @@ -114,11 +114,11 @@ private void toggleBuildMode(Player target, Player sender, boolean self) { XSound.ENTITY_EXPERIENCE_ORB_PICKUP.play(target); if (self) { - Messages.sendMessage(target, "build_activated_self"); + MessagesOld.sendMessage(target, "build_activated_self"); } else { XSound.ENTITY_EXPERIENCE_ORB_PICKUP.play(sender); - Messages.sendMessage(sender, "build_activated_other_sender", new AbstractMap.SimpleEntry<>("%target%", target.getName())); - Messages.sendMessage(target, "build_activated_other_target", new AbstractMap.SimpleEntry<>("%sender%", sender.getName())); + MessagesOld.sendMessage(sender, "build_activated_other_sender", new AbstractMap.SimpleEntry<>("%target%", target.getName())); + MessagesOld.sendMessage(target, "build_activated_other_target", new AbstractMap.SimpleEntry<>("%sender%", sender.getName())); } } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java index 03c19764..806aadeb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/BuildSystemCommand.java @@ -19,7 +19,7 @@ import com.google.common.collect.Lists; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -43,7 +43,7 @@ public BuildSystemCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } Player player = (Player) sender; @@ -55,10 +55,10 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N int page = Integer.parseInt(args[0]); sendMessage(player, page); } catch (NumberFormatException e) { - Messages.sendMessage(player, "buildsystem_invalid_page"); + MessagesOld.sendMessage(player, "buildsystem_invalid_page"); } } else { - Messages.sendMessage(player, "buildsystem_usage"); + MessagesOld.sendMessage(player, "buildsystem_usage"); } return true; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java index 0036836d..757d65d5 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ConfigCommand.java @@ -18,7 +18,7 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -41,7 +41,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N } if (args.length != 1) { - Messages.sendMessage(sender, "config_usage"); + MessagesOld.sendMessage(sender, "config_usage"); return true; } @@ -50,10 +50,10 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N case "reload": plugin.reloadConfig(); plugin.reloadConfigData(true); - Messages.sendMessage(sender, "config_reloaded"); + MessagesOld.sendMessage(sender, "config_reloaded"); break; default: - Messages.sendMessage(sender, "config_usage"); + MessagesOld.sendMessage(sender, "config_usage"); break; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java index 52478e70..4e61cf61 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/ExplosionsCommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.World; @@ -46,7 +46,7 @@ public ExplosionsCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -65,7 +65,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N toggleExplosions(player, Bukkit.getWorld(args[0])); break; default: - Messages.sendMessage(player, "explosions_usage"); + MessagesOld.sendMessage(player, "explosions_usage"); break; } @@ -74,23 +74,23 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N private void toggleExplosions(Player player, World bukkitWorld) { if (bukkitWorld == null) { - Messages.sendMessage(player, "explosions_unknown_world"); + MessagesOld.sendMessage(player, "explosions_unknown_world"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(bukkitWorld.getName()); if (buildWorld == null) { - Messages.sendMessage(player, "explosions_world_not_imported"); + MessagesOld.sendMessage(player, "explosions_world_not_imported"); return; } WorldData worldData = buildWorld.getData(); if (!worldData.explosions().get()) { worldData.explosions().set(true); - Messages.sendMessage(player, "explosions_activated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "explosions_activated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } else { worldData.explosions().set(false); - Messages.sendMessage(player, "explosions_deactivated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "explosions_deactivated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java index 52b55a9d..3810e73c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/GamemodeCommand.java @@ -18,7 +18,7 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.command.Command; @@ -41,7 +41,7 @@ public GamemodeCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -56,22 +56,22 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N case "survival": case "s": case "0": - setGamemode(player, args, GameMode.SURVIVAL, Messages.getString("gamemode_survival", player)); + setGamemode(player, args, GameMode.SURVIVAL, MessagesOld.getString("gamemode_survival", player)); break; case "creative": case "c": case "1": - setGamemode(player, args, GameMode.CREATIVE, Messages.getString("gamemode_creative", player)); + setGamemode(player, args, GameMode.CREATIVE, MessagesOld.getString("gamemode_creative", player)); break; case "adventure": case "a": case "2": - setGamemode(player, args, GameMode.ADVENTURE, Messages.getString("gamemode_adventure", player)); + setGamemode(player, args, GameMode.ADVENTURE, MessagesOld.getString("gamemode_adventure", player)); break; case "spectator": case "sp": case "3": - setGamemode(player, args, GameMode.SPECTATOR, Messages.getString("gamemode_spectator", player)); + setGamemode(player, args, GameMode.SPECTATOR, MessagesOld.getString("gamemode_spectator", player)); break; default: sendUsageMessage(player); @@ -96,7 +96,7 @@ private void setGamemode(Player player, String[] args, GameMode gameMode, String } private void sendUsageMessage(Player player) { - Messages.sendMessage(player, "gamemode_usage"); + MessagesOld.sendMessage(player, "gamemode_usage"); } private void setPlayerGamemode(Player player, GameMode gameMode, String gameModeName) { @@ -106,7 +106,7 @@ private void setPlayerGamemode(Player player, GameMode gameMode, String gameMode } player.setGameMode(gameMode); - Messages.sendMessage(player, "gamemode_set_self", new AbstractMap.SimpleEntry<>("%gamemode%", gameModeName)); + MessagesOld.sendMessage(player, "gamemode_set_self", new AbstractMap.SimpleEntry<>("%gamemode%", gameModeName)); } private void setTargetGamemode(Player player, String[] args, GameMode gameMode, String gameModeName) { @@ -117,13 +117,13 @@ private void setTargetGamemode(Player player, String[] args, GameMode gameMode, Player target = Bukkit.getPlayerExact(args[1]); if (target == null) { - Messages.sendMessage(player, "gamemode_player_not_found"); + MessagesOld.sendMessage(player, "gamemode_player_not_found"); return; } target.setGameMode(gameMode); - Messages.sendMessage(target, "gamemode_set_self", new AbstractMap.SimpleEntry<>("%gamemode%", gameModeName)); - Messages.sendMessage(player, "gamemode_set_other", + MessagesOld.sendMessage(target, "gamemode_set_self", new AbstractMap.SimpleEntry<>("%gamemode%", gameModeName)); + MessagesOld.sendMessage(player, "gamemode_set_other", new AbstractMap.SimpleEntry<>("%target%", target.getName()), new AbstractMap.SimpleEntry<>("%gamemode%", gameModeName) ); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java index f42a72ac..6647e93e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/NoAICommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.EntityAIManager; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; @@ -49,7 +49,7 @@ public NoAICommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -68,7 +68,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N toggleAI(player, Bukkit.getWorld(args[0])); break; default: - Messages.sendMessage(player, "noai_usage"); + MessagesOld.sendMessage(player, "noai_usage"); break; } @@ -77,23 +77,23 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N private void toggleAI(Player player, World bukkitWorld) { if (bukkitWorld == null) { - Messages.sendMessage(player, "noai_unknown_world"); + MessagesOld.sendMessage(player, "noai_unknown_world"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(bukkitWorld.getName()); if (buildWorld == null) { - Messages.sendMessage(player, "noai_world_not_imported"); + MessagesOld.sendMessage(player, "noai_world_not_imported"); return; } WorldData worldData = buildWorld.getData(); if (worldData.mobAi().get()) { worldData.mobAi().set(false); - Messages.sendMessage(player, "noai_activated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "noai_activated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } else { worldData.mobAi().set(true); - Messages.sendMessage(player, "noai_deactivated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "noai_deactivated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } boolean mobAI = worldData.mobAi().get(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java index d0c6f9a5..864aaf54 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PagedCommand.java @@ -17,7 +17,7 @@ */ package de.eintosti.buildsystem.command; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ComponentBuilder; import net.md_5.bungee.api.chat.HoverEvent; @@ -46,7 +46,7 @@ protected void sendMessage(Player player, int pageNum) { List page = createPage(commands, numPages, pageNum); page.add(0, new TextComponent("§7§m----------------------------------------------------")); - page.add(1, new TextComponent(Messages.getString(this.title, player) + page.add(1, new TextComponent(MessagesOld.getString(this.title, player) .replace("%page%", String.valueOf(pageNum)) .replace("%max%", String.valueOf(numPages)) .concat("\n")) @@ -81,12 +81,12 @@ protected TextComponent createComponent(Player player, String commandKey, String return new TextComponent(); } - TextComponent commandComponent = new TextComponent("§b" + Messages.getString(commandKey, player)); + TextComponent commandComponent = new TextComponent("§b" + MessagesOld.getString(commandKey, player)); TextComponent textComponent = new TextComponent(" §8» " + text); commandComponent.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, suggest)); commandComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, - new ComponentBuilder(Messages.getString(this.permission, player, new AbstractMap.SimpleEntry<>("%permission%", permission))).create() + new ComponentBuilder(MessagesOld.getString(this.permission, player, new AbstractMap.SimpleEntry<>("%permission%", permission))).create() )); commandComponent.addExtra(textComponent); return commandComponent; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java index a966cf03..0d6fd3c4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/PhysicsCommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.World; @@ -46,7 +46,7 @@ public PhysicsCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -65,13 +65,13 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N //TODO: Check each world for permission individually? if (args[0].equalsIgnoreCase("all") && worldManager.getBuildWorld("all") == null) { worldManager.getBuildWorlds().forEach(buildWorld -> buildWorld.getData().physics().set(true)); - Messages.sendMessage(player, "physics_activated_all"); + MessagesOld.sendMessage(player, "physics_activated_all"); } else { togglePhysics(player, Bukkit.getWorld(args[0])); } break; default: - Messages.sendMessage(player, "physics_usage"); + MessagesOld.sendMessage(player, "physics_usage"); break; } return true; @@ -79,23 +79,23 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N private void togglePhysics(Player player, World bukkitWorld) { if (bukkitWorld == null) { - Messages.sendMessage(player, "physics_unknown_world"); + MessagesOld.sendMessage(player, "physics_unknown_world"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(bukkitWorld.getName()); if (buildWorld == null) { - Messages.sendMessage(player, "physics_world_not_imported"); + MessagesOld.sendMessage(player, "physics_world_not_imported"); return; } WorldData worldData = buildWorld.getData(); if (!worldData.physics().get()) { worldData.physics().set(true); - Messages.sendMessage(player, "physics_activated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "physics_activated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } else { worldData.physics().set(false); - Messages.sendMessage(player, "physics_deactivated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "physics_deactivated", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java index e65d6568..8ffb0d6d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SettingsCommand.java @@ -18,7 +18,7 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -37,7 +37,7 @@ public SettingsCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java index 0803592a..1d4b5190 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SetupCommand.java @@ -18,7 +18,7 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -37,7 +37,7 @@ public SetupCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java index 1f53ec57..c15014ae 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SkullCommand.java @@ -18,7 +18,7 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -43,7 +43,7 @@ public SkullCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -56,21 +56,21 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N switch (args.length) { case 0: player.getInventory().addItem(inventoryUtils.getSkull("§b" + player.getName(), player.getName())); - Messages.sendMessage(player, "skull_player_received", new AbstractMap.SimpleEntry<>("%player%", player.getName())); + MessagesOld.sendMessage(player, "skull_player_received", new AbstractMap.SimpleEntry<>("%player%", player.getName())); break; case 1: String skullName = args[0]; if (skullName.length() > 16) { - ItemStack customSkull = inventoryUtils.getUrlSkull(Messages.getString("custom_skull_item", player), skullName); + ItemStack customSkull = inventoryUtils.getUrlSkull(MessagesOld.getString("custom_skull_item", player), skullName); player.getInventory().addItem(customSkull); - Messages.sendMessage(player, "skull_custom_received"); + MessagesOld.sendMessage(player, "skull_custom_received"); } else { player.getInventory().addItem(inventoryUtils.getSkull("§b" + skullName, skullName)); - Messages.sendMessage(player, "skull_player_received", new AbstractMap.SimpleEntry<>("%player%", skullName)); + MessagesOld.sendMessage(player, "skull_player_received", new AbstractMap.SimpleEntry<>("%player%", skullName)); } break; default: - Messages.sendMessage(player, "skull_usage"); + MessagesOld.sendMessage(player, "skull_usage"); break; } return true; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java index 7c82c8de..725476ea 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpawnCommand.java @@ -18,8 +18,8 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.SpawnManager; import org.bukkit.Location; @@ -48,7 +48,7 @@ public SpawnCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -57,15 +57,15 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N switch (args.length) { case 0: if (!spawnManager.teleport(player)) { - Messages.sendMessage(player, "spawn_unavailable"); + MessagesOld.sendMessage(player, "spawn_unavailable"); } else if (plugin.getConfigValues().isSpawnTeleportMessage()) { - Messages.sendMessage(player, "spawn_teleported"); + MessagesOld.sendMessage(player, "spawn_teleported"); } break; case 1: if (!player.hasPermission("buildsystem.spawn")) { - Messages.sendMessage(player, "spawn_usage"); + MessagesOld.sendMessage(player, "spawn_usage"); return true; } @@ -76,12 +76,12 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N BuildWorld buildWorld = worldManager.getBuildWorld(bukkitWorld.getName()); if (buildWorld == null) { - Messages.sendMessage(player, "spawn_world_not_imported"); + MessagesOld.sendMessage(player, "spawn_world_not_imported"); return true; } spawnManager.set(playerLocation, buildWorld.getName()); - Messages.sendMessage(player, "spawn_set", + MessagesOld.sendMessage(player, "spawn_set", new AbstractMap.SimpleEntry<>("%x%", round(playerLocation.getX())), new AbstractMap.SimpleEntry<>("%y%", round(playerLocation.getY())), new AbstractMap.SimpleEntry<>("%z%", round(playerLocation.getZ())), @@ -90,17 +90,17 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N break; case "remove": spawnManager.remove(); - Messages.sendMessage(player, "spawn_remove"); + MessagesOld.sendMessage(player, "spawn_remove"); break; default: - Messages.sendMessage(player, "spawn_admin"); + MessagesOld.sendMessage(player, "spawn_admin"); break; } break; default: String key = player.hasPermission("buildsystem.spawn") ? "spawn_admin" : "spawn_usage"; - Messages.sendMessage(player, key); + MessagesOld.sendMessage(player, key); break; } return true; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java index 4f660473..e6b06995 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/SpeedCommand.java @@ -19,7 +19,7 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -40,7 +40,7 @@ public SpeedCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -74,12 +74,12 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N setSpeed(player, 1.0f, speedString); break; default: - Messages.sendMessage(player, "speed_usage"); + MessagesOld.sendMessage(player, "speed_usage"); break; } break; default: - Messages.sendMessage(player, "speed_usage"); + MessagesOld.sendMessage(player, "speed_usage"); break; } @@ -89,10 +89,10 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N private void setSpeed(Player player, float speed, String speedString) { if (player.isFlying()) { player.setFlySpeed(speed - 0.1f); - Messages.sendMessage(player, "speed_set_flying", new AbstractMap.SimpleEntry<>("%speed%", speedString)); + MessagesOld.sendMessage(player, "speed_set_flying", new AbstractMap.SimpleEntry<>("%speed%", speedString)); } else { player.setWalkSpeed(speed); - Messages.sendMessage(player, "speed_set_walking", new AbstractMap.SimpleEntry<>("%speed%", speedString)); + MessagesOld.sendMessage(player, "speed_set_walking", new AbstractMap.SimpleEntry<>("%speed%", speedString)); } } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java index dc86209d..ec8a7b59 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TimeCommand.java @@ -18,8 +18,8 @@ package de.eintosti.buildsystem.command; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; import org.bukkit.World; @@ -48,7 +48,7 @@ public TimeCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -66,20 +66,20 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N switch (args.length) { case 0: { world.setTime(configValues.getNoonTime()); - Messages.sendMessage(player, "day_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); + MessagesOld.sendMessage(player, "day_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); break; } case 1: { if (world == null) { - Messages.sendMessage(player, "day_unknown_world"); + MessagesOld.sendMessage(player, "day_unknown_world"); return true; } world.setTime(configValues.getNoonTime()); - Messages.sendMessage(player, "day_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); + MessagesOld.sendMessage(player, "day_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); break; } default: - Messages.sendMessage(player, "day_usage"); + MessagesOld.sendMessage(player, "day_usage"); break; } break; @@ -94,20 +94,20 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N switch (args.length) { case 0: { world.setTime(configValues.getNightTime()); - Messages.sendMessage(player, "night_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); + MessagesOld.sendMessage(player, "night_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); break; } case 1: { if (world == null) { - Messages.sendMessage(player, "night_unknown_world"); + MessagesOld.sendMessage(player, "night_unknown_world"); return true; } world.setTime(configValues.getNightTime()); - Messages.sendMessage(player, "night_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); + MessagesOld.sendMessage(player, "night_set", new AbstractMap.SimpleEntry<>("%world%", world.getName())); break; } default: - Messages.sendMessage(player, "night_usage"); + MessagesOld.sendMessage(player, "night_usage"); break; } break; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java index 1ca32aae..27ec822c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/TopCommand.java @@ -19,7 +19,7 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.world.BuildWorldManager; import io.papermc.lib.PaperLib; import org.bukkit.Location; @@ -43,7 +43,7 @@ public TopCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } @@ -54,7 +54,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N } if (args.length != 0) { - Messages.sendMessage(player, "top_usage"); + MessagesOld.sendMessage(player, "top_usage"); return true; } @@ -69,7 +69,7 @@ private void sendToTop(Player player) { .getLocation(); if (!worldManager.isSafeLocation(blockLocation) || blockLocation.getBlock().getY() < playerLocation.getBlock().getY()) { - Messages.sendMessage(player, "top_failed"); + MessagesOld.sendMessage(player, "top_failed"); return; } @@ -79,7 +79,7 @@ private void sendToTop(Player player) { return; } XSound.ENTITY_ZOMBIE_INFECT.play(player); - Messages.sendMessage(player, "top_teleported"); + MessagesOld.sendMessage(player, "top_teleported"); }); } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java index 07da2ccd..6b6cc649 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/WorldsCommand.java @@ -19,9 +19,9 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.SubCommand; import de.eintosti.buildsystem.command.subcommand.worlds.*; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -41,7 +41,7 @@ public WorldsCommand(BuildSystemPlugin plugin) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) { if (!(sender instanceof Player)) { - plugin.getLogger().warning(Messages.getString("sender_not_player", null)); + plugin.getLogger().warning(MessagesOld.getString("sender_not_player", null)); return true; } Player player = (Player) sender; @@ -59,7 +59,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N WorldsTabComplete.WorldsArgument argument = WorldsTabComplete.WorldsArgument.matchArgument(args[0]); if (argument == null) { - Messages.sendMessage(player, "worlds_unknown_command"); + MessagesOld.sendMessage(player, "worlds_unknown_command"); return true; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java index ea4db6f9..da6f92cf 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/AddBuilderSubCommand.java @@ -19,10 +19,10 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; @@ -53,13 +53,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_addbuilder_usage"); + MessagesOld.sendMessage(player, "worlds_addbuilder_usage"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_addbuilder_unknown_world"); + MessagesOld.sendMessage(player, "worlds_addbuilder_unknown_world"); return; } @@ -81,7 +81,7 @@ public void getAddBuilderInput(Player player, BuildWorld buildWorld, boolean clo if (builderPlayer == null) { builderId = UUIDFetcher.getUUID(builderName); if (builderId == null) { - Messages.sendMessage(player, "worlds_addbuilder_player_not_found"); + MessagesOld.sendMessage(player, "worlds_addbuilder_player_not_found"); player.closeInventory(); return; } @@ -92,20 +92,20 @@ public void getAddBuilderInput(Player player, BuildWorld buildWorld, boolean clo } if (builderId.equals(player.getUniqueId()) && buildWorld.isCreator(player)) { - Messages.sendMessage(player, "worlds_addbuilder_already_creator"); + MessagesOld.sendMessage(player, "worlds_addbuilder_already_creator"); player.closeInventory(); return; } if (buildWorld.isBuilder(builderId)) { - Messages.sendMessage(player, "worlds_addbuilder_already_added"); + MessagesOld.sendMessage(player, "worlds_addbuilder_already_added"); player.closeInventory(); return; } buildWorld.addBuilder(builder); XSound.ENTITY_PLAYER_LEVELUP.play(player); - Messages.sendMessage(player, "worlds_addbuilder_added", new AbstractMap.SimpleEntry<>("%builder%", builderName)); + MessagesOld.sendMessage(player, "worlds_addbuilder_added", new AbstractMap.SimpleEntry<>("%builder%", builderName)); if (closeInventory) { player.closeInventory(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java index 23fbe117..17ebf9cb 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/BuildersSubCommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -45,13 +45,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_builders_usage"); + MessagesOld.sendMessage(player, "worlds_builders_usage"); return; } CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_builders_unknown_world"); + MessagesOld.sendMessage(player, "worlds_builders_unknown_world"); return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java index d9a03c65..c2d6c5b9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/DeleteSubCommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -45,13 +45,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_delete_usage"); + MessagesOld.sendMessage(player, "worlds_delete_usage"); return; } CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_delete_unknown_world"); + MessagesOld.sendMessage(player, "worlds_delete_unknown_world"); return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java index cba9011b..805cc64c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/EditSubCommand.java @@ -20,9 +20,9 @@ import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -47,13 +47,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_edit_usage"); + MessagesOld.sendMessage(player, "worlds_edit_usage"); return; } CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_edit_unknown_world"); + MessagesOld.sendMessage(player, "worlds_edit_unknown_world"); return; } @@ -62,7 +62,7 @@ public void execute(Player player, String[] args) { plugin.getEditInventory().openInventory(player, buildWorld); } else { XSound.ENTITY_ZOMBIE_BREAK_WOODEN_DOOR.play(player); - Titles.sendTitle(player, 5, 70, 20, " ", Messages.getString("world_not_loaded", player)); + Titles.sendTitle(player, 5, 70, 20, " ", MessagesOld.getString("world_not_loaded", player)); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java index d53a38a1..18c2f2b4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/HelpSubCommand.java @@ -18,10 +18,10 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import com.google.common.collect.Lists; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.PagedCommand; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.entity.Player; @@ -43,10 +43,10 @@ public void execute(Player player, String[] args) { int page = Integer.parseInt(args[1]); sendMessage(player, page); } catch (NumberFormatException e) { - Messages.sendMessage(player, "worlds_help_invalid_page"); + MessagesOld.sendMessage(player, "worlds_help_invalid_page"); } } else { - Messages.sendMessage(player, "worlds_help_usage"); + MessagesOld.sendMessage(player, "worlds_help_usage"); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java index 32db74c2..8859145b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportAllSubCommand.java @@ -18,10 +18,10 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.generator.Generator; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.ArgumentParser; import de.eintosti.buildsystem.util.UUIDFetcher; @@ -49,13 +49,13 @@ public void execute(Player player, String[] args) { } if (args.length != 1) { - Messages.sendMessage(player, "worlds_importall_usage"); + MessagesOld.sendMessage(player, "worlds_importall_usage"); return; } BuildWorldManager worldManager = plugin.getWorldManager(); if (worldManager.isImportingAllWorlds()) { - Messages.sendMessage(player, "worlds_importall_already_started"); + MessagesOld.sendMessage(player, "worlds_importall_already_started"); return; } @@ -74,7 +74,7 @@ public void execute(Player player, String[] args) { }); if (directories == null || directories.length == 0) { - Messages.sendMessage(player, "worlds_importall_no_worlds"); + MessagesOld.sendMessage(player, "worlds_importall_no_worlds"); return; } @@ -85,7 +85,7 @@ public void execute(Player player, String[] args) { if (parser.isArgument("g")) { String generatorArg = parser.getValue("g"); if (generatorArg == null) { - Messages.sendMessage(player, "worlds_importall_usage"); + MessagesOld.sendMessage(player, "worlds_importall_usage"); return; } try { @@ -97,12 +97,12 @@ public void execute(Player player, String[] args) { if (parser.isArgument("c")) { String creatorArg = parser.getValue("c"); if (creatorArg == null) { - Messages.sendMessage(player, "worlds_importall_usage"); + MessagesOld.sendMessage(player, "worlds_importall_usage"); return; } UUID creatorId = UUIDFetcher.getUUID(creatorArg); if (creatorId == null) { - Messages.sendMessage(player, "worlds_importall_player_not_found"); + MessagesOld.sendMessage(player, "worlds_importall_player_not_found"); return; } builder = new CraftBuilder(creatorId, creatorArg); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java index 9af1b303..bcd30bda 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ImportSubCommand.java @@ -18,11 +18,11 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.generator.Generator; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.ArgumentParser; import de.eintosti.buildsystem.util.UUIDFetcher; @@ -54,21 +54,21 @@ public void execute(Player player, String[] args) { } if (args.length < 2) { - Messages.sendMessage(player, "worlds_import_usage"); + MessagesOld.sendMessage(player, "worlds_import_usage"); return; } BuildWorldManager worldManager = plugin.getWorldManager(); BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld != null) { - Messages.sendMessage(player, "worlds_import_world_is_imported"); + MessagesOld.sendMessage(player, "worlds_import_world_is_imported"); return; } File worldFolder = new File(Bukkit.getWorldContainer(), args[1]); File levelFile = new File(worldFolder, "level.dat"); if (!worldFolder.isDirectory() || !levelFile.exists()) { - Messages.sendMessage(player, "worlds_import_unknown_world"); + MessagesOld.sendMessage(player, "worlds_import_unknown_world"); return; } @@ -77,7 +77,7 @@ public void execute(Player player, String[] args) { .findFirst() .orElse(null); if (invalidChar != null) { - Messages.sendMessage(player, "worlds_import_invalid_character", + MessagesOld.sendMessage(player, "worlds_import_invalid_character", new AbstractMap.SimpleEntry<>("%world%", worldName), new AbstractMap.SimpleEntry<>("%char%", invalidChar) ); @@ -94,7 +94,7 @@ public void execute(Player player, String[] args) { if (parser.isArgument("g")) { String generatorArg = parser.getValue("g"); if (generatorArg == null) { - Messages.sendMessage(player, "worlds_import_usage"); + MessagesOld.sendMessage(player, "worlds_import_usage"); return; } try { @@ -108,21 +108,21 @@ public void execute(Player player, String[] args) { if (parser.isArgument("c")) { String creatorArg = parser.getValue("c"); if (creatorArg == null) { - Messages.sendMessage(player, "worlds_import_usage"); + MessagesOld.sendMessage(player, "worlds_import_usage"); return; } UUID creatorId = UUIDFetcher.getUUID(creatorArg); if (creatorId == null) { - Messages.sendMessage(player, "worlds_import_player_not_found"); + MessagesOld.sendMessage(player, "worlds_import_player_not_found"); return; } creator = new CraftBuilder(creatorId, creatorArg); } } - Messages.sendMessage(player, "worlds_import_started", new AbstractMap.SimpleEntry<>("%world%", worldName)); + MessagesOld.sendMessage(player, "worlds_import_started", new AbstractMap.SimpleEntry<>("%world%", worldName)); if (worldManager.importWorld(player, worldName, creator, generator, generatorName, true)) { - Messages.sendMessage(player, "worlds_import_finished"); + MessagesOld.sendMessage(player, "worlds_import_finished"); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java index f11ed9b1..50305ca0 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/InfoSubCommand.java @@ -18,11 +18,11 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -50,40 +50,40 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_info_usage"); + MessagesOld.sendMessage(player, "worlds_info_usage"); return; } CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_info_unknown_world"); + MessagesOld.sendMessage(player, "worlds_info_unknown_world"); return; } //TODO: Print information about the custom generator? WorldData worldData = buildWorld.getData(); - Messages.sendMessage(player, "world_info", + MessagesOld.sendMessage(player, "world_info", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName()), new AbstractMap.SimpleEntry<>("%creator%", buildWorld.getCreator()), new AbstractMap.SimpleEntry<>("%item%", worldData.material().get().name()), - new AbstractMap.SimpleEntry<>("%type%", Messages.getDataString(buildWorld.getType().getKey(), player)), + new AbstractMap.SimpleEntry<>("%type%", MessagesOld.getDataString(buildWorld.getType().getKey(), player)), new AbstractMap.SimpleEntry<>("%private%", worldData.privateWorld().get()), new AbstractMap.SimpleEntry<>("%builders_enabled%", worldData.buildersEnabled().get()), new AbstractMap.SimpleEntry<>("%builders%", buildWorld.getBuildersInfo(player)), new AbstractMap.SimpleEntry<>("%block_breaking%", worldData.blockBreaking().get()), new AbstractMap.SimpleEntry<>("%block_placement%", worldData.blockPlacement().get()), - new AbstractMap.SimpleEntry<>("%status%", Messages.getDataString(worldData.status().get().getKey(), player)), + new AbstractMap.SimpleEntry<>("%status%", MessagesOld.getDataString(worldData.status().get().getKey(), player)), new AbstractMap.SimpleEntry<>("%project%", worldData.project().get()), new AbstractMap.SimpleEntry<>("%permission%", worldData.permission().get()), new AbstractMap.SimpleEntry<>("%time%", buildWorld.getWorldTime()), - new AbstractMap.SimpleEntry<>("%creation%", Messages.formatDate(buildWorld.getCreationDate())), + new AbstractMap.SimpleEntry<>("%creation%", MessagesOld.formatDate(buildWorld.getCreationDate())), new AbstractMap.SimpleEntry<>("%physics%", worldData.physics().get()), new AbstractMap.SimpleEntry<>("%explosions%", worldData.explosions().get()), new AbstractMap.SimpleEntry<>("%mobai%", worldData.mobAi().get()), new AbstractMap.SimpleEntry<>("%custom_spawn%", getCustomSpawn(buildWorld)), - new AbstractMap.SimpleEntry<>("%lastedited%", Messages.formatDate(worldData.lastEdited().get())), - new AbstractMap.SimpleEntry<>("%lastloaded%", Messages.formatDate(worldData.lastLoaded().get())), - new AbstractMap.SimpleEntry<>("%lastunloaded%", Messages.formatDate(worldData.lastUnloaded().get())) + new AbstractMap.SimpleEntry<>("%lastedited%", MessagesOld.formatDate(worldData.lastEdited().get())), + new AbstractMap.SimpleEntry<>("%lastloaded%", MessagesOld.formatDate(worldData.lastLoaded().get())), + new AbstractMap.SimpleEntry<>("%lastunloaded%", MessagesOld.formatDate(worldData.lastUnloaded().get())) ); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java index 5f0d3d0f..12c68df6 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/ItemSubCommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -40,9 +40,9 @@ public void execute(Player player, String[] args) { return; } - ItemStack navigator = plugin.getInventoryUtil().getItemStack(plugin.getConfigValues().getNavigatorItem(), Messages.getString("navigator_item", player)); + ItemStack navigator = plugin.getInventoryUtil().getItemStack(plugin.getConfigValues().getNavigatorItem(), MessagesOld.getString("navigator_item", player)); player.getInventory().addItem(navigator); - Messages.sendMessage(player, "worlds_item_receive"); + MessagesOld.sendMessage(player, "worlds_item_receive"); } @Override diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java index 6cc5b6fb..dc0947ab 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveBuilderSubCommand.java @@ -19,10 +19,10 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; @@ -52,13 +52,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_removebuilder_usage"); + MessagesOld.sendMessage(player, "worlds_removebuilder_usage"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_removebuilder_unknown_world"); + MessagesOld.sendMessage(player, "worlds_removebuilder_unknown_world"); return; } @@ -74,7 +74,7 @@ private void getRemoveBuilderInput(Player player, BuildWorld buildWorld) { if (builderPlayer == null) { builderId = UUIDFetcher.getUUID(builderName); if (builderId == null) { - Messages.sendMessage(player, "worlds_removebuilder_player_not_found"); + MessagesOld.sendMessage(player, "worlds_removebuilder_player_not_found"); player.closeInventory(); return; } @@ -83,20 +83,20 @@ private void getRemoveBuilderInput(Player player, BuildWorld buildWorld) { } if (builderId.equals(player.getUniqueId()) && buildWorld.isCreator(player)) { - Messages.sendMessage(player, "worlds_removebuilder_not_yourself"); + MessagesOld.sendMessage(player, "worlds_removebuilder_not_yourself"); player.closeInventory(); return; } if (!buildWorld.isBuilder(builderId)) { - Messages.sendMessage(player, "worlds_removebuilder_not_builder"); + MessagesOld.sendMessage(player, "worlds_removebuilder_not_builder"); player.closeInventory(); return; } buildWorld.removeBuilder(builderId); XSound.ENTITY_PLAYER_LEVELUP.play(player); - Messages.sendMessage(player, "worlds_removebuilder_removed", new AbstractMap.SimpleEntry<>("%builder%", builderName)); + MessagesOld.sendMessage(player, "worlds_removebuilder_removed", new AbstractMap.SimpleEntry<>("%builder%", builderName)); player.closeInventory(); }); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java index 1d137ea3..74415345 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RemoveSpawnSubCommand.java @@ -18,10 +18,10 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; @@ -47,12 +47,12 @@ public void execute(Player player, String[] args) { BuildWorld buildWorld = worldManager.getBuildWorld(player.getWorld().getName()); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_removespawn_world_not_imported"); + MessagesOld.sendMessage(player, "worlds_removespawn_world_not_imported"); return; } buildWorld.getData().customSpawn().set(null); - Messages.sendMessage(player, "worlds_removespawn_world_spawn_removed", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_removespawn_world_spawn_removed", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } @Override diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java index f9dd960f..2556fd87 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/RenameSubCommand.java @@ -19,10 +19,10 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.world.BuildWorldManager; @@ -47,13 +47,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_rename_usage"); + MessagesOld.sendMessage(player, "worlds_rename_usage"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_rename_unknown_world"); + MessagesOld.sendMessage(player, "worlds_rename_unknown_world"); return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java index 3596b231..3592388c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetCreatorSubCommand.java @@ -19,10 +19,10 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; @@ -50,13 +50,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_setcreator_usage"); + MessagesOld.sendMessage(player, "worlds_setcreator_usage"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_setcreator_unknown_world"); + MessagesOld.sendMessage(player, "worlds_setcreator_unknown_world"); return; } @@ -71,7 +71,7 @@ public void execute(Player player, String[] args) { plugin.getPlayerManager().forceUpdateSidebar(buildWorld); XSound.ENTITY_PLAYER_LEVELUP.play(player); - Messages.sendMessage(player, "worlds_setcreator_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_setcreator_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); player.closeInventory(); }); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java index 572d4597..c37c5a62 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetItemSubCommand.java @@ -19,10 +19,10 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Material; @@ -50,24 +50,24 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_setitem_usage"); + MessagesOld.sendMessage(player, "worlds_setitem_usage"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_setitem_unknown_world"); + MessagesOld.sendMessage(player, "worlds_setitem_unknown_world"); return; } ItemStack itemStack = player.getItemInHand(); if (itemStack.getType() == Material.AIR) { - Messages.sendMessage(player, "worlds_setitem_hand_empty"); + MessagesOld.sendMessage(player, "worlds_setitem_hand_empty"); return; } buildWorld.getData().material().set(XMaterial.matchXMaterial(itemStack)); - Messages.sendMessage(player, "worlds_setitem_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_setitem_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } @Override diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java index 086748d2..bb3a4fc7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetPermissionSubCommand.java @@ -19,9 +19,9 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.world.BuildWorldManager; @@ -49,13 +49,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_setpermission_usage"); + MessagesOld.sendMessage(player, "worlds_setpermission_usage"); return; } CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_setpermission_unknown_world"); + MessagesOld.sendMessage(player, "worlds_setpermission_unknown_world"); return; } @@ -68,7 +68,7 @@ public void getPermissionInput(Player player, CraftBuildWorld buildWorld, boolea plugin.getPlayerManager().forceUpdateSidebar(buildWorld); XSound.ENTITY_PLAYER_LEVELUP.play(player); - Messages.sendMessage(player, "worlds_setpermission_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_setpermission_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); if (closeInventory) { player.closeInventory(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java index b74697d7..1b1a321c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetProjectSubCommand.java @@ -19,9 +19,9 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.world.BuildWorldManager; @@ -49,13 +49,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_setproject_usage"); + MessagesOld.sendMessage(player, "worlds_setproject_usage"); return; } CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_setproject_unknown_world"); + MessagesOld.sendMessage(player, "worlds_setproject_unknown_world"); return; } @@ -68,7 +68,7 @@ public void getProjectInput(Player player, CraftBuildWorld buildWorld, boolean c plugin.getPlayerManager().forceUpdateSidebar(buildWorld); XSound.ENTITY_PLAYER_LEVELUP.play(player); - Messages.sendMessage(player, "worlds_setproject_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_setproject_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); if (closeInventory) { player.closeInventory(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java index 9a81aaf7..3b6d19ae 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetSpawnSubCommand.java @@ -18,10 +18,10 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Location; @@ -48,14 +48,14 @@ public void execute(Player player, String[] args) { BuildWorld buildWorld = worldManager.getBuildWorld(playerWorldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_setspawn_world_not_imported"); + MessagesOld.sendMessage(player, "worlds_setspawn_world_not_imported"); return; } Location loc = player.getLocation(); String locString = loc.getX() + ";" + loc.getY() + ";" + loc.getZ() + ";" + loc.getYaw() + ";" + loc.getPitch(); buildWorld.getData().customSpawn().set(locString); - Messages.sendMessage(player, "worlds_setspawn_world_spawn_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_setspawn_world_spawn_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } @Override diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java index 0c6c7349..613ae644 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/SetStatusSubCommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -45,13 +45,13 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_setstatus_usage"); + MessagesOld.sendMessage(player, "worlds_setstatus_usage"); return; } CraftBuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_setstatus_unknown_world"); + MessagesOld.sendMessage(player, "worlds_setstatus_unknown_world"); return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java index f76950b8..27bcfa34 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/TeleportSubCommand.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -44,20 +44,20 @@ public void execute(Player player, String[] args) { } if (args.length != 2) { - Messages.sendMessage(player, "worlds_tp_usage"); + MessagesOld.sendMessage(player, "worlds_tp_usage"); return; } BuildWorldManager worldManager = plugin.getWorldManager(); CraftBuildWorld buildWorld = worldManager.getBuildWorld(args[1]); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_tp_unknown_world"); + MessagesOld.sendMessage(player, "worlds_tp_unknown_world"); return; } World bukkitWorld = Bukkit.getServer().getWorld(args[1]); if (buildWorld.isLoaded() && bukkitWorld == null) { - Messages.sendMessage(player, "worlds_tp_unknown_world"); + MessagesOld.sendMessage(player, "worlds_tp_unknown_world"); return; } @@ -65,7 +65,7 @@ public void execute(Player player, String[] args) { if (player.hasPermission(permission) || permission.equalsIgnoreCase("-")) { worldManager.teleport(player, buildWorld); } else { - Messages.sendMessage(player, "worlds_tp_entry_forbidden"); + MessagesOld.sendMessage(player, "worlds_tp_entry_forbidden"); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java index 824890d4..cdccf223 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/command/subcommand/worlds/UnimportSubCommand.java @@ -18,10 +18,10 @@ package de.eintosti.buildsystem.command.subcommand.worlds; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.command.subcommand.Argument; import de.eintosti.buildsystem.command.subcommand.SubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.tabcomplete.WorldsTabComplete; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; @@ -47,18 +47,18 @@ public void execute(Player player, String[] args) { } if (args.length > 2) { - Messages.sendMessage(player, "worlds_unimport_usage"); + MessagesOld.sendMessage(player, "worlds_unimport_usage"); return; } BuildWorld buildWorld = worldManager.getBuildWorld(worldName); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_unimport_unknown_world"); + MessagesOld.sendMessage(player, "worlds_unimport_unknown_world"); return; } worldManager.unimportWorld(player, buildWorld, true); - Messages.sendMessage(player, "worlds_unimport_finished", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_unimport_finished", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } @Override diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java index e3425feb..80a4a4db 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/expansion/placeholderapi/PlaceholderApiExpansion.java @@ -18,8 +18,8 @@ package de.eintosti.buildsystem.expansion.placeholderapi; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.data.WorldData; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.world.BuildWorldManager; @@ -212,7 +212,7 @@ private String parseBuildWorldPlaceholder(Player player, String identifier) { case "buildersenabled": return String.valueOf(worldData.buildersEnabled().get()); case "creation": - return Messages.formatDate(buildWorld.getCreationDate()); + return MessagesOld.formatDate(buildWorld.getCreationDate()); case "creator": return buildWorld.getCreator(); case "creatorid": @@ -220,11 +220,11 @@ private String parseBuildWorldPlaceholder(Player player, String identifier) { case "explosions": return String.valueOf(worldData.explosions().get()); case "lastedited": - return Messages.formatDate(worldData.lastEdited().get()); + return MessagesOld.formatDate(worldData.lastEdited().get()); case "lastloaded": - return Messages.formatDate(worldData.lastLoaded().get()); + return MessagesOld.formatDate(worldData.lastLoaded().get()); case "lastunloaded": - return Messages.formatDate(worldData.lastUnloaded().get()); + return MessagesOld.formatDate(worldData.lastUnloaded().get()); case "loaded": return String.valueOf(buildWorld.isLoaded()); case "material": @@ -242,11 +242,11 @@ private String parseBuildWorldPlaceholder(Player player, String identifier) { case "spawn": return worldData.customSpawn().get(); case "status": - return Messages.getDataString(worldData.status().get().getKey(), player); + return MessagesOld.getDataString(worldData.status().get().getKey(), player); case "time": return buildWorld.getWorldTime(); case "type": - return Messages.getDataString(buildWorld.getType().getKey(), player); + return MessagesOld.getDataString(buildWorld.getType().getKey(), player); case "world": return buildWorld.getName(); default: diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/CraftBukkitVersion.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/CraftBukkitVersion.java index 99e3f44d..37139869 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/CraftBukkitVersion.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/internal/CraftBukkitVersion.java @@ -19,7 +19,7 @@ import com.google.common.collect.Lists; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.version.customblocks.CustomBlocks; import de.eintosti.buildsystem.version.gamerules.GameRules; import de.eintosti.buildsystem.version.util.MinecraftVersion; @@ -198,10 +198,10 @@ public GameRules initGameRules() { try { Constructor constructor = gameRules.getConstructor(String.class, List.class, List.class, List.class); return constructor.newInstance( - Messages.getString("worldeditor_gamerules_title", null), - Messages.getStringList("worldeditor_gamerules_boolean_enabled", null), - Messages.getStringList("worldeditor_gamerules_boolean_disabled", null), - Messages.getStringList("worldeditor_gamerules_integer", null) + MessagesOld.getString("worldeditor_gamerules_title", null), + MessagesOld.getStringList("worldeditor_gamerules_boolean_enabled", null), + MessagesOld.getStringList("worldeditor_gamerules_boolean_disabled", null), + MessagesOld.getStringList("worldeditor_gamerules_integer", null) ); } catch (Exception e) { e.printStackTrace(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java index 6879559b..a7caddf7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/BlockPlaceListener.java @@ -19,8 +19,8 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.version.customblocks.CustomBlock; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.entity.Player; @@ -50,7 +50,7 @@ public BlockPlaceListener(BuildSystemPlugin plugin) { private Map initBlockLookup() { Map lookup = new HashMap<>(); for (CustomBlock customBlock : CustomBlock.values()) { - lookup.put(Messages.getString(customBlock.getKey(), null), customBlock.getKey()); + lookup.put(MessagesOld.getString(customBlock.getKey(), null), customBlock.getKey()); } return lookup; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java index 3a205832..38f5b108 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/InventoryCloseListener.java @@ -19,9 +19,9 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -41,7 +41,7 @@ public InventoryCloseListener(BuildSystemPlugin plugin) { @EventHandler public void onSetupInventoryClose(InventoryCloseEvent event) { - if (!event.getView().getTitle().equals(Messages.getString("setup_title", (Player) event.getPlayer()))) { + if (!event.getView().getTitle().equals(MessagesOld.getString("setup_title", (Player) event.getPlayer()))) { return; } setNewItems(event); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java index 5b282b45..cbc8b92a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/NavigatorListener.java @@ -20,11 +20,11 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.NavigatorType; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.navigator.ArmorStandManager; import de.eintosti.buildsystem.navigator.settings.NavigatorInventoryType; import de.eintosti.buildsystem.player.BuildPlayerManager; @@ -109,7 +109,7 @@ public void manageNavigatorItemInteraction(PlayerInteractEvent event) { } XMaterial xMaterial = XMaterial.matchXMaterial(itemStack); - if (xMaterial != configValues.getNavigatorItem() || !itemMeta.getDisplayName().equals(Messages.getString("navigator_item", player))) { + if (xMaterial != configValues.getNavigatorItem() || !itemMeta.getDisplayName().equals(MessagesOld.getString("navigator_item", player))) { return; } @@ -130,14 +130,14 @@ private void openNavigator(Player player) { XSound.BLOCK_CHEST_OPEN.play(player); } else { // NEW if (playerManager.getOpenNavigator().contains(player)) { - Messages.sendMessage(player, "worlds_navigator_open"); + MessagesOld.sendMessage(player, "worlds_navigator_open"); return; } summonNewNavigator(player); - String findItemName = Messages.getString("navigator_item", player); - ItemStack replaceItem = inventoryUtils.getItemStack(XMaterial.BARRIER, Messages.getString("barrier_item", player)); + String findItemName = MessagesOld.getString("navigator_item", player); + ItemStack replaceItem = inventoryUtils.getItemStack(XMaterial.BARRIER, MessagesOld.getString("barrier_item", player)); inventoryUtils.replaceItem(player, findItemName, configValues.getNavigatorItem(), replaceItem); } } @@ -265,7 +265,7 @@ private boolean isCloseNavigatorItem(Player player, ItemStack itemStack) { return false; } - return itemMeta.getDisplayName().equals(Messages.getString("barrier_item", player)); + return itemMeta.getDisplayName().equals(MessagesOld.getString("barrier_item", player)); } /** diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java index 64ebc756..d0595755 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerChangedWorldListener.java @@ -19,11 +19,11 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.navigator.ArmorStandManager; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CachedValues; @@ -90,7 +90,7 @@ public void onPlayerChangedWorld(PlayerChangedWorldEvent event) { CraftBuildWorld newWorld = worldManager.getBuildWorld(worldName); if (newWorld != null && !newWorld.getData().physics().get() && player.hasPermission("buildsystem.physics.message")) { - Messages.sendMessage(player, "physics_deactivated_in_world", new AbstractMap.SimpleEntry<>("%world%", newWorld.getName())); + MessagesOld.sendMessage(player, "physics_deactivated_in_world", new AbstractMap.SimpleEntry<>("%world%", newWorld.getName())); } removeOldNavigator(player); @@ -120,7 +120,7 @@ private void removeBuildMode(Player player) { cachedValues.resetGameModeIfPresent(player); cachedValues.resetInventoryIfPresent(player); XSound.ENTITY_EXPERIENCE_ORB_PICKUP.play(player); - Messages.sendMessage(player, "build_deactivated_self"); + MessagesOld.sendMessage(player, "build_deactivated_self"); } private void setGoldBlock(BuildWorld buildWorld) { diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java index 3e66d1ac..3fcd9b1a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerCommandPreprocessListener.java @@ -19,11 +19,11 @@ import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.event.player.PlayerInventoryClearEvent; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.world.BuildWorldManager; @@ -246,7 +246,7 @@ public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { Player player = event.getPlayer(); if (command.equalsIgnoreCase("/clear")) { - ItemStack navigatorItem = inventoryUtils.getItemStack(configValues.getNavigatorItem(), Messages.getString("navigator_item", player)); + ItemStack navigatorItem = inventoryUtils.getItemStack(configValues.getNavigatorItem(), MessagesOld.getString("navigator_item", player)); if (!player.getInventory().contains(navigatorItem)) { return; } @@ -278,7 +278,7 @@ public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { private boolean disableArchivedWorlds(BuildWorld buildWorld, Player player, PlayerCommandPreprocessEvent event) { if (!worldManager.canBypassBuildRestriction(player) && buildWorld.getData().status().get() == WorldStatus.ARCHIVE) { event.setCancelled(true); - Messages.sendMessage(player, "command_archive_world"); + MessagesOld.sendMessage(player, "command_archive_world"); return true; } return false; @@ -295,7 +295,7 @@ private void checkBuilders(BuildWorld buildWorld, Player player, PlayerCommandPr if (buildWorld.getData().buildersEnabled().get() && !buildWorld.isBuilder(player)) { event.setCancelled(true); - Messages.sendMessage(player, "command_not_builder"); + MessagesOld.sendMessage(player, "command_not_builder"); } } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java index c25f7124..fe16d403 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerInventoryClearListener.java @@ -18,8 +18,8 @@ package de.eintosti.buildsystem.listener; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.event.player.PlayerInventoryClearEvent; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; import de.eintosti.buildsystem.util.InventoryUtils; @@ -52,7 +52,7 @@ public void onPlayerInventoryClear(PlayerInventoryClearEvent event) { } PlayerInventory playerInventory = player.getInventory(); - ItemStack navigatorItem = inventoryUtils.getItemStack(plugin.getConfigValues().getNavigatorItem(), Messages.getString("navigator_item", player)); + ItemStack navigatorItem = inventoryUtils.getItemStack(plugin.getConfigValues().getNavigatorItem(), MessagesOld.getString("navigator_item", player)); event.getNavigatorSlots().forEach(slot -> playerInventory.setItem(slot, navigatorItem)); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java index e33f7a67..a4ed33a4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerJoinListener.java @@ -18,12 +18,13 @@ package de.eintosti.buildsystem.listener; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.Settings; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CraftBuildPlayer; import de.eintosti.buildsystem.player.LogoutLocation; @@ -33,6 +34,7 @@ import de.eintosti.buildsystem.world.BuildWorldManager; import de.eintosti.buildsystem.world.SpawnManager; import io.papermc.lib.PaperLib; +import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -70,7 +72,7 @@ public PlayerJoinListener(BuildSystemPlugin plugin) { public void sendPlayerJoinMessage(PlayerJoinEvent event) { Player player = event.getPlayer(); String message = plugin.getConfigValues().isJoinQuitMessages() - ? Messages.getString("player_join", player, new AbstractMap.SimpleEntry<>("%player%", player.getName())) + ? Messages.getLegacyMessage("player.join", Placeholder.unparsed("player", player.getName())) : null; event.setJoinMessage(message); } @@ -92,7 +94,7 @@ public void onPlayerJoin(PlayerJoinEvent event) { if (buildWorld != null) { WorldData worldData = buildWorld.getData(); if (!worldData.physics().get() && player.hasPermission("buildsystem.physics.message")) { - Messages.sendMessage(player, "physics_deactivated_in_world", new AbstractMap.SimpleEntry<>("%world%", worldName)); + MessagesOld.sendMessage(player, "physics_deactivated_in_world", new AbstractMap.SimpleEntry<>("%world%", worldName)); } if (configValues.isArchiveVanish() && worldData.status().get() == WorldStatus.ARCHIVE) { @@ -184,7 +186,7 @@ private void performUpdateCheck(Player player) { .whenComplete((result, e) -> { if (result.requiresUpdate()) { StringBuilder stringBuilder = new StringBuilder(); - Messages.getStringList("update_available", player).forEach(line -> + MessagesOld.getStringList("update_available", player).forEach(line -> stringBuilder.append(line .replace("%new_version%", result.getNewestVersion()) .replace("%current_version%", plugin.getDescription().getVersion())) diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java index aa9c4591..62e075bc 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerQuitListener.java @@ -18,13 +18,14 @@ package de.eintosti.buildsystem.listener; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.Settings; +import de.eintosti.buildsystem.messages.Messages; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CachedValues; import de.eintosti.buildsystem.player.CraftBuildPlayer; import de.eintosti.buildsystem.player.LogoutLocation; import de.eintosti.buildsystem.settings.SettingsManager; +import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -32,8 +33,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; -import java.util.AbstractMap; - public class PlayerQuitListener implements Listener { private final BuildSystemPlugin plugin; @@ -51,7 +50,7 @@ public PlayerQuitListener(BuildSystemPlugin plugin) { public void sendPlayerQuitMessage(PlayerQuitEvent event) { Player player = event.getPlayer(); String message = plugin.getConfigValues().isJoinQuitMessages() - ? Messages.getString("player_quit", player, new AbstractMap.SimpleEntry<>("%player%", player.getName())) + ? Messages.getLegacyMessage("player.quit", Placeholder.unparsed("player", player.getName())) : null; event.setQuitMessage(message); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java index 1ac24315..c35c5a33 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java @@ -18,8 +18,8 @@ package de.eintosti.buildsystem.listener; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.world.BuildWorldManager; import org.bukkit.Bukkit; @@ -67,7 +67,7 @@ public void onPlayerTeleport(PlayerTeleportEvent event) { if (!Bukkit.getWorlds().get(0).equals(Bukkit.getWorld(worldName))) { if (!worldManager.canEnter(player, buildWorld)) { - Messages.sendMessage(player, "worlds_tp_entry_forbidden"); + MessagesOld.sendMessage(player, "worlds_tp_entry_forbidden"); event.setCancelled(true); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java new file mode 100644 index 00000000..c7102853 --- /dev/null +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.eintosti.buildsystem.messages; + +import com.google.common.collect.Lists; +import de.eintosti.buildsystem.BuildSystemPlugin; +import net.kyori.adventure.platform.bukkit.BukkitAudiences; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.minimessage.MiniMessage; +import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; +import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; +import org.bukkit.command.CommandSender; +import org.bukkit.plugin.java.JavaPlugin; +import org.jetbrains.annotations.NotNull; + +public final class Messages { + + private static final BuildSystemPlugin PLUGIN = JavaPlugin.getPlugin(BuildSystemPlugin.class); + private static final MiniMessage MINI_MESSAGE = MiniMessage.miniMessage(); + private static final LegacyComponentSerializer LEGACY_SERIALIZER = LegacyComponentSerializer.legacySection(); + + /** + * Gets the message with the given key as a component after it was parsed by {@link MiniMessage} + * using the given tag resolvers. + * + * @param key The key of the messages + * @param tagResolvers The tag resolvers to apply extra tags from + * @return The message as a component + */ + @NotNull + public static Component getMessage(String key, TagResolver... tagResolvers) { + String message = MessagesProvider.MESSAGES.get(key); + if (message == null) { + return Component.empty(); + } + + TagResolver[] allResolvers = Lists.newArrayList( + tagResolvers, + Placeholder.component("prefix", MINI_MESSAGE.deserialize(MessagesProvider.MESSAGES.get("prefix"))) + ).toArray(new TagResolver[0]); + + return MINI_MESSAGE.deserialize(message, allResolvers); + } + + /** + * Gets the message with the given key as a legacy string after it was parsed by {@link MiniMessage} + * using the given tag resolvers. + * + * @param key The key of the messages + * @param tagResolvers The tag resolvers to apply extra tags from + * @return The message a legacy string + * @see #getMessage(String, TagResolver...) + */ + @NotNull + public static String getLegacyMessage(String key, TagResolver... tagResolvers) { + return LEGACY_SERIALIZER.serialize(getMessage(key, tagResolvers)); + } + + /** + * Sends a message to the given sender. + * + * @param sender The sender + * @param key The key of the message to send + * @param tagResolvers The tag resolvers to apply extra tags from + */ + public static void sendMessage(CommandSender sender, String key, TagResolver... tagResolvers) { + try (BukkitAudiences audiences = PLUGIN.adventure()) { + Component message = getMessage(key, tagResolvers); + audiences.sender(sender).sendMessage(message); + } + } +} diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesOld.java similarity index 99% rename from buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java rename to buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesOld.java index e867af5b..194d0f39 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/Messages.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesOld.java @@ -15,8 +15,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package de.eintosti.buildsystem; +package de.eintosti.buildsystem.messages; +import de.eintosti.buildsystem.BuildSystemPlugin; import de.eintosti.buildsystem.util.color.ColorAPI; import me.clip.placeholderapi.PlaceholderAPI; import org.bukkit.Bukkit; @@ -41,7 +42,12 @@ import java.util.function.Function; import java.util.stream.Collectors; -public class Messages { +/** + * TODO: Migrate all messages to MiniMessage and replace this class with "Messages" + * + * @deprecated Use {@link Messages} instead + */ +public class MessagesOld { private static final Map MESSAGES = new HashMap<>(); private static final boolean PLACEHOLDER_API_ENABLED = Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null; diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java new file mode 100644 index 00000000..d346d095 --- /dev/null +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.eintosti.buildsystem.messages; + +import de.eintosti.buildsystem.BuildSystemPlugin; +import org.apache.commons.io.IOUtils; +import org.jetbrains.annotations.Nullable; + +import java.io.Closeable; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.Writer; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +public class MessagesProvider { + + protected static final Map MESSAGES = new HashMap<>(); + + private final BuildSystemPlugin plugin; + + public MessagesProvider(BuildSystemPlugin plugin) { + this.plugin = plugin; + } + + /** + * Sets up the plugin messages. + */ + public void setup() { + copyDefaultMessages(); + updateMissingMessages(); + loadMessages(); + } + + /** + * Gets the file in which the plugin messages are stored. + * + * @return The file in which the plugin messages are stored + */ + private File getMessagesFile() { + return new File(plugin.getDataFolder(), "messages.properties"); + } + + /** + * Copies the default messages from the resources folder to the plugin's data folder. + */ + private void copyDefaultMessages() { + File messages = getMessagesFile(); + if (messages.exists()) { + return; + } + + plugin.getLogger().info("Copying default messages file..."); + InputStream inputStream = null; + OutputStream outputStream = null; + + try { + inputStream = plugin.getResource("lang/messages.properties"); + outputStream = Files.newOutputStream(messages.toPath()); + IOUtils.copy(new InputStreamReader(inputStream, StandardCharsets.UTF_8), outputStream); + } catch (IOException e) { + plugin.getLogger().severe("Error while copying default messages:"); + e.printStackTrace(); + } finally { + close(inputStream); + close(outputStream); + } + } + + /** + * Checks if any messages are missing in the user's {@code messages.properties} file. + * If so, they are added using the default messages as a reference. + */ + private void updateMissingMessages() { + Path messagesPath = getMessagesFile().toPath(); + InputStream messagesInputStream = null; + InputStream defaultMessagesInputStream = null; + Writer writer = null; + + try { + OrderedProperties messagesProperties = new OrderedProperties(); + messagesInputStream = Files.newInputStream(messagesPath); + messagesProperties.load(new InputStreamReader(messagesInputStream, StandardCharsets.UTF_8)); + + OrderedProperties defaultProperties = new OrderedProperties(); + defaultMessagesInputStream = plugin.getResource("lang/messages.properties"); + defaultProperties.load(new InputStreamReader(defaultMessagesInputStream, StandardCharsets.UTF_8)); + + if (messagesProperties.equals(defaultProperties)) { + return; + } + + plugin.getLogger().info("Updating missing messages..."); + messagesProperties.entrySet().forEach(property -> defaultProperties.setProperty(property.getKey(), property.getValue())); + writer = Files.newBufferedWriter(messagesPath, StandardCharsets.UTF_8); + defaultProperties.store(writer, null); + } catch (IOException e) { + plugin.getLogger().severe("Error while updating missing messages:"); + e.printStackTrace(); + } finally { + close(messagesInputStream); + close(defaultMessagesInputStream); + close(writer); + } + } + + /** + * Loads and caches the messages stored in the user's {@code messages.properties} file. + */ + private void loadMessages() { + InputStream inputStream = null; + try { + Properties messages = new Properties(); + inputStream = Files.newInputStream(getMessagesFile().toPath()); + messages.load(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); + messages.forEach((key, value) -> MESSAGES.put(key.toString(), value.toString())); + } catch (IOException e) { + plugin.getLogger().severe("Error while updating missing messages:"); + e.printStackTrace(); + } finally { + close(inputStream); + } + } + + private void close(@Nullable Closeable closeable) { + if (closeable == null) { + return; + } + + try { + closeable.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/OrderedProperties.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/OrderedProperties.java new file mode 100644 index 00000000..77b1541e --- /dev/null +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/OrderedProperties.java @@ -0,0 +1,495 @@ +/* + * Copyright (c) 2018-2023, Thomas Meaney + * Copyright (c) contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.eintosti.buildsystem.messages; + +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InvalidObjectException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Enumeration; +import java.util.InvalidPropertiesFormatException; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.TreeMap; +import java.util.Vector; + +/** + * This class provides an alternative to the JDK's {@link Properties} class. It fixes the design flaw of using + * inheritance over composition, while keeping up the same APIs as the original class. Keys and values are + * guaranteed to be of type {@link String}. + *

            + * This class is not synchronized, contrary to the original implementation. + *

            + * As additional functionality, this class keeps its properties in a well-defined order. By default, the order + * is the one in which the individual properties have been added, either through explicit API calls or through + * reading them top-to-bottom from a properties file. + *

            + * Also, an optional flag can be set to omit the comment that contains the current date when storing the + * properties to a properties file. + *

            + * Currently, this class does not support the concept of default properties, contrary to the original implementation. + *

            + * Note that this implementation is not synchronized. If multiple threads access ordered + * properties concurrently, and at least one of the threads modifies the ordered properties structurally, it + * must be synchronized externally. This is typically accomplished by synchronizing on some object + * that naturally encapsulates the properties. + *

            + * Note that the actual (and quite complex) logic of parsing and storing properties from and to a stream + * is delegated to the {@link Properties} class from the JDK. + * + * @author Etienne Studer + * @see Properties + */ +final class OrderedProperties implements Serializable { + + private static final long serialVersionUID = 1L; + + private transient Map properties; + private transient boolean suppressDate; + + /** + * Creates a new instance that will keep the properties in the order they have been added. Other than + * the ordering of the keys, this instance behaves like an instance of the {@link Properties} class. + */ + OrderedProperties() { + this(new LinkedHashMap<>(), true); + } + + OrderedProperties(Map properties, boolean suppressDate) { + this.properties = properties; + this.suppressDate = suppressDate; + } + + /** + * See {@link Properties#getProperty(String)}. + */ + public String getProperty(String key) { + return properties.get(key); + } + + /** + * See {@link Properties#getProperty(String, String)}. + */ + public String getProperty(String key, String defaultValue) { + String value = properties.get(key); + return (value == null) ? defaultValue : value; + } + + /** + * See {@link Properties#setProperty(String, String)}. + */ + public String setProperty(String key, String value) { + return properties.put(key, value); + } + + /** + * Removes the property with the specified key, if it is present. Returns + * the value of the property, or null if there was no property with + * the specified key. + * + * @param key the key of the property to remove + * @return the previous value of the property, or null if there was no property with the specified key + */ + public String removeProperty(String key) { + return properties.remove(key); + } + + /** + * Returns true if there is a property with the specified key. + * + * @param key the key whose presence is to be tested + */ + public boolean containsProperty(String key) { + return properties.containsKey(key); + } + + /** + * See {@link Properties#size()}. + */ + public int size() { + return properties.size(); + } + + /** + * See {@link Properties#isEmpty()}. + */ + public boolean isEmpty() { + return properties.isEmpty(); + } + + /** + * See {@link Properties#propertyNames()}. + */ + public Enumeration propertyNames() { + return new Vector<>(properties.keySet()).elements(); + } + + /** + * See {@link Properties#stringPropertyNames()}. + */ + public Set stringPropertyNames() { + return new LinkedHashSet<>(properties.keySet()); + } + + /** + * See {@link Properties#entrySet()}. + */ + public Set> entrySet() { + return new LinkedHashSet<>(properties.entrySet()); + } + + /** + * See {@link Properties#load(InputStream)}. + */ + public void load(InputStream stream) throws IOException { + CustomProperties customProperties = new CustomProperties(this.properties); + customProperties.load(stream); + } + + /** + * See {@link Properties#load(Reader)}. + */ + public void load(Reader reader) throws IOException { + CustomProperties customProperties = new CustomProperties(this.properties); + customProperties.load(reader); + } + + /** + * See {@link Properties#loadFromXML(InputStream)}. + */ + @SuppressWarnings("DuplicateThrows") + public void loadFromXML(InputStream stream) throws IOException, InvalidPropertiesFormatException { + CustomProperties customProperties = new CustomProperties(this.properties); + customProperties.loadFromXML(stream); + } + + /** + * See {@link Properties#store(OutputStream, String)}. + */ + public void store(OutputStream stream, String comments) throws IOException { + CustomProperties customProperties = new CustomProperties(this.properties); + if (suppressDate) { + store(stream, comments, customProperties); + } else { + customProperties.store(stream, comments); + } + } + + private void store(OutputStream stream, String comments, CustomProperties properties) throws IOException { + if (commentRequiresEscaping(comments) || propertiesRequireEscaping(properties)) { + storeViaReflection(stream, comments, properties); + } else { + properties.store(new DateSuppressingPropertiesBufferedWriter(new OutputStreamWriter(stream, "8859_1")), comments); + } + } + + private static boolean commentRequiresEscaping(String comments) { + return comments != null && comments.chars().anyMatch(c -> c > '\u00ff'); + } + + @SuppressWarnings("Convert2MethodRef") + private static boolean propertiesRequireEscaping(CustomProperties properties) { + Map p = properties.targetProperties; + return !p.isEmpty() && (p.keySet().stream().anyMatch(k -> keyValueRequiresEscaping(k)) || p.values().stream().anyMatch(v -> keyValueRequiresEscaping(v))); + } + + private static boolean keyValueRequiresEscaping(String s) { + return s != null && s.chars().anyMatch(c -> (c < 0x0020) || (c > 0x007e)); + } + + private static void storeViaReflection(OutputStream stream, String comments, CustomProperties customProperties) throws IOException { + try { + Method method = Properties.class.getDeclaredMethod("store0", BufferedWriter.class, String.class, boolean.class); + method.setAccessible(true); + method.invoke(customProperties, new DateSuppressingPropertiesBufferedWriter(new OutputStreamWriter(stream, "8859_1")), comments, true); + } catch (NoSuchMethodException | IllegalAccessException | SecurityException | InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + /** + * See {@link Properties#store(Writer, String)}. + */ + public void store(Writer writer, String comments) throws IOException { + CustomProperties customProperties = new CustomProperties(this.properties); + if (suppressDate) { + customProperties.store(new DateSuppressingPropertiesBufferedWriter(writer), comments); + } else { + customProperties.store(writer, comments); + } + } + + /** + * See {@link Properties#storeToXML(OutputStream, String)}. + */ + public void storeToXML(OutputStream stream, String comment) throws IOException { + CustomProperties customProperties = new CustomProperties(this.properties); + customProperties.storeToXML(stream, comment); + } + + /** + * See {@link Properties#storeToXML(OutputStream, String, String)}. + */ + public void storeToXML(OutputStream stream, String comment, String encoding) throws IOException { + CustomProperties customProperties = new CustomProperties(this.properties); + customProperties.storeToXML(stream, comment, encoding); + } + + /** + * See {@link Properties#list(PrintStream)}. + */ + public void list(PrintStream stream) { + CustomProperties customProperties = new CustomProperties(this.properties); + customProperties.list(stream); + } + + /** + * See {@link Properties#list(PrintWriter)}. + */ + public void list(PrintWriter writer) { + CustomProperties customProperties = new CustomProperties(this.properties); + customProperties.list(writer); + } + + /** + * Convert this instance to a {@link Properties} instance. + * + * @return the {@link Properties} instance + */ + public Properties toJdkProperties() { + Properties jdkProperties = new Properties(); + for (Map.Entry entry : this.entrySet()) { + jdkProperties.put(entry.getKey(), entry.getValue()); + } + return jdkProperties; + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + + if (other == null || getClass() != other.getClass()) { + return false; + } + + OrderedProperties that = (OrderedProperties) other; + return Arrays.equals(properties.entrySet().toArray(), that.properties.entrySet().toArray()); + } + + @Override + public int hashCode() { + return Arrays.hashCode(properties.entrySet().toArray()); + } + + private void writeObject(ObjectOutputStream stream) throws IOException { + stream.defaultWriteObject(); + stream.writeObject(properties); + stream.writeBoolean(suppressDate); + } + + @SuppressWarnings("unchecked") + private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { + stream.defaultReadObject(); + properties = (Map) stream.readObject(); + suppressDate = stream.readBoolean(); + } + + private void readObjectNoData() throws InvalidObjectException { + throw new InvalidObjectException("Stream data required"); + } + + /** + * See {@link Properties#toString()}. + */ + @Override + public String toString() { + return properties.toString(); + } + + /** + * Creates a new instance that will have both the same property entries and + * the same behavior as the given source. + *

            + * Note that the source instance and the copy instance will share the same + * comparator instance if a custom ordering had been configured on the source. + * + * @param source the source to copy from + * @return the copy + */ + public static OrderedProperties copyOf(OrderedProperties source) { + // create a copy that has the same behaviour + OrderedPropertiesBuilder builder = new OrderedPropertiesBuilder(); + builder.withSuppressDateInComment(source.suppressDate); + if (source.properties instanceof TreeMap) { + builder.withOrdering(((TreeMap) source.properties).comparator()); + } + OrderedProperties result = builder.build(); + + // copy the properties from the source to the target + for (Map.Entry entry : source.entrySet()) { + result.setProperty(entry.getKey(), entry.getValue()); + } + return result; + } + + /** + * Builder for {@link OrderedProperties} instances. + */ + public static final class OrderedPropertiesBuilder { + + private Comparator comparator; + private boolean suppressDate; + + /** + * Use a custom ordering of the keys. + * + * @param comparator the ordering to apply on the keys + * @return the builder + */ + public OrderedPropertiesBuilder withOrdering(Comparator comparator) { + this.comparator = comparator; + return this; + } + + /** + * Suppress the comment that contains the current date when storing the properties. + * + * @param suppressDate whether to suppress the comment that contains the current date + * @return the builder + */ + public OrderedPropertiesBuilder withSuppressDateInComment(boolean suppressDate) { + this.suppressDate = suppressDate; + return this; + } + + /** + * Builds a new {@link OrderedProperties} instance. + * + * @return the new instance + */ + public OrderedProperties build() { + Map properties = (this.comparator != null) ? + new TreeMap<>(comparator) : + new LinkedHashMap<>(); + return new OrderedProperties(properties, suppressDate); + } + + } + + /** + * Custom {@link Properties} that delegates reading, writing, and enumerating properties to the + * backing {@link OrderedProperties} instance's properties. + */ + private static final class CustomProperties extends Properties { + + private final Map targetProperties; + + private CustomProperties(Map targetProperties) { + this.targetProperties = targetProperties; + } + + @Override + public Object get(Object key) { + return targetProperties.get(key); + } + + @Override + public Object put(Object key, Object value) { + return targetProperties.put((String) key, (String) value); + } + + @Override + public String getProperty(String key) { + return targetProperties.get(key); + } + + @Override + public Enumeration keys() { + return new Vector(targetProperties.keySet()).elements(); + } + + @Override + public Set keySet() { + return new LinkedHashSet<>(targetProperties.keySet()); + } + + @SuppressWarnings("unchecked") + @Override + public Set> entrySet() { + Set entrySet = targetProperties.entrySet(); + return (Set>) entrySet; + } + + } + + /** + * Custom {@link BufferedWriter} for storing properties that will write all leading lines of comments except + * the last comment line. Using the JDK Properties class to store properties, the last comment + * line always contains the current date which is what we want to filter out. + */ + private static final class DateSuppressingPropertiesBufferedWriter extends BufferedWriter { + + private final String LINE_SEPARATOR = System.getProperty("line.separator"); + + private StringBuilder currentComment; + private String previousComment; + + private DateSuppressingPropertiesBufferedWriter(Writer out) { + super(out); + } + + @Override + public void write(String string) throws IOException { + if (currentComment != null) { + currentComment.append(string); + if (string.endsWith(LINE_SEPARATOR)) { + if (previousComment != null) { + super.write(previousComment); + } + + previousComment = currentComment.toString(); + currentComment = null; + } + } else if (string.startsWith("#")) { + currentComment = new StringBuilder(string); + } else { + super.write(string); + } + } + + } + +} \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java index 0c154160..60d6338b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/FilteredWorldsInventory.java @@ -20,7 +20,6 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.WorldDisplay; import de.eintosti.buildsystem.api.settings.WorldFilter; import de.eintosti.buildsystem.api.settings.WorldSort; @@ -28,6 +27,7 @@ import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.navigator.settings.BuildWorldFilter; import de.eintosti.buildsystem.settings.CraftSettings; import de.eintosti.buildsystem.settings.SettingsManager; @@ -78,7 +78,7 @@ public FilteredWorldsInventory(BuildSystemPlugin plugin, String inventoryName, S } protected Inventory createInventory(Player player) { - Inventory inventory = Bukkit.createInventory(null, 54, Messages.getString(inventoryName, player)); + Inventory inventory = Bukkit.createInventory(null, 54, MessagesOld.getString(inventoryName, player)); int numOfPages = (numOfWorlds(player) / MAX_WORLDS) + (numOfWorlds(player) % MAX_WORLDS == 0 ? 0 : 1); inventoryUtils.fillMultiInvWithGlass(plugin, inventory, player, getInvIndex(player), numOfPages); @@ -86,8 +86,8 @@ protected Inventory createInventory(Player player) { addWorldSortItem(inventory, player); addWorldFilterItem(inventory, player); - inventoryUtils.addUrlSkull(inventory, 52, Messages.getString("gui_previous_page", player), "86971dd881dbaf4fd6bcaa93614493c612f869641ed59d1c9363a3666a5fa6"); - inventoryUtils.addUrlSkull(inventory, 53, Messages.getString("gui_next_page", player), "f32ca66056b72863e98f7f32bd7d94c7a0d796af691c9ac3a9136331352288f9"); + inventoryUtils.addUrlSkull(inventory, 52, MessagesOld.getString("gui_previous_page", player), "86971dd881dbaf4fd6bcaa93614493c612f869641ed59d1c9363a3666a5fa6"); + inventoryUtils.addUrlSkull(inventory, 53, MessagesOld.getString("gui_next_page", player), "f32ca66056b72863e98f7f32bd7d94c7a0d796af691c9ac3a9136331352288f9"); return inventory; } @@ -132,7 +132,7 @@ private void addWorlds(Player player) { int index = 0; inventories[index] = inventory; if (numWorlds == 0) { - inventoryUtils.addUrlSkull(inventory, 22, Messages.getString(noWorldsText, player), "2e3f50ba62cbda3ecf5479b62fedebd61d76589771cc19286bf2745cd71e47c6"); + inventoryUtils.addUrlSkull(inventory, 22, MessagesOld.getString(noWorldsText, player), "2e3f50ba62cbda3ecf5479b62fedebd61d76589771cc19286bf2745cd71e47c6"); return; } @@ -154,8 +154,8 @@ private void addWorldSortItem(Inventory inventory, Player player) { CraftSettings settings = settingsManager.getSettings(player); WorldSort worldSort = settings.getWorldDisplay().getWorldSort(); inventoryUtils.addItemStack(inventory, 45, XMaterial.BOOK, - Messages.getString("world_sort_title", player), - Messages.getStringList(worldSort.getLoreKey(), player) + MessagesOld.getString("world_sort_title", player), + MessagesOld.getStringList(worldSort.getLoreKey(), player) ); } @@ -164,10 +164,10 @@ private void addWorldFilterItem(Inventory inventory, Player player) { WorldFilter worldFilter = settings.getWorldDisplay().getWorldFilter(); List lore = new ArrayList<>(); - lore.add(Messages.getString(worldFilter.getMode().getLoreKey(), player, new AbstractMap.SimpleEntry<>("%text%", worldFilter.getText()))); - lore.addAll(Messages.getStringList("world_filter_lore", player)); + lore.add(MessagesOld.getString(worldFilter.getMode().getLoreKey(), player, new AbstractMap.SimpleEntry<>("%text%", worldFilter.getText()))); + lore.addAll(MessagesOld.getStringList("world_filter_lore", player)); - inventoryUtils.addItemStack(inventory, 46, XMaterial.HOPPER, Messages.getString("world_filter_title", player), lore); + inventoryUtils.addItemStack(inventory, 46, XMaterial.HOPPER, MessagesOld.getString("world_filter_title", player), lore); } /** diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java index abc71541..55905b4c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/NavigatorInventory.java @@ -19,7 +19,7 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -40,14 +40,14 @@ public NavigatorInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player) { - Inventory inventory = Bukkit.createInventory(null, 27, Messages.getString("old_navigator_title", player)); + Inventory inventory = Bukkit.createInventory(null, 27, MessagesOld.getString("old_navigator_title", player)); fillGuiWithGlass(player, inventory); - inventoryUtils.addUrlSkull(inventory, 11, Messages.getString("old_navigator_world_navigator", player), "d5c6dc2bbf51c36cfc7714585a6a5683ef2b14d47d8ff714654a893f5da622"); - inventoryUtils.addUrlSkull(inventory, 12, Messages.getString("old_navigator_world_archive", player), "7f6bf958abd78295eed6ffc293b1aa59526e80f54976829ea068337c2f5e8"); - inventoryUtils.addSkull(inventory, 13, Messages.getString("old_navigator_private_worlds", player), player.getName()); + inventoryUtils.addUrlSkull(inventory, 11, MessagesOld.getString("old_navigator_world_navigator", player), "d5c6dc2bbf51c36cfc7714585a6a5683ef2b14d47d8ff714654a893f5da622"); + inventoryUtils.addUrlSkull(inventory, 12, MessagesOld.getString("old_navigator_world_archive", player), "7f6bf958abd78295eed6ffc293b1aa59526e80f54976829ea068337c2f5e8"); + inventoryUtils.addSkull(inventory, 13, MessagesOld.getString("old_navigator_private_worlds", player), player.getName()); - inventoryUtils.addUrlSkull(inventory, 15, Messages.getString("old_navigator_settings", player), "1cba7277fc895bf3b673694159864b83351a4d14717e476ebda1c3bf38fcf37"); + inventoryUtils.addUrlSkull(inventory, 15, MessagesOld.getString("old_navigator_settings", player), "1cba7277fc895bf3b673694159864b83351a4d14717e476ebda1c3bf38fcf37"); return inventory; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java index 09f1e474..5d483560 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/PrivateInventory.java @@ -19,9 +19,9 @@ import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.entity.Player; @@ -54,7 +54,7 @@ protected Inventory createInventory(Player player) { private void addWorldCreateItem(Inventory inventory, Player player) { if (player.hasPermission("buildsystem.create.private")) { - inventoryUtils.addUrlSkull(inventory, 49, Messages.getString("private_create_world", player), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"); + inventoryUtils.addUrlSkull(inventory, 49, MessagesOld.getString("private_create_world", player), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"); } else { inventoryUtils.addGlassPane(plugin, player, inventory, 49); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java index c11fa58f..6400ca67 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/navigator/inventory/WorldsInventory.java @@ -19,9 +19,9 @@ import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.entity.Player; @@ -54,7 +54,7 @@ protected Inventory createInventory(Player player) { private void addWorldCreateItem(Inventory inventory, Player player) { if (player.hasPermission("buildsystem.create.public")) { - inventoryUtils.addUrlSkull(inventory, 49, Messages.getString("world_navigator_create_world", player), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"); + inventoryUtils.addUrlSkull(inventory, 49, MessagesOld.getString("world_navigator_create_world", player), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"); } else { inventoryUtils.addGlassPane(plugin, player, inventory, 49); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java index a854a90f..94ff3f64 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BlocksInventory.java @@ -19,7 +19,7 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.version.customblocks.CustomBlock; import de.eintosti.buildsystem.version.util.MinecraftVersion; @@ -45,7 +45,7 @@ public BlocksInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player) { - Inventory inventory = Bukkit.createInventory(null, 45, Messages.getString("blocks_title", player)); + Inventory inventory = Bukkit.createInventory(null, 45, MessagesOld.getString("blocks_title", player)); fillGuiWithGlass(player, inventory); setCustomBlock(inventory, player, 1, CustomBlock.FULL_OAK_BARCH); @@ -84,7 +84,7 @@ private Inventory getInventory(Player player) { private void setCustomBlock(Inventory inventory, Player player, int position, CustomBlock customBlock) { if (MinecraftVersion.getCurrent().isEqualOrHigherThan(customBlock.getVersion())) { - inventoryUtils.addUrlSkull(inventory, position, Messages.getString(customBlock.getKey(), player), customBlock.getSkullUrl()); + inventoryUtils.addUrlSkull(inventory, position, MessagesOld.getString(customBlock.getKey(), player), customBlock.getSkullUrl()); } } @@ -168,10 +168,10 @@ public void onInventoryClick(InventoryClickEvent event) { giveCustomBlock(player, CustomBlock.COMMAND_BLOCK); break; case 32: - giveCustomBlock(player, CustomBlock.BARRIER, inventoryUtils.getItemStack(XMaterial.BARRIER, Messages.getString(CustomBlock.BARRIER.getKey(), player))); + giveCustomBlock(player, CustomBlock.BARRIER, inventoryUtils.getItemStack(XMaterial.BARRIER, MessagesOld.getString(CustomBlock.BARRIER.getKey(), player))); break; case 33: - ItemStack itemStack = inventoryUtils.getItemStack(XMaterial.ITEM_FRAME, Messages.getString(CustomBlock.INVISIBLE_ITEM_FRAME.getKey(), player)); + ItemStack itemStack = inventoryUtils.getItemStack(XMaterial.ITEM_FRAME, MessagesOld.getString(CustomBlock.INVISIBLE_ITEM_FRAME.getKey(), player)); ItemMeta itemMeta = itemStack.getItemMeta(); itemMeta.addEnchant(Enchantment.DURABILITY, 1, true); // Inline imports to allow backwards compatibility @@ -193,7 +193,7 @@ public void onInventoryClick(InventoryClickEvent event) { giveCustomBlock(player, CustomBlock.DRAGON_EGG); break; case 41: - giveCustomBlock(player, CustomBlock.DEBUG_STICK, inventoryUtils.getItemStack(XMaterial.DEBUG_STICK, Messages.getString(CustomBlock.DEBUG_STICK.getKey(), player))); + giveCustomBlock(player, CustomBlock.DEBUG_STICK, inventoryUtils.getItemStack(XMaterial.DEBUG_STICK, MessagesOld.getString(CustomBlock.DEBUG_STICK.getKey(), player))); break; } } @@ -205,6 +205,6 @@ private void giveCustomBlock(Player player, CustomBlock customBlock, ItemStack i } private void giveCustomBlock(Player player, CustomBlock customBlock) { - giveCustomBlock(player, customBlock, inventoryUtils.getUrlSkull(Messages.getString(customBlock.getKey(), player), customBlock.getSkullUrl())); + giveCustomBlock(player, customBlock, inventoryUtils.getUrlSkull(MessagesOld.getString(customBlock.getKey(), player), customBlock.getSkullUrl())); } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java index 101c24e1..865d7fd2 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/player/BuildPlayerManager.java @@ -21,7 +21,6 @@ import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.ActionBar; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.player.BuildPlayer; import de.eintosti.buildsystem.api.player.PlayerManager; import de.eintosti.buildsystem.api.settings.DesignColor; @@ -31,6 +30,7 @@ import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.config.PlayersConfig; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.navigator.settings.BuildWorldDisplay; import de.eintosti.buildsystem.navigator.settings.BuildWorldFilter; import de.eintosti.buildsystem.navigator.settings.NavigatorInventoryType; @@ -230,7 +230,7 @@ public void giveNavigator(Player player) { return; } - ItemStack itemStack = plugin.getInventoryUtil().getItemStack(configValues.getNavigatorItem(), Messages.getString("navigator_item", player)); + ItemStack itemStack = plugin.getInventoryUtil().getItemStack(configValues.getNavigatorItem(), MessagesOld.getString("navigator_item", player)); PlayerInventory playerInventory = player.getInventory(); ItemStack slot8 = playerInventory.getItem(8); if (slot8 == null || slot8.getType() == XMaterial.AIR.parseMaterial()) { @@ -268,8 +268,8 @@ private void replaceBarrier(Player player) { } InventoryUtils inventoryUtils = plugin.getInventoryUtil(); - String findItemName = Messages.getString("barrier_item", player); - ItemStack replaceItem = inventoryUtils.getItemStack(plugin.getConfigValues().getNavigatorItem(), Messages.getString("navigator_item", player)); + String findItemName = MessagesOld.getString("barrier_item", player); + ItemStack replaceItem = inventoryUtils.getItemStack(plugin.getConfigValues().getNavigatorItem(), MessagesOld.getString("navigator_item", player)); inventoryUtils.replaceItem(player, findItemName, XMaterial.BARRIER, replaceItem); } @@ -364,7 +364,7 @@ private void sendTypeInfo(Player player, NavigatorInventoryType inventoryType) { break; } - ActionBar.sendActionBar(player, Messages.getString(message, player)); + ActionBar.sendActionBar(player, MessagesOld.getString(message, player)); XSound.ENTITY_CHICKEN_EGG.play(player); } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java index 6958c488..b3cb171b 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/DesignInventory.java @@ -19,8 +19,8 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.DesignColor; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -46,7 +46,7 @@ public DesignInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player) { - Inventory inventory = Bukkit.createInventory(null, 36, Messages.getString("design_title", player)); + Inventory inventory = Bukkit.createInventory(null, 36, MessagesOld.getString("design_title", player)); fillGuiWithGlass(inventory, player); setItem(player, inventory, 10, XMaterial.RED_STAINED_GLASS, "design_red", DesignColor.RED); @@ -87,7 +87,7 @@ private void setItem(Player player, Inventory inventory, int position, XMaterial SettingsManager settingsManager = plugin.getSettingsManager(); CraftSettings settings = settingsManager.getSettings(player); - String displayName = Messages.getString(key, player); + String displayName = MessagesOld.getString(key, player); ItemStack itemStack = inventoryUtils.getItemStack(material, settings.getDesignColor() == color ? ChatColor.GREEN + displayName diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java index 288b08a1..a5eefa96 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsInventory.java @@ -20,9 +20,9 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.NavigatorType; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; import org.bukkit.enchantments.Enchantment; @@ -55,7 +55,7 @@ public SettingsInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player) { - Inventory inventory = Bukkit.createInventory(null, 45, Messages.getString("settings_title", player)); + Inventory inventory = Bukkit.createInventory(null, 45, MessagesOld.getString("settings_title", player)); fillGuiWithGlass(player, inventory); CraftSettings settings = settingsManager.getSettings(player); @@ -95,8 +95,8 @@ private void addSettingsItem(Player player, Inventory inventory, int position, X ItemStack itemStack = material.parseItem(); ItemMeta itemMeta = itemStack.getItemMeta(); - itemMeta.setDisplayName(Messages.getString(displayNameKey, player)); - itemMeta.setLore(Messages.getStringList(loreKey, player)); + itemMeta.setDisplayName(MessagesOld.getString(displayNameKey, player)); + itemMeta.setLore(MessagesOld.getStringList(loreKey, player)); itemMeta.addItemFlags(ItemFlag.values()); itemStack.setItemMeta(itemMeta); @@ -116,11 +116,11 @@ private void addClearInventoryItem(Inventory inventory, Player player) { } private void addDesignItem(Inventory inventory, Player player) { - ItemStack itemStack = inventoryUtils.getItemStack(inventoryUtils.getColouredGlass(plugin, player), Messages.getString("settings_change_design_item", player)); + ItemStack itemStack = inventoryUtils.getItemStack(inventoryUtils.getColouredGlass(plugin, player), MessagesOld.getString("settings_change_design_item", player)); ItemMeta itemMeta = itemStack.getItemMeta(); itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS); - itemMeta.setLore(Messages.getStringList("settings_change_design_lore", player)); + itemMeta.setLore(MessagesOld.getStringList("settings_change_design_lore", player)); itemStack.setItemMeta(itemMeta); itemStack.addUnsafeEnchantment(Enchantment.DURABILITY, 1); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java index fb215aff..fd3d5f28 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SettingsManager.java @@ -18,11 +18,11 @@ package de.eintosti.buildsystem.settings; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.Settings; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.version.util.MinecraftVersion; import de.eintosti.buildsystem.world.BuildWorldManager; import fr.mrmicky.fastboard.FastBoard; @@ -96,7 +96,7 @@ public void startScoreboard(Player player) { return; } - board.updateTitle(Messages.getString("title", player)); + board.updateTitle(MessagesOld.getString("title", player)); BukkitTask scoreboardTask = Bukkit.getScheduler().runTaskTimerAsynchronously(plugin, () -> updateScoreboard(player, board), 0L, 20L); settings.setScoreboardTask(scoreboardTask); } @@ -120,7 +120,7 @@ public void updateScoreboard(Player player) { } private void updateScoreboard(Player player, FastBoard board) { - List body = Messages.getStringList("body", player, (line) -> getPlaceholders(line, player)); + List body = MessagesOld.getStringList("body", player, (line) -> getPlaceholders(line, player)); // Scoreboard line cannot be longer than 30 chars in versions <1.13 if (MinecraftVersion.getCurrent().isLowerThan(MinecraftVersion.AQUATIC_13)) { @@ -161,7 +161,7 @@ private String parseWorldInformation(Player player, BuildWorld buildWorld, Strin WorldData worldData = buildWorld.getData(); switch (input) { case "%status%": - return Messages.getDataString(worldData.status().get().getKey(), player); + return MessagesOld.getDataString(worldData.status().get().getKey(), player); case "%permission%": return worldData.permission().get(); case "%project%": @@ -169,13 +169,13 @@ private String parseWorldInformation(Player player, BuildWorld buildWorld, Strin case "%creator%": return buildWorld.getCreator(); case "%creation%": - return Messages.formatDate(buildWorld.getCreationDate()); + return MessagesOld.formatDate(buildWorld.getCreationDate()); case "%lastedited%": - return Messages.formatDate(worldData.lastEdited().get()); + return MessagesOld.formatDate(worldData.lastEdited().get()); case "%lastloaded%": - return Messages.formatDate(worldData.lastLoaded().get()); + return MessagesOld.formatDate(worldData.lastLoaded().get()); case "%lastunloaded%": - return Messages.formatDate(worldData.lastUnloaded().get()); + return MessagesOld.formatDate(worldData.lastUnloaded().get()); default: return ChatColor.WHITE + "-"; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java index 01195cd8..9fa5755e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/settings/SpeedInventory.java @@ -19,7 +19,7 @@ import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -42,14 +42,14 @@ public SpeedInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player) { - Inventory inventory = Bukkit.createInventory(null, 27, Messages.getString("speed_title", player)); + Inventory inventory = Bukkit.createInventory(null, 27, MessagesOld.getString("speed_title", player)); fillGuiWithGlass(player, inventory); - inventoryUtils.addUrlSkull(inventory, 11, Messages.getString("speed_1", player), "71bc2bcfb2bd3759e6b1e86fc7a79585e1127dd357fc202893f9de241bc9e530"); - inventoryUtils.addUrlSkull(inventory, 12, Messages.getString("speed_2", player), "4cd9eeee883468881d83848a46bf3012485c23f75753b8fbe8487341419847"); - inventoryUtils.addUrlSkull(inventory, 13, Messages.getString("speed_3", player), "1d4eae13933860a6df5e8e955693b95a8c3b15c36b8b587532ac0996bc37e5"); - inventoryUtils.addUrlSkull(inventory, 14, Messages.getString("speed_4", player), "d2e78fb22424232dc27b81fbcb47fd24c1acf76098753f2d9c28598287db5"); - inventoryUtils.addUrlSkull(inventory, 15, Messages.getString("speed_5", player), "6d57e3bc88a65730e31a14e3f41e038a5ecf0891a6c243643b8e5476ae2"); + inventoryUtils.addUrlSkull(inventory, 11, MessagesOld.getString("speed_1", player), "71bc2bcfb2bd3759e6b1e86fc7a79585e1127dd357fc202893f9de241bc9e530"); + inventoryUtils.addUrlSkull(inventory, 12, MessagesOld.getString("speed_2", player), "4cd9eeee883468881d83848a46bf3012485c23f75753b8fbe8487341419847"); + inventoryUtils.addUrlSkull(inventory, 13, MessagesOld.getString("speed_3", player), "1d4eae13933860a6df5e8e955693b95a8c3b15c36b8b587532ac0996bc37e5"); + inventoryUtils.addUrlSkull(inventory, 14, MessagesOld.getString("speed_4", player), "d2e78fb22424232dc27b81fbcb47fd24c1acf76098753f2d9c28598287db5"); + inventoryUtils.addUrlSkull(inventory, 15, MessagesOld.getString("speed_5", player), "6d57e3bc88a65730e31a14e3f41e038a5ecf0891a6c243643b8e5476ae2"); return inventory; } @@ -103,10 +103,10 @@ public void oInventoryClick(InventoryClickEvent event) { private void setSpeed(Player player, float speed, int num) { if (player.isFlying()) { player.setFlySpeed(speed - 0.1f); - Messages.sendMessage(player, "speed_set_flying", new AbstractMap.SimpleEntry<>("%speed%", num)); + MessagesOld.sendMessage(player, "speed_set_flying", new AbstractMap.SimpleEntry<>("%speed%", num)); } else { player.setWalkSpeed(speed); - Messages.sendMessage(player, "speed_set_walking", new AbstractMap.SimpleEntry<>("%speed%", num)); + MessagesOld.sendMessage(player, "speed_set_walking", new AbstractMap.SimpleEntry<>("%speed%", num)); } } } \ No newline at end of file diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java index 0b768733..d0aa65aa 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/InventoryUtils.java @@ -22,7 +22,6 @@ import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.settings.WorldDisplay; import de.eintosti.buildsystem.api.settings.WorldSort; import de.eintosti.buildsystem.api.world.BuildWorld; @@ -32,6 +31,7 @@ import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.config.SetupConfig; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.navigator.inventory.FilteredWorldsInventory; import de.eintosti.buildsystem.navigator.inventory.NavigatorInventory; import de.eintosti.buildsystem.navigator.settings.BuildWorldFilter; @@ -95,7 +95,7 @@ public boolean isNavigator(Player player, ItemStack itemStack) { return false; } - return itemMeta.getDisplayName().equals(Messages.getString("navigator_item", player)); + return itemMeta.getDisplayName().equals(MessagesOld.getString("navigator_item", player)); } public boolean inventoryContainsNavigator(Player player) { @@ -232,7 +232,7 @@ public void addUrlSkull(Inventory inventory, int position, String displayName, S } public boolean checkIfValidClick(InventoryClickEvent event, String titleKey) { - if (!event.getView().getTitle().equals(Messages.getString(titleKey, (Player) event.getWhoClicked()))) { + if (!event.getView().getTitle().equals(MessagesOld.getString(titleKey, (Player) event.getWhoClicked()))) { return false; } @@ -247,7 +247,7 @@ public boolean checkIfValidClick(InventoryClickEvent event, String titleKey) { public void addWorldItem(Player player, Inventory inventory, int position, BuildWorld buildWorld) { String worldName = buildWorld.getName(); - String displayName = Messages.getString("world_item_title", player, new AbstractMap.SimpleEntry<>("%world%", worldName)); + String displayName = MessagesOld.getString("world_item_title", player, new AbstractMap.SimpleEntry<>("%world%", worldName)); XMaterial material = buildWorld.getData().material().get(); if (material == XMaterial.PLAYER_HEAD) { @@ -277,9 +277,9 @@ public void manageInventoryClick(InventoryClickEvent event, Player player, ItemS String displayName = itemMeta.getDisplayName(); if (slot == 22 && - displayName.equals(Messages.getString("world_navigator_no_worlds", player)) - || displayName.equals(Messages.getString("archive_no_worlds", player)) - || displayName.equals(Messages.getString("private_no_worlds", player))) { + displayName.equals(MessagesOld.getString("world_navigator_no_worlds", player)) + || displayName.equals(MessagesOld.getString("archive_no_worlds", player)) + || displayName.equals(MessagesOld.getString("private_no_worlds", player))) { return; } @@ -324,7 +324,7 @@ private void manageWorldItemClick(InventoryClickEvent event, Player player, Item } else { player.closeInventory(); XSound.ENTITY_ZOMBIE_BREAK_WOODEN_DOOR.play(player); - Titles.sendTitle(player, 5, 70, 20, " ", Messages.getString("world_not_loaded", player)); + Titles.sendTitle(player, 5, 70, 20, " ", MessagesOld.getString("world_not_loaded", player)); } } @@ -356,7 +356,7 @@ private void teleport(Player player, String worldName) { * @return The name of the world */ private String getWorldName(Player player, String input) { - String template = Messages.getString("world_item_title", player, new AbstractMap.SimpleEntry<>("%world%", "")); + String template = MessagesOld.getString("world_item_title", player, new AbstractMap.SimpleEntry<>("%world%", "")); return StringUtils.difference(template, input); } @@ -415,18 +415,18 @@ public List getDisplayOrder(BuildWorldManager worldManager, CraftSet private List getLore(Player player, BuildWorld buildWorld) { WorldData worldData = buildWorld.getData(); Map.Entry[] placeholders = new Map.Entry[]{ - new AbstractMap.SimpleEntry<>("%status%", Messages.getDataString(worldData.status().get().getKey(), player)), + new AbstractMap.SimpleEntry<>("%status%", MessagesOld.getDataString(worldData.status().get().getKey(), player)), new AbstractMap.SimpleEntry<>("%project%", worldData.project().get()), new AbstractMap.SimpleEntry<>("%permission%", worldData.permission().get()), new AbstractMap.SimpleEntry<>("%creator%", buildWorld.hasCreator() ? buildWorld.getCreator() : "-"), - new AbstractMap.SimpleEntry<>("%creation%", Messages.formatDate(buildWorld.getCreationDate())), - new AbstractMap.SimpleEntry<>("%lastedited%", Messages.formatDate(worldData.lastEdited().get())), - new AbstractMap.SimpleEntry<>("%lastloaded%", Messages.formatDate(worldData.lastLoaded().get())), - new AbstractMap.SimpleEntry<>("%lastunloaded%", Messages.formatDate(worldData.lastUnloaded().get())) + new AbstractMap.SimpleEntry<>("%creation%", MessagesOld.formatDate(buildWorld.getCreationDate())), + new AbstractMap.SimpleEntry<>("%lastedited%", MessagesOld.formatDate(worldData.lastEdited().get())), + new AbstractMap.SimpleEntry<>("%lastloaded%", MessagesOld.formatDate(worldData.lastLoaded().get())), + new AbstractMap.SimpleEntry<>("%lastunloaded%", MessagesOld.formatDate(worldData.lastUnloaded().get())) }; List messageList = plugin.getWorldManager().isPermitted(player, WorldsTabComplete.WorldsArgument.EDIT.getPermission(), buildWorld.getName()) - ? Messages.getStringList("world_item_lore_edit", player, placeholders) - : Messages.getStringList("world_item_lore_normal", player, placeholders); + ? MessagesOld.getStringList("world_item_lore_edit", player, placeholders) + : MessagesOld.getStringList("world_item_lore_normal", player, placeholders); // Replace %builders% placeholder List lore = new ArrayList<>(); @@ -467,7 +467,7 @@ private List getLore(Player player, BuildWorld buildWorld) { * @see CraftBuildWorld#getBuildersInfo(Player) */ private List formatBuilders(Player player, BuildWorld buildWorld) { - String template = Messages.getString("world_item_builders_builder_template", player); + String template = MessagesOld.getString("world_item_builders_builder_template", player); List builders = buildWorld.getBuilders(); List builderNames = new ArrayList<>(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java index f4008173..82a1e7f7 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/util/PlayerChatInput.java @@ -20,7 +20,7 @@ import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; +import de.eintosti.buildsystem.messages.MessagesOld; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -48,8 +48,8 @@ public class PlayerChatInput implements Listener { public PlayerChatInput(BuildSystemPlugin plugin, Player player, String titleKey, InputRunnable runWhenComplete) { this.plugin = plugin; - String title = Messages.getString(titleKey, player); - String subtitle = Messages.getString("cancel_subtitle", player); + String title = MessagesOld.getString(titleKey, player); + String subtitle = MessagesOld.getString("cancel_subtitle", player); this.taskId = new BukkitRunnable() { public void run() { @@ -90,7 +90,7 @@ public void onPlayerChat(AsyncPlayerChatEvent event) { XSound.ENTITY_ITEM_BREAK.play(player); Titles.clearTitle(player); - Messages.sendMessage(player, "input_cancelled"); + MessagesOld.sendMessage(player, "input_cancelled"); return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java index 90b69df7..99f1b320 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/BuildWorldManager.java @@ -21,7 +21,6 @@ import com.cryptomorin.xseries.XSound; import com.cryptomorin.xseries.messages.Titles; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.BuildWorldCreator; import de.eintosti.buildsystem.api.world.Builder; @@ -33,6 +32,7 @@ import de.eintosti.buildsystem.api.world.generator.Generator; import de.eintosti.buildsystem.config.ConfigValues; import de.eintosti.buildsystem.config.WorldConfig; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.FileUtils; import de.eintosti.buildsystem.util.PlayerChatInput; import de.eintosti.buildsystem.util.UUIDFetcher; @@ -174,7 +174,7 @@ public void startWorldNameInput(Player player, WorldType worldType, @Nullable St player.closeInventory(); new PlayerChatInput(plugin, player, "enter_world_name", input -> { if (Arrays.stream(input.split("")).anyMatch(c -> c.matches("[^A-Za-z\\d/_-]") || c.matches(configValues.getInvalidNameCharacters()))) { - Messages.sendMessage(player, "worlds_world_creation_invalid_characters"); + MessagesOld.sendMessage(player, "worlds_world_creation_invalid_characters"); } String worldName = input .replaceAll("[^A-Za-z\\d/_-]", "") @@ -182,7 +182,7 @@ public void startWorldNameInput(Player player, WorldType worldType, @Nullable St .replace(" ", "_") .trim(); if (worldName.isEmpty()) { - Messages.sendMessage(player, "worlds_world_creation_name_bank"); + MessagesOld.sendMessage(player, "worlds_world_creation_name_bank"); return; } @@ -203,7 +203,7 @@ private void startCustomGeneratorInput(Player player, String worldName, String t ChunkGenerator chunkGenerator = getChunkGenerator(generatorInfo[0], generatorInfo[1], worldName); if (chunkGenerator == null) { - Messages.sendMessage(player, "worlds_import_unknown_generator"); + MessagesOld.sendMessage(player, "worlds_import_unknown_generator"); XSound.ENTITY_ITEM_BREAK.play(player); return; } @@ -237,7 +237,7 @@ public boolean worldExists(String worldName) { public boolean worldExists(Player player, String worldName) { if (worldExists(worldName)) { - Messages.sendMessage(player, "worlds_world_exists"); + MessagesOld.sendMessage(player, "worlds_world_exists"); XSound.ENTITY_ITEM_BREAK.play(player); return true; } @@ -284,7 +284,7 @@ public boolean importWorld(Player player, String worldName, Builder creator, Gen chunkGenerator = getChunkGenerator(generatorInfo[0], generatorInfo[1], worldName); if (chunkGenerator == null) { - Messages.sendMessage(player, "worlds_import_unknown_generator"); + MessagesOld.sendMessage(player, "worlds_import_unknown_generator"); return false; } } @@ -298,7 +298,7 @@ public boolean importWorld(Player player, String worldName, Builder creator, Gen if (worldCreator.isHigherVersion()) { String key = single ? "import" : "importall"; - Messages.sendMessage(player, "worlds_" + key + "_newer_version", new AbstractMap.SimpleEntry<>("%world%", worldName)); + MessagesOld.sendMessage(player, "worlds_" + key + "_newer_version", new AbstractMap.SimpleEntry<>("%world%", worldName)); return false; } @@ -317,8 +317,8 @@ public void importWorlds(Player player, String[] worldList, Generator generator, int worlds = worldList.length; int delay = configValues.getImportDelay(); - Messages.sendMessage(player, "worlds_importall_started", new AbstractMap.SimpleEntry<>("%amount%", String.valueOf(worlds))); - Messages.sendMessage(player, "worlds_importall_delay", new AbstractMap.SimpleEntry<>("%delay%", String.valueOf(delay))); + MessagesOld.sendMessage(player, "worlds_importall_started", new AbstractMap.SimpleEntry<>("%amount%", String.valueOf(worlds))); + MessagesOld.sendMessage(player, "worlds_importall_delay", new AbstractMap.SimpleEntry<>("%delay%", String.valueOf(delay))); importingAllWorlds = true; AtomicInteger worldsImported = new AtomicInteger(0); @@ -329,13 +329,13 @@ public void run() { if (i >= worlds) { this.cancel(); importingAllWorlds = false; - Messages.sendMessage(player, "worlds_importall_finished"); + MessagesOld.sendMessage(player, "worlds_importall_finished"); return; } String worldName = worldList[i]; if (getBuildWorld(worldName) != null) { - Messages.sendMessage(player, "worlds_importall_world_already_imported", new AbstractMap.SimpleEntry<>("%world%", worldName)); + MessagesOld.sendMessage(player, "worlds_importall_world_already_imported", new AbstractMap.SimpleEntry<>("%world%", worldName)); return; } @@ -344,7 +344,7 @@ public void run() { .findFirst() .orElse(null); if (invalidChar != null) { - Messages.sendMessage(player, "worlds_importall_invalid_character", + MessagesOld.sendMessage(player, "worlds_importall_invalid_character", new AbstractMap.SimpleEntry<>("%world%", worldName), new AbstractMap.SimpleEntry<>("%char%", invalidChar) ); @@ -352,7 +352,7 @@ public void run() { } if (importWorld(player, worldName, creator, generator, null, false)) { - Messages.sendMessage(player, "worlds_importall_world_imported", new AbstractMap.SimpleEntry<>("%world%", worldName)); + MessagesOld.sendMessage(player, "worlds_importall_world_imported", new AbstractMap.SimpleEntry<>("%world%", worldName)); } } }.runTaskTimer(plugin, 0, 20L * delay); @@ -376,23 +376,23 @@ public void deleteWorld(BuildWorld buildWorld) { */ public void deleteWorld(Player player, BuildWorld buildWorld) { if (!buildWorlds.containsKey(buildWorld.getName())) { - Messages.sendMessage(player, "worlds_delete_unknown_world"); + MessagesOld.sendMessage(player, "worlds_delete_unknown_world"); return; } String worldName = buildWorld.getName(); File deleteFolder = new File(Bukkit.getWorldContainer(), worldName); if (!deleteFolder.exists()) { - Messages.sendMessage(player, "worlds_delete_unknown_directory"); + MessagesOld.sendMessage(player, "worlds_delete_unknown_directory"); return; } - Messages.sendMessage(player, "worlds_delete_started", new AbstractMap.SimpleEntry<>("%world%", worldName)); + MessagesOld.sendMessage(player, "worlds_delete_started", new AbstractMap.SimpleEntry<>("%world%", worldName)); removePlayersFromWorld(worldName, "worlds_delete_players_world"); Bukkit.getScheduler().runTaskLater(plugin, () -> { unimportWorld(player, buildWorld, false); FileUtils.deleteDirectory(deleteFolder); - Messages.sendMessage(player, "worlds_delete_finished"); + MessagesOld.sendMessage(player, "worlds_delete_finished"); }, 20L); } @@ -455,7 +455,7 @@ private List removePlayersFromWorld(String worldName, String messageKey) PaperLib.teleportAsync(player, spawnLocation); } - Messages.sendMessage(player, messageKey); + MessagesOld.sendMessage(player, messageKey); players.add(player); }); @@ -513,12 +513,12 @@ public void renameWorld(Player player, BuildWorld buildWorld, String newName) { String oldName = buildWorld.getName(); if (oldName.equalsIgnoreCase(newName)) { - Messages.sendMessage(player, "worlds_rename_same_name"); + MessagesOld.sendMessage(player, "worlds_rename_same_name"); return; } if (Arrays.stream(newName.split("")).anyMatch(c -> c.matches("[^A-Za-z\\d/_-]") || c.matches(configValues.getInvalidNameCharacters()))) { - Messages.sendMessage(player, "worlds_world_creation_invalid_characters"); + MessagesOld.sendMessage(player, "worlds_world_creation_invalid_characters"); } String parsedNewName = newName .replaceAll("[^A-Za-z\\d/_-]", "") @@ -526,7 +526,7 @@ public void renameWorld(Player player, BuildWorld buildWorld, String newName) { .replace(" ", "_") .trim(); if (parsedNewName.isEmpty()) { - Messages.sendMessage(player, "worlds_world_creation_name_bank"); + MessagesOld.sendMessage(player, "worlds_world_creation_name_bank"); return; } @@ -535,13 +535,13 @@ public void renameWorld(Player player, BuildWorld buildWorld, String newName) { } World oldWorld = Bukkit.getWorld(oldName); if (oldWorld == null) { - Messages.sendMessage(player, "worlds_rename_unknown_world"); + MessagesOld.sendMessage(player, "worlds_rename_unknown_world"); return; } renameWorld(buildWorld, newName); - Messages.sendMessage(player, "worlds_rename_set", + MessagesOld.sendMessage(player, "worlds_rename_set", new AbstractMap.SimpleEntry<>("%oldName%", oldName), new AbstractMap.SimpleEntry<>("%newName%", parsedNewName) ); @@ -561,7 +561,7 @@ public void teleport(Player player, CraftBuildWorld buildWorld) { World bukkitWorld = Bukkit.getServer().getWorld(buildWorld.getName()); if (bukkitWorld == null) { - Messages.sendMessage(player, "worlds_tp_unknown_world"); + MessagesOld.sendMessage(player, "worlds_tp_unknown_world"); return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java index e715313c..06d25e9a 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorld.java @@ -20,7 +20,6 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.messages.Titles; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.event.world.BuildWorldLoadEvent; import de.eintosti.buildsystem.api.event.world.BuildWorldPostLoadEvent; import de.eintosti.buildsystem.api.event.world.BuildWorldPostUnloadEvent; @@ -30,6 +29,7 @@ import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.UUIDFetcher; import de.eintosti.buildsystem.world.data.BuildWorldData; @@ -257,13 +257,13 @@ public de.eintosti.buildsystem.api.world.generator.CustomGenerator getCustomGene public String getDifficultyName(Player player) { switch (worldData.difficulty().get()) { case PEACEFUL: - return Messages.getString("difficulty_peaceful", player); + return MessagesOld.getString("difficulty_peaceful", player); case EASY: - return Messages.getString("difficulty_easy", player); + return MessagesOld.getString("difficulty_easy", player); case NORMAL: - return Messages.getString("difficulty_normal", player); + return MessagesOld.getString("difficulty_normal", player); case HARD: - return Messages.getString("difficulty_hard", player); + return MessagesOld.getString("difficulty_hard", player); default: return "-"; } @@ -299,7 +299,7 @@ public List getBuilders() { * @return The list of builders which have been added to the given world as a string */ public String getBuildersInfo(Player player) { - String template = Messages.getString("world_item_builders_builder_template", player); + String template = MessagesOld.getString("world_item_builders_builder_template", player); List builderNames = getBuilderNames(); String string = ""; @@ -478,7 +478,7 @@ public void load(Player player) { player.closeInventory(); Titles.sendTitle(player, 5, 70, 20, " ", - Messages.getString("loading_world", player, new AbstractMap.SimpleEntry<>("%world%", name)) + MessagesOld.getString("loading_world", player, new AbstractMap.SimpleEntry<>("%world%", name)) ); load(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java index bbaf9a82..ed04d858 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/CraftBuildWorldCreator.java @@ -19,13 +19,13 @@ import com.cryptomorin.xseries.XMaterial; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.BuildWorldCreator; import de.eintosti.buildsystem.api.world.Builder; import de.eintosti.buildsystem.api.world.data.WorldType; import de.eintosti.buildsystem.api.world.generator.CustomGenerator; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.FileUtils; import de.eintosti.buildsystem.world.generator.voidgenerator.DeprecatedVoidGenerator; import de.eintosti.buildsystem.world.generator.voidgenerator.ModernVoidGenerator; @@ -172,13 +172,13 @@ private void createPredefinedOrCustomWorld(Player player) { CraftBuildWorld buildWorld = createBuildWorldObject(player); worldManager.addBuildWorld(buildWorld); - Messages.sendMessage(player, "worlds_world_creation_started", + MessagesOld.sendMessage(player, "worlds_world_creation_started", new AbstractMap.SimpleEntry<>("%world%", worldName), - new AbstractMap.SimpleEntry<>("%type%", Messages.getDataString(worldType.getKey(), player)) + new AbstractMap.SimpleEntry<>("%type%", MessagesOld.getDataString(worldType.getKey(), player)) ); finishPreparationsAndGenerate(buildWorld); teleportAfterCreation(player); - Messages.sendMessage(player, "worlds_creation_finished"); + MessagesOld.sendMessage(player, "worlds_creation_finished"); } /** @@ -209,14 +209,14 @@ private void createTemplateWorld(Player player) { File worldFile = new File(Bukkit.getWorldContainer(), worldName); File templateFile = new File(plugin.getDataFolder() + File.separator + "templates" + File.separator + template); if (!templateFile.exists()) { - Messages.sendMessage(player, "worlds_template_does_not_exist"); + MessagesOld.sendMessage(player, "worlds_template_does_not_exist"); return; } CraftBuildWorld buildWorld = createBuildWorldObject(player); worldManager.addBuildWorld(buildWorld); - Messages.sendMessage(player, "worlds_template_creation_started", + MessagesOld.sendMessage(player, "worlds_template_creation_started", new AbstractMap.SimpleEntry<>("%world%", worldName), new AbstractMap.SimpleEntry<>("%template%", template) ); @@ -225,7 +225,7 @@ private void createTemplateWorld(Player player) { .type(org.bukkit.WorldType.FLAT) .generateStructures(false)); teleportAfterCreation(player); - Messages.sendMessage(player, "worlds_creation_finished"); + MessagesOld.sendMessage(player, "worlds_creation_finished"); } /** diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java index 79e3f717..d54df62c 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/BuilderInventory.java @@ -20,10 +20,10 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.Builder; import de.eintosti.buildsystem.command.subcommand.worlds.AddBuilderSubCommand; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.PaginatedInventory; import de.eintosti.buildsystem.util.StringUtils; @@ -59,14 +59,14 @@ public BuilderInventory(BuildSystemPlugin plugin) { } private Inventory createInventory(BuildWorld buildWorld, Player player) { - Inventory inventory = Bukkit.createInventory(null, 27, Messages.getString("worldeditor_builders_title", player)); + Inventory inventory = Bukkit.createInventory(null, 27, MessagesOld.getString("worldeditor_builders_title", player)); fillGuiWithGlass(inventory, player); addCreatorInfoItem(inventory, buildWorld, player); addBuilderAddItem(inventory, buildWorld, player); - inventoryUtils.addUrlSkull(inventory, 18, Messages.getString("gui_previous_page", player), "f7aacad193e2226971ed95302dba433438be4644fbab5ebf818054061667fbe2"); - inventoryUtils.addUrlSkull(inventory, 26, Messages.getString("gui_next_page", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158"); + inventoryUtils.addUrlSkull(inventory, 18, MessagesOld.getString("gui_previous_page", player), "f7aacad193e2226971ed95302dba433438be4644fbab5ebf818054061667fbe2"); + inventoryUtils.addUrlSkull(inventory, 26, MessagesOld.getString("gui_next_page", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158"); return inventory; } @@ -74,10 +74,10 @@ private Inventory createInventory(BuildWorld buildWorld, Player player) { private void addCreatorInfoItem(Inventory inventory, BuildWorld buildWorld, Player player) { String creatorName = buildWorld.getCreator(); if (creatorName == null || creatorName.equalsIgnoreCase("-")) { - inventoryUtils.addItemStack(inventory, 4, XMaterial.BARRIER, Messages.getString("worldeditor_builders_no_creator_item", player)); + inventoryUtils.addItemStack(inventory, 4, XMaterial.BARRIER, MessagesOld.getString("worldeditor_builders_no_creator_item", player)); } else { - inventoryUtils.addSkull(inventory, 4, Messages.getString("worldeditor_builders_creator_item", player), - buildWorld.getCreator(), Messages.getString("worldeditor_builders_creator_lore", player, new AbstractMap.SimpleEntry<>("%creator%", buildWorld.getCreator())) + inventoryUtils.addSkull(inventory, 4, MessagesOld.getString("worldeditor_builders_creator_item", player), + buildWorld.getCreator(), MessagesOld.getString("worldeditor_builders_creator_lore", player, new AbstractMap.SimpleEntry<>("%creator%", buildWorld.getCreator())) ); } } @@ -85,7 +85,7 @@ private void addCreatorInfoItem(Inventory inventory, BuildWorld buildWorld, Play private void addBuilderAddItem(Inventory inventory, BuildWorld buildWorld, Player player) { UUID creatorId = buildWorld.getCreatorId(); if ((creatorId != null && creatorId.equals(player.getUniqueId())) || player.hasPermission(BuildSystemPlugin.ADMIN_PERMISSION)) { - inventoryUtils.addUrlSkull(inventory, 22, Messages.getString("worldeditor_builders_add_builder_item", player), + inventoryUtils.addUrlSkull(inventory, 22, MessagesOld.getString("worldeditor_builders_add_builder_item", player), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716" ); } else { @@ -109,8 +109,8 @@ private void addItems(BuildWorld buildWorld, Player player) { for (Builder builder : builders) { String builderName = builder.getName(); inventoryUtils.addSkull(inventory, columnSkull++, - Messages.getString("worldeditor_builders_builder_item", player, new AbstractMap.SimpleEntry<>("%builder%", builderName)), - builderName, Messages.getStringList("worldeditor_builders_builder_lore", player) + MessagesOld.getString("worldeditor_builders_builder_item", player, new AbstractMap.SimpleEntry<>("%builder%", builderName)), + builderName, MessagesOld.getStringList("worldeditor_builders_builder_lore", player) ); if (columnSkull > maxColumnSkull) { @@ -149,7 +149,7 @@ public void onInventoryClick(InventoryClickEvent event) { CraftBuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { player.closeInventory(); - Messages.sendMessage(player, "worlds_addbuilder_error"); + MessagesOld.sendMessage(player, "worlds_addbuilder_error"); return; } @@ -193,13 +193,13 @@ public void onInventoryClick(InventoryClickEvent event) { return; } - String template = Messages.getString("worldeditor_builders_builder_item", player, new AbstractMap.SimpleEntry<>("%builder%", "")); + String template = MessagesOld.getString("worldeditor_builders_builder_item", player, new AbstractMap.SimpleEntry<>("%builder%", "")); String builderName = StringUtils.difference(template, itemMeta.getDisplayName()); UUID builderId = UUIDFetcher.getUUID(builderName); buildWorld.removeBuilder(builderId); XSound.ENTITY_ENDERMAN_TELEPORT.play(player); - Messages.sendMessage(player, "worlds_removebuilder_removed", new AbstractMap.SimpleEntry<>("%builder%", builderName)); + MessagesOld.sendMessage(player, "worlds_removebuilder_removed", new AbstractMap.SimpleEntry<>("%builder%", builderName)); } XSound.ENTITY_CHICKEN_EGG.play(player); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java index 18fecbfb..5451d50d 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/CreateInventory.java @@ -20,9 +20,9 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.util.PaginatedInventory; import de.eintosti.buildsystem.world.BuildWorldManager; @@ -60,23 +60,23 @@ public CreateInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player, Page page) { - Inventory inventory = Bukkit.createInventory(null, 45, Messages.getString("create_title", player)); + Inventory inventory = Bukkit.createInventory(null, 45, MessagesOld.getString("create_title", player)); fillGuiWithGlass(player, inventory, page); - addPageItem(inventory, page, Page.PREDEFINED, inventoryUtils.getUrlSkull(Messages.getString("create_predefined_worlds", player), "2cdc0feb7001e2c10fd5066e501b87e3d64793092b85a50c856d962f8be92c78")); - addPageItem(inventory, page, Page.GENERATOR, inventoryUtils.getUrlSkull(Messages.getString("create_generators", player), "b2f79016cad84d1ae21609c4813782598e387961be13c15682752f126dce7a")); - addPageItem(inventory, page, Page.TEMPLATES, inventoryUtils.getUrlSkull(Messages.getString("create_templates", player), "d17b8b43f8c4b5cfeb919c9f8fe93f26ceb6d2b133c2ab1eb339bd6621fd309c")); + addPageItem(inventory, page, Page.PREDEFINED, inventoryUtils.getUrlSkull(MessagesOld.getString("create_predefined_worlds", player), "2cdc0feb7001e2c10fd5066e501b87e3d64793092b85a50c856d962f8be92c78")); + addPageItem(inventory, page, Page.GENERATOR, inventoryUtils.getUrlSkull(MessagesOld.getString("create_generators", player), "b2f79016cad84d1ae21609c4813782598e387961be13c15682752f126dce7a")); + addPageItem(inventory, page, Page.TEMPLATES, inventoryUtils.getUrlSkull(MessagesOld.getString("create_templates", player), "d17b8b43f8c4b5cfeb919c9f8fe93f26ceb6d2b133c2ab1eb339bd6621fd309c")); switch (page) { case PREDEFINED: - addPredefinedWorldItem(player, inventory, 29, WorldType.NORMAL, Messages.getString("create_normal_world", player)); - addPredefinedWorldItem(player, inventory, 30, WorldType.FLAT, Messages.getString("create_flat_world", player)); - addPredefinedWorldItem(player, inventory, 31, WorldType.NETHER, Messages.getString("create_nether_world", player)); - addPredefinedWorldItem(player, inventory, 32, WorldType.END, Messages.getString("create_end_world", player)); - addPredefinedWorldItem(player, inventory, 33, WorldType.VOID, Messages.getString("create_void_world", player)); + addPredefinedWorldItem(player, inventory, 29, WorldType.NORMAL, MessagesOld.getString("create_normal_world", player)); + addPredefinedWorldItem(player, inventory, 30, WorldType.FLAT, MessagesOld.getString("create_flat_world", player)); + addPredefinedWorldItem(player, inventory, 31, WorldType.NETHER, MessagesOld.getString("create_nether_world", player)); + addPredefinedWorldItem(player, inventory, 32, WorldType.END, MessagesOld.getString("create_end_world", player)); + addPredefinedWorldItem(player, inventory, 33, WorldType.VOID, MessagesOld.getString("create_void_world", player)); break; case GENERATOR: - inventoryUtils.addUrlSkull(inventory, 31, Messages.getString("create_generators_create_world", player), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"); + inventoryUtils.addUrlSkull(inventory, 31, MessagesOld.getString("create_generators_create_world", player), "3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"); break; case TEMPLATES: // Template stuff is done during inventory open @@ -131,7 +131,7 @@ private void addTemplates(Player player, Page page) { inventories[index] = inventory; if (numTemplates == 0) { for (int i = 29; i <= 33; i++) { - inventoryUtils.addItemStack(inventory, i, XMaterial.BARRIER, Messages.getString("create_no_templates", player)); + inventoryUtils.addItemStack(inventory, i, XMaterial.BARRIER, MessagesOld.getString("create_no_templates", player)); } return; } @@ -141,7 +141,7 @@ private void addTemplates(Player player, Page page) { } for (File templateFile : templateFiles) { - inventoryUtils.addItemStack(inventory, columnTemplate++, XMaterial.FILLED_MAP, Messages.getString("create_template", player, new AbstractMap.SimpleEntry<>("%template%", templateFile.getName()))); + inventoryUtils.addItemStack(inventory, columnTemplate++, XMaterial.FILLED_MAP, MessagesOld.getString("create_template", player, new AbstractMap.SimpleEntry<>("%template%", templateFile.getName()))); if (columnTemplate > maxColumnTemplate) { columnTemplate = 29; inventory = getInventory(player, page); @@ -166,8 +166,8 @@ private void fillGuiWithGlass(Player player, Inventory inventory, Page page) { inventoryUtils.addGlassPane(plugin, player, inventory, 33); break; case TEMPLATES: - inventoryUtils.addUrlSkull(inventory, 38, Messages.getString("gui_previous_page", player), "f7aacad193e2226971ed95302dba433438be4644fbab5ebf818054061667fbe2"); - inventoryUtils.addUrlSkull(inventory, 42, Messages.getString("gui_next_page", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158"); + inventoryUtils.addUrlSkull(inventory, 38, MessagesOld.getString("gui_previous_page", player), "f7aacad193e2226971ed95302dba433438be4644fbab5ebf818054061667fbe2"); + inventoryUtils.addUrlSkull(inventory, 42, MessagesOld.getString("gui_next_page", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158"); break; } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java index dc405b8c..7b403fa9 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/DeleteInventory.java @@ -20,8 +20,8 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -44,18 +44,18 @@ public DeleteInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player, BuildWorld buildWorld) { - Inventory inventory = Bukkit.createInventory(null, 27, Messages.getString("delete_title", player)); + Inventory inventory = Bukkit.createInventory(null, 27, MessagesOld.getString("delete_title", player)); fillGuiWithGlass(inventory); inventoryUtils.addItemStack(inventory, 11, XMaterial.LIME_DYE, - Messages.getString("delete_world_confirm", player) + MessagesOld.getString("delete_world_confirm", player) ); inventoryUtils.addItemStack(inventory, 13, XMaterial.FILLED_MAP, - Messages.getString("delete_world_name", player, new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())), - Messages.getStringList("delete_world_name_lore", player) + MessagesOld.getString("delete_world_name", player, new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())), + MessagesOld.getStringList("delete_world_name_lore", player) ); inventoryUtils.addItemStack(inventory, 15, XMaterial.RED_DYE, - Messages.getString("delete_world_cancel", player) + MessagesOld.getString("delete_world_cancel", player) ); return inventory; @@ -90,7 +90,7 @@ public void onInventoryClick(InventoryClickEvent event) { Player player = (Player) event.getWhoClicked(); BuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { - Messages.sendMessage(player, "worlds_delete_error"); + MessagesOld.sendMessage(player, "worlds_delete_error"); player.closeInventory(); return; } @@ -103,7 +103,7 @@ public void onInventoryClick(InventoryClickEvent event) { } else if (slot == 15) { XSound.ENTITY_ZOMBIE_BREAK_WOODEN_DOOR.play(player); player.closeInventory(); - Messages.sendMessage(player, "worlds_delete_canceled", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + MessagesOld.sendMessage(player, "worlds_delete_canceled", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java index 393f12f8..daa8f195 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/EditInventory.java @@ -21,13 +21,13 @@ import com.cryptomorin.xseries.XSound; import com.google.common.collect.Sets; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; import de.eintosti.buildsystem.api.world.data.Visibility; import de.eintosti.buildsystem.api.world.data.WorldData; import de.eintosti.buildsystem.command.subcommand.worlds.SetPermissionSubCommand; import de.eintosti.buildsystem.command.subcommand.worlds.SetProjectSubCommand; import de.eintosti.buildsystem.config.ConfigValues; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -67,7 +67,7 @@ public EditInventory(BuildSystemPlugin plugin) { } public Inventory getInventory(Player player, CraftBuildWorld buildWorld) { - Inventory inventory = Bukkit.createInventory(null, 54, Messages.getString("worldeditor_title", player)); + Inventory inventory = Bukkit.createInventory(null, 54, MessagesOld.getString("worldeditor_title", player)); WorldData worldData = buildWorld.getData(); fillGuiWithGlass(player, inventory); @@ -78,29 +78,29 @@ public Inventory getInventory(Player player, CraftBuildWorld buildWorld) { addSettingsItem(player, inventory, 22, XMaterial.SAND, worldData.physics().get(), "worldeditor_physics_item", "worldeditor_physics_lore"); addTimeItem(player, inventory, buildWorld); addSettingsItem(player, inventory, 24, XMaterial.TNT, worldData.explosions().get(), "worldeditor_explosions_item", "worldeditor_explosions_lore"); - inventoryUtils.addItemStack(inventory, 29, XMaterial.DIAMOND_SWORD, Messages.getString("worldeditor_butcher_item", player), - Messages.getStringList("worldeditor_butcher_lore", player) + inventoryUtils.addItemStack(inventory, 29, XMaterial.DIAMOND_SWORD, MessagesOld.getString("worldeditor_butcher_item", player), + MessagesOld.getStringList("worldeditor_butcher_lore", player) ); addBuildersItem(player, inventory, buildWorld); addSettingsItem(player, inventory, 31, XMaterial.ARMOR_STAND, worldData.mobAi().get(), "worldeditor_mobai_item", "worldeditor_mobai_lore"); addVisibilityItem(player, inventory, buildWorld); addSettingsItem(player, inventory, 33, XMaterial.TRIPWIRE_HOOK, worldData.blockInteractions().get(), "worldeditor_blockinteractions_item", "worldeditor_blockinteractions_lore"); - inventoryUtils.addItemStack(inventory, 38, XMaterial.FILLED_MAP, Messages.getString("worldeditor_gamerules_item", player), - Messages.getStringList("worldeditor_gamerules_lore", player) + inventoryUtils.addItemStack(inventory, 38, XMaterial.FILLED_MAP, MessagesOld.getString("worldeditor_gamerules_item", player), + MessagesOld.getStringList("worldeditor_gamerules_lore", player) ); addDifficultyItem(player, inventory, buildWorld); inventoryUtils.addItemStack(inventory, 40, inventoryUtils.getStatusItem(worldData.status().get()), "worldeditor_status_item", - Messages.getStringList("worldeditor_status_lore", player, - new AbstractMap.SimpleEntry<>("%status%", Messages.getDataString(buildWorld.getData().status().get().getKey(), player)) + MessagesOld.getStringList("worldeditor_status_lore", player, + new AbstractMap.SimpleEntry<>("%status%", MessagesOld.getDataString(buildWorld.getData().status().get().getKey(), player)) ) ); - inventoryUtils.addItemStack(inventory, 41, XMaterial.ANVIL, Messages.getString("worldeditor_project_item", player), - Messages.getStringList("worldeditor_project_lore", player, + inventoryUtils.addItemStack(inventory, 41, XMaterial.ANVIL, MessagesOld.getString("worldeditor_project_item", player), + MessagesOld.getStringList("worldeditor_project_lore", player, new AbstractMap.SimpleEntry<>("%project%", buildWorld.getData().project().get()) ) ); - inventoryUtils.addItemStack(inventory, 42, XMaterial.PAPER, Messages.getString("worldeditor_permission_item", player), - Messages.getStringList("worldeditor_permission_lore", player, + inventoryUtils.addItemStack(inventory, 42, XMaterial.PAPER, MessagesOld.getString("worldeditor_permission_item", player), + MessagesOld.getStringList("worldeditor_permission_lore", player, new AbstractMap.SimpleEntry<>("%permission%", buildWorld.getData().permission().get()) ) ); @@ -119,7 +119,7 @@ private void fillGuiWithGlass(Player player, Inventory inventory) { } private void addBuildWorldInfoItem(Player player, Inventory inventory, BuildWorld buildWorld) { - String displayName = Messages.getString("worldeditor_world_item", player, new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); + String displayName = MessagesOld.getString("worldeditor_world_item", player, new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName())); XMaterial material = buildWorld.getData().material().get(); if (material == XMaterial.PLAYER_HEAD) { @@ -134,8 +134,8 @@ private void addSettingsItem(Player player, Inventory inventory, int position, X ItemMeta itemMeta = itemStack.getItemMeta(); if (itemMeta != null) { - itemMeta.setDisplayName(Messages.getString(displayNameKey, player)); - itemMeta.setLore(Messages.getStringList(loreKey, player)); + itemMeta.setDisplayName(MessagesOld.getString(displayNameKey, player)); + itemMeta.setLore(MessagesOld.getStringList(loreKey, player)); itemMeta.addItemFlags(ItemFlag.values()); } @@ -151,25 +151,25 @@ private void addTimeItem(Player player, Inventory inventory, BuildWorld buildWor World bukkitWorld = Bukkit.getWorld(buildWorld.getName()); XMaterial xMaterial = XMaterial.WHITE_STAINED_GLASS; - String value = Messages.getString("worldeditor_time_lore_unknown", player); + String value = MessagesOld.getString("worldeditor_time_lore_unknown", player); switch (getWorldTime(bukkitWorld)) { case SUNRISE: xMaterial = XMaterial.ORANGE_STAINED_GLASS; - value = Messages.getString("worldeditor_time_lore_sunrise", player); + value = MessagesOld.getString("worldeditor_time_lore_sunrise", player); break; case NOON: xMaterial = XMaterial.YELLOW_STAINED_GLASS; - value = Messages.getString("worldeditor_time_lore_noon", player); + value = MessagesOld.getString("worldeditor_time_lore_noon", player); break; case NIGHT: xMaterial = XMaterial.BLUE_STAINED_GLASS; - value = Messages.getString("worldeditor_time_lore_night", player); + value = MessagesOld.getString("worldeditor_time_lore_night", player); break; } - inventoryUtils.addItemStack(inventory, 23, xMaterial, Messages.getString("worldeditor_time_item", player), - Messages.getStringList("worldeditor_time_lore", player, new AbstractMap.SimpleEntry<>("%time%", value)) + inventoryUtils.addItemStack(inventory, 23, xMaterial, MessagesOld.getString("worldeditor_time_item", player), + MessagesOld.getStringList("worldeditor_time_lore", player, new AbstractMap.SimpleEntry<>("%time%", value)) ); } @@ -198,15 +198,15 @@ private void addBuildersItem(Player player, Inventory inventory, BuildWorld buil ); } else { inventoryUtils.addItemStack(inventory, 30, XMaterial.BARRIER, - Messages.getString("worldeditor_builders_not_creator_item", player), - Messages.getStringList("worldeditor_builders_not_creator_lore", player) + MessagesOld.getString("worldeditor_builders_not_creator_item", player), + MessagesOld.getStringList("worldeditor_builders_not_creator_lore", player) ); } } private void addVisibilityItem(Player player, Inventory inventory, BuildWorld buildWorld) { int slot = 32; - String displayName = Messages.getString("worldeditor_visibility_item", player); + String displayName = MessagesOld.getString("worldeditor_visibility_item", player); boolean isPrivate = buildWorld.getData().privateWorld().get(); if (!playerManager.canCreateWorld(player, Visibility.matchVisibility(isPrivate))) { @@ -215,11 +215,11 @@ private void addVisibilityItem(Player player, Inventory inventory, BuildWorld bu } XMaterial xMaterial = XMaterial.ENDER_EYE; - List lore = Messages.getStringList("worldeditor_visibility_lore_public", player); + List lore = MessagesOld.getStringList("worldeditor_visibility_lore_public", player); if (isPrivate) { xMaterial = XMaterial.ENDER_PEARL; - lore = Messages.getStringList("worldeditor_visibility_lore_private", player); + lore = MessagesOld.getStringList("worldeditor_visibility_lore_private", player); } inventoryUtils.addItemStack(inventory, slot, xMaterial, displayName, lore); @@ -243,8 +243,8 @@ private void addDifficultyItem(Player player, Inventory inventory, CraftBuildWor } inventoryUtils.addItemStack(inventory, 39, xMaterial, - Messages.getString("worldeditor_difficulty_item", player), - Messages.getStringList("worldeditor_difficulty_lore", player, + MessagesOld.getString("worldeditor_difficulty_item", player), + MessagesOld.getStringList("worldeditor_difficulty_lore", player, new AbstractMap.SimpleEntry<>("%difficulty%", buildWorld.getDifficultyName(player)) ) ); @@ -265,7 +265,7 @@ public void onInventoryClick(InventoryClickEvent event) { CraftBuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { player.closeInventory(); - Messages.sendMessage(player, "worlds_edit_error"); + MessagesOld.sendMessage(player, "worlds_edit_error"); return; } @@ -425,7 +425,7 @@ private void removeEntities(Player player, BuildWorld buildWorld) { }); player.closeInventory(); - Messages.sendMessage(player, "worldeditor_butcher_removed", new AbstractMap.SimpleEntry<>("%amount%", entitiesRemoved.get())); + MessagesOld.sendMessage(player, "worldeditor_butcher_removed", new AbstractMap.SimpleEntry<>("%amount%", entitiesRemoved.get())); } private static final Set IGNORED_ENTITIES = Sets.newHashSet( diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java index 39b2e0a3..24be5043 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/GameRuleInventory.java @@ -20,8 +20,8 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.BuildWorld; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import de.eintosti.buildsystem.version.gamerules.GameRules; import de.eintosti.buildsystem.world.CraftBuildWorld; @@ -69,13 +69,13 @@ private void fillGuiWithGlass(Player player, Inventory inventory) { int invIndex = gameRules.getInvIndex(playerUUID); if (numGameRules > 1 && invIndex > 0) { - inventoryUtils.addUrlSkull(inventory, 36, Messages.getString("gui_previous_page", player), "f7aacad193e2226971ed95302dba433438be4644fbab5ebf818054061667fbe2"); + inventoryUtils.addUrlSkull(inventory, 36, MessagesOld.getString("gui_previous_page", player), "f7aacad193e2226971ed95302dba433438be4644fbab5ebf818054061667fbe2"); } else { inventoryUtils.addGlassPane(plugin, player, inventory, 36); } if (numGameRules > 1 && invIndex < (numGameRules - 1)) { - inventoryUtils.addUrlSkull(inventory, 44, Messages.getString("gui_next_page", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158"); + inventoryUtils.addUrlSkull(inventory, 44, MessagesOld.getString("gui_next_page", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158"); } else { inventoryUtils.addGlassPane(plugin, player, inventory, 44); } @@ -95,7 +95,7 @@ public void onInventoryClick(InventoryClickEvent event) { CraftBuildWorld buildWorld = plugin.getPlayerManager().getBuildPlayer(player).getCachedWorld(); if (buildWorld == null) { player.closeInventory(); - Messages.sendMessage(player, "worlds_edit_error"); + MessagesOld.sendMessage(player, "worlds_edit_error"); return; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java index 46576b7d..8cac8158 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/SetupInventory.java @@ -18,9 +18,9 @@ package de.eintosti.buildsystem.world.modification; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.data.WorldStatus; import de.eintosti.buildsystem.api.world.data.WorldType; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.util.InventoryUtils; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -44,32 +44,32 @@ public SetupInventory(BuildSystemPlugin plugin) { } private Inventory getInventory(Player player) { - Inventory inventory = Bukkit.createInventory(null, 45, Messages.getString("setup_title", player)); + Inventory inventory = Bukkit.createInventory(null, 45, MessagesOld.getString("setup_title", player)); fillGuiWithGlass(player, inventory); - inventoryUtils.addUrlSkull(inventory, 10, Messages.getString("setup_create_item_name", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158", Messages.getStringList("setup_create_item_lore", player)); - inventoryUtils.addUrlSkull(inventory, 19, Messages.getString("setup_default_item_name", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158", Messages.getStringList("setup_default_item_lore", player)); - inventoryUtils.addUrlSkull(inventory, 28, Messages.getString("setup_status_item_name", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158", Messages.getStringList("setup_status_item_name_lore", player)); - - inventoryUtils.addItemStack(inventory, 11, inventoryUtils.getCreateItem(WorldType.NORMAL), Messages.getString("setup_normal_world", player)); - inventoryUtils.addItemStack(inventory, 12, inventoryUtils.getCreateItem(WorldType.FLAT), Messages.getString("setup_flat_world", player)); - inventoryUtils.addItemStack(inventory, 13, inventoryUtils.getCreateItem(WorldType.NETHER), Messages.getString("setup_nether_world", player)); - inventoryUtils.addItemStack(inventory, 14, inventoryUtils.getCreateItem(WorldType.END), Messages.getString("setup_end_world", player)); - inventoryUtils.addItemStack(inventory, 15, inventoryUtils.getCreateItem(WorldType.VOID), Messages.getString("setup_void_world", player)); - - inventoryUtils.addItemStack(inventory, 20, inventoryUtils.getDefaultItem(WorldType.NORMAL), Messages.getString("setup_normal_world", player)); - inventoryUtils.addItemStack(inventory, 21, inventoryUtils.getDefaultItem(WorldType.FLAT), Messages.getString("setup_flat_world", player)); - inventoryUtils.addItemStack(inventory, 22, inventoryUtils.getDefaultItem(WorldType.NETHER), Messages.getString("setup_nether_world", player)); - inventoryUtils.addItemStack(inventory, 23, inventoryUtils.getDefaultItem(WorldType.END), Messages.getString("setup_end_world", player)); - inventoryUtils.addItemStack(inventory, 24, inventoryUtils.getDefaultItem(WorldType.VOID), Messages.getString("setup_void_world", player)); - inventoryUtils.addItemStack(inventory, 25, inventoryUtils.getDefaultItem(WorldType.IMPORTED), Messages.getString("setup_imported_world", player)); - - inventoryUtils.addItemStack(inventory, 29, inventoryUtils.getStatusItem(WorldStatus.NOT_STARTED), Messages.getString("status_not_started", player)); - inventoryUtils.addItemStack(inventory, 30, inventoryUtils.getStatusItem(WorldStatus.IN_PROGRESS), Messages.getString("status_in_progress", player)); - inventoryUtils.addItemStack(inventory, 31, inventoryUtils.getStatusItem(WorldStatus.ALMOST_FINISHED), Messages.getString("status_almost_finished", player)); - inventoryUtils.addItemStack(inventory, 32, inventoryUtils.getStatusItem(WorldStatus.FINISHED), Messages.getString("status_finished", player)); - inventoryUtils.addItemStack(inventory, 33, inventoryUtils.getStatusItem(WorldStatus.ARCHIVE), Messages.getString("status_archive", player)); - inventoryUtils.addItemStack(inventory, 34, inventoryUtils.getStatusItem(WorldStatus.HIDDEN), Messages.getString("status_hidden", player)); + inventoryUtils.addUrlSkull(inventory, 10, MessagesOld.getString("setup_create_item_name", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158", MessagesOld.getStringList("setup_create_item_lore", player)); + inventoryUtils.addUrlSkull(inventory, 19, MessagesOld.getString("setup_default_item_name", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158", MessagesOld.getStringList("setup_default_item_lore", player)); + inventoryUtils.addUrlSkull(inventory, 28, MessagesOld.getString("setup_status_item_name", player), "d34ef0638537222b20f480694dadc0f85fbe0759d581aa7fcdf2e43139377158", MessagesOld.getStringList("setup_status_item_name_lore", player)); + + inventoryUtils.addItemStack(inventory, 11, inventoryUtils.getCreateItem(WorldType.NORMAL), MessagesOld.getString("setup_normal_world", player)); + inventoryUtils.addItemStack(inventory, 12, inventoryUtils.getCreateItem(WorldType.FLAT), MessagesOld.getString("setup_flat_world", player)); + inventoryUtils.addItemStack(inventory, 13, inventoryUtils.getCreateItem(WorldType.NETHER), MessagesOld.getString("setup_nether_world", player)); + inventoryUtils.addItemStack(inventory, 14, inventoryUtils.getCreateItem(WorldType.END), MessagesOld.getString("setup_end_world", player)); + inventoryUtils.addItemStack(inventory, 15, inventoryUtils.getCreateItem(WorldType.VOID), MessagesOld.getString("setup_void_world", player)); + + inventoryUtils.addItemStack(inventory, 20, inventoryUtils.getDefaultItem(WorldType.NORMAL), MessagesOld.getString("setup_normal_world", player)); + inventoryUtils.addItemStack(inventory, 21, inventoryUtils.getDefaultItem(WorldType.FLAT), MessagesOld.getString("setup_flat_world", player)); + inventoryUtils.addItemStack(inventory, 22, inventoryUtils.getDefaultItem(WorldType.NETHER), MessagesOld.getString("setup_nether_world", player)); + inventoryUtils.addItemStack(inventory, 23, inventoryUtils.getDefaultItem(WorldType.END), MessagesOld.getString("setup_end_world", player)); + inventoryUtils.addItemStack(inventory, 24, inventoryUtils.getDefaultItem(WorldType.VOID), MessagesOld.getString("setup_void_world", player)); + inventoryUtils.addItemStack(inventory, 25, inventoryUtils.getDefaultItem(WorldType.IMPORTED), MessagesOld.getString("setup_imported_world", player)); + + inventoryUtils.addItemStack(inventory, 29, inventoryUtils.getStatusItem(WorldStatus.NOT_STARTED), MessagesOld.getString("status_not_started", player)); + inventoryUtils.addItemStack(inventory, 30, inventoryUtils.getStatusItem(WorldStatus.IN_PROGRESS), MessagesOld.getString("status_in_progress", player)); + inventoryUtils.addItemStack(inventory, 31, inventoryUtils.getStatusItem(WorldStatus.ALMOST_FINISHED), MessagesOld.getString("status_almost_finished", player)); + inventoryUtils.addItemStack(inventory, 32, inventoryUtils.getStatusItem(WorldStatus.FINISHED), MessagesOld.getString("status_finished", player)); + inventoryUtils.addItemStack(inventory, 33, inventoryUtils.getStatusItem(WorldStatus.ARCHIVE), MessagesOld.getString("status_archive", player)); + inventoryUtils.addItemStack(inventory, 34, inventoryUtils.getStatusItem(WorldStatus.HIDDEN), MessagesOld.getString("status_hidden", player)); return inventory; } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java index b5834897..6a9dddc4 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/world/modification/StatusInventory.java @@ -20,8 +20,8 @@ import com.cryptomorin.xseries.XMaterial; import com.cryptomorin.xseries.XSound; import de.eintosti.buildsystem.BuildSystemPlugin; -import de.eintosti.buildsystem.Messages; import de.eintosti.buildsystem.api.world.data.WorldStatus; +import de.eintosti.buildsystem.messages.MessagesOld; import de.eintosti.buildsystem.player.BuildPlayerManager; import de.eintosti.buildsystem.player.CraftBuildPlayer; import de.eintosti.buildsystem.util.InventoryUtils; @@ -60,7 +60,7 @@ private Inventory getInventory(Player player) { selectedWorldName = "N/A"; } - String title = Messages.getString("status_title", player, new AbstractMap.SimpleEntry<>("%world%", selectedWorldName)); + String title = MessagesOld.getString("status_title", player, new AbstractMap.SimpleEntry<>("%world%", selectedWorldName)); Inventory inventory = Bukkit.createInventory(null, 27, title); fillGuiWithGlass(player, inventory); @@ -89,7 +89,7 @@ private void fillGuiWithGlass(Player player, Inventory inventory) { private void addStatusItem(Player player, Inventory inventory, int position, WorldStatus status) { XMaterial material = inventoryUtils.getStatusItem(status); - String displayName = Messages.getString(status.getKey(), player); + String displayName = MessagesOld.getString(status.getKey(), player); if (!player.hasPermission(status.getPermission())) { material = XMaterial.BARRIER; @@ -118,7 +118,7 @@ public void onInventoryClick(InventoryClickEvent event) { return; } - String title = Messages.getString("status_title", player, new AbstractMap.SimpleEntry<>("%world%", selectedWorldName)); + String title = MessagesOld.getString("status_title", player, new AbstractMap.SimpleEntry<>("%world%", selectedWorldName)); if (!event.getView().getTitle().equals(title)) { return; } @@ -138,7 +138,7 @@ public void onInventoryClick(InventoryClickEvent event) { CraftBuildWorld buildWorld = buildPlayer.getCachedWorld(); if (buildWorld == null) { player.closeInventory(); - Messages.sendMessage(player, "worlds_setstatus_error"); + MessagesOld.sendMessage(player, "worlds_setstatus_error"); return; } @@ -161,9 +161,9 @@ public void onInventoryClick(InventoryClickEvent event) { playerManager.forceUpdateSidebar(buildWorld); XSound.ENTITY_CHICKEN_EGG.play(player); - Messages.sendMessage(player, "worlds_setstatus_set", + MessagesOld.sendMessage(player, "worlds_setstatus_set", new AbstractMap.SimpleEntry<>("%world%", buildWorld.getName()), - new AbstractMap.SimpleEntry<>("%status%", Messages.getDataString(buildWorld.getData().status().get().getKey(), player)) + new AbstractMap.SimpleEntry<>("%status%", MessagesOld.getDataString(buildWorld.getData().status().get().getKey(), player)) ); } diff --git a/buildsystem-core/src/main/resources/lang/messages.properties b/buildsystem-core/src/main/resources/lang/messages.properties new file mode 100644 index 00000000..c6172943 --- /dev/null +++ b/buildsystem-core/src/main/resources/lang/messages.properties @@ -0,0 +1,3 @@ +prefix=BuildSystem » +player.join=[+] +player.quit=[-] \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 29bbd61c..f64f5d94 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,6 +9,9 @@ worldedit = "7.2.17" placeholderapi = "2.11.5" # Third Party +adventure-api = "4.14.0" +adventure-minimessage = "4.14.0" +adventure-platform = "4.3.1" annotations = "24.1.0" authlib = "1.5.25" bstats = "3.0.2" @@ -28,6 +31,9 @@ worldedit = { group = "com.sk89q.worldedit", name = "worldedit-core", version.re # Third Party annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" } +adventure-api = { group = "net.kyori", name = "adventure-api", version.ref = "adventure-api" } +adventure-minimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure-minimessage" } +adventure-platform = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventure-platform" } authlib = { group = "com.mojang", name = "authlib", version.ref = "authlib" } bstats = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" } fastboard = { group = "fr.mrmicky", name = "fastboard", version.ref = "fastboard" } From 9fb9a91cb4b6fc1e9b0963715c940d6c5307c6ec Mon Sep 17 00:00:00 2001 From: Thomas Meaney Date: Fri, 5 Apr 2024 12:33:03 +0200 Subject: [PATCH 14/14] Fix issues with new message sending --- .../buildsystem/messages/Messages.java | 78 +++++++++++++++---- .../buildsystem/messages/MessagesOld.java | 3 +- .../messages/MessagesProvider.java | 7 +- 3 files changed, 68 insertions(+), 20 deletions(-) diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java index c7102853..589a09ac 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/Messages.java @@ -17,9 +17,7 @@ */ package de.eintosti.buildsystem.messages; -import com.google.common.collect.Lists; import de.eintosti.buildsystem.BuildSystemPlugin; -import net.kyori.adventure.platform.bukkit.BukkitAudiences; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.minimessage.MiniMessage; import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder; @@ -27,7 +25,12 @@ import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.bukkit.command.CommandSender; import org.bukkit.plugin.java.JavaPlugin; -import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; public final class Messages { @@ -43,19 +46,51 @@ public final class Messages { * @param tagResolvers The tag resolvers to apply extra tags from * @return The message as a component */ - @NotNull public static Component getMessage(String key, TagResolver... tagResolvers) { String message = MessagesProvider.MESSAGES.get(key); if (message == null) { + PLUGIN.getLogger().warning("Could not find message with key '" + key + "'"); return Component.empty(); } - TagResolver[] allResolvers = Lists.newArrayList( - tagResolvers, - Placeholder.component("prefix", MINI_MESSAGE.deserialize(MessagesProvider.MESSAGES.get("prefix"))) - ).toArray(new TagResolver[0]); + return MINI_MESSAGE.deserialize(message, mergeTagResolvers(tagResolvers)); + } - return MINI_MESSAGE.deserialize(message, allResolvers); + /** + * Gets the messages with the given key as a list of components after they were parsed by {@link MiniMessage} + * using the given tag resolvers. + * + * @param key The key of the messages + * @param tagResolvers The tag resolvers to apply extra tags from + * @return The messages as a list of components + */ + public static List getMessages(String key, TagResolver... tagResolvers) { + String message = MessagesProvider.MESSAGES.get(key); + if (message == null) { + PLUGIN.getLogger().warning("Could not find message with key '" + key + "'"); + return new ArrayList<>(); + } + + String[] split = message.split("\n"); + Component[] parsed = new Component[split.length]; + for (int i = 0; i < split.length; i++) { + parsed[i] = MINI_MESSAGE.deserialize(split[i], mergeTagResolvers(tagResolvers)); + } + + return Arrays.asList(parsed); + } + + /** + * Merges an array of {@link TagResolver} objects with the prefix tag resolver. + * + * @param tagResolvers The tag resolvers to merge + * @return An array of {@link TagResolver} objects containing the merged resolvers + */ + private static TagResolver[] mergeTagResolvers(TagResolver... tagResolvers) { + return Stream.concat( + Stream.of(Placeholder.component("prefix", MINI_MESSAGE.deserialize(MessagesProvider.MESSAGES.get("prefix")))), + Arrays.stream(tagResolvers) + ).toArray(TagResolver[]::new); } /** @@ -67,11 +102,26 @@ public static Component getMessage(String key, TagResolver... tagResolvers) { * @return The message a legacy string * @see #getMessage(String, TagResolver...) */ - @NotNull - public static String getLegacyMessage(String key, TagResolver... tagResolvers) { + public static String getString(String key, TagResolver... tagResolvers) { return LEGACY_SERIALIZER.serialize(getMessage(key, tagResolvers)); } + /** + * Gets the message with the given key as a list of legacy strings after it was parsed by {@link MiniMessage} + * using the given tag resolvers. + * + * @param key The key of the messages + * @param tagResolvers The tag resolvers to apply extra tags from + * @return The message a legacy string + * @see #getMessages(String, TagResolver...) + */ + public static List getStringList(String key, TagResolver... tagResolvers) { + List messages = getMessages(key, tagResolvers); + return messages.stream() + .map(LEGACY_SERIALIZER::serialize) + .collect(Collectors.toList()); + } + /** * Sends a message to the given sender. * @@ -80,9 +130,7 @@ public static String getLegacyMessage(String key, TagResolver... tagResolvers) { * @param tagResolvers The tag resolvers to apply extra tags from */ public static void sendMessage(CommandSender sender, String key, TagResolver... tagResolvers) { - try (BukkitAudiences audiences = PLUGIN.adventure()) { - Component message = getMessage(key, tagResolvers); - audiences.sender(sender).sendMessage(message); - } + Component message = getMessage(key, tagResolvers); + PLUGIN.adventure().sender(sender).sendMessage(message); } } diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesOld.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesOld.java index 194d0f39..5d98fa52 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesOld.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesOld.java @@ -43,10 +43,11 @@ import java.util.stream.Collectors; /** - * TODO: Migrate all messages to MiniMessage and replace this class with "Messages" + * TODO: Migrate all messages to MiniMessage and replace this class with {@link Messages} * * @deprecated Use {@link Messages} instead */ +@Deprecated public class MessagesOld { private static final Map MESSAGES = new HashMap<>(); diff --git a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java index d346d095..bdcfbe3e 100644 --- a/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java +++ b/buildsystem-core/src/main/java/de/eintosti/buildsystem/messages/MessagesProvider.java @@ -34,6 +34,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; +import java.util.logging.Level; public class MessagesProvider { @@ -117,8 +118,7 @@ private void updateMissingMessages() { writer = Files.newBufferedWriter(messagesPath, StandardCharsets.UTF_8); defaultProperties.store(writer, null); } catch (IOException e) { - plugin.getLogger().severe("Error while updating missing messages:"); - e.printStackTrace(); + plugin.getLogger().log(Level.SEVERE, "Error while updating missing messages:", e); } finally { close(messagesInputStream); close(defaultMessagesInputStream); @@ -137,8 +137,7 @@ private void loadMessages() { messages.load(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); messages.forEach((key, value) -> MESSAGES.put(key.toString(), value.toString())); } catch (IOException e) { - plugin.getLogger().severe("Error while updating missing messages:"); - e.printStackTrace(); + plugin.getLogger().log(Level.SEVERE, "Error while loading messages:", e); } finally { close(inputStream); }