Skip to content

Commit

Permalink
Merge pull request #1652 from ProjectTSB/add/effect-api-give-operation
Browse files Browse the repository at this point in the history
✨ EffectAPI/give で Operation 系を指定できるように
  • Loading branch information
ChenCMD authored Nov 24, 2024
2 parents 3c6cd33 + 4ca8577 commit 859418a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
execute unless data storage asset:effect Duration run data modify storage asset:effect Duration set from storage api: Argument.Duration
execute if data storage asset:effect Stack if data storage api: Argument.Stack run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"Effect の Stack が API とデフォルト値の両方で設定されています"}]
execute unless data storage asset:effect Stack run data modify storage asset:effect Stack set from storage api: Argument.Stack
execute unless data storage asset:effect DurationOperation run data modify storage asset:effect DurationOperation set from storage api: Argument.DurationOperation
execute unless data storage asset:effect StackOperation run data modify storage asset:effect StackOperation set from storage api: Argument.StackOperation
# デフォルト値
execute unless data storage asset:effect Stack run data modify storage asset:effect Stack set value 1
execute unless data storage asset:effect DurationOperation run data modify storage asset:effect DurationOperation set value "replace"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Argument.ID : int
# Argument.Duration? : int (default: Asset | error)
# Argument.Stack? : int (default: 1)
# Argument.DurationOperation? : "forceReplace" | "replace" | "add" (default: "replace")
# Argument.StackOperation? : "forceReplace" | "replace" | "add" (default: "replace")
# Argument.FieldOverride? : compound
# @api

Expand All @@ -17,4 +19,6 @@
data remove storage api: Argument.ID
data remove storage api: Argument.Duration
data remove storage api: Argument.Stack
data remove storage api: Argument.DurationOperation
data remove storage api: Argument.StackOperation
data remove storage api: Argument.FieldOverride

0 comments on commit 859418a

Please sign in to comment.