0.2h Specify CommandSender when setting property value
This commit is contained in:
parent
f2648656aa
commit
453cc8ad41
@ -158,7 +158,7 @@ public class CommandEditAbstract<O, V> extends MassiveCommand
|
||||
|
||||
// Apply
|
||||
// We set the new property value.
|
||||
this.getProperty().setValue(this.getObject(), after);
|
||||
this.getProperty().setValue(sender, this.getObject(), after);
|
||||
|
||||
// After
|
||||
// We inform what the value is after.
|
||||
@ -245,7 +245,7 @@ public class CommandEditAbstract<O, V> extends MassiveCommand
|
||||
|
||||
public V setValue(V value)
|
||||
{
|
||||
return this.getProperty().setValue(this.getObject(), value);
|
||||
return this.getProperty().setValue(sender, this.getObject(), value);
|
||||
}
|
||||
|
||||
public Entry<O, V> getInheritedEntry()
|
||||
|
@ -113,7 +113,7 @@ public abstract class CommandEditContainerAbstract<O, V> extends CommandEditAbst
|
||||
|
||||
// Apply
|
||||
// We set the new property value.
|
||||
this.getProperty().setValue(this.getObject(), after);
|
||||
this.getProperty().setValue(sender, this.getObject(), after);
|
||||
|
||||
// Create messages
|
||||
List<Mson> messages = new MassiveList<>();
|
||||
|
@ -74,7 +74,7 @@ public class EditSettings<O>
|
||||
|
||||
public void setUsed(CommandSender sender, O used)
|
||||
{
|
||||
this.getUsedProperty().setValue(sender, used);
|
||||
this.getUsedProperty().setValue(sender, sender, used);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
@ -85,7 +85,7 @@ public abstract class Property<O, V> implements Named
|
||||
return this.getRaw(object);
|
||||
}
|
||||
|
||||
public V setValue(O object, V value)
|
||||
public V setValue(CommandSender sender, O object, V value)
|
||||
{
|
||||
// Get Before
|
||||
V before = this.getRaw(object);
|
||||
@ -105,7 +105,7 @@ public abstract class Property<O, V> implements Named
|
||||
if (entity != null) entity.changed();
|
||||
|
||||
// On Change
|
||||
this.onChange(object, before, value);
|
||||
this.onChange(sender, object, before, value);
|
||||
|
||||
// Return Before
|
||||
return before;
|
||||
@ -115,7 +115,7 @@ public abstract class Property<O, V> implements Named
|
||||
// ON CHANGE
|
||||
// -------------------------------------------- //
|
||||
|
||||
public void onChange(O object, V before, V after)
|
||||
public void onChange(CommandSender sender, O object, V before, V after)
|
||||
{
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user