diff --git a/compatibility/chestprotect/.gitignore b/compatibility/chestprotect/.gitignore deleted file mode 100644 index 4788b4b45..000000000 --- a/compatibility/chestprotect/.gitignore +++ /dev/null @@ -1,113 +0,0 @@ -# User-specific stuff -.idea/ - -*.iml -*.ipr -*.iws - -# IntelliJ -out/ - -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# Windows thumbnail cache files -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -target/ - -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next - -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties -.mvn/wrapper/maven-wrapper.jar -.flattened-pom.xml - -# Common working directory -run/ diff --git a/compatibility/chestprotect/pom.xml b/compatibility/chestprotect/pom.xml deleted file mode 100644 index 5595a48c0..000000000 --- a/compatibility/chestprotect/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - 4.0.0 - - com.ghostchu - quickshop-hikari - 5.2.0.7 - ../../pom.xml - - com.ghostchu.quickshop.compatibility - chestprotect - jar - - Compat-ChestProtect - - Compatibility module for ChestProtect - - 17 - UTF-8 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-shade-plugin - - - - - - src/main/resources - true - - - - - - - jitpack.io - https://jitpack.io - - - - - - org.spigotmc - spigot-api - - - com.ghostchu.quickshop.compatibility - common - ${parent.version} - compile - - - com.ghostchu - quickshop-bukkit - ${parent.version} - provided - - - com.github.angeschossen - ChestProtectAPI - 5.12.1 - provided - - - diff --git a/compatibility/chestprotect/src/main/java/com/ghostchu/quickshop/compatibility/chestprotect/Main.java b/compatibility/chestprotect/src/main/java/com/ghostchu/quickshop/compatibility/chestprotect/Main.java deleted file mode 100644 index 7ec0bd29b..000000000 --- a/compatibility/chestprotect/src/main/java/com/ghostchu/quickshop/compatibility/chestprotect/Main.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ghostchu.quickshop.compatibility.chestprotect; - -import com.ghostchu.quickshop.api.event.ShopCreateEvent; -import com.ghostchu.quickshop.api.event.ShopPreCreateEvent; -import com.ghostchu.quickshop.api.obj.QUser; -import com.ghostchu.quickshop.compatibility.CompatibilityModule; -import me.angeschossen.chestprotect.api.ChestProtectAPI; -import me.angeschossen.chestprotect.api.protection.block.BlockProtection; -import me.angeschossen.chestprotect.api.protection.world.ProtectionWorld; -import net.kyori.adventure.text.Component; -import org.bukkit.Location; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; - -import java.util.Optional; - -public final class Main extends CompatibilityModule implements Listener { - - @Override - public void init() { - // There no init stuffs need to do - } - - @EventHandler(ignoreCancelled = true) - public void onPreCreation(ShopPreCreateEvent event) { - Location loc = event.getLocation(); - ProtectionWorld world = ChestProtectAPI.getInstance().getProtectionWorld(loc.getWorld()); - if (world != null) { - BlockProtection protection = world.getBlockProtection(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); - QUser qUser = event.getCreator(); - Optional playerOptional = qUser.getBukkitPlayer(); - if (playerOptional.isPresent()) { - if (protection != null) { - Player player = playerOptional.get(); - if (!player.getUniqueId().equals(protection.getOwner())) { - event.setCancelled(true, (Component) null); - } - } - } - } - } - - @EventHandler(ignoreCancelled = true) - public void onPreCreation(ShopCreateEvent event) { - Location loc = event.getShop().getLocation(); - ProtectionWorld world = ChestProtectAPI.getInstance().getProtectionWorld(loc.getWorld()); - if (world != null) { - BlockProtection protection = world.getBlockProtection(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); - QUser qUser = event.getCreator(); - Optional playerOptional = qUser.getBukkitPlayer(); - if (playerOptional.isPresent()) { - if (protection != null) { - Player player = playerOptional.get(); - if (!player.getUniqueId().equals(protection.getOwner())) { - event.setCancelled(true, "You can't create a shop on a exists ChestProtect protection"); - } - } - } - } - } -} diff --git a/compatibility/chestprotect/src/main/resources/plugin.yml b/compatibility/chestprotect/src/main/resources/plugin.yml deleted file mode 100644 index 849b6ecc0..000000000 --- a/compatibility/chestprotect/src/main/resources/plugin.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: qscompat-${project.artifactId} -version: '${project.version}' -main: com.ghostchu.quickshop.compatibility.${project.artifactId}.Main -api-version: 1.18 -depend: - - ChestProtect - - QuickShop-Hikari -authors: [ Ghost_chu ] -description: Compatibility module for ChestProtect diff --git a/pom.xml b/pom.xml index 67bcce32b..79aa3a72c 100644 --- a/pom.xml +++ b/pom.xml @@ -363,7 +363,6 @@ compatibility/bungeecord-geyser compatibility/ecoenchants compatibility/reforges - compatibility/chestprotect addon/discordsrv addon/plan addon/discount