3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-03 01:50:07 +01:00

Add debug messages

Dieser Commit ist enthalten in:
MattBDev 2020-04-27 17:53:56 -04:00
Ursprung 491be025cc
Commit b1ea736eb2
4 geänderte Dateien mit 33 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -364,6 +364,11 @@ public class Settings extends Config {
" - PERM: fawe.freebuild.<plugin>"
})
public boolean FREEBUILD = false;
@Comment({
"Other experimental features"
})
public boolean OTHER = false;
}
public static class WEB {

Datei anzeigen

@ -19,25 +19,33 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.config.Settings;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extension.platform.Platform;
import com.sk89q.worldedit.extension.platform.PlatformManager;
import com.sk89q.worldedit.extension.platform.permission.ActorSelectorLimits;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.RegionSelector;
import com.sk89q.worldedit.util.Location;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public enum SelectionWand implements DoubleActionBlockTool {
INSTANCE;
private static final Logger logger = LoggerFactory.getLogger(SelectionWand.class);
@Override
public boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked) {
RegionSelector selector = session.getRegionSelector(player.getWorld());
BlockVector3 blockPoint = clicked.toVector().toBlockPoint();
if (selector.selectPrimary(blockPoint, ActorSelectorLimits.forActor(player))) {
if (Settings.IMP.EXPERIMENTAL.OTHER) {
logger.debug("actSecondary Hit and about to explain with explainPrimarySelection");
}
selector.explainPrimarySelection(player, session, blockPoint);
}
return true;
@ -49,6 +57,9 @@ public enum SelectionWand implements DoubleActionBlockTool {
BlockVector3 blockPoint = clicked.toVector().toBlockPoint();
if (selector.selectSecondary(blockPoint, ActorSelectorLimits.forActor(player))) {
if (Settings.IMP.EXPERIMENTAL.OTHER) {
logger.debug("actPrimary Hit and about to explain with explainSecondarySelection");
}
selector.explainSecondarySelection(player, session, blockPoint);
}
return true;

Datei anzeigen

@ -21,6 +21,7 @@ package com.sk89q.worldedit.extension.platform;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.wrappers.AsyncPlayer;
import com.boydti.fawe.wrappers.LocationMaskedPlayerWrapper;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
@ -340,6 +341,10 @@ public class PlatformManager {
VirtualWorld virtual = session.getVirtualWorld();
if (virtual != null) {
if (Settings.IMP.EXPERIMENTAL.OTHER) {
logger.debug("virtualWorld was not null in handlePlayerInput()");
}
virtual.handleBlockInteract(player, vector.toBlockPoint(), event);
if (event.isCancelled()) return;
}
@ -408,6 +413,9 @@ public class PlatformManager {
LocalSession session = worldEdit.getSessionManager().get(player);
VirtualWorld virtual = session.getVirtualWorld();
if (virtual != null) {
if (Settings.IMP.EXPERIMENTAL.OTHER) {
logger.debug("virtualWorld was not null in handlePlayerInput()");
}
virtual.handlePlayerInput(player, event);
if (event.isCancelled()) return;
}

Datei anzeigen

@ -30,11 +30,12 @@ import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
import com.sk89q.worldedit.world.World;
import javax.annotation.Nullable;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.jetbrains.annotations.Nullable;
/**
* Region selectors create {@link Region}s from a series of "selected points."
* They are used, for example, to allow users to create a {@link CuboidRegion}
@ -76,13 +77,8 @@ public interface RegionSelector {
/**
* Tell the player information about his/her primary selection.
*
<<<<<<< HEAD
* @param actor the actor
* @param session the session
=======
* @param actor the actor
* @param session the session
>>>>>>> 18a55bc14... Add new experimental snapshot API (#524)
* @param position position
*/
void explainPrimarySelection(Actor actor, LocalSession session, BlockVector3 position);
@ -167,7 +163,7 @@ public interface RegionSelector {
@Deprecated
default List<String> getInformationLines() {
return Lists.newArrayList();
}
};
/**
* Get lines of information about the selection.