mirror of
https://github.com/EpicEricEE/ShopChest.git
synced 2024-11-25 12:06:16 +01:00
Put API and implementation in seperate modules
This commit is contained in:
parent
59e111ea96
commit
34de6022e7
35
api/pom.xml
Normal file
35
api/pom.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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>
|
||||
|
||||
<groupId>de.epiceric.shopchest</groupId>
|
||||
<artifactId>shopchest-api</artifactId>
|
||||
<version>1.13-SNAPSHOT</version>
|
||||
|
||||
<name>ShopChest-API</name>
|
||||
|
||||
<parent>
|
||||
<groupId>de.epiceric.shopchest</groupId>
|
||||
<artifactId>shopchest-parent</artifactId>
|
||||
<version>1.13-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -1,20 +1,21 @@
|
||||
package de.epiceric.shopchest.api;
|
||||
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
/**
|
||||
* The plugin's main entry point
|
||||
*
|
||||
* @since 1.13
|
||||
*/
|
||||
public interface ShopChest {
|
||||
|
||||
public abstract class ShopChest extends JavaPlugin {
|
||||
|
||||
/**
|
||||
* Gets an instance of the shop manager
|
||||
*
|
||||
* @return the shop manager
|
||||
*/
|
||||
ShopManager getShopManager();
|
||||
public abstract ShopManager getShopManager();
|
||||
|
||||
/**
|
||||
* Gets the amount of shops the given player is allowed to have
|
||||
@ -24,6 +25,6 @@ public interface ShopChest {
|
||||
* @param player the player
|
||||
* @return the shop limit
|
||||
*/
|
||||
int getShopLimit(OfflinePlayer player);
|
||||
public abstract int getShopLimit(OfflinePlayer player);
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package de.epiceric.shopchest.api.event;
|
||||
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.api.shop.Shop;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.Cancellable;
|
181
implementation/pom.xml
Normal file
181
implementation/pom.xml
Normal file
@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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>
|
||||
|
||||
<groupId>de.epiceric.shopchest</groupId>
|
||||
<artifactId>shopchest</artifactId>
|
||||
<version>1.13-SNAPSHOT</version>
|
||||
|
||||
<name>ShopChest</name>
|
||||
<url>https://www.spigotmc.org/resources/shopchest.11431/</url>
|
||||
<description>Let your players create their own nice-looking shops to sell their stuff to other players!</description>
|
||||
|
||||
<parent>
|
||||
<groupId>de.epiceric.shopchest</groupId>
|
||||
<artifactId>shopchest-parent</artifactId>
|
||||
<version>1.13-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sk89q-repo</id>
|
||||
<url>http://maven.sk89q.com/artifactory/repo/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>athion-repo</id>
|
||||
<url>http://ci.athion.net/job/PlotSquared-Releases/ws/mvn/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>uskyblock-repo</id>
|
||||
<url>https://raw.github.com/rlf/uSkyBlock/mvn-repo/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>tastybento-repo</id>
|
||||
<url>http://dl.bintray.com/tastybento/maven-repo</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack-repo</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>nlthijs48-repo</id>
|
||||
<url>http://maven.wiefferink.me</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>VaultAPI</artifactId>
|
||||
<version>1.7</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>fr.xephi</groupId>
|
||||
<artifactId>authme</artifactId>
|
||||
<version>5.4.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.intellectualsites.plotsquared</groupId>
|
||||
<artifactId>PlotSquared-API</artifactId>
|
||||
<version>4.226</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.rlf</groupId>
|
||||
<artifactId>uSkyBlock-API</artifactId>
|
||||
<version>2.6.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.wasteofplastic</groupId>
|
||||
<artifactId>askyblock</artifactId>
|
||||
<version>3.0.6.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.TechFortress</groupId>
|
||||
<artifactId>GriefPrevention</artifactId>
|
||||
<version>16.11.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.wiefferink</groupId>
|
||||
<artifactId>areashop</artifactId>
|
||||
<version>2.6.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.palmergames</groupId>
|
||||
<artifactId>Towny</artifactId>
|
||||
<version>0.93.1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/Towny-0.93.1.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pl.gnacik</groupId>
|
||||
<artifactId>IslandWorld</artifactId>
|
||||
<version>8.5</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/IslandWorld-8.5.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<!-- Shaded dependencies -->
|
||||
<dependency>
|
||||
<groupId>de.epiceric.shopchest</groupId>
|
||||
<artifactId>shopchest-api</artifactId>
|
||||
<version>1.13-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codemc.worldguardwrapper</groupId>
|
||||
<artifactId>worldguardwrapper</artifactId>
|
||||
<version>1.1.6-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>1.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<version>1.7.26</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>org.bstats.bukkit</pattern>
|
||||
<shadedPattern>de.epiceric.shopchest.dependencies.bstats</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.codemc.worldguardwrapper</pattern>
|
||||
<shadedPattern>de.epiceric.shopchest.dependencies.worldguardwrapper</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.zaxxer.hikari</pattern>
|
||||
<shadedPattern>de.epiceric.shopchest.dependencies.hikari</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.slf4j</pattern>
|
||||
<shadedPattern>de.epiceric.shopchest.dependencies.slf4j</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -150,7 +150,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.UPDATE_CHECKING));
|
||||
|
||||
UpdateChecker uc = new UpdateChecker(ShopChest.getInstance());
|
||||
UpdateChecker uc = new UpdateChecker(plugin);
|
||||
UpdateChecker.UpdateCheckerResult result = uc.check();
|
||||
|
||||
if (result == UpdateChecker.UpdateCheckerResult.TRUE) {
|
@ -43,7 +43,7 @@ public class PlotSquaredShopFlag {
|
||||
public static boolean isFlagAllowedOnPlot(Plot plot, GroupFlag flag, Player p) {
|
||||
if (plot != null && flag != null) {
|
||||
Group group = plot.getFlag(flag, PlotSquaredShopFlag.Group.NONE);
|
||||
ShopChest.getInstance().debug("Flag " + flag.getName() + " is set to " + group);
|
||||
//ShopChest.getInstance().debug("Flag " + flag.getName() + " is set to " + group);
|
||||
|
||||
switch (group) {
|
||||
case OWNERS:
|
||||
@ -59,7 +59,7 @@ public class PlotSquaredShopFlag {
|
||||
}
|
||||
}
|
||||
|
||||
ShopChest.getInstance().debug("Flag or plot is null, or value of flag is not a group");
|
||||
//ShopChest.getInstance().debug("Flag or plot is null, or value of flag is not a group");
|
||||
|
||||
return true;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user