Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 16:12:51 +02:00
Make extent public (unsafe)
Dieser Commit ist enthalten in:
Ursprung
7cc1994e20
Commit
1eacb91267
@ -33,15 +33,9 @@ public class WEManager {
|
|||||||
|
|
||||||
public void cancelEditSafe(AbstractDelegateExtent parent, FaweException reason) throws FaweException {
|
public void cancelEditSafe(AbstractDelegateExtent parent, FaweException reason) throws FaweException {
|
||||||
log.warn("CancelEditSafe was hit. Please ignore this message.");
|
log.warn("CancelEditSafe was hit. Please ignore this message.");
|
||||||
try {
|
|
||||||
final Field field = AbstractDelegateExtent.class.getDeclaredField("extent");
|
|
||||||
field.setAccessible(true);
|
|
||||||
Extent currentExtent = parent.getExtent();
|
Extent currentExtent = parent.getExtent();
|
||||||
if (!(currentExtent instanceof NullExtent)) {
|
if (!(currentExtent instanceof NullExtent)) {
|
||||||
field.set(parent, new NullExtent((Extent) field.get(parent), reason));
|
parent.extent = new NullExtent(parent.extent, reason);
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
throw reason;
|
throw reason;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,8 @@ public class AbstractDelegateExtent implements Extent {
|
|||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(AbstractDelegateExtent.class);
|
private static final Logger logger = LoggerFactory.getLogger(AbstractDelegateExtent.class);
|
||||||
|
|
||||||
private final Extent extent;
|
//Not safe for public usage
|
||||||
|
public Extent extent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new instance.
|
* Create a new instance.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren