ReplaceItem class
- Inheritance
-
- Object
- Widget
- RestActionAble
- ReplaceItem
Constructors
- ReplaceItem(Entity? entity, {required Item? item, required Slot slot})
- Sets a specific container slot to a item for Entities.
- ReplaceItem.block(Location? loc, {required Item? item, required Slot slot})
- To set items inside a block use ReplaceItem.block:
- ReplaceItem.clear(dynamic target, Slot slot)
- Use ReplaceItem.clear to clear a specific slot you can
- ReplaceItem.from(dynamic target, {required dynamic from, required Slot? fromSlot, required Slot slot, String? modifier})
-
To copy an Item from one slot to another use
ReplaceItem.from
: - ReplaceItem.modify(dynamic target, String? modifier, {required Slot slot})
- ReplaceItem.modify takes a modifier path and applies it to an slot.
Properties
- called ↔ bool
-
Contains the Information, if this RestAction is already called (and can't be called again)
getter/setter pairinherited
- entity ↔ Entity?
-
getter/setter pair
- fromEntity ↔ Entity?
-
getter/setter pair
- fromLoc ↔ Location?
-
getter/setter pair
- fromSlot ↔ Slot?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- item ↔ Item?
-
getter/setter pair
- loc ↔ Location?
-
getter/setter pair
- modifier ↔ String?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slot ↔ Slot
-
getter/setter pair
-
writable
↔ List<
Widget> ? -
The writable list the RestAction writes it's contents on
getter/setter pairinherited
Methods
-
generate(
Context context) → Widget -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queue(
[List< Widget> ? writable]) → void -
Execute this method to add this to the WidgetList (can use default list or as parameter given list)
This method can only be executed once, if it is executed multiple times you will get an Error. You can read out if it is already executed in the boolean Called
Example for a queue method:
inherited
-
toMap(
) → dynamic -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited