geforkt von Mirrors/Paper
Add transient modifier API
Dieser Commit ist enthalten in:
Ursprung
e48a6a04cc
Commit
6c30e5b15b
@ -23,6 +23,11 @@ public class UnmodifiableAttributeInstance extends CraftAttributeInstance {
|
||||
throw new UnsupportedOperationException("Cannot modify default attributes");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTransientModifier(AttributeModifier modifier) {
|
||||
throw new UnsupportedOperationException("Cannot modify default attributes");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeModifier(AttributeModifier modifier) {
|
||||
throw new UnsupportedOperationException("Cannot modify default attributes");
|
||||
|
@ -51,6 +51,14 @@ public class CraftAttributeInstance implements AttributeInstance {
|
||||
this.handle.addPermanentModifier(CraftAttributeInstance.convert(modifier));
|
||||
}
|
||||
|
||||
// Paper start - Transient modifier API
|
||||
@Override
|
||||
public void addTransientModifier(AttributeModifier modifier) {
|
||||
Preconditions.checkArgument(modifier != null, "modifier");
|
||||
this.handle.addTransientModifier(CraftAttributeInstance.convert(modifier));
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@Override
|
||||
public void removeModifier(AttributeModifier modifier) {
|
||||
Preconditions.checkArgument(modifier != null, "modifier");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren