mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
renamed cancel to onCancel
This commit is contained in:
parent
65819d1784
commit
be3acf3edc
@ -61,6 +61,6 @@ public interface MachineOperation {
|
||||
* This method is called when a {@link MachineOperation} is interrupted before finishing.
|
||||
* Implement to specify behaviour that should happen in this case.
|
||||
*/
|
||||
default void cancel() {}
|
||||
default void onCancel() {}
|
||||
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ public class MachineProcessor<T extends MachineOperation> {
|
||||
Event event = new AsyncMachineOperationFinishEvent(pos, this, operation);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
} else {
|
||||
operation.cancel();
|
||||
operation.onCancel();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -37,7 +37,7 @@ public class GEOMiningOperation extends MiningOperation {
|
||||
* when the {@link GEOMiningOperation} gets cancelled
|
||||
*/
|
||||
@Override
|
||||
public void cancel() {
|
||||
public void onCancel() {
|
||||
ResourceManager resourceManager = Slimefun.getGPSNetwork().getResourceManager();
|
||||
OptionalInt supplies = resourceManager.getSupplies(resource, block.getWorld(), block.getX() >> 4, block.getZ() >> 4);
|
||||
supplies.ifPresent(s -> resourceManager.setSupplies(resource, block.getWorld(), block.getX() >> 4, block.getZ() >> 4, s + 1));
|
||||
|
Loading…
Reference in New Issue
Block a user