From 29e0ed6ef4969665d3b1d50e3d928159db8a8347 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 11 Apr 2023 21:44:44 +0100 Subject: [PATCH] Add Fabric 1.19.4 server-side mod support (#348) --- .github/workflows/{java_ci.yml => ci.yml} | 38 +- .github/workflows/release.yml | 88 ++++ HEADER | 16 + README.md | 6 +- build.gradle | 26 +- bukkit/build.gradle | 3 +- .../william278/huskhomes/BukkitHuskHomes.java | 19 + .../huskhomes/api/HuskHomesAPI.java | 19 + .../huskhomes/command/BrigadierUtil.java | 19 + .../huskhomes/command/BukkitCommand.java | 19 + .../event/BukkitEventDispatcher.java | 19 + .../huskhomes/event/DeleteAllHomesEvent.java | 19 + .../huskhomes/event/DeleteAllWarpsEvent.java | 19 + .../huskhomes/event/HomeCreateEvent.java | 19 + .../huskhomes/event/HomeDeleteEvent.java | 19 + .../huskhomes/event/HomeEditEvent.java | 19 + .../huskhomes/event/HomeListEvent.java | 19 + .../event/ReceiveTeleportRequestEvent.java | 19 + .../event/ReplyTeleportRequestEvent.java | 19 + .../event/SendTeleportRequestEvent.java | 19 + .../huskhomes/event/TeleportBackEvent.java | 19 + .../huskhomes/event/TeleportEvent.java | 19 + .../huskhomes/event/TeleportWarmupEvent.java | 19 + .../huskhomes/event/WarpCreateEvent.java | 19 + .../huskhomes/event/WarpDeleteEvent.java | 19 + .../huskhomes/event/WarpEditEvent.java | 19 + .../huskhomes/event/WarpListEvent.java | 19 + .../huskhomes/hook/PlaceholderAPIHook.java | 19 + .../huskhomes/hook/RedisEconomyHook.java | 19 + .../huskhomes/hook/VaultEconomyHook.java | 19 + .../listener/BukkitEventListener.java | 19 + .../william278/huskhomes/user/BukkitUser.java | 19 + .../huskhomes/util/BukkitAdapter.java | 19 + .../huskhomes/util/BukkitTaskRunner.java | 27 +- .../huskhomes/BukkitPluginTests.java | 19 + common/build.gradle | 50 +- .../net/william278/huskhomes/HuskHomes.java | 19 + .../huskhomes/api/BaseHuskHomesAPI.java | 19 + .../huskhomes/command/BackCommand.java | 19 + .../william278/huskhomes/command/Command.java | 29 +- .../huskhomes/command/DelHomeCommand.java | 19 + .../huskhomes/command/DelWarpCommand.java | 19 + .../huskhomes/command/DisabledCommand.java | 19 + .../huskhomes/command/EditHomeCommand.java | 19 + .../huskhomes/command/EditWarpCommand.java | 19 + .../huskhomes/command/Executable.java | 19 + .../huskhomes/command/HomeCommand.java | 19 + .../huskhomes/command/HuskHomesCommand.java | 19 + .../huskhomes/command/InGameCommand.java | 19 + .../huskhomes/command/ListCommand.java | 19 + .../william278/huskhomes/command/Node.java | 19 + .../huskhomes/command/PrivateHomeCommand.java | 19 + .../command/PrivateHomeListCommand.java | 24 +- .../huskhomes/command/PublicHomeCommand.java | 19 + .../command/PublicHomeListCommand.java | 19 + .../huskhomes/command/RtpCommand.java | 19 + .../command/SavedPositionCommand.java | 19 + .../huskhomes/command/SetHomeCommand.java | 19 + .../huskhomes/command/SetPositionCommand.java | 19 + .../huskhomes/command/SetSpawnCommand.java | 19 + .../huskhomes/command/SetWarpCommand.java | 19 + .../huskhomes/command/SpawnCommand.java | 19 + .../huskhomes/command/TabProvider.java | 19 + .../command/TeleportRequestCommand.java | 19 + .../huskhomes/command/TpAllCommand.java | 19 + .../huskhomes/command/TpCommand.java | 19 + .../huskhomes/command/TpHereCommand.java | 19 + .../huskhomes/command/TpIgnoreCommand.java | 19 + .../huskhomes/command/TpOfflineCommand.java | 19 + .../huskhomes/command/TpRespondCommand.java | 19 + .../huskhomes/command/TpaAllCommand.java | 19 + .../command/UserListTabProvider.java | 19 + .../huskhomes/command/WarpCommand.java | 19 + .../huskhomes/command/WarpListCommand.java | 19 + .../william278/huskhomes/config/Locales.java | 19 + .../william278/huskhomes/config/Server.java | 19 + .../william278/huskhomes/config/Settings.java | 19 + .../william278/huskhomes/config/Spawn.java | 19 + .../huskhomes/database/Database.java | 19 + .../huskhomes/database/MySqlDatabase.java | 19 + .../huskhomes/database/SqLiteDatabase.java | 19 + .../huskhomes/event/Cancellable.java | 19 + .../net/william278/huskhomes/event/Event.java | 19 + .../huskhomes/event/EventDispatcher.java | 19 + .../huskhomes/event/IDeleteAllHomesEvent.java | 19 + .../huskhomes/event/IDeleteAllWarpsEvent.java | 19 + .../huskhomes/event/IHomeCreateEvent.java | 19 + .../huskhomes/event/IHomeDeleteEvent.java | 19 + .../huskhomes/event/IHomeEditEvent.java | 19 + .../huskhomes/event/IHomeListEvent.java | 19 + .../event/IReceiveTeleportRequestEvent.java | 19 + .../event/IReplyTeleportRequestEvent.java | 19 + .../event/ISendTeleportRequestEvent.java | 19 + .../huskhomes/event/ITeleportBackEvent.java | 19 + .../huskhomes/event/ITeleportEvent.java | 19 + .../event/ITeleportRequestEvent.java | 21 +- .../huskhomes/event/ITeleportWarmupEvent.java | 19 + .../huskhomes/event/IWarpCreateEvent.java | 19 + .../huskhomes/event/IWarpDeleteEvent.java | 19 + .../huskhomes/event/IWarpEditEvent.java | 19 + .../huskhomes/event/IWarpListEvent.java | 19 + .../huskhomes/hook/BlueMapHook.java | 19 + .../william278/huskhomes/hook/DynmapHook.java | 19 + .../huskhomes/hook/EconomyHook.java | 19 + .../net/william278/huskhomes/hook/Hook.java | 19 + .../william278/huskhomes/hook/MapHook.java | 19 + .../william278/huskhomes/hook/PlanHook.java | 19 + .../huskhomes/listener/EventListener.java | 19 + .../huskhomes/manager/HomesManager.java | 19 + .../william278/huskhomes/manager/Manager.java | 19 + .../huskhomes/manager/RequestsManager.java | 19 + .../huskhomes/manager/WarpsManager.java | 19 + .../william278/huskhomes/network/Broker.java | 19 + .../william278/huskhomes/network/Message.java | 19 + .../william278/huskhomes/network/Payload.java | 19 + .../network/PluginMessageBroker.java | 19 + .../huskhomes/network/RedisBroker.java | 19 + .../william278/huskhomes/position/Home.java | 19 + .../huskhomes/position/Location.java | 19 + .../huskhomes/position/Position.java | 19 + .../huskhomes/position/PositionMeta.java | 19 + .../huskhomes/position/SavedPosition.java | 19 + .../william278/huskhomes/position/Warp.java | 19 + .../william278/huskhomes/position/World.java | 19 + .../random/NormalDistributionEngine.java | 19 + .../random/RandomTeleportEngine.java | 19 + .../william278/huskhomes/teleport/Target.java | 19 + .../huskhomes/teleport/Teleport.java | 23 +- .../huskhomes/teleport/TeleportBuilder.java | 19 + .../huskhomes/teleport/TeleportRequest.java | 19 + .../huskhomes/teleport/Teleportable.java | 19 + .../teleport/TeleportationException.java | 19 + .../huskhomes/teleport/TimedTeleport.java | 19 + .../huskhomes/teleport/Username.java | 19 + .../huskhomes/user/CommandUser.java | 19 + .../huskhomes/user/ConsoleUser.java | 19 + .../william278/huskhomes/user/OnlineUser.java | 22 +- .../william278/huskhomes/user/SavedUser.java | 19 + .../net/william278/huskhomes/user/User.java | 19 + .../william278/huskhomes/util/TaskRunner.java | 23 +- .../huskhomes/util/ThrowingConsumer.java | 19 + .../huskhomes/util/UnsafeBlocks.java | 19 + .../huskhomes/util/ValidationException.java | 19 + .../william278/huskhomes/util/Validator.java | 19 + .../huskhomes/config/LocalesTests.java | 19 + .../hook/PlanDataExtensionTests.java | 19 + .../network/MessageSerializationTests.java | 19 + .../random/NormalDistributionTests.java | 19 + fabric/build.gradle | 69 +++ .../william278/huskhomes/FabricHuskHomes.java | 479 ++++++++++++++++++ .../huskhomes/command/FabricCommand.java | 162 ++++++ .../event/DeleteAllHomesCallback.java | 82 +++ .../event/DeleteAllWarpsCallback.java | 75 +++ .../huskhomes/event/FabricEventCallback.java | 31 ++ .../event/FabricEventDispatcher.java | 138 +++++ .../huskhomes/event/HomeCreateCallback.java | 103 ++++ .../huskhomes/event/HomeDeleteCallback.java | 83 +++ .../huskhomes/event/HomeEditCallback.java | 83 +++ .../huskhomes/event/HomeListCallback.java | 95 ++++ .../event/ReceiveTeleportRequestCallback.java | 83 +++ .../event/ReplyTeleportRequestCallback.java | 83 +++ .../event/SendTeleportRequestCallback.java | 83 +++ .../huskhomes/event/TeleportBackCallback.java | 83 +++ .../huskhomes/event/TeleportCallback.java | 76 +++ .../event/TeleportWarmupCallback.java | 79 +++ .../huskhomes/event/WarpCreateCallback.java | 98 ++++ .../huskhomes/event/WarpDeleteCallback.java | 83 +++ .../huskhomes/event/WarpEditCallback.java | 83 +++ .../huskhomes/event/WarpListCallback.java | 90 ++++ .../listener/FabricEventListener.java | 64 +++ .../william278/huskhomes/user/FabricUser.java | 155 ++++++ .../huskhomes/util/FabricTaskRunner.java | 93 ++++ .../main/resources/assets/huskhomes/icon.png | Bin 0 -> 59529 bytes fabric/src/main/resources/fabric.mod.json | 37 ++ gradle.properties | 8 +- paper/build.gradle | 4 +- .../william278/huskhomes/PaperHuskHomes.java | 19 + .../huskhomes/PaperHuskHomesLoader.java | 19 + .../huskhomes/command/PaperCommand.java | 19 + .../huskhomes/hook/Pl3xMapHook.java | 19 + settings.gradle | 13 +- 181 files changed, 5566 insertions(+), 67 deletions(-) rename .github/workflows/{java_ci.yml => ci.yml} (60%) create mode 100644 .github/workflows/release.yml create mode 100644 HEADER create mode 100644 fabric/build.gradle create mode 100644 fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/command/FabricCommand.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/DeleteAllHomesCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/FabricEventCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/FabricEventDispatcher.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/HomeCreateCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/HomeDeleteCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/HomeEditCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/HomeListCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/SendTeleportRequestCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/TeleportBackCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/TeleportCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/TeleportWarmupCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/WarpCreateCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/WarpDeleteCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/WarpEditCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/event/WarpListCallback.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/user/FabricUser.java create mode 100644 fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java create mode 100644 fabric/src/main/resources/assets/huskhomes/icon.png create mode 100644 fabric/src/main/resources/fabric.mod.json diff --git a/.github/workflows/java_ci.yml b/.github/workflows/ci.yml similarity index 60% rename from .github/workflows/java_ci.yml rename to .github/workflows/ci.yml index 127e3e86..8e1ecc34 100644 --- a/.github/workflows/java_ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ # Builds, tests the project with Gradle and uploads to Modrinth -name: Java CI +name: CI Tests & Publish on: push: @@ -35,7 +35,7 @@ jobs: - name: Get Version run: | echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV - - name: Upload to Modrinth + - name: Upload to Modrinth (Spigot) uses: Kir-Antipov/mc-publish@v3.2 with: modrinth-id: J6U9o3JG @@ -46,7 +46,7 @@ jobs: dynmap | suggests | * pl3xmap | suggests | * files-primary: target/HuskHomes-Plugin-*.jar - name: HuskHomes v${{ env.version_name }} + name: HuskHomes (Spigot) v${{ env.version_name }} version: ${{ env.version_name }} version-type: alpha changelog: ${{ github.event.head_commit.message }} @@ -60,8 +60,36 @@ jobs: 1.18.2 1.19.4 java: 16 + - name: Upload to Modrinth & CurseForge (Fabric) + uses: Kir-Antipov/mc-publish@v3.2 + with: + modrinth-id: J6U9o3JG + modrinth-featured: false + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + curseforge-id: 849217 + curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} + dependencies: | + fabric-api | requires | * + bluemap | suggests | * + dynmap | suggests | * + luckperms | suggests | * + files-primary: target/HuskHomes-Fabric-*.jar + name: HuskHomes (Fabric) v${{ env.version_name }} + version: ${{ env.version_name }} + version-type: alpha + changelog: ${{ github.event.head_commit.message }} + loaders: | + fabric + game-versions: | + 1.19.4 + java: 17 + - name: Upload GitHub Artifact (Spigot) + uses: actions/upload-artifact@v2 + with: + name: HuskHomes (Spigot) + path: target/HuskHomes-Plugin-*.jar - name: Upload GitHub Artifact uses: actions/upload-artifact@v2 with: - name: HuskHomes Plugin - path: target/HuskHomes-Plugin-*.jar \ No newline at end of file + name: HuskHomes (Fabric) + path: target/HuskHomes-Fabric-*.jar \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..2fce2c1b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,88 @@ +# Publishes a release to Modrinth and CurseForge when a release is published on GitHub. +name: Release Test & Publish + +on: + release: + types: [ published ] + +permissions: + contents: read + checks: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: build test + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/build/test-results/test/TEST-*.xml' + - name: Upload to Modrinth (Spigot) + uses: Kir-Antipov/mc-publish@v3.2 + with: + modrinth-id: J6U9o3JG + modrinth-featured: false + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + modrinth-dependencies: | + bluemap | suggests | * + dynmap | suggests | * + pl3xmap | suggests | * + files-primary: target/HuskHomes-Plugin-*.jar + name: HuskHomes (Spigot) v${{ github.event.release.tag_name }} + version: ${{ github.event.release.tag_name }} + version-type: release + changelog: ${{ github.event.release.body }} + loaders: | + spigot + paper + purpur + game-versions: | + 1.16.5 + 1.17.1 + 1.18.2 + 1.19.4 + java: 16 + - name: Upload to Modrinth & CurseForge (Fabric) + uses: Kir-Antipov/mc-publish@v3.2 + with: + modrinth-id: J6U9o3JG + modrinth-featured: false + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + curseforge-id: 849217 + curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} + dependencies: | + fabric-api | requires | * + bluemap | suggests | * + dynmap | suggests | * + luckperms | suggests | * + files-primary: target/HuskHomes-Fabric-*.jar + name: HuskHomes (Fabric) v${{ github.event.release.tag_name }} + version: ${{ github.event.release.tag_name }} + version-type: release + changelog: ${{ github.event.release.body }} + loaders: | + fabric + game-versions: | + 1.19.4 + java: 17 + - name: Upload GitHub Artifact (Spigot) + uses: actions/upload-artifact@v2 + with: + name: HuskHomes (Spigot) + path: target/HuskHomes-Plugin-*.jar + - name: Upload GitHub Artifact + uses: actions/upload-artifact@v2 + with: + name: HuskHomes (Fabric) + path: target/HuskHomes-Fabric-*.jar \ No newline at end of file diff --git a/HEADER b/HEADER new file mode 100644 index 00000000..1ee179f2 --- /dev/null +++ b/HEADER @@ -0,0 +1,16 @@ +This file is part of HuskHomes, licensed under the Apache License 2.0. + + Copyright (c) William278 + Copyright (c) contributors + + 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. \ No newline at end of file diff --git a/README.md b/README.md index c00d1cdf..7d8cc6c5 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@


-**HuskHomes** is a powerful, intuitive and flexible teleportation plugin for Spigot-based Minecraft servers. The plugin supports a wide array of features; from teleporting between players, teleport requests, public and private homes, warps, random teleporting and more. +**HuskHomes** is a powerful, intuitive and flexible teleportation plugin for Spigot and Fabric-based Minecraft servers. The plugin supports a wide array of features; from teleporting between players, teleport requests, public and private homes, warps, random teleporting and more. All of this is supported on standalone and cross-server setups; players can set home and teleport on and between multiple servers on a proxy network. @@ -43,7 +43,7 @@ All of this is supported on standalone and cross-server setups; players can set **⭐ Extensible API & open-source** — Still not enough? Extend the plugin with the HuskHomes API. Or, submit a pull request—we're open-source! ## Building -HuskHomes requires Java 17 to build (required for Paper plugin 1.19.x support). To build, simply run the following in the root of the repository: +HuskHomes requires Java 17 to build. To build, simply run the following in the root of the repository: ```bash ./gradlew clean build @@ -62,7 +62,7 @@ Translations of the plugin locales are welcome to help make the plugin more acce ## Links - [Docs](https://william278.net/docs/huskhomes/) — Read the plugin documentation! -- [Spigot](https://www.spigotmc.org/resources/huskhomes.83767/) — View the Spigot resource page (Also: [Polymart](https://polymart.org/resource/huskhomes.284/), [Modrinth](https://modrinth.com/plugin/huskhomes)) +- [Spigot](https://www.spigotmc.org/resources/huskhomes.83767/) — View the Spigot resource page (Also: [Polymart](https://polymart.org/resource/huskhomes.284/), [Modrinth](https://modrinth.com/plugin/huskhomes), [CurseForge](https://www.curseforge.com/minecraft/mc-mods/huskhomes/)) - [Issues](https://github.com/WiIIiam278/HuskHomes2/issues) — File a bug report or feature request - [Discord](https://discord.gg/tVYhJfyDWG) — Get help, ask questions - [bStats](https://bstats.org/plugin/bukkit/HuskHomes/8430) — View plugin metrics diff --git a/build.gradle b/build.gradle index 7fcb2298..f640cdfa 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ import org.apache.tools.ant.filters.ReplaceTokens plugins { id 'com.github.johnrengelman.shadow' version '8.1.1' + id 'org.cadixdev.licenser' version '0.6.1' apply false id 'org.ajoberstar.grgit' version '5.0.0' id 'maven-publish' id 'java' @@ -9,6 +10,7 @@ plugins { group 'net.william278' version "$ext.plugin_version-${versionMetadata()}" +defaultTasks 'licenseFormat', 'build' ext { set 'version', version.toString() @@ -19,6 +21,7 @@ ext { allprojects { apply plugin: 'com.github.johnrengelman.shadow' + apply plugin: 'org.cadixdev.licenser' apply plugin: 'java' compileJava.options.encoding = 'UTF-8' @@ -29,6 +32,7 @@ allprojects { repositories { mavenLocal() mavenCentral() + maven { url 'https://maven.fabricmc.net/' } maven { url 'https://libraries.minecraft.net/' } maven { url 'https://api.modrinth.com/maven' } maven { url 'https://repo.papermc.io/repository/maven-public/' } @@ -50,29 +54,40 @@ allprojects { useJUnitPlatform() } + license { + header = rootProject.file('HEADER') + include '**/*.java' + newLine = true + } + processResources { - filesNotMatching(['**/*.png', '**/*.svg']) { + filesMatching(['**/*.json', '**/*.yml']) { filter ReplaceTokens as Class, beginToken: '${', endToken: '}', tokens: rootProject.ext.properties } } + } subprojects { version rootProject.version archivesBaseName = "${rootProject.name}-${project.name.capitalize()}" + compileJava.options.encoding = 'UTF-8' - if ('paper'.contains(project.name)) { + jar { + from '../LICENSE' + } + + if (['paper', 'fabric'].contains(project.name)) { compileJava.options.release.set 17 } - if (['bukkit', 'paper', 'plugin'].contains(project.name)) { + if (['bukkit', 'paper', 'plugin', 'fabric'].contains(project.name)) { shadowJar { destinationDirectory.set(file("$rootDir/target")) archiveClassifier.set('') } - // API publishing if (['bukkit'].contains(project.name)) { java { withSourcesJar() @@ -120,4 +135,5 @@ def versionMetadata() { return System.getenv("GITHUB_RUN_NUMBER") ? 'build.' + System.getenv("GITHUB_RUN_NUMBER") : 'unknown' } return grgit.head().abbreviatedId + (grgit.status().clean ? '' : '-indev') -} \ No newline at end of file +} + diff --git a/bukkit/build.gradle b/bukkit/build.gradle index 3882dfe0..f103f6ac 100644 --- a/bukkit/build.gradle +++ b/bukkit/build.gradle @@ -1,5 +1,5 @@ dependencies { - implementation project(path: ':common') + implementation project(':common') implementation 'org.bstats:bstats-bukkit:3.0.2' implementation 'io.papermc:paperlib:1.0.8' @@ -43,7 +43,6 @@ shadowJar { relocate 'org.yaml.snakeyaml', 'net.william278.huskhomes.libraries.snakeyaml' relocate 'com.google.gson', 'net.william278.huskhomes.libraries.gson' relocate 'net.kyori', 'net.william278.huskhomes.libraries' - relocate 'org.bstats', 'net.william278.huskhomes.libraries.bstats' relocate 'io.papermc.lib', 'net.william278.huskhomes.libraries.paperlib' relocate 'me.lucko.commodore', 'net.william278.huskhomes.libraries.commodore' diff --git a/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java b/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java index ace758aa..96c04c54 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java +++ b/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes; import io.papermc.lib.PaperLib; diff --git a/bukkit/src/main/java/net/william278/huskhomes/api/HuskHomesAPI.java b/bukkit/src/main/java/net/william278/huskhomes/api/HuskHomesAPI.java index 317c246e..a8d6add3 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/api/HuskHomesAPI.java +++ b/bukkit/src/main/java/net/william278/huskhomes/api/HuskHomesAPI.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.api; import net.william278.huskhomes.BukkitHuskHomes; diff --git a/bukkit/src/main/java/net/william278/huskhomes/command/BrigadierUtil.java b/bukkit/src/main/java/net/william278/huskhomes/command/BrigadierUtil.java index 7bc800be..3b975574 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/command/BrigadierUtil.java +++ b/bukkit/src/main/java/net/william278/huskhomes/command/BrigadierUtil.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import me.lucko.commodore.CommodoreProvider; diff --git a/bukkit/src/main/java/net/william278/huskhomes/command/BukkitCommand.java b/bukkit/src/main/java/net/william278/huskhomes/command/BukkitCommand.java index 23efc6a0..d81aebf6 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/command/BukkitCommand.java +++ b/bukkit/src/main/java/net/william278/huskhomes/command/BukkitCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import me.lucko.commodore.CommodoreProvider; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/BukkitEventDispatcher.java b/bukkit/src/main/java/net/william278/huskhomes/event/BukkitEventDispatcher.java index a32be4fb..a9919a2e 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/BukkitEventDispatcher.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/BukkitEventDispatcher.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Home; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllHomesEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllHomesEvent.java index 8da31a03..8002f072 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllHomesEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllHomesEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.user.CommandUser; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsEvent.java index 2658dcf3..98eaa396 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.user.CommandUser; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/HomeCreateEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/HomeCreateEvent.java index dbb5a2b7..9eb21fba 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/HomeCreateEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/HomeCreateEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Position; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/HomeDeleteEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/HomeDeleteEvent.java index 7ea06f13..b90cad08 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/HomeDeleteEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/HomeDeleteEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Home; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/HomeEditEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/HomeEditEvent.java index 55cf2414..9a1faf35 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/HomeEditEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/HomeEditEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Home; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/HomeListEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/HomeListEvent.java index d622e783..b864fddb 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/HomeListEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/HomeListEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Home; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestEvent.java index 3f88234c..751aeb36 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TeleportRequest; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestEvent.java index cd8a2e57..7976a39d 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TeleportRequest; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/SendTeleportRequestEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/SendTeleportRequestEvent.java index 5d746f48..d30ab0e2 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/SendTeleportRequestEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/SendTeleportRequestEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TeleportRequest; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/TeleportBackEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/TeleportBackEvent.java index 938e65e1..187d4aad 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/TeleportBackEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/TeleportBackEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Position; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/TeleportEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/TeleportEvent.java index b1802195..0e98b11d 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/TeleportEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/TeleportEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.Teleport; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/TeleportWarmupEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/TeleportWarmupEvent.java index f1417192..62ac5c00 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/TeleportWarmupEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/TeleportWarmupEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TimedTeleport; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/WarpCreateEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/WarpCreateEvent.java index a70b6740..0045a72b 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/WarpCreateEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/WarpCreateEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Position; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/WarpDeleteEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/WarpDeleteEvent.java index 1bb307bc..7234d6cd 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/WarpDeleteEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/WarpDeleteEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Warp; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/WarpEditEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/WarpEditEvent.java index 3d1f133c..1e495d50 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/WarpEditEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/WarpEditEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Warp; diff --git a/bukkit/src/main/java/net/william278/huskhomes/event/WarpListEvent.java b/bukkit/src/main/java/net/william278/huskhomes/event/WarpListEvent.java index 8e91f20f..b9f9aa39 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/event/WarpListEvent.java +++ b/bukkit/src/main/java/net/william278/huskhomes/event/WarpListEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Warp; diff --git a/bukkit/src/main/java/net/william278/huskhomes/hook/PlaceholderAPIHook.java b/bukkit/src/main/java/net/william278/huskhomes/hook/PlaceholderAPIHook.java index a331b361..65de4a92 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/hook/PlaceholderAPIHook.java +++ b/bukkit/src/main/java/net/william278/huskhomes/hook/PlaceholderAPIHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import me.clip.placeholderapi.PlaceholderAPIPlugin; diff --git a/bukkit/src/main/java/net/william278/huskhomes/hook/RedisEconomyHook.java b/bukkit/src/main/java/net/william278/huskhomes/hook/RedisEconomyHook.java index 5723288f..0c48b93c 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/hook/RedisEconomyHook.java +++ b/bukkit/src/main/java/net/william278/huskhomes/hook/RedisEconomyHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import dev.unnm3d.rediseconomy.api.RedisEconomyAPI; diff --git a/bukkit/src/main/java/net/william278/huskhomes/hook/VaultEconomyHook.java b/bukkit/src/main/java/net/william278/huskhomes/hook/VaultEconomyHook.java index eb2fa23c..170c5367 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/hook/VaultEconomyHook.java +++ b/bukkit/src/main/java/net/william278/huskhomes/hook/VaultEconomyHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import net.milkbowl.vault.economy.Economy; diff --git a/bukkit/src/main/java/net/william278/huskhomes/listener/BukkitEventListener.java b/bukkit/src/main/java/net/william278/huskhomes/listener/BukkitEventListener.java index 10ad1939..e1bca7ec 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/listener/BukkitEventListener.java +++ b/bukkit/src/main/java/net/william278/huskhomes/listener/BukkitEventListener.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.listener; import net.william278.huskhomes.BukkitHuskHomes; diff --git a/bukkit/src/main/java/net/william278/huskhomes/user/BukkitUser.java b/bukkit/src/main/java/net/william278/huskhomes/user/BukkitUser.java index 438be6c9..07926cbb 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/user/BukkitUser.java +++ b/bukkit/src/main/java/net/william278/huskhomes/user/BukkitUser.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.user; import io.papermc.lib.PaperLib; diff --git a/bukkit/src/main/java/net/william278/huskhomes/util/BukkitAdapter.java b/bukkit/src/main/java/net/william278/huskhomes/util/BukkitAdapter.java index 8af76edf..0a480ef0 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/util/BukkitAdapter.java +++ b/bukkit/src/main/java/net/william278/huskhomes/util/BukkitAdapter.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.util; import net.william278.huskhomes.position.Location; diff --git a/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java b/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java index dbac0f8d..274bb7d8 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java +++ b/bukkit/src/main/java/net/william278/huskhomes/util/BukkitTaskRunner.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.util; import net.william278.huskhomes.BukkitHuskHomes; @@ -23,8 +42,8 @@ public interface BukkitTaskRunner extends TaskRunner { } @Override - default int runSync(@NotNull Runnable runnable) { - return Bukkit.getScheduler().runTask((BukkitHuskHomes) getPlugin(), runnable).getTaskId(); + default void runSync(@NotNull Runnable runnable) { + Bukkit.getScheduler().runTask((BukkitHuskHomes) getPlugin(), runnable).getTaskId(); } @Override @@ -36,8 +55,8 @@ public interface BukkitTaskRunner extends TaskRunner { } @Override - default int runLater(@NotNull Runnable runnable, long delay) { - return Bukkit.getScheduler().runTaskLater((BukkitHuskHomes) getPlugin(), runnable, delay).getTaskId(); + default void runLater(@NotNull Runnable runnable, long delay) { + Bukkit.getScheduler().runTaskLater((BukkitHuskHomes) getPlugin(), runnable, delay).getTaskId(); } @Override diff --git a/bukkit/src/test/java/net/william278/huskhomes/BukkitPluginTests.java b/bukkit/src/test/java/net/william278/huskhomes/BukkitPluginTests.java index eed5c559..03f0fe81 100644 --- a/bukkit/src/test/java/net/william278/huskhomes/BukkitPluginTests.java +++ b/bukkit/src/test/java/net/william278/huskhomes/BukkitPluginTests.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes; import be.seeseemelk.mockbukkit.MockBukkit; diff --git a/common/build.gradle b/common/build.gradle index ad5971bc..9c528abd 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,43 +1,35 @@ +plugins { + id 'java-library' +} + +test { + useJUnitPlatform() +} + dependencies { - implementation 'commons-io:commons-io:2.11.0' - implementation 'org.apache.commons:commons-text:1.10.0' - implementation 'de.themoep:minedown-adventure:1.7.2-SNAPSHOT' - implementation 'com.google.code.gson:gson:2.10.1' - implementation 'net.william278:Annotaml:2.0.1' - implementation 'net.william278:PagineDown:1.1' - implementation 'net.william278:DesertWell:1.1.1' - implementation 'dev.dejvokep:boosted-yaml:1.3.1' - implementation 'net.kyori:adventure-api:4.13.0' - implementation('com.zaxxer:HikariCP:5.0.1') { + api 'commons-io:commons-io:2.11.0' + api 'org.apache.commons:commons-text:1.10.0' + api 'de.themoep:minedown-adventure:1.7.2-SNAPSHOT' + api 'com.google.code.gson:gson:2.10.1' + api 'net.william278:Annotaml:2.0.1' + api 'net.william278:PagineDown:1.1' + api 'net.william278:DesertWell:1.1.1' + api 'dev.dejvokep:boosted-yaml:1.3.1' + api 'net.kyori:adventure-api:4.13.1' + api('com.zaxxer:HikariCP:5.0.1') { exclude module: 'slf4j-api' } - compileOnly 'org.jetbrains:annotations:24.0.1' - compileOnly 'com.google.guava:guava:31.1-jre' compileOnly 'redis.clients:jedis:' + jedis_version compileOnly 'org.xerial:sqlite-jdbc:' + sqlite_driver_version compileOnly 'com.mysql:mysql-connector-j:' + mysql_driver_version + + compileOnly 'org.jetbrains:annotations:24.0.1' + compileOnly 'com.google.guava:guava:31.1-jre' compileOnly 'com.github.plan-player-analytics:Plan:5.5.1923' compileOnly 'com.github.BlueMap-Minecraft:BlueMapAPI:2.5.0' compileOnly 'us.dynmap:DynmapCoreAPI:3.4' testImplementation 'com.github.plan-player-analytics:Plan:5.5.1923' testImplementation 'com.github.yuriy-g:simple-java-plot:5c502c2e98' -} - -shadowJar { - relocate 'org.apache.commons.io', 'net.william278.huskhomes.libraries.commons.io' - relocate 'org.apache.commons.text', 'net.william278.huskhomes.libraries.commons.text' - relocate 'org.apache.commons.lang3', 'net.william278.huskhomes.libraries.commons.lang3' - relocate 'de.themoep', 'net.william278.huskhomes.libraries' - relocate 'org.jetbrains', 'net.william278.huskhomes.libraries' - relocate 'org.intellij', 'net.william278.huskhomes.libraries' - relocate 'com.zaxxer', 'net.william278.huskhomes.libraries' - relocate 'net.william278.annotaml', 'net.william278.huskhomes.libraries.annotaml' - relocate 'net.william278.paginedown', 'net.william278.huskhomes.libraries.paginedown' - relocate 'net.william278.desertwell', 'net.william278.huskhomes.libraries.desertwell' - relocate 'dev.dejvokep.boostedyaml', 'net.william278.huskhomes.libraries.boostedyaml' - relocate 'org.yaml.snakeyaml', 'net.william278.huskhomes.libraries.snakeyaml' - relocate 'com.google.gson', 'net.william278.huskhomes.libraries.gson' - relocate 'net.kyori', 'net.william278.huskhomes.libraries' } \ No newline at end of file diff --git a/common/src/main/java/net/william278/huskhomes/HuskHomes.java b/common/src/main/java/net/william278/huskhomes/HuskHomes.java index 6665f83d..0ad18ba3 100644 --- a/common/src/main/java/net/william278/huskhomes/HuskHomes.java +++ b/common/src/main/java/net/william278/huskhomes/HuskHomes.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes; import com.google.gson.Gson; diff --git a/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java b/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java index d4de2921..f5df57be 100644 --- a/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java +++ b/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.api; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/command/BackCommand.java b/common/src/main/java/net/william278/huskhomes/command/BackCommand.java index f201cadf..7996a387 100644 --- a/common/src/main/java/net/william278/huskhomes/command/BackCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/BackCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/Command.java b/common/src/main/java/net/william278/huskhomes/command/Command.java index a9e0a6b9..683df20e 100644 --- a/common/src/main/java/net/william278/huskhomes/command/Command.java +++ b/common/src/main/java/net/william278/huskhomes/command/Command.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; @@ -33,14 +52,22 @@ public abstract class Command extends Node { @NotNull protected String[] removeFirstArg(@NotNull String[] args) { + if (args.length <= 1) { + return new String[0]; + } String[] newArgs = new String[args.length - 1]; System.arraycopy(args, 1, newArgs, 0, args.length - 1); return newArgs; } + @NotNull + public final String getRawUsage() { + return usage; + } + @NotNull public final String getUsage() { - return "/" + getName() + " " + usage; + return "/" + getName() + " " + getRawUsage(); } public final void addAdditionalPermissions(@NotNull Map additionalPermissions) { diff --git a/common/src/main/java/net/william278/huskhomes/command/DelHomeCommand.java b/common/src/main/java/net/william278/huskhomes/command/DelHomeCommand.java index f97ff04b..41f1bb3d 100644 --- a/common/src/main/java/net/william278/huskhomes/command/DelHomeCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/DelHomeCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/DelWarpCommand.java b/common/src/main/java/net/william278/huskhomes/command/DelWarpCommand.java index b6e231ff..6a57814a 100644 --- a/common/src/main/java/net/william278/huskhomes/command/DelWarpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/DelWarpCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java b/common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java index 52e002b7..0709d9d6 100644 --- a/common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java b/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java index b4cda4a2..b9ac011e 100644 --- a/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/command/EditWarpCommand.java b/common/src/main/java/net/william278/huskhomes/command/EditWarpCommand.java index 8ee2b644..041b273f 100644 --- a/common/src/main/java/net/william278/huskhomes/command/EditWarpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/EditWarpCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/command/Executable.java b/common/src/main/java/net/william278/huskhomes/command/Executable.java index 963c6f4f..9cf5a0f8 100644 --- a/common/src/main/java/net/william278/huskhomes/command/Executable.java +++ b/common/src/main/java/net/william278/huskhomes/command/Executable.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.user.CommandUser; diff --git a/common/src/main/java/net/william278/huskhomes/command/HomeCommand.java b/common/src/main/java/net/william278/huskhomes/command/HomeCommand.java index 83ccdb7a..8e918e87 100644 --- a/common/src/main/java/net/william278/huskhomes/command/HomeCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/HomeCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/HuskHomesCommand.java b/common/src/main/java/net/william278/huskhomes/command/HuskHomesCommand.java index d6f6dd78..4f30c146 100644 --- a/common/src/main/java/net/william278/huskhomes/command/HuskHomesCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/HuskHomesCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/command/InGameCommand.java b/common/src/main/java/net/william278/huskhomes/command/InGameCommand.java index f107a27a..aade5643 100644 --- a/common/src/main/java/net/william278/huskhomes/command/InGameCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/InGameCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/ListCommand.java b/common/src/main/java/net/william278/huskhomes/command/ListCommand.java index 027fa892..186c7bc4 100644 --- a/common/src/main/java/net/william278/huskhomes/command/ListCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/ListCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/Node.java b/common/src/main/java/net/william278/huskhomes/command/Node.java index dce5670e..0606a1e5 100644 --- a/common/src/main/java/net/william278/huskhomes/command/Node.java +++ b/common/src/main/java/net/william278/huskhomes/command/Node.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/PrivateHomeCommand.java b/common/src/main/java/net/william278/huskhomes/command/PrivateHomeCommand.java index 231e32b6..bc1c32f6 100644 --- a/common/src/main/java/net/william278/huskhomes/command/PrivateHomeCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/PrivateHomeCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/PrivateHomeListCommand.java b/common/src/main/java/net/william278/huskhomes/command/PrivateHomeListCommand.java index 6afdc9c3..6a5d0458 100644 --- a/common/src/main/java/net/william278/huskhomes/command/PrivateHomeListCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/PrivateHomeListCommand.java @@ -1,9 +1,31 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; import net.william278.huskhomes.config.Locales; import net.william278.huskhomes.position.Home; -import net.william278.huskhomes.user.*; +import net.william278.huskhomes.user.CommandUser; +import net.william278.huskhomes.user.OnlineUser; +import net.william278.huskhomes.user.SavedUser; +import net.william278.huskhomes.user.User; import net.william278.paginedown.PaginatedList; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/command/PublicHomeCommand.java b/common/src/main/java/net/william278/huskhomes/command/PublicHomeCommand.java index 283eba80..2aa94b8d 100644 --- a/common/src/main/java/net/william278/huskhomes/command/PublicHomeCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/PublicHomeCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/PublicHomeListCommand.java b/common/src/main/java/net/william278/huskhomes/command/PublicHomeListCommand.java index bc18f1e7..738a1e95 100644 --- a/common/src/main/java/net/william278/huskhomes/command/PublicHomeListCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/PublicHomeListCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java b/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java index 5ebf7bdf..87e019cf 100644 --- a/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/SavedPositionCommand.java b/common/src/main/java/net/william278/huskhomes/command/SavedPositionCommand.java index f5db7d1a..23cc8b44 100644 --- a/common/src/main/java/net/william278/huskhomes/command/SavedPositionCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/SavedPositionCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/SetHomeCommand.java b/common/src/main/java/net/william278/huskhomes/command/SetHomeCommand.java index 7d776ff5..fa5d8d3b 100644 --- a/common/src/main/java/net/william278/huskhomes/command/SetHomeCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/SetHomeCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/SetPositionCommand.java b/common/src/main/java/net/william278/huskhomes/command/SetPositionCommand.java index b7c84b5a..18895e31 100644 --- a/common/src/main/java/net/william278/huskhomes/command/SetPositionCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/SetPositionCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/SetSpawnCommand.java b/common/src/main/java/net/william278/huskhomes/command/SetSpawnCommand.java index 9d47cbb6..5d85c5c3 100644 --- a/common/src/main/java/net/william278/huskhomes/command/SetSpawnCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/SetSpawnCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/SetWarpCommand.java b/common/src/main/java/net/william278/huskhomes/command/SetWarpCommand.java index e7eaf2d0..a85e374f 100644 --- a/common/src/main/java/net/william278/huskhomes/command/SetWarpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/SetWarpCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/SpawnCommand.java b/common/src/main/java/net/william278/huskhomes/command/SpawnCommand.java index 32e3219c..13038197 100644 --- a/common/src/main/java/net/william278/huskhomes/command/SpawnCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/SpawnCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/TabProvider.java b/common/src/main/java/net/william278/huskhomes/command/TabProvider.java index 3483763a..10cbf5a7 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TabProvider.java +++ b/common/src/main/java/net/william278/huskhomes/command/TabProvider.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.user.CommandUser; diff --git a/common/src/main/java/net/william278/huskhomes/command/TeleportRequestCommand.java b/common/src/main/java/net/william278/huskhomes/command/TeleportRequestCommand.java index f5bff690..dcb7c110 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TeleportRequestCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TeleportRequestCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/TpAllCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpAllCommand.java index 49fafee3..815204be 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpAllCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpAllCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/TpCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpCommand.java index 2ab01d95..e0aea4e8 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/TpHereCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpHereCommand.java index ca8fb9e7..6fb66d75 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpHereCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpHereCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/TpIgnoreCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpIgnoreCommand.java index c5b9574d..d86bd77a 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpIgnoreCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpIgnoreCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/command/TpOfflineCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpOfflineCommand.java index ab12038c..38bbe1fd 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpOfflineCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpOfflineCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/TpRespondCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpRespondCommand.java index 350e282b..9e7a405b 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpRespondCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpRespondCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/TpaAllCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpaAllCommand.java index 432816ac..9798b5c2 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpaAllCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpaAllCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/UserListTabProvider.java b/common/src/main/java/net/william278/huskhomes/command/UserListTabProvider.java index 19da4c7c..0bb57d71 100644 --- a/common/src/main/java/net/william278/huskhomes/command/UserListTabProvider.java +++ b/common/src/main/java/net/william278/huskhomes/command/UserListTabProvider.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/WarpCommand.java b/common/src/main/java/net/william278/huskhomes/command/WarpCommand.java index 69923a61..8ff5fb91 100644 --- a/common/src/main/java/net/william278/huskhomes/command/WarpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/WarpCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/command/WarpListCommand.java b/common/src/main/java/net/william278/huskhomes/command/WarpListCommand.java index 63d227e9..4248a569 100644 --- a/common/src/main/java/net/william278/huskhomes/command/WarpListCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/WarpListCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/config/Locales.java b/common/src/main/java/net/william278/huskhomes/config/Locales.java index eeef3f30..56e13eb9 100644 --- a/common/src/main/java/net/william278/huskhomes/config/Locales.java +++ b/common/src/main/java/net/william278/huskhomes/config/Locales.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.config; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/config/Server.java b/common/src/main/java/net/william278/huskhomes/config/Server.java index 054a535e..803ccb2c 100644 --- a/common/src/main/java/net/william278/huskhomes/config/Server.java +++ b/common/src/main/java/net/william278/huskhomes/config/Server.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.config; import net.william278.annotaml.YamlFile; diff --git a/common/src/main/java/net/william278/huskhomes/config/Settings.java b/common/src/main/java/net/william278/huskhomes/config/Settings.java index 5f4282e0..a6e9111b 100644 --- a/common/src/main/java/net/william278/huskhomes/config/Settings.java +++ b/common/src/main/java/net/william278/huskhomes/config/Settings.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.config; import net.william278.annotaml.YamlComment; diff --git a/common/src/main/java/net/william278/huskhomes/config/Spawn.java b/common/src/main/java/net/william278/huskhomes/config/Spawn.java index 21adb202..48444254 100644 --- a/common/src/main/java/net/william278/huskhomes/config/Spawn.java +++ b/common/src/main/java/net/william278/huskhomes/config/Spawn.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.config; import net.william278.annotaml.YamlFile; diff --git a/common/src/main/java/net/william278/huskhomes/database/Database.java b/common/src/main/java/net/william278/huskhomes/database/Database.java index eda76a2e..ce9dea20 100644 --- a/common/src/main/java/net/william278/huskhomes/database/Database.java +++ b/common/src/main/java/net/william278/huskhomes/database/Database.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.database; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/database/MySqlDatabase.java b/common/src/main/java/net/william278/huskhomes/database/MySqlDatabase.java index bed45bbf..c4825c3b 100644 --- a/common/src/main/java/net/william278/huskhomes/database/MySqlDatabase.java +++ b/common/src/main/java/net/william278/huskhomes/database/MySqlDatabase.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.database; import com.zaxxer.hikari.HikariDataSource; diff --git a/common/src/main/java/net/william278/huskhomes/database/SqLiteDatabase.java b/common/src/main/java/net/william278/huskhomes/database/SqLiteDatabase.java index ac3c9f91..9642483e 100644 --- a/common/src/main/java/net/william278/huskhomes/database/SqLiteDatabase.java +++ b/common/src/main/java/net/william278/huskhomes/database/SqLiteDatabase.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.database; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/event/Cancellable.java b/common/src/main/java/net/william278/huskhomes/event/Cancellable.java index 68a671aa..0ebe0eeb 100644 --- a/common/src/main/java/net/william278/huskhomes/event/Cancellable.java +++ b/common/src/main/java/net/william278/huskhomes/event/Cancellable.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; /** diff --git a/common/src/main/java/net/william278/huskhomes/event/Event.java b/common/src/main/java/net/william278/huskhomes/event/Event.java index 88f3538e..15da15b9 100644 --- a/common/src/main/java/net/william278/huskhomes/event/Event.java +++ b/common/src/main/java/net/william278/huskhomes/event/Event.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; /** diff --git a/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java b/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java index e73befee..20a643a0 100644 --- a/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java +++ b/common/src/main/java/net/william278/huskhomes/event/EventDispatcher.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/event/IDeleteAllHomesEvent.java b/common/src/main/java/net/william278/huskhomes/event/IDeleteAllHomesEvent.java index 3a097a62..ec8890d8 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IDeleteAllHomesEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IDeleteAllHomesEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.user.CommandUser; diff --git a/common/src/main/java/net/william278/huskhomes/event/IDeleteAllWarpsEvent.java b/common/src/main/java/net/william278/huskhomes/event/IDeleteAllWarpsEvent.java index 65a9d124..ccfdcbda 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IDeleteAllWarpsEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IDeleteAllWarpsEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.user.CommandUser; diff --git a/common/src/main/java/net/william278/huskhomes/event/IHomeCreateEvent.java b/common/src/main/java/net/william278/huskhomes/event/IHomeCreateEvent.java index 464e17f3..2608295d 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IHomeCreateEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IHomeCreateEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Position; diff --git a/common/src/main/java/net/william278/huskhomes/event/IHomeDeleteEvent.java b/common/src/main/java/net/william278/huskhomes/event/IHomeDeleteEvent.java index 4c42177f..7b63df92 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IHomeDeleteEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IHomeDeleteEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Home; diff --git a/common/src/main/java/net/william278/huskhomes/event/IHomeEditEvent.java b/common/src/main/java/net/william278/huskhomes/event/IHomeEditEvent.java index 3290ab98..ef676cdb 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IHomeEditEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IHomeEditEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Home; diff --git a/common/src/main/java/net/william278/huskhomes/event/IHomeListEvent.java b/common/src/main/java/net/william278/huskhomes/event/IHomeListEvent.java index 26f69981..9d7e00ec 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IHomeListEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IHomeListEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Home; diff --git a/common/src/main/java/net/william278/huskhomes/event/IReceiveTeleportRequestEvent.java b/common/src/main/java/net/william278/huskhomes/event/IReceiveTeleportRequestEvent.java index 273a2442..f37b164f 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IReceiveTeleportRequestEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IReceiveTeleportRequestEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TeleportRequest; diff --git a/common/src/main/java/net/william278/huskhomes/event/IReplyTeleportRequestEvent.java b/common/src/main/java/net/william278/huskhomes/event/IReplyTeleportRequestEvent.java index 080bd3f3..93c33652 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IReplyTeleportRequestEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IReplyTeleportRequestEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TeleportRequest; diff --git a/common/src/main/java/net/william278/huskhomes/event/ISendTeleportRequestEvent.java b/common/src/main/java/net/william278/huskhomes/event/ISendTeleportRequestEvent.java index f16afb10..d321ee70 100644 --- a/common/src/main/java/net/william278/huskhomes/event/ISendTeleportRequestEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/ISendTeleportRequestEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.user.OnlineUser; diff --git a/common/src/main/java/net/william278/huskhomes/event/ITeleportBackEvent.java b/common/src/main/java/net/william278/huskhomes/event/ITeleportBackEvent.java index 6e20695b..a3cdfcfe 100644 --- a/common/src/main/java/net/william278/huskhomes/event/ITeleportBackEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/ITeleportBackEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Position; diff --git a/common/src/main/java/net/william278/huskhomes/event/ITeleportEvent.java b/common/src/main/java/net/william278/huskhomes/event/ITeleportEvent.java index 621df49b..bf0f5316 100644 --- a/common/src/main/java/net/william278/huskhomes/event/ITeleportEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/ITeleportEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.Teleport; diff --git a/common/src/main/java/net/william278/huskhomes/event/ITeleportRequestEvent.java b/common/src/main/java/net/william278/huskhomes/event/ITeleportRequestEvent.java index 91e0c9cc..6cc60cea 100644 --- a/common/src/main/java/net/william278/huskhomes/event/ITeleportRequestEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/ITeleportRequestEvent.java @@ -1,9 +1,28 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TeleportRequest; import org.jetbrains.annotations.NotNull; -public interface ITeleportRequestEvent extends Event { +public interface ITeleportRequestEvent extends Cancellable { @NotNull TeleportRequest getRequest(); diff --git a/common/src/main/java/net/william278/huskhomes/event/ITeleportWarmupEvent.java b/common/src/main/java/net/william278/huskhomes/event/ITeleportWarmupEvent.java index 53e56f0e..3ad3c8d6 100644 --- a/common/src/main/java/net/william278/huskhomes/event/ITeleportWarmupEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/ITeleportWarmupEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.teleport.TimedTeleport; diff --git a/common/src/main/java/net/william278/huskhomes/event/IWarpCreateEvent.java b/common/src/main/java/net/william278/huskhomes/event/IWarpCreateEvent.java index 05833200..c60cf152 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IWarpCreateEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IWarpCreateEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Position; diff --git a/common/src/main/java/net/william278/huskhomes/event/IWarpDeleteEvent.java b/common/src/main/java/net/william278/huskhomes/event/IWarpDeleteEvent.java index 1f1b584b..77142cef 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IWarpDeleteEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IWarpDeleteEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Warp; diff --git a/common/src/main/java/net/william278/huskhomes/event/IWarpEditEvent.java b/common/src/main/java/net/william278/huskhomes/event/IWarpEditEvent.java index 7f2fe036..fb3e741b 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IWarpEditEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IWarpEditEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Warp; diff --git a/common/src/main/java/net/william278/huskhomes/event/IWarpListEvent.java b/common/src/main/java/net/william278/huskhomes/event/IWarpListEvent.java index 684996b8..50710f2d 100644 --- a/common/src/main/java/net/william278/huskhomes/event/IWarpListEvent.java +++ b/common/src/main/java/net/william278/huskhomes/event/IWarpListEvent.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.event; import net.william278.huskhomes.position.Warp; diff --git a/common/src/main/java/net/william278/huskhomes/hook/BlueMapHook.java b/common/src/main/java/net/william278/huskhomes/hook/BlueMapHook.java index 2f225669..78345e99 100644 --- a/common/src/main/java/net/william278/huskhomes/hook/BlueMapHook.java +++ b/common/src/main/java/net/william278/huskhomes/hook/BlueMapHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import de.bluecolored.bluemap.api.BlueMapAPI; diff --git a/common/src/main/java/net/william278/huskhomes/hook/DynmapHook.java b/common/src/main/java/net/william278/huskhomes/hook/DynmapHook.java index 1100d363..df8f5d5b 100644 --- a/common/src/main/java/net/william278/huskhomes/hook/DynmapHook.java +++ b/common/src/main/java/net/william278/huskhomes/hook/DynmapHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/hook/EconomyHook.java b/common/src/main/java/net/william278/huskhomes/hook/EconomyHook.java index 73155133..c272c82e 100644 --- a/common/src/main/java/net/william278/huskhomes/hook/EconomyHook.java +++ b/common/src/main/java/net/william278/huskhomes/hook/EconomyHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/hook/Hook.java b/common/src/main/java/net/william278/huskhomes/hook/Hook.java index 58a2520f..298bc679 100644 --- a/common/src/main/java/net/william278/huskhomes/hook/Hook.java +++ b/common/src/main/java/net/william278/huskhomes/hook/Hook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/hook/MapHook.java b/common/src/main/java/net/william278/huskhomes/hook/MapHook.java index dfb2e1c4..24cb81bd 100644 --- a/common/src/main/java/net/william278/huskhomes/hook/MapHook.java +++ b/common/src/main/java/net/william278/huskhomes/hook/MapHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/hook/PlanHook.java b/common/src/main/java/net/william278/huskhomes/hook/PlanHook.java index 64d2c34f..84a2715a 100644 --- a/common/src/main/java/net/william278/huskhomes/hook/PlanHook.java +++ b/common/src/main/java/net/william278/huskhomes/hook/PlanHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import com.djrapitops.plan.capability.CapabilityService; diff --git a/common/src/main/java/net/william278/huskhomes/listener/EventListener.java b/common/src/main/java/net/william278/huskhomes/listener/EventListener.java index 227f34bd..ca19543d 100644 --- a/common/src/main/java/net/william278/huskhomes/listener/EventListener.java +++ b/common/src/main/java/net/william278/huskhomes/listener/EventListener.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.listener; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/manager/HomesManager.java b/common/src/main/java/net/william278/huskhomes/manager/HomesManager.java index 98c0c105..34df43aa 100644 --- a/common/src/main/java/net/william278/huskhomes/manager/HomesManager.java +++ b/common/src/main/java/net/william278/huskhomes/manager/HomesManager.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.manager; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/manager/Manager.java b/common/src/main/java/net/william278/huskhomes/manager/Manager.java index eefacdf5..dc9f6ffc 100644 --- a/common/src/main/java/net/william278/huskhomes/manager/Manager.java +++ b/common/src/main/java/net/william278/huskhomes/manager/Manager.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.manager; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java b/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java index d00abaa4..8dbf07b7 100644 --- a/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java +++ b/common/src/main/java/net/william278/huskhomes/manager/RequestsManager.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.manager; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/manager/WarpsManager.java b/common/src/main/java/net/william278/huskhomes/manager/WarpsManager.java index c25ea069..50b25c35 100644 --- a/common/src/main/java/net/william278/huskhomes/manager/WarpsManager.java +++ b/common/src/main/java/net/william278/huskhomes/manager/WarpsManager.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.manager; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/network/Broker.java b/common/src/main/java/net/william278/huskhomes/network/Broker.java index 7fb048f1..196782b4 100644 --- a/common/src/main/java/net/william278/huskhomes/network/Broker.java +++ b/common/src/main/java/net/william278/huskhomes/network/Broker.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.network; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/network/Message.java b/common/src/main/java/net/william278/huskhomes/network/Message.java index 5a38ed40..7629303c 100644 --- a/common/src/main/java/net/william278/huskhomes/network/Message.java +++ b/common/src/main/java/net/william278/huskhomes/network/Message.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.network; import com.google.gson.annotations.Expose; diff --git a/common/src/main/java/net/william278/huskhomes/network/Payload.java b/common/src/main/java/net/william278/huskhomes/network/Payload.java index f3710f12..17d3dad0 100644 --- a/common/src/main/java/net/william278/huskhomes/network/Payload.java +++ b/common/src/main/java/net/william278/huskhomes/network/Payload.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.network; import com.google.gson.annotations.Expose; diff --git a/common/src/main/java/net/william278/huskhomes/network/PluginMessageBroker.java b/common/src/main/java/net/william278/huskhomes/network/PluginMessageBroker.java index e79936d9..79349574 100644 --- a/common/src/main/java/net/william278/huskhomes/network/PluginMessageBroker.java +++ b/common/src/main/java/net/william278/huskhomes/network/PluginMessageBroker.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.network; import com.google.common.io.ByteArrayDataInput; diff --git a/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java b/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java index 449f777d..55407401 100644 --- a/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java +++ b/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.network; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/position/Home.java b/common/src/main/java/net/william278/huskhomes/position/Home.java index 143fd418..bb8453fb 100644 --- a/common/src/main/java/net/william278/huskhomes/position/Home.java +++ b/common/src/main/java/net/william278/huskhomes/position/Home.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.position; import net.william278.huskhomes.user.User; diff --git a/common/src/main/java/net/william278/huskhomes/position/Location.java b/common/src/main/java/net/william278/huskhomes/position/Location.java index 0a92c1fc..3f54a390 100644 --- a/common/src/main/java/net/william278/huskhomes/position/Location.java +++ b/common/src/main/java/net/william278/huskhomes/position/Location.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.position; import com.google.gson.annotations.Expose; diff --git a/common/src/main/java/net/william278/huskhomes/position/Position.java b/common/src/main/java/net/william278/huskhomes/position/Position.java index c2b7e2c8..e143cd86 100644 --- a/common/src/main/java/net/william278/huskhomes/position/Position.java +++ b/common/src/main/java/net/william278/huskhomes/position/Position.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.position; import com.google.gson.annotations.Expose; diff --git a/common/src/main/java/net/william278/huskhomes/position/PositionMeta.java b/common/src/main/java/net/william278/huskhomes/position/PositionMeta.java index 1d6559c4..47363b2b 100644 --- a/common/src/main/java/net/william278/huskhomes/position/PositionMeta.java +++ b/common/src/main/java/net/william278/huskhomes/position/PositionMeta.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.position; import com.google.common.reflect.TypeToken; diff --git a/common/src/main/java/net/william278/huskhomes/position/SavedPosition.java b/common/src/main/java/net/william278/huskhomes/position/SavedPosition.java index 4736ba79..ef0567be 100644 --- a/common/src/main/java/net/william278/huskhomes/position/SavedPosition.java +++ b/common/src/main/java/net/william278/huskhomes/position/SavedPosition.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.position; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/position/Warp.java b/common/src/main/java/net/william278/huskhomes/position/Warp.java index d5c2eee4..dcbbac0c 100644 --- a/common/src/main/java/net/william278/huskhomes/position/Warp.java +++ b/common/src/main/java/net/william278/huskhomes/position/Warp.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.position; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/position/World.java b/common/src/main/java/net/william278/huskhomes/position/World.java index de215855..fd5db2bc 100644 --- a/common/src/main/java/net/william278/huskhomes/position/World.java +++ b/common/src/main/java/net/william278/huskhomes/position/World.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.position; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/random/NormalDistributionEngine.java b/common/src/main/java/net/william278/huskhomes/random/NormalDistributionEngine.java index ddaea2ee..956b8879 100644 --- a/common/src/main/java/net/william278/huskhomes/random/NormalDistributionEngine.java +++ b/common/src/main/java/net/william278/huskhomes/random/NormalDistributionEngine.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.random; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/random/RandomTeleportEngine.java b/common/src/main/java/net/william278/huskhomes/random/RandomTeleportEngine.java index 35048f88..d281505d 100644 --- a/common/src/main/java/net/william278/huskhomes/random/RandomTeleportEngine.java +++ b/common/src/main/java/net/william278/huskhomes/random/RandomTeleportEngine.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.random; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/teleport/Target.java b/common/src/main/java/net/william278/huskhomes/teleport/Target.java index f9ce8279..a5eda39b 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/Target.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/Target.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java b/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java index b45a133e..ac9cb755 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/Teleport.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import net.william278.huskhomes.HuskHomes; @@ -9,12 +28,12 @@ import net.william278.huskhomes.network.Message; import net.william278.huskhomes.network.Payload; import net.william278.huskhomes.position.Position; import net.william278.huskhomes.user.OnlineUser; +import net.william278.huskhomes.util.ThrowingConsumer; import org.jetbrains.annotations.NotNull; import java.util.Arrays; import java.util.List; import java.util.Optional; -import java.util.function.Consumer; public class Teleport { @@ -146,7 +165,7 @@ public class Teleport { } // Fire the teleport event - private void fireEvent(@NotNull Consumer afterFired) { + private void fireEvent(@NotNull ThrowingConsumer afterFired) { plugin.fireEvent(plugin.getTeleportEvent(this), afterFired); } diff --git a/common/src/main/java/net/william278/huskhomes/teleport/TeleportBuilder.java b/common/src/main/java/net/william278/huskhomes/teleport/TeleportBuilder.java index 441cb674..fe1a9b6f 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/TeleportBuilder.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/TeleportBuilder.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java b/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java index e5efd864..b379cad5 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/TeleportRequest.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import com.google.gson.annotations.Expose; diff --git a/common/src/main/java/net/william278/huskhomes/teleport/Teleportable.java b/common/src/main/java/net/william278/huskhomes/teleport/Teleportable.java index ed641a3c..759b38bb 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/Teleportable.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/Teleportable.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/teleport/TeleportationException.java b/common/src/main/java/net/william278/huskhomes/teleport/TeleportationException.java index b6667fe4..8ed14812 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/TeleportationException.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/TeleportationException.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/teleport/TimedTeleport.java b/common/src/main/java/net/william278/huskhomes/teleport/TimedTeleport.java index 8a3ec721..cedf12b9 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/TimedTeleport.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/TimedTeleport.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/teleport/Username.java b/common/src/main/java/net/william278/huskhomes/teleport/Username.java index 5a1abcdc..646e61e5 100644 --- a/common/src/main/java/net/william278/huskhomes/teleport/Username.java +++ b/common/src/main/java/net/william278/huskhomes/teleport/Username.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.teleport; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/user/CommandUser.java b/common/src/main/java/net/william278/huskhomes/user/CommandUser.java index f647889f..499b1f8b 100644 --- a/common/src/main/java/net/william278/huskhomes/user/CommandUser.java +++ b/common/src/main/java/net/william278/huskhomes/user/CommandUser.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.user; import de.themoep.minedown.adventure.MineDown; diff --git a/common/src/main/java/net/william278/huskhomes/user/ConsoleUser.java b/common/src/main/java/net/william278/huskhomes/user/ConsoleUser.java index 6c89f2d2..f7fbf389 100644 --- a/common/src/main/java/net/william278/huskhomes/user/ConsoleUser.java +++ b/common/src/main/java/net/william278/huskhomes/user/ConsoleUser.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.user; import net.kyori.adventure.audience.Audience; diff --git a/common/src/main/java/net/william278/huskhomes/user/OnlineUser.java b/common/src/main/java/net/william278/huskhomes/user/OnlineUser.java index be456189..7c017c99 100644 --- a/common/src/main/java/net/william278/huskhomes/user/OnlineUser.java +++ b/common/src/main/java/net/william278/huskhomes/user/OnlineUser.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.user; import de.themoep.minedown.adventure.MineDown; @@ -247,7 +266,8 @@ public abstract class OnlineUser extends User implements Teleportable, CommandUs * @param nodePrefix the prefix of the permission nodes to get * @return a list of numbers from the prefixed permission nodes, sorted by size */ - private List getNumericalPermissions(@NotNull String nodePrefix) { + @NotNull + protected List getNumericalPermissions(@NotNull String nodePrefix) { return getPermissions().entrySet().stream() .filter(Map.Entry::getValue) .filter(permission -> permission.getKey().startsWith(nodePrefix)) diff --git a/common/src/main/java/net/william278/huskhomes/user/SavedUser.java b/common/src/main/java/net/william278/huskhomes/user/SavedUser.java index d02d8b78..d480393b 100644 --- a/common/src/main/java/net/william278/huskhomes/user/SavedUser.java +++ b/common/src/main/java/net/william278/huskhomes/user/SavedUser.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.user; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/user/User.java b/common/src/main/java/net/william278/huskhomes/user/User.java index 74fb27bf..75f30d54 100644 --- a/common/src/main/java/net/william278/huskhomes/user/User.java +++ b/common/src/main/java/net/william278/huskhomes/user/User.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.user; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java b/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java index 6ed6871c..07998827 100644 --- a/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java +++ b/common/src/main/java/net/william278/huskhomes/util/TaskRunner.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.util; import net.william278.huskhomes.HuskHomes; @@ -9,9 +28,9 @@ import java.util.function.Supplier; public interface TaskRunner { int runAsync(@NotNull Runnable runnable); CompletableFuture supplyAsync(@NotNull Supplier supplier); - int runSync(@NotNull Runnable runnable); + void runSync(@NotNull Runnable runnable); int runAsyncRepeating(@NotNull Runnable runnable, long delay); - int runLater(@NotNull Runnable runnable, long delay); + void runLater(@NotNull Runnable runnable, long delay); void cancelTask(int taskId); void cancelAllTasks(); @NotNull diff --git a/common/src/main/java/net/william278/huskhomes/util/ThrowingConsumer.java b/common/src/main/java/net/william278/huskhomes/util/ThrowingConsumer.java index fd3084d1..6bf00eb7 100644 --- a/common/src/main/java/net/william278/huskhomes/util/ThrowingConsumer.java +++ b/common/src/main/java/net/william278/huskhomes/util/ThrowingConsumer.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.util; import java.util.function.Consumer; diff --git a/common/src/main/java/net/william278/huskhomes/util/UnsafeBlocks.java b/common/src/main/java/net/william278/huskhomes/util/UnsafeBlocks.java index d7049908..3bad9182 100644 --- a/common/src/main/java/net/william278/huskhomes/util/UnsafeBlocks.java +++ b/common/src/main/java/net/william278/huskhomes/util/UnsafeBlocks.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.util; import net.kyori.adventure.key.Key; diff --git a/common/src/main/java/net/william278/huskhomes/util/ValidationException.java b/common/src/main/java/net/william278/huskhomes/util/ValidationException.java index cea9f389..9cbf422c 100644 --- a/common/src/main/java/net/william278/huskhomes/util/ValidationException.java +++ b/common/src/main/java/net/william278/huskhomes/util/ValidationException.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.util; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/main/java/net/william278/huskhomes/util/Validator.java b/common/src/main/java/net/william278/huskhomes/util/Validator.java index e3aea16f..17163cdd 100644 --- a/common/src/main/java/net/william278/huskhomes/util/Validator.java +++ b/common/src/main/java/net/william278/huskhomes/util/Validator.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.util; import net.william278.huskhomes.HuskHomes; diff --git a/common/src/test/java/net/william278/huskhomes/config/LocalesTests.java b/common/src/test/java/net/william278/huskhomes/config/LocalesTests.java index 87436770..e181547e 100644 --- a/common/src/test/java/net/william278/huskhomes/config/LocalesTests.java +++ b/common/src/test/java/net/william278/huskhomes/config/LocalesTests.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.config; import net.william278.annotaml.Annotaml; diff --git a/common/src/test/java/net/william278/huskhomes/hook/PlanDataExtensionTests.java b/common/src/test/java/net/william278/huskhomes/hook/PlanDataExtensionTests.java index 2cfef0bf..0e4d915d 100644 --- a/common/src/test/java/net/william278/huskhomes/hook/PlanDataExtensionTests.java +++ b/common/src/test/java/net/william278/huskhomes/hook/PlanDataExtensionTests.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import com.djrapitops.plan.extension.extractor.ExtensionExtractor; diff --git a/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java b/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java index 5dfdaaa5..aa307a57 100644 --- a/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java +++ b/common/src/test/java/net/william278/huskhomes/network/MessageSerializationTests.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.network; import com.google.gson.Gson; diff --git a/common/src/test/java/net/william278/huskhomes/random/NormalDistributionTests.java b/common/src/test/java/net/william278/huskhomes/random/NormalDistributionTests.java index 475bec7b..115edf8b 100644 --- a/common/src/test/java/net/william278/huskhomes/random/NormalDistributionTests.java +++ b/common/src/test/java/net/william278/huskhomes/random/NormalDistributionTests.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.random; import com.github.plot.Plot; diff --git a/fabric/build.gradle b/fabric/build.gradle new file mode 100644 index 00000000..78b3a7b9 --- /dev/null +++ b/fabric/build.gradle @@ -0,0 +1,69 @@ +plugins { + id 'fabric-loom' version '1.1-SNAPSHOT' +} + +apply plugin: 'fabric-loom' +loom.serverOnlyMinecraftJar() + +dependencies { + minecraft 'com.mojang:minecraft:1.19.4' + mappings 'net.fabricmc:yarn:1.19.4+build.2' + modImplementation 'net.fabricmc:fabric-loader:0.14.19' + + // Fabric API modules + Set fabricApiModules = [ + 'fabric-api-base', + 'fabric-lifecycle-events-v1', + 'fabric-entity-events-v1', + 'fabric-command-api-v2', + 'fabric-networking-api-v1' + ] + fabricApiModules.forEach { + modImplementation(fabricApi.module(it, '0.77.0+1.19.4')) + } + modImplementation include('net.kyori:adventure-platform-fabric:5.8.0') + modImplementation include('me.lucko:fabric-permissions-api:0.2-SNAPSHOT') + + implementation include('redis.clients:jedis:' + jedis_version) + implementation include('com.mysql:mysql-connector-j:' + mysql_driver_version) + implementation include('org.xerial:sqlite-jdbc:' + sqlite_driver_version) + + compileOnly 'org.jetbrains:annotations:24.0.1' + + shadow project(path: ":common") +} + +shadowJar { + configurations = [project.configurations.shadow] + destinationDirectory.set(file("$projectDir/build/libs")) + + exclude('net.fabricmc:.*') + exclude('net.kyori:.*') + exclude '/mappings/*' + + relocate 'org.apache.commons.io', 'net.william278.huskhomes.libraries.commons.io' + relocate 'org.apache.commons.text', 'net.william278.huskhomes.libraries.commons.text' + relocate 'org.apache.commons.lang3', 'net.william278.huskhomes.libraries.commons.lang3' + relocate 'de.themoep', 'net.william278.huskhomes.libraries' + relocate 'org.jetbrains', 'net.william278.huskhomes.libraries' + relocate 'org.intellij', 'net.william278.huskhomes.libraries' + relocate 'com.zaxxer', 'net.william278.huskhomes.libraries' + relocate 'net.william278.annotaml', 'net.william278.huskhomes.libraries.annotaml' + relocate 'net.william278.paginedown', 'net.william278.huskhomes.libraries.paginedown' + relocate 'net.william278.desertwell', 'net.william278.huskhomes.libraries.desertwell' + relocate 'dev.dejvokep.boostedyaml', 'net.william278.huskhomes.libraries.boostedyaml' + relocate 'org.yaml.snakeyaml', 'net.william278.huskhomes.libraries.snakeyaml' + relocate 'com.google.gson', 'net.william278.huskhomes.libraries.gson' +} + +remapJar { + dependsOn tasks.shadowJar + mustRunAfter tasks.shadowJar + inputFile = shadowJar.archiveFile.get() + addNestedDependencies = true + + destinationDirectory.set(file("$rootDir/target/")) + archiveClassifier.set('') +} + +shadowJar.finalizedBy(remapJar) \ No newline at end of file diff --git a/fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java b/fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java new file mode 100644 index 00000000..7a6b42a6 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/FabricHuskHomes.java @@ -0,0 +1,479 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes; + +import net.fabricmc.api.DedicatedServerModInitializer; +import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; +import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; +import net.fabricmc.fabric.api.networking.v1.PacketSender; +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; +import net.fabricmc.loader.api.FabricLoader; +import net.fabricmc.loader.api.ModContainer; +import net.kyori.adventure.platform.fabric.FabricServerAudiences; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.network.ServerPlayNetworkHandler; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; +import net.william278.annotaml.Annotaml; +import net.william278.desertwell.Version; +import net.william278.huskhomes.command.Command; +import net.william278.huskhomes.command.FabricCommand; +import net.william278.huskhomes.config.Locales; +import net.william278.huskhomes.config.Server; +import net.william278.huskhomes.config.Settings; +import net.william278.huskhomes.config.Spawn; +import net.william278.huskhomes.database.Database; +import net.william278.huskhomes.database.MySqlDatabase; +import net.william278.huskhomes.database.SqLiteDatabase; +import net.william278.huskhomes.event.FabricEventDispatcher; +import net.william278.huskhomes.hook.Hook; +import net.william278.huskhomes.listener.EventListener; +import net.william278.huskhomes.listener.FabricEventListener; +import net.william278.huskhomes.manager.Manager; +import net.william278.huskhomes.network.Broker; +import net.william278.huskhomes.network.PluginMessageBroker; +import net.william278.huskhomes.network.RedisBroker; +import net.william278.huskhomes.position.Location; +import net.william278.huskhomes.position.World; +import net.william278.huskhomes.random.NormalDistributionEngine; +import net.william278.huskhomes.random.RandomTeleportEngine; +import net.william278.huskhomes.user.ConsoleUser; +import net.william278.huskhomes.user.FabricUser; +import net.william278.huskhomes.user.OnlineUser; +import net.william278.huskhomes.user.SavedUser; +import net.william278.huskhomes.util.FabricTaskRunner; +import net.william278.huskhomes.util.UnsafeBlocks; +import net.william278.huskhomes.util.Validator; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.spi.LoggingEventBuilder; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.nio.file.Files; +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.logging.Level; +import java.util.stream.Collectors; + +public class FabricHuskHomes implements DedicatedServerModInitializer, HuskHomes, + FabricTaskRunner, FabricEventDispatcher, ServerPlayNetworking.PlayChannelHandler { + + public static final Logger LOGGER = LoggerFactory.getLogger("HuskHomes"); + private static FabricHuskHomes instance; + + @NotNull + public static FabricHuskHomes getInstance() { + return instance; + } + + private final ModContainer modContainer = FabricLoader.getInstance() + .getModContainer("huskhomes").orElseThrow(() -> new RuntimeException("Failed to get Mod Container")); + private MinecraftServer minecraftServer; + private Map permissions; + private Set savedUsers; + private Settings settings; + private Locales locales; + private Database database; + private Validator validator; + private Manager manager; + private EventListener eventListener; + private RandomTeleportEngine randomTeleportEngine; + private Spawn serverSpawn; + private UnsafeBlocks unsafeBlocks; + private List hooks; + private List commands; + private Map> globalPlayerList; + private Set currentlyOnWarmup; + private Server server; + @Nullable + private Broker broker; + private FabricServerAudiences audiences; + + @Override + public void onInitializeServer() { + // Set instance + instance = this; + + // Get plugin version from mod container + this.permissions = new HashMap<>(); + this.savedUsers = new HashSet<>(); + this.globalPlayerList = new HashMap<>(); + this.currentlyOnWarmup = new HashSet<>(); + this.validator = new Validator(this); + + // Load settings and locales + initialize("plugin config & locale files", (plugin) -> { + if (!loadConfigs()) { + throw new IllegalStateException("Failed to load config files. Please check the console for errors"); + } + }); + + // Pre-register commands + initialize("commands", (plugin) -> this.commands = registerCommands()); + + ServerLifecycleEvents.SERVER_STARTING.register(server -> { + this.minecraftServer = server; + this.onEnable(); + }); + ServerLifecycleEvents.SERVER_STOPPING.register(server -> this.onDisable()); + } + + private void onEnable() { + // Create adventure audience + this.audiences = FabricServerAudiences.of(minecraftServer); + + // Initialize the database + initialize(getSettings().getDatabaseType().getDisplayName() + " database connection", (plugin) -> { + this.database = switch (getSettings().getDatabaseType()) { + case MYSQL -> new MySqlDatabase(this); + case SQLITE -> new SqLiteDatabase(this); + }; + + database.initialize(); + }); + + // Initialize the manager + this.manager = new Manager(this); + + // Initialize the network messenger if proxy mode is enabled + if (getSettings().doCrossServer()) { + initialize(settings.getBrokerType().getDisplayName() + " message broker", (plugin) -> { + broker = switch (settings.getBrokerType()) { + case PLUGIN_MESSAGE -> new PluginMessageBroker(this); + case REDIS -> new RedisBroker(this); + }; + broker.initialize(); + }); + } + + setRandomTeleportEngine(new NormalDistributionEngine(this)); + + // Register plugin hooks (Economy, Maps, Plan) + initialize("hooks", (plugin) -> { + this.registerHooks(); + + if (hooks.size() > 0) { + hooks.forEach(Hook::initialize); + log(Level.INFO, "Registered " + hooks.size() + " mod hooks: " + hooks.stream() + .map(Hook::getName) + .collect(Collectors.joining(", "))); + } + }); + + // Register events + initialize("events", (plugin) -> this.eventListener = new FabricEventListener(this)); + + this.checkForUpdates(); + } + + private void onDisable() { + if (this.eventListener != null) { + this.eventListener.handlePluginDisable(); + } + if (database != null) { + database.terminate(); + } + if (broker != null) { + broker.close(); + } + if (audiences != null) { + audiences.close(); + audiences = null; + } + cancelAllTasks(); + } + + @Override + @NotNull + public ConsoleUser getConsole() { + return new ConsoleUser(audiences.console()); + } + + @Override + @NotNull + public List getOnlineUsers() { + return minecraftServer.getPlayerManager().getPlayerList() + .stream().map(user -> (OnlineUser) FabricUser.adapt(this, user)) + .toList(); + } + + @Override + @NotNull + public Set getSavedUsers() { + return savedUsers; + } + + @Override + @NotNull + public Settings getSettings() { + return settings; + } + + @Override + public void setSettings(@NotNull Settings settings) { + this.settings = settings; + } + + @Override + @NotNull + public Locales getLocales() { + return locales; + } + + @Override + public void setLocales(@NotNull Locales locales) { + this.locales = locales; + } + + @Override + public Optional getServerSpawn() { + return Optional.ofNullable(serverSpawn); + } + + @Override + public void setServerSpawn(@NotNull Spawn spawn) { + this.serverSpawn = spawn; + } + + @Override + @NotNull + public String getServerName() { + return server.getName(); + } + + @Override + public void setServer(@NotNull Server server) { + this.server = server; + } + + @Override + public void setUnsafeBlocks(@NotNull UnsafeBlocks unsafeBlocks) { + this.unsafeBlocks = unsafeBlocks; + } + + @Override + @NotNull + public Database getDatabase() { + return database; + } + + @Override + @NotNull + public Validator getValidator() { + return validator; + } + + @Override + @NotNull + public Manager getManager() { + return manager; + } + + @Override + @NotNull + public Broker getMessenger() { + if (broker == null) { + throw new IllegalStateException("Attempted to access message broker when it was not initialized"); + } + return broker; + } + + @Override + @NotNull + public RandomTeleportEngine getRandomTeleportEngine() { + return randomTeleportEngine; + } + + @Override + public void setRandomTeleportEngine(@NotNull RandomTeleportEngine randomTeleportEngine) { + this.randomTeleportEngine = randomTeleportEngine; + } + + @Override + public void setServerSpawn(@NotNull Location location) { + try { + this.serverSpawn = Annotaml.create(new File(getDataFolder(), "spawn.yml"), new Spawn(location)).get(); + + // Update the world spawn location, too + minecraftServer.getWorlds().forEach(world -> { + if (world.getRegistryKey().getValue().asString().equals(location.getWorld().getName())) { + world.setSpawnPos(BlockPos.ofFloored(location.getX(), location.getY(), location.getZ()), 0); + } + }); + } catch (IOException | InvocationTargetException | InstantiationException | IllegalAccessException e) { + log(Level.WARNING, "Failed to save the server spawn.yml file", e); + } + } + + @Override + @NotNull + public List getHooks() { + return hooks; + } + + @Override + public void setHooks(@NotNull List hooks) { + this.hooks = hooks; + } + + @Override + public CompletableFuture> findSafeGroundLocation(@NotNull Location location) { + return CompletableFuture.completedFuture(Optional.of(location)); //todo + } + + @Override + @Nullable + public InputStream getResource(@NotNull String name) { + return this.modContainer.findPath(name) + .map(path -> { + try { + return Files.newInputStream(path); + } catch (IOException e) { + log(Level.WARNING, "Failed to load resource: " + name, e); + } + return null; + }) + .orElse(this.getClass().getClassLoader().getResourceAsStream(name)); + } + + @Override + @NotNull + public File getDataFolder() { + return FabricLoader.getInstance().getConfigDir().resolve("huskhomes").toFile(); + } + + @Override + @NotNull + public List getWorlds() { + final List worlds = new ArrayList<>(); + minecraftServer.getWorlds().forEach(world -> worlds.add(World.from( + world.getRegistryKey().getValue().asString(), + UUID.nameUUIDFromBytes(world.getRegistryKey().getValue().asString().getBytes()) + ))); + return worlds; + } + + @Override + @NotNull + public Version getVersion() { + return Version.fromString(modContainer.getMetadata().getVersion().getFriendlyString(), "-"); + } + + @Override + @NotNull + public List getCommands() { + return commands; + } + + @Override + @NotNull + public List registerCommands() { + final List commands = Arrays.stream(FabricCommand.Type.values()) + .map(FabricCommand.Type::getCommand) + .filter(command -> !settings.isCommandDisabled(command)) + .toList(); + + CommandRegistrationCallback.EVENT.register((dispatcher, ignored, ignored2) -> + commands.forEach(command -> new FabricCommand(command, this).register(dispatcher))); + + return commands; + } + + @Override + public boolean isDependencyLoaded(@NotNull String name) { + return FabricLoader.getInstance().isModLoaded(name); + } + + @Override + @NotNull + public Map> getGlobalPlayerList() { + return globalPlayerList; + } + + @Override + @NotNull + public Set getCurrentlyOnWarmup() { + return currentlyOnWarmup; + } + + @Override + public boolean isBlockUnsafe(@NotNull String blockId) { + return unsafeBlocks.isUnsafe(blockId); + } + + @Override + public void registerMetrics(int metricsId) { + // No metrics for Fabric + } + + @Override + public void initializePluginChannels() { + ServerPlayNetworking.registerGlobalReceiver(new Identifier("bungeecord", "main"), this); + } + + // When a plugin message is received by the server + @Override + public void receive(@NotNull MinecraftServer server, @NotNull ServerPlayerEntity player, + @NotNull ServerPlayNetworkHandler handler, @NotNull PacketByteBuf buf, @NotNull PacketSender responseSender) { + if (broker != null && broker instanceof PluginMessageBroker pluginMessenger + && getSettings().getBrokerType() == Broker.Type.PLUGIN_MESSAGE) { + pluginMessenger.onReceive(PluginMessageBroker.BUNGEE_CHANNEL_ID, FabricUser.adapt(this, player), buf.readByteArray()); + } + } + + @Override + public void log(@NotNull Level level, @NotNull String message, @NotNull Throwable... exceptions) { + LoggingEventBuilder logEvent = LOGGER.makeLoggingEventBuilder( + switch (level.getName()) { + case "WARNING" -> org.slf4j.event.Level.WARN; + case "SEVERE" -> org.slf4j.event.Level.ERROR; + default -> org.slf4j.event.Level.INFO; + } + ); + if (exceptions.length >= 1) { + logEvent = logEvent.setCause(exceptions[0]); + } + logEvent.log(message); + } + + @NotNull + public Map getPermissions() { + return permissions; + } + + @NotNull + public MinecraftServer getMinecraftServer() { + return minecraftServer; + } + + @Override + @NotNull + public FabricHuskHomes getPlugin() { + return this; + } + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/command/FabricCommand.java b/fabric/src/main/java/net/william278/huskhomes/command/FabricCommand.java new file mode 100644 index 00000000..9987cfea --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/command/FabricCommand.java @@ -0,0 +1,162 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.command; + +import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.builder.LiteralArgumentBuilder; +import com.mojang.brigadier.tree.LiteralCommandNode; +import me.lucko.fabric.api.permissions.v0.PermissionCheckEvent; +import me.lucko.fabric.api.permissions.v0.Permissions; +import net.fabricmc.fabric.api.util.TriState; +import net.minecraft.server.command.ServerCommandSource; +import net.minecraft.server.network.ServerPlayerEntity; +import net.william278.huskhomes.FabricHuskHomes; +import net.william278.huskhomes.teleport.TeleportRequest; +import net.william278.huskhomes.user.CommandUser; +import net.william278.huskhomes.user.FabricUser; +import org.jetbrains.annotations.NotNull; + +import java.util.Map; + +import static com.mojang.brigadier.arguments.StringArgumentType.greedyString; +import static net.minecraft.server.command.CommandManager.argument; +import static net.minecraft.server.command.CommandManager.literal; + +public class FabricCommand { + + private final FabricHuskHomes plugin; + private final Command command; + + public FabricCommand(@NotNull Command command, @NotNull FabricHuskHomes plugin) { + this.command = command; + this.plugin = plugin; + } + + public void register(@NotNull CommandDispatcher dispatcher) { + // Register brigadier command + final LiteralArgumentBuilder builder = literal(command.getName()) + .requires(Permissions.require(command.getPermission(), command.isOperatorCommand() ? 3 : 0)) + .executes(getBrigadierExecutor()); + plugin.getPermissions().put(command.getPermission(), command.isOperatorCommand()); + if (!command.getRawUsage().isBlank()) { + builder.then(argument(command.getRawUsage().replaceAll("[<>\\[\\]]", ""), greedyString()) + .executes(getBrigadierExecutor()) + .suggests(getBrigadierSuggester())); + } + + // Register additional permissions + final Map permissions = command.getAdditionalPermissions(); + permissions.forEach((permission, isOp) -> plugin.getPermissions().put(permission, isOp)); + PermissionCheckEvent.EVENT.register((player, node) -> { + if (permissions.containsKey(node) && permissions.get(node) && player.hasPermissionLevel(3)) { + return TriState.TRUE; + } + return TriState.DEFAULT; + }); + + // Register aliases + final LiteralCommandNode node = dispatcher.register(builder); + dispatcher.register(literal("huskhomes:" + command.getName()).executes(getBrigadierExecutor()).redirect(node)); + command.getAliases().forEach(alias -> dispatcher.register(literal(alias).executes(getBrigadierExecutor()).redirect(node))); + } + + private com.mojang.brigadier.Command getBrigadierExecutor() { + return (context) -> { + command.onExecuted( + resolveExecutor(context.getSource()), + command.removeFirstArg(context.getInput().split(" ")) + ); + return 1; + }; + } + + private com.mojang.brigadier.suggestion.SuggestionProvider getBrigadierSuggester() { + if (!(command instanceof TabProvider provider)) { + return (context, builder) -> com.mojang.brigadier.suggestion.Suggestions.empty(); + } + return (context, builder) -> { + final String[] args = command.removeFirstArg(context.getInput().split(" ")); + provider.getSuggestions(resolveExecutor(context.getSource()), args).stream() + .map(suggestion -> { + final String completedArgs = String.join(" ", args); + int lastIndex = completedArgs.lastIndexOf(" "); + if (lastIndex == -1) { + return suggestion; + } + return completedArgs.substring(0, lastIndex + 1) + suggestion; + }) + .forEach(builder::suggest); + return builder.buildFuture(); + }; + } + + private CommandUser resolveExecutor(@NotNull ServerCommandSource source) { + if (source.getEntity() instanceof ServerPlayerEntity player) { + return FabricUser.adapt(plugin, player); + } + return plugin.getConsole(); + } + + + /** + * Commands available on the Fabric HuskHomes implementation + */ + public enum Type { + HOME_COMMAND(new PrivateHomeCommand(FabricHuskHomes.getInstance())), + SET_HOME_COMMAND(new SetHomeCommand(FabricHuskHomes.getInstance())), + HOME_LIST_COMMAND(new PrivateHomeListCommand(FabricHuskHomes.getInstance())), + DEL_HOME_COMMAND(new DelHomeCommand(FabricHuskHomes.getInstance())), + EDIT_HOME_COMMAND(new EditHomeCommand(FabricHuskHomes.getInstance())), + PUBLIC_HOME_COMMAND(new PublicHomeCommand(FabricHuskHomes.getInstance())), + PUBLIC_HOME_LIST_COMMAND(new PublicHomeListCommand(FabricHuskHomes.getInstance())), + WARP_COMMAND(new WarpCommand(FabricHuskHomes.getInstance())), + SET_WARP_COMMAND(new SetWarpCommand(FabricHuskHomes.getInstance())), + WARP_LIST_COMMAND(new WarpListCommand(FabricHuskHomes.getInstance())), + DEL_WARP_COMMAND(new DelWarpCommand(FabricHuskHomes.getInstance())), + EDIT_WARP_COMMAND(new EditWarpCommand(FabricHuskHomes.getInstance())), + TP_COMMAND(new TpCommand(FabricHuskHomes.getInstance())), + TP_HERE_COMMAND(new TpHereCommand(FabricHuskHomes.getInstance())), + TPA_COMMAND(new TeleportRequestCommand(FabricHuskHomes.getInstance(), TeleportRequest.Type.TPA)), + TPA_HERE_COMMAND(new TeleportRequestCommand(FabricHuskHomes.getInstance(), TeleportRequest.Type.TPA_HERE)), + TPACCEPT_COMMAND(new TpRespondCommand(FabricHuskHomes.getInstance(), true)), + TPDECLINE_COMMAND(new TpRespondCommand(FabricHuskHomes.getInstance(), false)), + RTP_COMMAND(new RtpCommand(FabricHuskHomes.getInstance())), + TP_IGNORE_COMMAND(new TpIgnoreCommand(FabricHuskHomes.getInstance())), + TP_OFFLINE_COMMAND(new TpOfflineCommand(FabricHuskHomes.getInstance())), + TP_ALL_COMMAND(new TpAllCommand(FabricHuskHomes.getInstance())), + TPA_ALL_COMMAND(new TpaAllCommand(FabricHuskHomes.getInstance())), + SPAWN_COMMAND(new SpawnCommand(FabricHuskHomes.getInstance())), + SET_SPAWN_COMMAND(new SetSpawnCommand(FabricHuskHomes.getInstance())), + BACK_COMMAND(new BackCommand(FabricHuskHomes.getInstance())), + HUSKHOMES_COMMAND(new HuskHomesCommand(FabricHuskHomes.getInstance())); + + private final Command command; + + Type(@NotNull Command command) { + this.command = command; + } + + @NotNull + public Command getCommand() { + return command; + } + } + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/DeleteAllHomesCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/DeleteAllHomesCallback.java new file mode 100644 index 00000000..f84f238d --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/DeleteAllHomesCallback.java @@ -0,0 +1,82 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.user.CommandUser; +import net.william278.huskhomes.user.User; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface DeleteAllHomesCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(DeleteAllHomesCallback.class, + (listeners) -> (event) -> { + for (DeleteAllHomesCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (owner, deleter) -> + new IDeleteAllHomesEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public User getHomeOwner() { + return owner; + } + + @Override + @NotNull + public CommandUser getDeleter() { + return deleter; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsCallback.java new file mode 100644 index 00000000..78945be9 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/DeleteAllWarpsCallback.java @@ -0,0 +1,75 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.user.CommandUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.Function; + +public interface DeleteAllWarpsCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(DeleteAllWarpsCallback.class, + (listeners) -> (event) -> { + for (DeleteAllWarpsCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + Function SUPPLIER = (deleter) -> + new IDeleteAllWarpsEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public CommandUser getDeleter() { + return deleter; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/FabricEventCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/FabricEventCallback.java new file mode 100644 index 00000000..ef0c3a7f --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/FabricEventCallback.java @@ -0,0 +1,31 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.minecraft.util.ActionResult; +import org.jetbrains.annotations.NotNull; + +public interface FabricEventCallback { + + @NotNull + ActionResult invoke(@NotNull E event); + + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/FabricEventDispatcher.java b/fabric/src/main/java/net/william278/huskhomes/event/FabricEventDispatcher.java new file mode 100644 index 00000000..f377bb03 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/FabricEventDispatcher.java @@ -0,0 +1,138 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.FabricHuskHomes; +import net.william278.huskhomes.position.Home; +import net.william278.huskhomes.position.Position; +import net.william278.huskhomes.position.Warp; +import net.william278.huskhomes.teleport.Teleport; +import net.william278.huskhomes.teleport.TeleportRequest; +import net.william278.huskhomes.teleport.TimedTeleport; +import net.william278.huskhomes.user.CommandUser; +import net.william278.huskhomes.user.OnlineUser; +import net.william278.huskhomes.user.User; +import org.jetbrains.annotations.NotNull; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.List; +import java.util.logging.Level; + +public interface FabricEventDispatcher extends EventDispatcher { + + @SuppressWarnings("unchecked") + @Override + default boolean fireIsCancelled(@NotNull T event) { + try { + final Method field = event.getClass().getDeclaredMethod("getEvent"); + field.setAccessible(true); + + net.fabricmc.fabric.api.event.Event fabricEvent = (net.fabricmc.fabric.api.event.Event) field.invoke(event); + + final FabricEventCallback invoker = (FabricEventCallback) fabricEvent.invoker(); + return invoker.invoke(event) == ActionResult.FAIL; + } catch (InvocationTargetException | NoSuchMethodException | IllegalAccessException e) { + getPlugin().log(Level.WARNING, "Failed to fire event (" + event.getClass().getName() + ")", e); + return false; + } + } + + @Override + default ITeleportEvent getTeleportEvent(@NotNull Teleport teleport) { + return TeleportCallback.SUPPLIER.apply(teleport); + } + + @Override + default ITeleportWarmupEvent getTeleportWarmupEvent(@NotNull TimedTeleport teleport, int duration) { + return TeleportWarmupCallback.SUPPLIER.apply(teleport, duration); + } + + @Override + default ISendTeleportRequestEvent getSendTeleportRequestEvent(@NotNull OnlineUser sender, @NotNull TeleportRequest request) { + return SendTeleportRequestCallback.SUPPLIER.apply(sender, request); + } + + @Override + default IReceiveTeleportRequestEvent getReceiveTeleportRequestEvent(@NotNull OnlineUser recipient, @NotNull TeleportRequest request) { + return ReceiveTeleportRequestCallback.SUPPLIER.apply(recipient, request); + } + + @Override + default IReplyTeleportRequestEvent getReplyTeleportRequestEvent(@NotNull OnlineUser recipient, @NotNull TeleportRequest request) { + return ReplyTeleportRequestCallback.SUPPLIER.apply(recipient, request); + } + + @Override + default IHomeCreateEvent getHomeCreateEvent(@NotNull User owner, @NotNull String name, @NotNull Position position, @NotNull CommandUser creator) { + return HomeCreateCallback.SUPPLIER.apply(owner, name, position, creator); + } + + @Override + default IHomeEditEvent getHomeEditEvent(@NotNull Home home, @NotNull CommandUser editor) { + return HomeEditCallback.SUPPLIER.apply(home, editor); + } + + @Override + default IHomeDeleteEvent getHomeDeleteEvent(@NotNull Home home, @NotNull CommandUser deleter) { + return HomeDeleteCallback.SUPPLIER.apply(home, deleter); + } + + @Override + default IWarpCreateEvent getWarpCreateEvent(@NotNull String name, @NotNull Position position, @NotNull CommandUser creator) { + return WarpCreateCallback.SUPPLIER.apply(name, position, creator); + } + + @Override + default IWarpEditEvent getWarpEditEvent(@NotNull Warp warp, @NotNull CommandUser editor) { + return WarpEditCallback.SUPPLIER.apply(warp, editor); + } + + @Override + default IWarpDeleteEvent getWarpDeleteEvent(@NotNull Warp warp, @NotNull CommandUser deleter) { + return WarpDeleteCallback.SUPPLIER.apply(warp, deleter); + } + + @Override + default IHomeListEvent getViewHomeListEvent(@NotNull List homes, @NotNull CommandUser listViewer, boolean publicHomeList) { + return HomeListCallback.SUPPLIER.apply(homes, listViewer, publicHomeList); + } + + @Override + default IWarpListEvent getViewWarpListEvent(@NotNull List homes, @NotNull CommandUser listViewer) { + return WarpListCallback.SUPPLIER.apply(homes, listViewer); + } + + @Override + default IDeleteAllHomesEvent getDeleteAllHomesEvent(@NotNull User user, @NotNull CommandUser deleter) { + return DeleteAllHomesCallback.SUPPLIER.apply(user, deleter); + } + + @Override + default IDeleteAllWarpsEvent getDeleteAllWarpsEvent(@NotNull CommandUser deleter) { + return DeleteAllWarpsCallback.SUPPLIER.apply(deleter); + } + + @Override + @NotNull + FabricHuskHomes getPlugin(); + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/HomeCreateCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/HomeCreateCallback.java new file mode 100644 index 00000000..026ad4b3 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/HomeCreateCallback.java @@ -0,0 +1,103 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.data.client.BlockStateVariantMap.QuadFunction; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Position; +import net.william278.huskhomes.user.CommandUser; +import net.william278.huskhomes.user.User; +import org.jetbrains.annotations.NotNull; + +public interface HomeCreateCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(HomeCreateCallback.class, + (listeners) -> (event) -> { + for (HomeCreateCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + QuadFunction SUPPLIER = (user, name, position, creator) -> + new IHomeCreateEvent() { + private boolean cancelled = false; + private String homeName = name; + + @Override + @NotNull + public User getOwner() { + return user; + } + + @Override + @NotNull + public String getName() { + return homeName; + } + + @Override + public void setName(@NotNull String name) { + this.homeName = name; + } + + @Override + @NotNull + public Position getPosition() { + return position; + } + + @Override + public void setPosition(@NotNull Position position) { + } + + @Override + public @NotNull CommandUser getCreator() { + return creator; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/HomeDeleteCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/HomeDeleteCallback.java new file mode 100644 index 00000000..0f479589 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/HomeDeleteCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Home; +import net.william278.huskhomes.user.CommandUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface HomeDeleteCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(HomeDeleteCallback.class, + (listeners) -> (event) -> { + for (HomeDeleteCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (home, deleter) -> + new IHomeDeleteEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public Home getHome() { + return home; + } + + @Override + @NotNull + public CommandUser getDeleter() { + return deleter; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/HomeEditCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/HomeEditCallback.java new file mode 100644 index 00000000..3b28f749 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/HomeEditCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Home; +import net.william278.huskhomes.user.CommandUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface HomeEditCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(HomeEditCallback.class, + (listeners) -> (event) -> { + for (HomeEditCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (home, editor) -> + new IHomeEditEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public Home getHome() { + return home; + } + + @Override + @NotNull + public CommandUser getEditor() { + return editor; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/HomeListCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/HomeListCallback.java new file mode 100644 index 00000000..e89d5cb6 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/HomeListCallback.java @@ -0,0 +1,95 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Home; +import net.william278.huskhomes.user.CommandUser; +import org.apache.commons.lang3.function.TriFunction; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public interface HomeListCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(HomeListCallback.class, + (listeners) -> (event) -> { + for (HomeListCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + TriFunction, CommandUser, Boolean, IHomeListEvent> SUPPLIER = (homes, viewer, publicHomes) -> + new IHomeListEvent() { + private boolean cancelled = false; + private List listHomes = homes; + + @Override + @NotNull + public List getHomes() { + return listHomes; + } + + @Override + public void setHomes(@NotNull List homes) { + this.listHomes = homes; + } + + @Override + @NotNull + public CommandUser getListViewer() { + return viewer; + } + + @Override + public boolean getIsPublicHomeList() { + return publicHomes; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestCallback.java new file mode 100644 index 00000000..a0b4da5a --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/ReceiveTeleportRequestCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.teleport.TeleportRequest; +import net.william278.huskhomes.user.OnlineUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface ReceiveTeleportRequestCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(ReceiveTeleportRequestCallback.class, + (listeners) -> (event) -> { + for (ReceiveTeleportRequestCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (recipient, request) -> + new IReceiveTeleportRequestEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public OnlineUser getRecipient() { + return recipient; + } + + @Override + @NotNull + public TeleportRequest getRequest() { + return request; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestCallback.java new file mode 100644 index 00000000..85dcddb8 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/ReplyTeleportRequestCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.teleport.TeleportRequest; +import net.william278.huskhomes.user.OnlineUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface ReplyTeleportRequestCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(ReplyTeleportRequestCallback.class, + (listeners) -> (event) -> { + for (ReplyTeleportRequestCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (recipient, request) -> + new IReplyTeleportRequestEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public OnlineUser getRecipient() { + return recipient; + } + + @Override + @NotNull + public TeleportRequest getRequest() { + return request; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/SendTeleportRequestCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/SendTeleportRequestCallback.java new file mode 100644 index 00000000..d7fd6505 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/SendTeleportRequestCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.teleport.TeleportRequest; +import net.william278.huskhomes.user.OnlineUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface SendTeleportRequestCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(SendTeleportRequestCallback.class, + (listeners) -> (event) -> { + for (SendTeleportRequestCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (sender, request) -> + new ISendTeleportRequestEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public OnlineUser getSender() { + return sender; + } + + @Override + @NotNull + public TeleportRequest getRequest() { + return request; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/TeleportBackCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/TeleportBackCallback.java new file mode 100644 index 00000000..90a153c6 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/TeleportBackCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Position; +import net.william278.huskhomes.teleport.Teleport; +import org.jetbrains.annotations.NotNull; + +import java.util.function.Function; + +public interface TeleportBackCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(TeleportBackCallback.class, + (listeners) -> (event) -> { + for (TeleportBackCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.FAIL; + } else if (result == ActionResult.FAIL) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + Function SUPPLIER = (teleport) -> + new ITeleportBackEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public Position getLastPosition() { + return (Position) getTeleport().getTarget(); + } + + @Override + @NotNull + public Teleport getTeleport() { + return teleport; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/TeleportCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/TeleportCallback.java new file mode 100644 index 00000000..99a7cc6b --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/TeleportCallback.java @@ -0,0 +1,76 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.teleport.Teleport; +import org.jetbrains.annotations.NotNull; + +import java.util.function.Function; + +public interface TeleportCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(TeleportCallback.class, + (listeners) -> (event) -> { + for (TeleportCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.FAIL; + } else if (result == ActionResult.FAIL) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + Function SUPPLIER = (teleport) -> + new ITeleportEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public Teleport getTeleport() { + return teleport; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/TeleportWarmupCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/TeleportWarmupCallback.java new file mode 100644 index 00000000..c9d6961c --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/TeleportWarmupCallback.java @@ -0,0 +1,79 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.teleport.TimedTeleport; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface TeleportWarmupCallback extends FabricEventCallback { + @NotNull + Event EVENT = EventFactory.createArrayBacked(TeleportWarmupCallback.class, + (listeners) -> (event) -> { + for (TeleportWarmupCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.FAIL; + } else if (result == ActionResult.FAIL) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (timedTeleport, duration) -> + new ITeleportWarmupEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public TimedTeleport getTimedTeleport() { + return timedTeleport; + } + + @Override + public int getWarmupDuration() { + return duration; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/WarpCreateCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/WarpCreateCallback.java new file mode 100644 index 00000000..78b69dc9 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/WarpCreateCallback.java @@ -0,0 +1,98 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Position; +import net.william278.huskhomes.user.CommandUser; +import org.apache.commons.lang3.function.TriFunction; +import org.jetbrains.annotations.NotNull; + +public interface WarpCreateCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(WarpCreateCallback.class, + (listeners) -> (event) -> { + for (WarpCreateCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + TriFunction SUPPLIER = (name, position, creator) -> + new IWarpCreateEvent() { + private boolean cancelled = false; + private String homeName = name; + + @Override + @NotNull + public String getName() { + return homeName; + } + + @Override + public void setName(@NotNull String name) { + this.homeName = name; + } + + @Override + @NotNull + public Position getPosition() { + return position; + } + + @Override + public void setPosition(@NotNull Position position) { + } + + @Override + @NotNull + public CommandUser getCreator() { + return creator; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/WarpDeleteCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/WarpDeleteCallback.java new file mode 100644 index 00000000..cbba72ea --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/WarpDeleteCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Warp; +import net.william278.huskhomes.user.CommandUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface WarpDeleteCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(WarpDeleteCallback.class, + (listeners) -> (event) -> { + for (WarpDeleteCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (warp, deleter) -> + new IWarpDeleteEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public Warp getWarp() { + return warp; + } + + @Override + @NotNull + public CommandUser getDeleter() { + return deleter; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/WarpEditCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/WarpEditCallback.java new file mode 100644 index 00000000..d3291d91 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/WarpEditCallback.java @@ -0,0 +1,83 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Warp; +import net.william278.huskhomes.user.CommandUser; +import org.jetbrains.annotations.NotNull; + +import java.util.function.BiFunction; + +public interface WarpEditCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(WarpEditCallback.class, + (listeners) -> (event) -> { + for (WarpEditCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction SUPPLIER = (warp, editor) -> + new IWarpEditEvent() { + private boolean cancelled = false; + + @Override + @NotNull + public Warp getWarp() { + return warp; + } + + @Override + @NotNull + public CommandUser getEditor() { + return editor; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/event/WarpListCallback.java b/fabric/src/main/java/net/william278/huskhomes/event/WarpListCallback.java new file mode 100644 index 00000000..21f2a55f --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/event/WarpListCallback.java @@ -0,0 +1,90 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.event; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.util.ActionResult; +import net.william278.huskhomes.position.Warp; +import net.william278.huskhomes.user.CommandUser; +import org.jetbrains.annotations.NotNull; + +import java.util.List; +import java.util.function.BiFunction; + +public interface WarpListCallback extends FabricEventCallback { + + @NotNull + Event EVENT = EventFactory.createArrayBacked(WarpListCallback.class, + (listeners) -> (event) -> { + for (WarpListCallback listener : listeners) { + final ActionResult result = listener.invoke(event); + if (event.isCancelled()) { + return ActionResult.CONSUME; + } else if (result != ActionResult.PASS) { + event.setCancelled(true); + return result; + } + } + + return ActionResult.PASS; + }); + + @NotNull + BiFunction, CommandUser, IWarpListEvent> SUPPLIER = (warps, viewer) -> + new IWarpListEvent() { + private boolean cancelled = false; + private List listWarps = warps; + + @Override + @NotNull + public List getWarps() { + return listWarps; + } + + @Override + public void setWarps(@NotNull List homes) { + this.listWarps = homes; + } + + @Override + @NotNull + public CommandUser getListViewer() { + return viewer; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + @Override + public boolean isCancelled() { + return cancelled; + } + + @NotNull + public Event getEvent() { + return EVENT; + } + + }; + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java b/fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java new file mode 100644 index 00000000..969d9d82 --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java @@ -0,0 +1,64 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.listener; + +import net.fabricmc.fabric.api.entity.event.v1.ServerLivingEntityEvents; +import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents; +import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; +import net.minecraft.server.network.ServerPlayerEntity; +import net.william278.huskhomes.FabricHuskHomes; +import net.william278.huskhomes.user.FabricUser; +import org.jetbrains.annotations.NotNull; + +// Note that the teleport event and update player respawn position events are not handled on Fabric. +// The "update last position on teleport event" and "global respawn" features are not supported on Fabric. +public class FabricEventListener extends EventListener { + + public FabricEventListener(@NotNull FabricHuskHomes plugin) { + super(plugin); + this.registerEvents(plugin); + } + + // Register fabric event callback listeners to internal handlers + private void registerEvents(@NotNull FabricHuskHomes plugin) { + // Join event + ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> handlePlayerJoin( + FabricUser.adapt(plugin, handler.player) + )); + + // Quit event + ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> handlePlayerLeave( + FabricUser.adapt(plugin, handler.player) + )); + + // Death event + ServerLivingEntityEvents.AFTER_DEATH.register((entity, source) -> { + if (entity instanceof ServerPlayerEntity player) { + handlePlayerDeath(FabricUser.adapt(plugin, player)); + } + }); + + // Respawn event + ServerPlayerEvents.AFTER_RESPAWN.register((oldPlayer, newPlayer, alive) -> handlePlayerRespawn( + FabricUser.adapt(plugin, newPlayer) + )); + } + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/user/FabricUser.java b/fabric/src/main/java/net/william278/huskhomes/user/FabricUser.java new file mode 100644 index 00000000..f77fa69f --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/user/FabricUser.java @@ -0,0 +1,155 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.user; + +import me.lucko.fabric.api.permissions.v0.Permissions; +import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; +import net.kyori.adventure.audience.Audience; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; +import net.william278.huskhomes.FabricHuskHomes; +import net.william278.huskhomes.position.Location; +import net.william278.huskhomes.position.Position; +import net.william278.huskhomes.position.World; +import net.william278.huskhomes.teleport.TeleportationException; +import org.jetbrains.annotations.NotNull; + +import java.util.*; + +public class FabricUser extends OnlineUser { + private final FabricHuskHomes plugin; + private final ServerPlayerEntity player; + + private FabricUser(@NotNull FabricHuskHomes plugin, @NotNull ServerPlayerEntity player) { + super(player.getUuid(), player.getEntityName()); + this.plugin = plugin; + this.player = player; + } + + @NotNull + public static FabricUser adapt(@NotNull FabricHuskHomes plugin, @NotNull ServerPlayerEntity player) { + return new FabricUser(plugin, player); + } + + @Override + public Position getPosition() { + return Position.at( + player.getX(), player.getY(), player.getZ(), + player.getYaw(), player.getPitch(), + World.from( + player.getWorld().getRegistryKey().getValue().asString(), + UUID.nameUUIDFromBytes(player.getWorld().getRegistryKey().getValue().asString().getBytes()) + ), + plugin.getServerName() + ); + } + + @Override + public Optional getBedSpawnPosition() { + final BlockPos spawn = player.getSpawnPointPosition(); + if (spawn == null) { + return Optional.empty(); + } + + return Optional.of(Position.at( + spawn.getX(), spawn.getY(), spawn.getZ(), + player.getSpawnAngle(), 0, + World.from( + player.getSpawnPointDimension().getValue().asString(), + UUID.nameUUIDFromBytes(player.getSpawnPointDimension().getValue().asString().getBytes()) + ), + plugin.getServerName() + )); + } + + @Override + public double getHealth() { + return player.getHealth(); + } + + @Override + public boolean hasPermission(@NotNull String node) { + final boolean requiresOp = Boolean.TRUE.equals(plugin.getPermissions().computeIfPresent(node, (key, isOp) -> isOp)); + return Permissions.check(player, node, !requiresOp || player.hasPermissionLevel(3)); + } + + @Override + @NotNull + public Map getPermissions() { + return plugin.getPermissions().entrySet().stream() + .filter(entry -> Permissions.check(player, entry.getKey(), entry.getValue())) + .collect(HashMap::new, (map, entry) -> map.put(entry.getKey(), entry.getValue()), HashMap::putAll); + } + + @Override + @NotNull + protected List getNumericalPermissions(@NotNull String nodePrefix) { + final List permissions = new ArrayList<>(); + for (int i = 0; i < 100; i++) { + if (hasPermission(nodePrefix + i)) { + permissions.add(i); + } + } + return permissions.stream().sorted(Collections.reverseOrder()).toList(); + } + + @Override + @NotNull + public Audience getAudience() { + return player; + } + + @Override + public void teleportLocally(@NotNull Location location, boolean asynchronous) throws TeleportationException { + final MinecraftServer server = player.getWorld().getServer(); + final Identifier worldId = Identifier.tryParse(location.getWorld().getName()); + player.teleport( + server.getWorld(server.getWorldRegistryKeys().stream() + .filter(key -> key.getValue().equals(worldId)).findFirst() + .orElseThrow(() -> new TeleportationException(TeleportationException.Type.WORLD_NOT_FOUND)) + ), + location.getX(), location.getY(), location.getZ(), + location.getYaw(), location.getPitch() + ); + } + + @Override + public void sendPluginMessage(@NotNull String channel, byte[] message) { + final PacketByteBuf buf = PacketByteBufs.create(); + buf.writeBytes(message); + final CustomPayloadS2CPacket packet = new CustomPayloadS2CPacket(Identifier.tryParse(channel), buf); + player.networkHandler.sendPacket(packet); + } + + @Override + public boolean isMoving() { + return player.isTouchingWater() || player.isFallFlying() || player.isSprinting() || player.isSneaking(); + } + + @Override + public boolean isVanished() { + return false; + } + +} diff --git a/fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java b/fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java new file mode 100644 index 00000000..7c0ac2dd --- /dev/null +++ b/fabric/src/main/java/net/william278/huskhomes/util/FabricTaskRunner.java @@ -0,0 +1,93 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + +package net.william278.huskhomes.util; + +import net.william278.huskhomes.FabricHuskHomes; +import org.jetbrains.annotations.NotNull; + +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Supplier; + +public interface FabricTaskRunner extends TaskRunner { + + ConcurrentHashMap> tasks = new ConcurrentHashMap<>(); + + @Override + default int runAsync(@NotNull Runnable runnable) { + tasks.put(tasks.size(), CompletableFuture.runAsync(runnable, getPlugin().getMinecraftServer())); + return tasks.size(); + } + + @Override + default CompletableFuture supplyAsync(@NotNull Supplier supplier) { + return CompletableFuture.supplyAsync(supplier, getPlugin().getMinecraftServer()); + } + + @Override + default void runSync(@NotNull Runnable runnable) { + getPlugin().getMinecraftServer().executeSync(runnable); + } + + @Override + default int runAsyncRepeating(@NotNull Runnable runnable, long delay) { + tasks.put(tasks.size(), CompletableFuture.runAsync(() -> { + while (true) { + try { + Thread.sleep(delay * 50); + } catch (InterruptedException e) { + e.printStackTrace(); + return; + } + runnable.run(); + } + }, getPlugin().getMinecraftServer())); + return tasks.size(); + } + + @Override + default void runLater(@NotNull Runnable runnable, long delay) { + CompletableFuture.runAsync(() -> { + try { + Thread.sleep(delay * 50); + } catch (InterruptedException e) { + e.printStackTrace(); + return; + } + runnable.run(); + }, getPlugin().getMinecraftServer()); + } + + @Override + default void cancelTask(int taskId) { + tasks.get(taskId).cancel(true); + } + + @Override + default void cancelAllTasks() { + tasks.forEach((taskId, future) -> future.cancel(true)); + tasks.clear(); + } + + @Override + @NotNull + FabricHuskHomes getPlugin(); + +} diff --git a/fabric/src/main/resources/assets/huskhomes/icon.png b/fabric/src/main/resources/assets/huskhomes/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7c79c219ee28e84aa8228cd2f64d7dc5eb306474 GIT binary patch literal 59529 zcmce;2{@E(|35rZ)GefqtVJc2Em_7cqOui=>{5}*I*n}%x>Zz|iV((#>@g&}u|&qc z)EL58vJ5lK*au^HuTl5?+|Tp;-s8U<$NP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ff-~Bw8QXY zWOCnY3H4ZWR{c5kg=tAo-~NsHBWQE!SajJ-26M|I+WU{>L)6j}L&IT-m92 zb{(2N&zPm7A>X}B<=S=7WXU$!&aYeFdaTJm(Rbw6Eo4#Nn-e4AZzGE;0$Z%vw~<86 zQ{0nkbCE^c-gvB8pNk}Ve*)Noj?3ZV8LLydFNsU_Ui-aVy-#+@EW5*pXKRDzz}{!A zxW?}A?qJdWwh8e92E~5^K-0w&9V(ulzgF8D$N2H+|K?RU|2;VKMnb$Z!n;I-NTfBzr&ad76z#qsT*Sl7(){xR{4cyn|1wzrZQ+y3*OIdQ-B z(}Z>3{8RE9>sDyrv+TH1+E8{gTBlI>s z|2FQp@tjXJjFoYDRPpoImor{ne|}k0&~Qb(Zuh@Z(*~i{O%0cw=2~~PDk-@=>;Cbp z|009e8m^?R+(Iwr|N8p#N=wqhj*f{xm4JqtG)$6Xc4E~vzI&lPdbch2qtnc5ueqQ1 zk*gNrsd!xf0`Mc~}KYz=*f7Gdd>fMmV*6!`n&);Hn?EBCFu)w_RA?wSe*Ul|KdvpW5RgBx$;Z8m?h-yY*y5zPra9%f!MFim;rR7P!Rncpft|MCVFU(=9krm!!C zE9^PA{~CYL`k!ffp)T*+p9`n6J{=X_bu!6e<$wNTO51jBtzekJ00f?{elF{r5}E*L C#R&QU literal 0 HcmV?d00001 diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json new file mode 100644 index 00000000..86647b29 --- /dev/null +++ b/fabric/src/main/resources/fabric.mod.json @@ -0,0 +1,37 @@ +{ + "schemaVersion": 1, + "id": "huskhomes", + "version": "${version}", + "name": "HuskHomes", + "icon": "assets/huskhomes/icon.png", + "description": "A powerful, intuitive and flexible teleportation suite", + "authors": [ + { + "name": "William278", + "contact": { + "sources": "https://github.com/WiIIiam278/", + "homepage": "https://william278.net/" + } + } + ], + "license": "Apache-2.0", + "contact": { + "homepage": "https://william278.net/project/huskhomes/", + "repo": "https://github.com/WiIIiam278/HuskHomes2", + "issues": "https://github.com/WiIIiam278/HuskHomes2/issues" + }, + "environment": "server", + "entrypoints": { + "server": [ + "net.william278.huskhomes.FabricHuskHomes" + ] + }, + "depends": { + "fabricloader": ">=0.14.19", + "minecraft": ">=1.19.4", + "fabric-api": "*" + }, + "custom": { + "modmenu:api": true + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index e61def2e..a147f318 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ -org.gradle.jvmargs='-Dfile.encoding=UTF-8' - -org.gradle.daemon=true javaVersion=16 -plugin_version=4.1.1 +org.gradle.jvmargs='-Dfile.encoding=UTF-8' +org.gradle.daemon=true + +plugin_version=4.2 plugin_archive=huskhomes jedis_version=4.3.1 diff --git a/paper/build.gradle b/paper/build.gradle index f0ee85cb..ae860387 100644 --- a/paper/build.gradle +++ b/paper/build.gradle @@ -3,8 +3,8 @@ plugins { } dependencies { - compileOnly project(path: ':common') - implementation project(path: ':bukkit') + implementation project(':bukkit') + compileOnly project(':common') compileOnly 'io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT' compileOnly 'maven.modrinth:pl3xmap:1.19.3-321' diff --git a/paper/src/main/java/net/william278/huskhomes/PaperHuskHomes.java b/paper/src/main/java/net/william278/huskhomes/PaperHuskHomes.java index f3013678..c0471c2e 100644 --- a/paper/src/main/java/net/william278/huskhomes/PaperHuskHomes.java +++ b/paper/src/main/java/net/william278/huskhomes/PaperHuskHomes.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes; import net.william278.huskhomes.command.BukkitCommand; diff --git a/paper/src/main/java/net/william278/huskhomes/PaperHuskHomesLoader.java b/paper/src/main/java/net/william278/huskhomes/PaperHuskHomesLoader.java index 7ec4c13b..94b9557c 100644 --- a/paper/src/main/java/net/william278/huskhomes/PaperHuskHomesLoader.java +++ b/paper/src/main/java/net/william278/huskhomes/PaperHuskHomesLoader.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes; import io.papermc.paper.plugin.loader.PluginClasspathBuilder; diff --git a/paper/src/main/java/net/william278/huskhomes/command/PaperCommand.java b/paper/src/main/java/net/william278/huskhomes/command/PaperCommand.java index 2aef2652..e7006f98 100644 --- a/paper/src/main/java/net/william278/huskhomes/command/PaperCommand.java +++ b/paper/src/main/java/net/william278/huskhomes/command/PaperCommand.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.command; import me.lucko.commodore.CommodoreProvider; diff --git a/paper/src/main/java/net/william278/huskhomes/hook/Pl3xMapHook.java b/paper/src/main/java/net/william278/huskhomes/hook/Pl3xMapHook.java index 94211c0a..afcd609f 100644 --- a/paper/src/main/java/net/william278/huskhomes/hook/Pl3xMapHook.java +++ b/paper/src/main/java/net/william278/huskhomes/hook/Pl3xMapHook.java @@ -1,3 +1,22 @@ +/* + * This file is part of HuskHomes, licensed under the Apache License 2.0. + * + * Copyright (c) William278 + * Copyright (c) contributors + * + * 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. + */ + package net.william278.huskhomes.hook; import net.pl3x.map.Key; diff --git a/settings.gradle b/settings.gradle index 5cc36d7b..077deffa 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,12 +1,15 @@ pluginManagement { repositories { gradlePluginPortal() + maven { url 'https://maven.fabricmc.net/' } } } rootProject.name = 'HuskHomes' - -include 'common' -include 'bukkit' -include 'paper' -include 'plugin' \ No newline at end of file +include( + 'common', + 'bukkit', + 'paper', + 'plugin', + 'fabric' +) \ No newline at end of file