Scoreboard class

Inheritance

Constructors

Scoreboard(String name, {String type = 'dummy', TextComponent? display, bool addIntoLoad = true})
A scoreboard objective holds values, kind a like a Variable inside Minecraft.
Scoreboard.add(String name, {String type = 'dummy', TextComponent? display})
The Scoreboard.add constructor does exactly the same as Scoreboard but puts the result without checking in the current file.
Scoreboard.click(String name, {TextComponent? display, bool addIntoLoad = true, bool removeOld = false})
The Scoreboard.click constructor adds a carrot on a stick click event objective
factory
Scoreboard.modify(String name, {bool? useHearts = false})
Scoreboard.remove(String name)
Scoreboard.remove removes an objective by its name again.
Scoreboard.setdisplay(String name, {String display = 'sidebar'})
With Scoreboard.setdisplay you can display the values:
Scoreboard.trigger(String name, {TextComponent? display, bool addIntoLoad = true, bool removeOld = false})
The Scoreboard.trigger constructor adds a trigger objective
factory
Scoreboard.villager(String name, {TextComponent? display, bool addIntoLoad = true, bool removeOld = false})
The Scoreboard.click constructor adds a carrot on a stick click event objective
factory

Properties

all Score
Scoreboard.all is a shortcut for ScoreboardEntity.All()
no setter
called bool
Contains the Information, if this RestAction is already called (and can't be called again)
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
name String
getter/setter pair
player Score
Scoreboard.player is a shortcut for ScoreboardEntity.Player()
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
self Score
Scoreboard.self is a shortcut for ScoreboardEntity.Self()
no setter
subcommand String
final
type String
getter/setter pair
useHearts bool?
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
prefixName() → void
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() Map
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](dynamic target) Score

Static Properties

prefix String?
Often you find yourself giving all scoreboards a prefix especially for your project. This can get very repetitive and annoying, so objD has this prefix built in.
getter/setter pair