Zeldaboy111

Regenerating Mines! ]|[ Skript #451

Sep 17th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. options:
  2. prefix: &6Mines&8:&7
  3.  
  4. on quit:
  5. delete {mine.user.%uuid of player%.isConfirmingMine}
  6.  
  7. command /mine [<text>] [<text>] [<text>] [<text>] [<text>]:
  8. aliases: /mines
  9. trigger:
  10. if executor is not a player:
  11. send "{@prefix} This command can only be executed by a player."
  12. else if arg-1 is "create":
  13. if arg-2 is not set:
  14. send "{@prefix} Invalid Usage! &e/mine create <id> <length> <depth> <width>&7."
  15. else if {mine.list::*} contains arg-2 in lower case:
  16. send "{@prefix} A mine with the id &e%arg-2 in lower case% &7already exists."
  17. else if isNotANumber(arg-3), isNotANumber(arg-4) or isNotANumber(arg-5) is false:
  18. stop
  19. else:
  20. # Make the user confirm creating this mine.
  21.  
  22. else if arg-1 is "delete":
  23. # Delete a mine
  24. else if arg-1 is "confirm":
  25. if {mine.user.%uuid of player%.isConfirmingMine} is not true:
  26. send "{@prefix} Invalid Usage! &e/mine <create | delete> <id> <length> <depth> <width>&7."
  27. else:
  28. # Confirm creating a mine
  29. else:
  30. send "{@prefix} Invalid Usage! &e/mine <create | delete> <id> <length> <depth> <width>&7."
  31.  
  32. function isNotANumber(input: String) :: Boolean:
  33.  
  34. # Send an error-msg, and send all previous placed numbers
  35. return false
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment