mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-28 05:45:10 -06:00
Desert heat command
This commit is contained in:
parent
be744e73b3
commit
1b5bd736bb
2 changed files with 8 additions and 0 deletions
|
|
@ -74,6 +74,9 @@ public final class DesertZone extends MapZone implements Plugin<Object> {
|
|||
* @param p the <code>Player</code>.
|
||||
*/
|
||||
private static void effect(Player p) {
|
||||
if (p.getAttribute("/save:desert-heat-disabled", false)) {
|
||||
return;
|
||||
}
|
||||
p.setAttribute("desert-delay", GameWorld.getTicks() + getDelay(p));
|
||||
evaporate(p);
|
||||
if (drink(p)) {
|
||||
|
|
|
|||
|
|
@ -508,5 +508,10 @@ class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) {
|
|||
player.debug("Penguin spawned at:$pengCoords")
|
||||
}
|
||||
|
||||
define("heat", Privilege.ADMIN, "::heat", "Toggles desert heat damage.") { player, _ ->
|
||||
val disabled = !player.getAttribute("/save:desert-heat-disabled", false)
|
||||
player.setAttribute("/save:desert-heat-disabled", disabled)
|
||||
notify(player, "Desert heat is ${if (disabled) "disabled" else "enabled"}.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue