geforkt von Mirrors/FastAsyncWorldEdit
display potentially unsafe extent message in console if no Actor
Dieser Commit ist enthalten in:
Ursprung
6b3fe20c61
Commit
febcf5f76f
@ -29,6 +29,7 @@ import com.sk89q.worldedit.EditSession;
|
|||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.event.extent.EditSessionEvent;
|
import com.sk89q.worldedit.event.extent.EditSessionEvent;
|
||||||
|
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
||||||
import com.sk89q.worldedit.regions.Region;
|
import com.sk89q.worldedit.regions.Region;
|
||||||
@ -37,6 +38,8 @@ import com.sk89q.worldedit.util.eventbus.EventBus;
|
|||||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@ -45,6 +48,9 @@ import javax.annotation.Nullable;
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
public class EditSessionBuilder {
|
public class EditSessionBuilder {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(AbstractDelegateExtent.class);
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private World world;
|
private World world;
|
||||||
private Player player;
|
private Player player;
|
||||||
@ -222,7 +228,8 @@ public class EditSessionBuilder {
|
|||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Settings.IMP.EXTENT.DEBUG && event.getActor() != null) {
|
if (Settings.IMP.EXTENT.DEBUG) {
|
||||||
|
if (event.getActor() != null) {
|
||||||
event.getActor().printDebug("Potentially unsafe extent blocked: " + toReturn.getClass().getName());
|
event.getActor().printDebug("Potentially unsafe extent blocked: " + toReturn.getClass().getName());
|
||||||
event.getActor().printDebug(" - For area restrictions, it is recommended to use the FaweAPI");
|
event.getActor().printDebug(" - For area restrictions, it is recommended to use the FaweAPI");
|
||||||
event.getActor().printDebug(" - For block logging, it is recommended to use BlocksHub");
|
event.getActor().printDebug(" - For block logging, it is recommended to use BlocksHub");
|
||||||
@ -233,6 +240,18 @@ public class EditSessionBuilder {
|
|||||||
event.getActor().printDebug(" - If you disable CP's WE logger (CP config) and this still shows, please update CP");
|
event.getActor().printDebug(" - If you disable CP's WE logger (CP config) and this still shows, please update CP");
|
||||||
event.getActor().printDebug(" - Use BlocksHub and set `debug` false in the FAWE config");
|
event.getActor().printDebug(" - Use BlocksHub and set `debug` false in the FAWE config");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
logger.debug("Potentially unsafe extent blocked: " + toReturn.getClass().getName());
|
||||||
|
logger.debug(" - For area restrictions, it is recommended to use the FaweAPI");
|
||||||
|
logger.debug(" - For block logging, it is recommended to use BlocksHub");
|
||||||
|
logger.debug(" - To allow this plugin add it to the FAWE `allowed-plugins` list");
|
||||||
|
logger.debug(" - To hide this message set `debug` to false in the FAWE config.yml");
|
||||||
|
if (toReturn.getClass().getName().contains("CoreProtect")) {
|
||||||
|
logger.debug("Note on CoreProtect: ");
|
||||||
|
logger.debug(" - If you disable CP's WE logger (CP config) and this still shows, please update CP");
|
||||||
|
logger.debug(" - Use BlocksHub and set `debug` false in the FAWE config");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return extent;
|
return extent;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren