- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleUntitled Paste
TypeDenizen Script
Date2016/01/28 02:29:59 UTC-08:00
ByGuest
Other
Paste
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
4100
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> {
    - yaml load:BANSYSTEM
    - yaml set id:BANSYSTEM <player>.NAME:<player.name>
    - yaml set id:BANSYSTEM <player>.IPAdresse:<player.ip.address>
    - yaml set id:BANSYSTEM <player>.banned:true
    - yaml savefile:BANSYSTEM id:BANSYSTEM
   } 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]"
   }

BanListener:
  type: world
  events:
   on player login:
    - ^announce "WUHU"   
    - yaml load:BANSYSTEM id:BANSYSTEM  
    - execute as_server 'ex announce "<gold> <yaml[BANSYSTEM].read[<pl>]>"'
    - if <yaml[BANSYSTEM].read[<pl>].contains[<player>.banned:true]> { 
     - DETERMINE "KICKED TEST" 
    }
    #- DETERMINE "KICKED <&9><&l>Andoria<&nl><&7>Du wurdest permanent von Andoria gesperrt" 
   on player joins:
    - if !<yaml[BANSYSTEM].contains[<pl>]> {
     - yaml set id:BANSYSTEM <player>.NAME:<player.name>
     - yaml set id:BANSYSTEM <player>.IPAdresse:<player.ip.address>
     - yaml set id:BANSYSTEM <player>.banned:false
     - yaml savefile:BANSYSTEM id:BANSYSTEM
    } 



RawRaw



Pastes made: 76867