Paste #29265: Untitled Paste

Date: 2016/01/28 03:46:01 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


xBanSystem: 
  type: command 
  name: ban 
  description: Sperre einen Spieler. 
  script: 
  - if <context.args.get[1]> == Baartmaan { 
    - narrate "<&c>System <&8><&chr[00BB]> <&7>Du kannst dich nicht selbst sperren!" 
  } 
  else if <context.args.get[1]> == <server.list_online_players.formatted> {
   - if <context.args.size > 16 {
    - yaml load:BANSYSTEM 
    - yaml set id:BANSYSTEM <player.uuid>.NAME:<player.name> 
    - yaml set id:BANSYSTEM <player.uuid>.IPAdresse:<player.ip.address> 
    - yaml set id:BANSYSTEM <player.uuid>.banned:true
    - yaml set id:BANSYSTEM "<player.uuid>.grund:<context.args.get[2].to[16].space_separated>
    - yaml savefile:BANSYSTEM id:BANSYSTEM
    - announce " "
    - announce "<&8><&l><&chr[00BB]> <&7>Der Spieler <&c><context.args.get[1]> <&7>wurde von <&c><pl.name><&7> permanent gesperrt!"
    - announce "<&8><&l><&chr[00BB]> <&7>Grund: <&c><context.args.get[2].to[16].space_separated>"
   } else {
    - narrate "only 15 args.."
   }
  } 
  else if <context.args.get[1]> == firststart { 
    - yaml create id:BANSYSTEM 
    - yaml savefile:BANSYSTEM id:BANSYSTEM 
    - yaml load:BANSYSTEM id:BANSYSTEM 
    - narrate "succes" 
  } else { 
    - narrate "usage /ban [player]" 
  }