Skip to content

Commit

Permalink
Merge branch 'main' into feature/hikari-cp
Browse files Browse the repository at this point in the history
# Conflicts:
#	Core/build.gradle.kts
#	Core/src/main/java/com/plotsquared/core/database/SQLManager.java
  • Loading branch information
TheMeinerLP committed Nov 26, 2023
2 parents fd68e22 + 31ae62b commit b6a0a39
Show file tree
Hide file tree
Showing 94 changed files with 1,289 additions and 586 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: |
Thanks for taking the time to fill out this bug report for PlotSquared! Fill out the following form to your best ability to help us fix the problem.
Only use this if you're absolutely sure that you found a bug and can reproduce it. For anything else, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.github.io/plotsquared-documentation/).
Only use this if you're absolutely sure that you found a bug and can reproduce it. For anything else, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.gitbook.io/plotsquared/).
Do NOT use the public issue tracker to report security vulnerabilities! They are disclosed using [this](https://github.com/IntellectualSites/PlotSquared/security/policy) GitHub form!
- type: dropdown
Expand All @@ -27,7 +27,7 @@ body:
description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
multiple: false
options:
- '1.20.1'
- '1.20.2'
- '1.20'
- '1.19.4'
- '1.19.3'
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://discord.gg/intellectualsites
about: Our support Discord, please ask questions and seek support here.
- name: PlotSquared Wiki
url: https://intellectualsites.github.io/plotsquared-documentation/
url: https://intellectualsites.gitbook.io/plotsquared/
about: Take a look at the wiki page for instructions how to setup PlotSquared and use its commands.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: |
Thanks for taking the time to fill out this feature request for PlotSquared! Fill out the following form to your best ability to help us understand your feature request and greately improve the change of it getting added.
For anything else than a feature request, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.github.io/plotsquared-documentation/).
For anything else than a feature request, use: [our Discord server](https://discord.gg/intellectualsites) or [the wiki](https://intellectualsites.gitbook.io/plotsquared/).
- type: textarea
attributes:
Expand Down
9 changes: 8 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
"config:base",
":semanticCommitsDisabled"
],
"automerge": true,
"labels": [
"dependencies"
],
"rebaseWhen": "conflicted",
"schedule": ["on the first day of the month"]
"schedule": ["on the first day of the month"],
"ignoreDeps": [
"com.google.code.gson:gson",
"com.google.guava:guava",
"org.yaml:snakeyaml",
"org.apache.logging.log4j:log4j-api"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Java
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Java
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Publish core javadoc
# if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
Expand All @@ -54,7 +54,7 @@ jobs:
target-branch: main
target-directory: v7/core
- name: Publish bukkit javadoc
# if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
language: [ 'java' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/label-merge-conflicts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Label conflicting PRs"
on:
push:
pull_request_target:
types: [ synchronize ]
pull_request:
types: [ synchronize ]

permissions:
pull-requests: write

jobs:
main:
if: github.event.pull_request.user.login != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Label conflicting PRs
uses: eps1lon/[email protected]
with:
dirtyLabel: "unresolved-merge-conflict"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "Please take a moment and address the merge conflicts of your pull request. Thanks!"
continueOnMissingPermissions: true
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,5 @@ build/

.DS_Store
# Ignore run folders
run-[0-0].[0-9]/
run-[0-0].[0-9].[0-9]/

run-[0-9].[0-9][0-9]/
run-[0-9].[0-9][0-9].[0-9]/
22 changes: 11 additions & 11 deletions Bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ dependencies {
api(projects.plotsquaredCore)

// Metrics
implementation("org.bstats:bstats-bukkit")
implementation(libs.bstatsBukkit)

// Paper
compileOnly("io.papermc.paper:paper-api")
implementation("io.papermc:paperlib")
compileOnly(libs.paper)
implementation(libs.paperlib)

// Plugins
compileOnly(libs.worldeditBukkit) {
exclude(group = "org.bukkit")
exclude(group = "org.spigotmc")
}
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false }
testImplementation("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false }
compileOnly("com.github.MilkBowl:VaultAPI") {
compileOnly(libs.faweBukkit) { isTransitive = false }
testImplementation(libs.faweBukkit) { isTransitive = false }
compileOnly(libs.vault) {
exclude(group = "org.bukkit")
}
compileOnly(libs.placeholderapi)
Expand All @@ -44,15 +44,15 @@ dependencies {

// Other libraries
implementation(libs.squirrelid) { isTransitive = false }
implementation("dev.notmyfault.serverlib:ServerLib")
implementation(libs.serverlib)

// Our libraries
implementation(libs.arkitektonika)
implementation("com.intellectualsites.paster:Paster")
implementation("com.intellectualsites.informative-annotations:informative-annotations")
implementation(libs.paster)
implementation(libs.informativeAnnotations)

// Adventure
implementation("net.kyori:adventure-platform-bukkit")
implementation(libs.adventureBukkit)
}

tasks.processResources {
Expand Down Expand Up @@ -100,7 +100,7 @@ tasks {
withType<Javadoc> {
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
val opt = options as StandardJavadocDocletOptions
opt.links("https://jd.papermc.io/paper/1.19/")
opt.links("https://jd.papermc.io/paper/1.20/")
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
opt.links("https://intellectualsites.github.io/plotsquared-javadocs/core/")
opt.links("https://jd.advntr.dev/api/4.14.0/")
Expand Down
23 changes: 21 additions & 2 deletions Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.plotsquared.bukkit.listener.EntitySpawnListener;
import com.plotsquared.bukkit.listener.PaperListener;
import com.plotsquared.bukkit.listener.PlayerEventListener;
import com.plotsquared.bukkit.listener.PlayerEventListener1201;
import com.plotsquared.bukkit.listener.ProjectileEventListener;
import com.plotsquared.bukkit.listener.ServerListener;
import com.plotsquared.bukkit.listener.SingleWorldListener;
Expand Down Expand Up @@ -135,6 +136,7 @@
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
Expand Down Expand Up @@ -252,6 +254,7 @@ public int versionMaxHeight() {
}

@Override
@SuppressWarnings("deprecation") // Paper deprecation
public void onEnable() {
this.pluginName = getDescription().getName();

Expand Down Expand Up @@ -357,6 +360,9 @@ public void onEnable() {

if (Settings.Enabled_Components.EVENTS) {
getServer().getPluginManager().registerEvents(injector().getInstance(PlayerEventListener.class), this);
if ((serverVersion()[1] == 20 && serverVersion()[2] >= 1) || serverVersion()[1] > 20) {
getServer().getPluginManager().registerEvents(injector().getInstance(PlayerEventListener1201.class), this);
}
getServer().getPluginManager().registerEvents(injector().getInstance(BlockEventListener.class), this);
if (serverVersion()[1] >= 17) {
getServer().getPluginManager().registerEvents(injector().getInstance(BlockEventListener117.class), this);
Expand Down Expand Up @@ -550,7 +556,7 @@ public void onEnable() {
this.startMetrics();

if (Settings.Enabled_Components.WORLDS) {
TaskManager.getPlatformImplementation().taskRepeat(this::unload, TaskTime.seconds(1L));
TaskManager.getPlatformImplementation().taskRepeat(this::unload, TaskTime.seconds(10L));
try {
singleWorldListener = injector().getInstance(SingleWorldListener.class);
Bukkit.getPluginManager().registerEvents(singleWorldListener, this);
Expand Down Expand Up @@ -812,6 +818,7 @@ private void runEntityTask() {
case "MINECART_MOB_SPAWNER":
case "ENDER_CRYSTAL":
case "MINECART_TNT":
case "CHEST_BOAT":
case "BOAT":
if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) {
com.plotsquared.core.location.Location location = BukkitUtil.adapt(entity.getLocation());
Expand Down Expand Up @@ -1160,6 +1167,7 @@ public void setGenerator(final @NonNull String worldName) {
return new BukkitPlotGenerator(world, generator, this.plotAreaManager);
}

@SuppressWarnings("deprecation") // Paper deprecation
@Override
public @NonNull String pluginsFormatted() {
StringBuilder msg = new StringBuilder();
Expand All @@ -1176,12 +1184,23 @@ public void setGenerator(final @NonNull String worldName) {
.append(" • Load Before: ").append(p.getDescription().getLoadBefore()).append("\n")
.append(" • Dependencies: ").append(p.getDescription().getDepend()).append("\n")
.append(" • Soft Dependencies: ").append(p.getDescription().getSoftDepend()).append("\n");
List<RegisteredServiceProvider<?>> providers = Bukkit.getServicesManager().getRegistrations(p);
if (!providers.isEmpty()) {
msg.append(" • Provided Services: \n");
for (RegisteredServiceProvider<?> provider : providers) {
msg.append(" • ")
.append(provider.getService().getName()).append(" = ")
.append(provider.getProvider().getClass().getName())
.append(" (priority: ").append(provider.getPriority()).append(")")
.append("\n");
}
}
}
return msg.toString();
}

@Override
@SuppressWarnings("ConstantConditions")
@SuppressWarnings({"ConstantConditions", "deprecation"}) // Paper deprecation
public @NonNull String worldEditImplementations() {
StringBuilder msg = new StringBuilder();
if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
Expand Down
Loading

0 comments on commit b6a0a39

Please sign in to comment.