mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 12:36:40 +00:00
fix compile
This commit is contained in:
@ -9,6 +9,7 @@ import com.boydti.fawe.util.WEManager;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.PassthroughExtent;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
|
||||
public class MemoryCheckingExtent extends PassthroughExtent {
|
||||
private final Player player;
|
||||
@ -22,9 +23,9 @@ public class MemoryCheckingExtent extends PassthroughExtent {
|
||||
public Extent getExtent() {
|
||||
if (MemUtil.isMemoryLimited()) {
|
||||
if (this.player != null) {
|
||||
player.print(BBC.WORLDEDIT_CANCEL_REASON.format(BBC.WORLDEDIT_CANCEL_REASON_LOW_MEMORY.s()));
|
||||
player.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason", (TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.low.memory"))));
|
||||
if (Permission.hasPermission(this.player, "worldedit.fast")) {
|
||||
BBC.WORLDEDIT_OOM_ADMIN.send(this.player);
|
||||
this.player.print(TranslatableComponent.of("fawe.info.worldedit.oom.admin"));
|
||||
}
|
||||
}
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.LOW_MEMORY);
|
||||
|
@ -6,6 +6,8 @@ import com.boydti.fawe.beta.IChunk;
|
||||
import com.boydti.fawe.beta.IChunkGet;
|
||||
import com.boydti.fawe.beta.IChunkSet;
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
@ -44,7 +46,7 @@ public class NullExtent extends FaweRegionExtent implements IBatchProcessor {
|
||||
*
|
||||
* @param extent the extent
|
||||
*/
|
||||
public NullExtent(Extent extent, BBC failReason) {
|
||||
public NullExtent(Extent extent, Component failReason) {
|
||||
this(extent, new FaweException(failReason));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user