Removed problems from old Denizen code
This commit is contained in:
@@ -82,8 +82,7 @@ apartments_command_apartmentremoveaccess:
|
||||
- aptrm
|
||||
permission: apartments.command.apartmentremoveaccess
|
||||
tab completions:
|
||||
# TODO: use the procedural tab-complete to handle this correctly!
|
||||
1: <server.online_players.parse[name]>
|
||||
1: <proc[apartments_all_with_access].context[<player>].parse[name]>
|
||||
script:
|
||||
- if <context.source_type> != player:
|
||||
- narrate "<&c>Please run this command as a player."
|
||||
|
||||
@@ -109,3 +109,17 @@ apartments_end_edit:
|
||||
- inventory set origin:<[item]> slot:<[slot]> player:<[player]>
|
||||
- adjust <[player]> gamemode:survival
|
||||
- flag <[player]> apartments_edit:!
|
||||
|
||||
apartments_all_with_access:
|
||||
debug: false
|
||||
type: procedure
|
||||
definitions: player
|
||||
script:
|
||||
- define location <player.location>
|
||||
- define apartment <proc[apartments_at].context[<[location]>]>
|
||||
- if <[apartment]> == null:
|
||||
- determine <list[]>
|
||||
- define owner <proc[apartments_owner].context[<[apartment]>]>
|
||||
- if <[owner]> != <[player]>:
|
||||
- determine <list[]>
|
||||
- determine <[owner].flag[apartments_access].get[<[apartment]>].if_null[<list[]>].keys>
|
||||
|
||||
@@ -12,7 +12,7 @@ apartments_world:
|
||||
## invalid access
|
||||
on player right clicks block:
|
||||
- if <player.is_op>:
|
||||
- stop
|
||||
- stop
|
||||
- if <context.location.if_null[null]> == null:
|
||||
- stop
|
||||
- if !<proc[apartments_access].context[<player>|<context.location>]>:
|
||||
|
||||
Reference in New Issue
Block a user