mirricraft-skript/mirricraft-gamemode.sk

47 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2023-04-26 14:44:54 +00:00
#--------------------------------------------------
#
# MIRRICRAFT
# by Christer Warén / Warén Group
#
#--------------------------------------------------
command /gamemode [<string>] [<player>]:
2020-10-24 03:31:01 +00:00
description: Game Mode
aliases: /gm
2020-10-24 03:42:03 +00:00
executable by: console and players
2020-10-24 03:31:01 +00:00
trigger:
2023-04-26 14:44:54 +00:00
if arg-2 is not set:
if arg-1 is "0" or "s" or "survival":
if player has the permission "mirricraft.gamemode.survival":
set gamemode of player to Survival
stop
else if arg-1 is "1" or "c" or "creative":
if player has the permission "mirricraft.gamemode.creative":
set gamemode of player to Creative
stop
else if arg-1 is "2" or "a" or "adventure":
if player has the permission "mirricraft.gamemode.adventure":
set gamemode of player to Adventure
stop
else if arg-1 is "3" or "sp" or "spectator":
if player has the permission "mirricraft.gamemode.spectator":
set gamemode of player to Spectator
stop
else:
message "&7[&2MirriCraft&7]&r Valitse pelitila" to player
2020-10-24 03:31:01 +00:00
stop
2023-04-26 14:44:54 +00:00
if arg-2 is set:
if player has the permission "mirricraft.admin":
if arg-1 is "0" or "s" or "survival":
set gamemode of arg-2 to Survival
stop
else if arg-1 is "1" or "c" or "creative":
set gamemode of arg-2 to Creative
stop
else if arg-1 is "2" or "a" or "adventure":
set gamemode of arg-2 to Adventure
stop
else if arg-1 is "3" or "sp" or "spectator":
set gamemode of arg-2 to Spectator
stop