mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-09-19 13:58:22 +00:00
8c0195970b
* Consistenty use javax annotations. - Unfortunately jetbrains annotations seem to be exposed transitively via core somewhere, but with the correct IDE settings, annotations can be defaulted to javax - Cleaning up of import order in #1195 - Must be merged before #1195 * Add and apply .editorconfig from P2 - Does not rearrange entries * Address some comments * add back some javadoc comments * Address final comments Co-authored-by: NotMyFault <mc.cache@web.de>
25 lines
575 B
Java
25 lines
575 B
Java
package com.fastasyncworldedit.core.extent;
|
|
|
|
import com.sk89q.worldedit.extent.Extent;
|
|
|
|
import java.util.function.Supplier;
|
|
|
|
/**
|
|
* An extent that delegates actions to another extent that may change at any time.
|
|
*/
|
|
public class SupplyingExtent extends PassthroughExtent {
|
|
|
|
private final Supplier<Extent> extentSupplier;
|
|
|
|
public SupplyingExtent(Supplier<Extent> extentSupplier) {
|
|
super(extentSupplier.get());
|
|
this.extentSupplier = extentSupplier;
|
|
}
|
|
|
|
@Override
|
|
public Extent getExtent() {
|
|
return this.extentSupplier.get();
|
|
}
|
|
|
|
}
|