Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
jdk:
- openjdk16

before_install:
- sdk install java 16.0.1-open
- sdk use java 16.0.1-open
- sdk install maven
- mvn -v

install:
- mvn install -DskipTests
124 changes: 76 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

<name>Shops</name>
<description>Shops is the ultimate solution for server shops</description>
<version>4.0.0</version>
<version>4.11.0</version>
<packaging>jar</packaging>

<properties>
<author>Kiran Hart</author>
<jarName>${project.name}</jarName>
<main.class>${project.groupId}.${project.artifactId}.${project.name}</main.class>
<java.version>16</java.version>
<flight.version>3.18.0</flight.version>
<flight.version>3.30.0</flight.version>
<flight.path>ca.tweetzy</flight.path>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down Expand Up @@ -47,6 +47,10 @@
<id>opencollab-snapshot</id>
<url>https://repo.opencollab.dev/maven-snapshots/</url>
</repository>
<repository>
<id>auxilor-plugins</id>
<url>https://repo.auxilor.io/repository/maven-public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand All @@ -59,7 +63,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -70,14 +74,20 @@
<dependency>
<groupId>${flight.path}</groupId>
<artifactId>funds</artifactId>
<version>1.7.0</version>
<version>1.10.0</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.willfp</groupId>
<artifactId>EcoBits</artifactId>
<version>1.8.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
Expand Down Expand Up @@ -195,50 +205,68 @@
</relocations>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- <artifactId>maven-resources-plugin</artifactId>-->
<!-- <version>3.0.2</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>copy-files-on-build</id>-->
<!-- <phase>package</phase>-->
<!-- <goals>-->
<!-- <goal>copy-resources</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <outputDirectory>D:\Development\Spigot Servers\Latest Version\plugins</outputDirectory>-->
<!-- <resources>-->
<!-- <resource>-->
<!-- <directory>${project.build.directory}</directory>-->
<!-- <include>${project.name}.jar</include>-->
<!-- <filtering>false</filtering>-->
<!-- </resource>-->
<!-- </resources>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-antrun-plugin</artifactId>-->
<!-- <version>1.7</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <phase>test</phase>-->
<!-- <goals>-->
<!-- <goal>run</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <tasks>-->
<!-- <delete>-->
<!-- <fileset dir="D:\Development\Spigot Servers\Latest Version\plugins\Shops\locales" includes="*.yml"/>-->
<!-- <fileset dir="D:\Development\Spigot Servers\Latest Version\plugins\Shops\" includes="*.yml"/>-->
<!-- </delete>-->
<!-- </tasks>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-files-on-build</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>D:\Development\Spigot Servers\Latest Version\plugins</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}</directory>
<include>${project.name}.jar</include>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>copy-named-jar</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/${project.name}.jar</sourceFile>
<destinationFile>D:\Development\Spigot Plugins\Ready Jars\${project.name}\${project.name} - v${project.version}.jar</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete>
<fileset dir="D:\Development\Spigot Servers\Latest Version\plugins\Shops\locales" includes="*.yml"/>
<fileset dir="D:\Development\Spigot Servers\Latest Version\plugins\Shops\" includes="*.yml"/>
</delete>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ca/tweetzy/shops/Shops.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ protected void onFlight() {
new DeleteCommand(),
new CartCommand(),
new AdminCommand(),
new PrefillCommand(),
new ReloadCommand()
);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ca/tweetzy/shops/api/cart/CartContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ default TransactionResult executeSell(@NonNull final Player player) {
if (totalFoundInInventory == 0)
return TransactionResult.PLAYER_DOES_NOT_HAVE_ITEM;


final int amountToSell = Math.min(getQuantity(), totalFoundInInventory);

final double subTotal = getSellSubtotal(amountToSell);
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/ca/tweetzy/shops/api/shop/ShopDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public interface ShopDisplay extends Jsonable {

void setCartButtonSlot(final int slot);

int getSellButtonSlot();

void setSellButtonSlot(final int slot);

List<Integer> getFillSlots();

void setFillSlots(final List<Integer> slots);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ public enum ShopLayoutControl {
NEXT_PAGE_BUTTON,
SEARCH_BUTTON,
FILTER_BUTTON,
CART_BUTTON
CART_BUTTON,
SELL_BUTTON
}
Loading
Loading