Skip to content

Commit

Permalink
Update to 1.20.4
Browse files Browse the repository at this point in the history
Update Paper to 1.20.4 and other dependencies.
  • Loading branch information
noahbclarkson committed Jan 16, 2024
1 parent c5f2d4c commit 636c521
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 128 deletions.
18 changes: 0 additions & 18 deletions .classpath

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: 'Unprotesting'
assignees: 'noahbclarkson'

---

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
check-latest: true
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.2.0
uses: gradle/gradle-build-action@v2.11.1
- name: Gradle Build Action
uses: gradle/gradle-build-action@v2.2.0
uses: gradle/gradle-build-action@v2.11.1
with:
arguments: test build
gradle-version: '7.4'
- uses: actions/upload-artifact@v2
gradle-version: '8.5'
- uses: actions/upload-artifact@v4.1.0
with:
name: 'Auto-Tune-Artifact'
path: build/libs/*.jar
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ hs_err_pid*
gradle
.gradle
/build
bin
bin

# Classpath
.classpath
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2f6d82bd12af4ce490959be74d1b6149)](https://app.codacy.com/gh/Unprotesting/Auto-Tune?utm_source=github.com&utm_medium=referral&utm_content=Unprotesting/Auto-Tune&utm_campaign=Badge_Grade_Settings)
[![Discord](https://img.shields.io/discord/748222485975269508.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/bNVVPe5)

>A Powerful Minecraft Automatic-Economy Plugin for ```1.13-1.20.2``` with many features!
>A Powerful Minecraft Automatic-Economy Plugin for ```1.20.4``` with many features!
<img src="https://github.com/Unprotesting/Auto-Tune/blob/master/.github/AtLogo.png?raw=true" width="100"/>
## :star: Overview
Expand Down Expand Up @@ -73,6 +73,6 @@ Feel free to create a fork of the repository and open a pull request to contribu

> [![Discord](https://img.shields.io/discord/748222485975269508.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/bNVVPe5)
>
> :email: *[email protected]*
> :email: *<[email protected]>*
>
> :calling: **Unprotesting#3616**
44 changes: 14 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

group 'unprotesting.com.github'
version '0.14.3'
version '0.14.4'

ext {
jettyVersion = '11.0.12'
lombokVersion = '1.18.24'
adventureVersion = '4.11.0'
paperMCVersion = '1.20.2-R0.1-SNAPSHOT'
bstatsVersion = '3.0.0'
mapdbVersion = '3.0.8'
ifVersion = '0.10.7'
junitVersion = '5.8.2'
jettyVersion = '11.0.19'
lombokVersion = '1.18.30'
adventureVersion = '4.15.0'
paperMCVersion = '1.20.4-R0.1-SNAPSHOT'
bstatsVersion = '3.0.2'
mapdbVersion = '3.1.0'
ifVersion = '0.10.13'
vaultVersion = '1.7.1'
}

Expand Down Expand Up @@ -46,33 +45,18 @@ dependencies {
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
}


shadowJar {

dependencies {
exclude(dependency('org.eclipse.collections:eclipse-collections-api'))
exclude(dependency('org.eclipse.collections:eclipse-collections'))
exclude(dependency('org.eclipse.collections:eclipse-collections-forkjoin'))
exclude(dependency('com.google.guava:guava'))
exclude(dependency('net.jpountz.lz4:lz4'))
exclude(dependency('org.jetbrains.kotlin:kotlin-stdlib'))
exclude(dependency('com.google.code.findbugs:jsr305'))
exclude(dependency('com.google.errorprone:error_prone_annotations'))
exclude(dependency('com.google.guava:failureaccess'))
exclude(dependency('com.google.guava:listenablefuture'))
exclude(dependency('com.google.j2objc:j2objc-annotations'))
exclude(dependency('org.checkerframework:checker-qual'))
exclude(dependency('org.jetbrains:annotations'))
exclude(dependency('org.jetbrains.kotlin:kotlin-stdlib-common'))
}

relocate "org.bstats", "unprotesting.com.github.bstats"
relocate "org.mapdb", "unprotesting.com.github.mapdb"
relocate "com.github.stefvanschie.inventoryframework", "unprotesting.com.github.inventoryframework"

minimize()
archiveBaseName.set('Auto-Tune')
archiveVersion.set(version)
archiveClassifier.set(null)
archiveAppendix.set(null)

archiveName("Auto-Tune-${project.version}.jar")
minimize()
}

artifacts {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
rootProject.name = 'Auto-Tune'

rootProject.name = 'Auto-Tune'
1 change: 1 addition & 0 deletions src/main/java/unprotesting/com/github/data/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ private void createDb(String location) {
.allocateIncrement(5 * 1024 * 1024)
.closeOnJvmShutdown().make();
db.getStore().fileLoad();
db.getStore().compact();
Format.getLog().config("Database initialized at " + location);
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/unprotesting/com/github/data/Shop.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected Shop(ConfigurationSection config, String sectionName, boolean isEnchan
this.autosell = new HashMap<UUID, Integer>();
this.recentBuys = new HashMap<UUID, Integer>();
this.recentSells = new HashMap<UUID, Integer>();
this.setting = new CollectFirst(config.getString("collect-first", "server"));
this.setting = new CollectFirst(config.getString("collect-first", "none"));
this.loadConfiguration(config, sectionName);
}

Expand Down Expand Up @@ -206,7 +206,7 @@ public double getSellPrice() {
public void addBuys(UUID player, int buyCount) {
AutoTuneLogger logger = Format.getLog();
if (recentBuys.containsKey(player)) {
recentBuys.merge(player, buyCount, Integer::sum);
recentBuys.merge(player, buyCount, (a, b) -> (int) a + (int) b);
logger.finest("Recent buys: " + recentBuys.get(player));
} else {
recentBuys.put(player, buyCount);
Expand All @@ -225,7 +225,7 @@ public void addBuys(UUID player, int buyCount) {
public void addSells(UUID player, int sellCount) {
AutoTuneLogger logger = Format.getLog();
if (recentSells.containsKey(player)) {
recentSells.merge(player, sellCount, Integer::sum);
recentSells.merge(player, sellCount, (a, b) -> (int) a + (int) b);
logger.finest("Recent sells: " + recentSells.get(player));
} else {
recentSells.put(player, sellCount);
Expand All @@ -252,7 +252,7 @@ public void clearAutosell() {
public void addAutosell(UUID uuid, int count) {
AutoTuneLogger logger = Format.getLog();
if (autosell.containsKey(uuid)) {
autosell.merge(uuid, count, Integer::sum);
autosell.merge(uuid, count, (a, b) -> (int) a + (int) b);
logger.finest("Autosell: " + autosell.get(uuid) + " for " + uuid);
} else {
autosell.put(uuid, count);
Expand Down
8 changes: 5 additions & 3 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# The default rate that prices are updated (in minutes). Every price update the max-buys and sells are also reset.
# Increase this for low player counts, decrease for high player counts.
time-period: 10
time-period: 60

# The default maximum change in a given time-period for an item.
# Increase this for high player counts, decrease for low player counts.
volatility: 0.25

# The default percentage difference in the sell price from the buy price.
# Increase this for low player counts, decrease for high player counts.
sell-price-difference: 20
sell-price-difference: 25

# Use the durability function to allow for damaged items to be sold.
# If this is set to true, the item's price will be scaled to its durability.
Expand All @@ -24,13 +24,15 @@ minimum-players: 2
# If you wish to have sell & buy limits enable this.
enable-sell-limits: true

# If you wish to have collection on your server, enable this.
# If you wish to have collection on your server (requiring items to be collected
# by each player or server wide before they can be purchased), enable this.
enable-collection: false

# If you wish to have loans on your server, enable this.
enable-loans: false

# The interest applied on loans each minute.
# (Only applies if loans are enabled)
# If inflation is too high you can increase this.
# If inflation is too low you can decrease this.
interest: 0.05
Expand Down
10 changes: 2 additions & 8 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@ version: "0.14.3"
depend:
- "Vault"
libraries:
- "org.eclipse.collections:eclipse-collections-api:11.0.0"
- "org.eclipse.collections:eclipse-collections:11.0.0"
- "org.eclipse.collections:eclipse-collections-forkjoin:11.0.0"
- "com.google.guava:guava:31.1-jre"
- "net.jpountz.lz4:lz4:1.3.0"
- "org.jetbrains.kotlin:kotlin-stdlib:1.7.0"
- "org.eclipse.jetty:jetty-server:11.0.12"
- "org.eclipse.jetty:jetty-servlet:11.0.12"
- "org.eclipse.jetty:jetty-server:11.0.19"
- "org.eclipse.jetty:jetty-servlet:11.0.19"
api-version: 1.13
api: "1.13"
website: "https://github.com/Unprotesting/Auto-Tune"
Expand Down
Loading

0 comments on commit 636c521

Please sign in to comment.