Fix build
This commit is contained in:
1 parent
51d05a1bbe
commit
fe3fa9677c
5 files changed
-261
No files matched your search
@@ -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/
|
||||
@@ -1,76 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ghostchu</groupId>
|
||||
<artifactId>quickshop-hikari</artifactId>
|
||||
<version>5.2.0.7</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>com.ghostchu.quickshop.compatibility</groupId>
|
||||
<artifactId>chestprotect</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Compat-ChestProtect</name>
|
||||
|
||||
<description>Compatibility module for ChestProtect</description>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ghostchu.quickshop.compatibility</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ghostchu</groupId>
|
||||
<artifactId>quickshop-bukkit</artifactId>
|
||||
<version>${parent.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.angeschossen</groupId>
|
||||
<artifactId>ChestProtectAPI</artifactId>
|
||||
<version>5.12.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
-62
@@ -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<Player> 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<Player> 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -363,7 +363,6 @@
|
||||
<module>compatibility/bungeecord-geyser</module>
|
||||
<module>compatibility/ecoenchants</module>
|
||||
<module>compatibility/reforges</module>
|
||||
<module>compatibility/chestprotect</module>
|
||||
<module>addon/discordsrv</module>
|
||||
<module>addon/plan</module>
|
||||
<module>addon/discount</module>
|
||||
|
||||
Reference in new issue
Block a user