Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ build/
.gradle/
*/.gradle/
!gradle/*/*.jar
.vscode/*
9 changes: 4 additions & 5 deletions BlueBridgeCore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ buildscript {
}
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:6.0.0"
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.0'
}

}

plugins {
id "com.github.johnrengelman.shadow" version "6.0.0"
}
apply plugin: 'com.gradleup.shadow'


dependencies {
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.5.0'
compileOnly 'de.bluecolored.bluemap:BlueMapAPI:2.7.2'
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
implementation 'org.apache.commons:commons-text:1.9'
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
}

tasks.build.dependsOn tasks.shadowJar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class BlueMapIntegration {

public void onEnable(BlueMapAPI blueMapAPI) {
this.blueMapAPI = blueMapAPI;
Bukkit.getScheduler().runTask(BlueBridgeCore.getInstance(), () -> {
Bukkit.getAsyncScheduler().runNow(BlueBridgeCore.getInstance(), x -> {
BlueBridgeCore.getInstance().updateConfig();
BlueBridgeCore.getInstance().reloadAddons();
createMarkerSets();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;

public class UpdateTask extends BukkitRunnable {

Expand All @@ -34,7 +35,7 @@ public static synchronized void resetLastSnapshots() {
public static synchronized void createAndSchedule(boolean instant) {
if (currentTask == null && !locked) {
currentTask = new UpdateTask();
currentTask.runTaskLater(BlueBridgeCore.getInstance(), instant ? 0L : BlueBridgeConfig.updateInterval());
Bukkit.getAsyncScheduler().runDelayed(BlueBridgeCore.getInstance(), x -> currentTask.run(), instant ? 0L : BlueBridgeConfig.updateInterval()*50, TimeUnit.MICROSECONDS);
}
}

Expand All @@ -53,14 +54,14 @@ public void run() {
for (BlueBridgeAddon addon : addons) {
if(addon.supportsAsync()) continue;
collectSnapshots(addon, newSnapshots);
}
Bukkit.getScheduler().runTaskAsynchronously(BlueBridgeCore.getInstance(), () ->{
for (BlueBridgeAddon addon : addons) {
if(!addon.supportsAsync()) continue;
collectSnapshots(addon, newSnapshots);
}
doUpdate(newSnapshots);
});
Bukkit.getAsyncScheduler().runNow(BlueBridgeCore.getInstance(), x -> {
for (BlueBridgeAddon addon : addons) {
if(!addon.supportsAsync()) continue;
collectSnapshots(addon, newSnapshots);
}
doUpdate(newSnapshots);
});
}

private void collectSnapshots(BlueBridgeAddon addon, ConcurrentMap<String, ConcurrentMap<String, RegionSnapshot>> newSnapshots){
Expand Down
2 changes: 1 addition & 1 deletion BlueBridgeCore/src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Number of ticks to wait between every update. The default of 200 means 10 seconds.
# Number of ticks (1 tick is 50 miliseconds) to wait between every update. The default of 200 means 10 seconds.
updateInterval: 200

# If this is set to true, all regions will be displayed as markers by default unless their region specific setting is false.
Expand Down
3 changes: 2 additions & 1 deletion BlueBridgeCore/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ version: ${gradleVersion}
authors: [ ${ contributors } ]
website: https://github.com/Mark-225/BlueBridge
api-version: 1.13
depend: [ "BlueMap" ]
depend: [ "BlueMap" ]
folia-supported: true
3 changes: 2 additions & 1 deletion BlueBridgeGP/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dependencies {
implementation project(':BlueBridgeCore')
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.5.0'
provided 'de.bluecolored.bluemap:BlueMapAPI:2.7.2'
implementation 'com.github.TechFortress:GriefPrevention:16.17.1'
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public void addOrUpdateClaim(Claim claim) {
//Schedule updates for all child claims
if (claim.children != null && !claim.children.isEmpty()) {
for (Claim child : claim.children) {
Bukkit.getScheduler().runTaskLater(BlueBridgeGP.getInstance(), () -> {
Bukkit.getAsyncScheduler().runNow(BlueBridgeGP.getInstance(), x -> {
addOrUpdateClaim(child);
}, 0l);
});
}
}

Expand Down
3 changes: 2 additions & 1 deletion BlueBridgeGP/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ version: ${gradleVersion}
authors: [ ${ contributors } ]
website: https://github.com/Mark-225/BlueBridge
api-version: 1.13
depend: [ "BlueBridgeCore", "GriefPrevention" ]
depend: [ "BlueBridgeCore", "GriefPrevention" ]
folia-supported: true
2 changes: 1 addition & 1 deletion BlueBridgeWB/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
implementation project(':BlueBridgeCore')
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.5.0'
provided 'de.bluecolored.bluemap:BlueMapAPI:2.7.2'
}
3 changes: 2 additions & 1 deletion BlueBridgeWB/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ version: ${gradleVersion}
authors: [ ${ contributors } ]
website: https://github.com/Mark-225/BlueBridge
api-version: 1.13
depend: [ "BlueBridgeCore" ]
depend: [ "BlueBridgeCore" ]
folia-supported: true
2 changes: 1 addition & 1 deletion BlueBridgeWG/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ repositories {

dependencies {
implementation project(':BlueBridgeCore')
provided 'com.github.BlueMap-Minecraft:BlueMapAPI:2.5.0'
provided 'de.bluecolored.bluemap:BlueMapAPI:2.7.2'
implementation 'com.sk89q.worldguard:worldguard-bukkit:7.0.0'
}
3 changes: 2 additions & 1 deletion BlueBridgeWG/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ version: ${gradleVersion}
authors: [ ${ contributors } ]
website: https://github.com/Mark-225/BlueBridge
api-version: 1.13
depend: [ "BlueBridgeCore", "WorldGuard" ]
depend: [ "BlueBridgeCore", "WorldGuard" ]
folia-supported: true
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins{
id "java"
id "idea"
id 'com.gradleup.shadow' version '8.3.0'
}

subprojects {
Expand All @@ -12,15 +13,16 @@ subprojects {
//Contributors are added to this list in the order of their first contribution. Separate using a comma and space.
def authors = 'Mark_225, Aurelien30000'

sourceCompatibility = 11
targetCompatibility = 11
sourceCompatibility = 21
targetCompatibility = 21

group 'de.mark225'

repositories {
mavenCentral()
maven { url 'https://repo.bluecolored.de/releases' }
maven { url "https://jitpack.io" }
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots" }
maven { url "https://repo.papermc.io/repository/maven-public/" }
}

configurations {
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.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists