Removed problems from old Denizen code

This commit is contained in:
Rares Bozga
2025-12-10 22:36:00 +02:00
parent ee1528fe87
commit a77544467d
28 changed files with 92 additions and 81 deletions

View File

@@ -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."

View File

@@ -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>

View File

@@ -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>]>: