Compare commits
3
Commits
0.109.1-tss3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
344c9ca6ca | ||
|
|
d1eb4191e9 | ||
|
|
23698ced3e |
@@ -22,13 +22,12 @@ jobs:
|
||||
with:
|
||||
java-version: '25'
|
||||
distribution: 'temurin'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: 'Build'
|
||||
run: ./gradlew build --no-daemon
|
||||
|
||||
- name: 'Upload artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: MobArena.jar
|
||||
path: build/libs/MobArena-*.jar
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id("java-library")
|
||||
id("com.gradleup.shadow") version "9.6.1"
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
group = "com.garbagemule"
|
||||
@@ -71,6 +72,17 @@ tasks {
|
||||
// Let the build task produce the final artifact.
|
||||
build { dependsOn(shadowJar) }
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("shadow") {
|
||||
groupId = "com.garbagemule"
|
||||
artifactId = "MobArena"
|
||||
version = project.version.toString()
|
||||
artifact(tasks.shadowJar)
|
||||
}
|
||||
}
|
||||
}
|
||||
val checkNoLegacyMaterialApi = tasks.register("checkNoLegacyMaterialApi") {
|
||||
group = "verification"
|
||||
description = "Fails if legacy Bukkit material access returns to production sources."
|
||||
|
||||
@@ -134,6 +134,7 @@ public class ArenaImpl implements Arena
|
||||
private Map<Integer, ThingPicker> everyWaveMap, afterWaveMap, waveTiersMap;
|
||||
private double spawnpointMinDistanceSquared;
|
||||
private double spawnpointMaxDistanceSquared;
|
||||
private int leaveBufferDistance;
|
||||
|
||||
// Misc
|
||||
private ArenaListener eventListener;
|
||||
@@ -220,6 +221,7 @@ public class ArenaImpl implements Arena
|
||||
this.waveTiersMap = MAUtils.getArenaRewardMap(plugin, section, name, "tiers");
|
||||
this.spawnpointMinDistanceSquared = Math.pow(settings.getDouble("spawnpoint-min-distance", 0), 2);
|
||||
this.spawnpointMaxDistanceSquared = Math.pow(settings.getDouble("spawnpoint-max-distance", 15), 2);
|
||||
this.leaveBufferDistance = settings.getInt("leave-buffer-distance", 3);
|
||||
|
||||
// Misc
|
||||
this.eventListener = new ArenaListener(this, plugin);
|
||||
@@ -403,6 +405,11 @@ public class ArenaImpl implements Arena
|
||||
return spawnpointMaxDistanceSquared;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLeaveBufferDistance() {
|
||||
return leaveBufferDistance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaveManager getWaveManager() {
|
||||
return waveManager;
|
||||
|
||||
@@ -345,7 +345,7 @@ public class MASpawnThread implements Runnable
|
||||
private void removeCheatingPlayers() {
|
||||
List<Player> players = new ArrayList<>(arena.getPlayersInArena());
|
||||
for (Player p : players) {
|
||||
if (region.contains(p.getLocation())) {
|
||||
if (region.contains(p.getLocation(), arena.getLeaveBufferDistance())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ public interface Arena
|
||||
|
||||
double getSpawnpointMaxDistanceSquared();
|
||||
|
||||
int getLeaveBufferDistance();
|
||||
|
||||
WaveManager getWaveManager();
|
||||
|
||||
ArenaListener getEventListener();
|
||||
|
||||
@@ -29,6 +29,7 @@ wave-interval: 15
|
||||
final-wave: 0
|
||||
spawnpoint-min-distance: 0
|
||||
spawnpoint-max-distance: 15
|
||||
leave-buffer-distance: 3
|
||||
monster-limit: 100
|
||||
monster-exp: false
|
||||
keep-exp: false
|
||||
|
||||
Reference in New Issue
Block a user