mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-16 17:16:11 +00:00
Make extent public (unsafe)
This commit is contained in:
parent
7cc1994e20
commit
1eacb91267
@ -33,15 +33,9 @@ public class WEManager {
|
||||
|
||||
public void cancelEditSafe(AbstractDelegateExtent parent, FaweException reason) throws FaweException {
|
||||
log.warn("CancelEditSafe was hit. Please ignore this message.");
|
||||
try {
|
||||
final Field field = AbstractDelegateExtent.class.getDeclaredField("extent");
|
||||
field.setAccessible(true);
|
||||
Extent currentExtent = parent.getExtent();
|
||||
if (!(currentExtent instanceof NullExtent)) {
|
||||
field.set(parent, new NullExtent((Extent) field.get(parent), reason));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
parent.extent = new NullExtent(parent.extent, reason);
|
||||
}
|
||||
throw reason;
|
||||
}
|
||||
|
@ -59,7 +59,8 @@ public class AbstractDelegateExtent implements Extent {
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user