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