mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-22 18:46:45 +01:00
Add per-arena setting auto-ignite-fuse
.
This new setting allows changing the fuse time for auto-ignited TNT, which is normally a hardcoded 80 ticks in Minecraft. Note the somewhat weak safeguarding without any sort of error message - with great power comes great responsibility... Closes #715
This commit is contained in:
parent
b9b4d0d204
commit
c88f20c46f
@ -17,6 +17,7 @@ These changes will (most likely) be included in the next version.
|
|||||||
- Pet names are now per-class configurable via the optional `pet-name` property, which defaults to `<display-name>'s pet` (the `<player-name>` variable is also supported).
|
- Pet names are now per-class configurable via the optional `pet-name` property, which defaults to `<display-name>'s pet` (the `<player-name>` variable is also supported).
|
||||||
- New per-arena setting `auto-leave-on-end` can be used to automatically "kick" spectators when the current session ends.
|
- New per-arena setting `auto-leave-on-end` can be used to automatically "kick" spectators when the current session ends.
|
||||||
- New per-arena setting `clear-wave-leeway` allows for tweaking the number of mobs allowed to be alive before the next wave spawns. The setting affects `clear-wave-before-next`, `clear-wave-before-boss`, and the final wave check, and it defaults to 0.
|
- New per-arena setting `clear-wave-leeway` allows for tweaking the number of mobs allowed to be alive before the next wave spawns. The setting affects `clear-wave-before-next`, `clear-wave-before-boss`, and the final wave check, and it defaults to 0.
|
||||||
|
- New per-arena setting `auto-ignite-fuse` makes the fuse time for auto-ignited TNT configurable. The unit is ticks and defaults to 80.
|
||||||
- Added boss abilities `disorient-all`, `fetch-all`, `pull-all`, and `throw-all`. These abilities work like their target-specific and distance-based counterparts, but affect all players in the arena.
|
- Added boss abilities `disorient-all`, `fetch-all`, `pull-all`, and `throw-all`. These abilities work like their target-specific and distance-based counterparts, but affect all players in the arena.
|
||||||
- (API) MobArena's internal command handler now supports registering pre-instantiated subcommand instances. This should make it easier for extensions to avoid the Singleton anti-pattern for command dependencies.
|
- (API) MobArena's internal command handler now supports registering pre-instantiated subcommand instances. This should make it easier for extensions to avoid the Singleton anti-pattern for command dependencies.
|
||||||
- (API) MobArena now fires MobArenaPreReloadEvent and MobArenaReloadEvent before and after, respectively, reloading its config-file. This should allow extensions and other plugins to better respond to configuration changes.
|
- (API) MobArena now fires MobArenaPreReloadEvent and MobArenaReloadEvent before and after, respectively, reloading its config-file. This should allow extensions and other plugins to better respond to configuration changes.
|
||||||
|
@ -123,6 +123,7 @@ public class ArenaListener
|
|||||||
private boolean allowTeleport,
|
private boolean allowTeleport,
|
||||||
canShare,
|
canShare,
|
||||||
autoIgniteTNT;
|
autoIgniteTNT;
|
||||||
|
private int autoIgniteFuse;
|
||||||
|
|
||||||
private Set<Player> banned;
|
private Set<Player> banned;
|
||||||
|
|
||||||
@ -146,6 +147,7 @@ public class ArenaListener
|
|||||||
this.allowTeleport = s.getBoolean("allow-teleporting", false);
|
this.allowTeleport = s.getBoolean("allow-teleporting", false);
|
||||||
this.canShare = s.getBoolean("share-items-in-arena", true);
|
this.canShare = s.getBoolean("share-items-in-arena", true);
|
||||||
this.autoIgniteTNT = s.getBoolean("auto-ignite-tnt", false);
|
this.autoIgniteTNT = s.getBoolean("auto-ignite-tnt", false);
|
||||||
|
this.autoIgniteFuse = s.getInt("auto-ignite-fuse", 80);
|
||||||
this.useClassChests = s.getBoolean("use-class-chests", false);
|
this.useClassChests = s.getBoolean("use-class-chests", false);
|
||||||
|
|
||||||
this.classLimits = arena.getClassLimitManager();
|
this.classLimits = arena.getClassLimitManager();
|
||||||
@ -284,6 +286,7 @@ public class ArenaListener
|
|||||||
stack.setAmount(stack.getAmount() - 1);
|
stack.setAmount(stack.getAmount() - 1);
|
||||||
TNTPrimed tnt = b.getWorld().spawn(b.getRelative(BlockFace.UP).getLocation(), TNTPrimed.class);
|
TNTPrimed tnt = b.getWorld().spawn(b.getRelative(BlockFace.UP).getLocation(), TNTPrimed.class);
|
||||||
tnt.setSource(event.getPlayer());
|
tnt.setSource(event.getPlayer());
|
||||||
|
tnt.setFuseTicks(Math.max(0, autoIgniteFuse));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ food-regen: false
|
|||||||
lock-food-level: true
|
lock-food-level: true
|
||||||
player-time-in-arena: world
|
player-time-in-arena: world
|
||||||
auto-ignite-tnt: false
|
auto-ignite-tnt: false
|
||||||
|
auto-ignite-fuse: 80
|
||||||
auto-start-timer: 0
|
auto-start-timer: 0
|
||||||
start-delay-timer: 0
|
start-delay-timer: 0
|
||||||
auto-ready: false
|
auto-ready: false
|
||||||
|
Loading…
Reference in New Issue
Block a user