0.2h Specify CommandSender when setting property value

This commit is contained in:
BuildTools 2016-03-09 16:02:09 +01:00 committed by Olof Larsson
parent f2648656aa
commit 453cc8ad41
4 changed files with 7 additions and 7 deletions

View File

@ -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()

View File

@ -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<>();

View File

@ -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);
}
// -------------------------------------------- //

View File

@ -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)
{
}