mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Add debug messages
This commit is contained in:
parent
491be025cc
commit
b13dea19c5
@ -364,6 +364,11 @@ public class Settings extends Config {
|
|||||||
" - PERM: fawe.freebuild.<plugin>"
|
" - PERM: fawe.freebuild.<plugin>"
|
||||||
})
|
})
|
||||||
public boolean FREEBUILD = false;
|
public boolean FREEBUILD = false;
|
||||||
|
|
||||||
|
@Comment({
|
||||||
|
"Other experimental features"
|
||||||
|
})
|
||||||
|
public boolean OTHER = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class WEB {
|
public static class WEB {
|
||||||
|
@ -19,25 +19,33 @@
|
|||||||
|
|
||||||
package com.sk89q.worldedit.command.tool;
|
package com.sk89q.worldedit.command.tool;
|
||||||
|
|
||||||
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
import com.sk89q.worldedit.extension.platform.Platform;
|
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.extension.platform.permission.ActorSelectorLimits;
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.regions.RegionSelector;
|
import com.sk89q.worldedit.regions.RegionSelector;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public enum SelectionWand implements DoubleActionBlockTool {
|
public enum SelectionWand implements DoubleActionBlockTool {
|
||||||
INSTANCE;
|
INSTANCE;
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(SelectionWand.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked) {
|
public boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked) {
|
||||||
RegionSelector selector = session.getRegionSelector(player.getWorld());
|
RegionSelector selector = session.getRegionSelector(player.getWorld());
|
||||||
BlockVector3 blockPoint = clicked.toVector().toBlockPoint();
|
BlockVector3 blockPoint = clicked.toVector().toBlockPoint();
|
||||||
|
|
||||||
if (selector.selectPrimary(blockPoint, ActorSelectorLimits.forActor(player))) {
|
if (selector.selectPrimary(blockPoint, ActorSelectorLimits.forActor(player))) {
|
||||||
|
if (Settings.IMP.EXPERIMENTAL.OTHER) {
|
||||||
|
logger.info("actSecondary Hit and about to explain with explainPrimarySelection");
|
||||||
|
}
|
||||||
selector.explainPrimarySelection(player, session, blockPoint);
|
selector.explainPrimarySelection(player, session, blockPoint);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -49,6 +57,9 @@ public enum SelectionWand implements DoubleActionBlockTool {
|
|||||||
BlockVector3 blockPoint = clicked.toVector().toBlockPoint();
|
BlockVector3 blockPoint = clicked.toVector().toBlockPoint();
|
||||||
|
|
||||||
if (selector.selectSecondary(blockPoint, ActorSelectorLimits.forActor(player))) {
|
if (selector.selectSecondary(blockPoint, ActorSelectorLimits.forActor(player))) {
|
||||||
|
if (Settings.IMP.EXPERIMENTAL.OTHER) {
|
||||||
|
logger.info("actPrimary Hit and about to explain with explainSecondarySelection");
|
||||||
|
}
|
||||||
selector.explainSecondarySelection(player, session, blockPoint);
|
selector.explainSecondarySelection(player, session, blockPoint);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit.extension.platform;
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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.AsyncPlayer;
|
||||||
import com.boydti.fawe.wrappers.LocationMaskedPlayerWrapper;
|
import com.boydti.fawe.wrappers.LocationMaskedPlayerWrapper;
|
||||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
@ -340,6 +341,10 @@ public class PlatformManager {
|
|||||||
|
|
||||||
VirtualWorld virtual = session.getVirtualWorld();
|
VirtualWorld virtual = session.getVirtualWorld();
|
||||||
if (virtual != null) {
|
if (virtual != null) {
|
||||||
|
if (Settings.IMP.EXPERIMENTAL.OTHER) {
|
||||||
|
logger.info("virtualWorld was not null in handlePlayerInput()");
|
||||||
|
}
|
||||||
|
|
||||||
virtual.handleBlockInteract(player, vector.toBlockPoint(), event);
|
virtual.handleBlockInteract(player, vector.toBlockPoint(), event);
|
||||||
if (event.isCancelled()) return;
|
if (event.isCancelled()) return;
|
||||||
}
|
}
|
||||||
@ -408,6 +413,9 @@ public class PlatformManager {
|
|||||||
LocalSession session = worldEdit.getSessionManager().get(player);
|
LocalSession session = worldEdit.getSessionManager().get(player);
|
||||||
VirtualWorld virtual = session.getVirtualWorld();
|
VirtualWorld virtual = session.getVirtualWorld();
|
||||||
if (virtual != null) {
|
if (virtual != null) {
|
||||||
|
if (Settings.IMP.EXPERIMENTAL.OTHER) {
|
||||||
|
logger.info("virtualWorld was not null in handlePlayerInput()");
|
||||||
|
}
|
||||||
virtual.handlePlayerInput(player, event);
|
virtual.handlePlayerInput(player, event);
|
||||||
if (event.isCancelled()) return;
|
if (event.isCancelled()) return;
|
||||||
}
|
}
|
||||||
|
@ -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.util.formatting.text.format.TextColor;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Region selectors create {@link Region}s from a series of "selected points."
|
* 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}
|
* 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.
|
* Tell the player information about his/her primary selection.
|
||||||
*
|
*
|
||||||
<<<<<<< HEAD
|
|
||||||
* @param actor the actor
|
* @param actor the actor
|
||||||
* @param session the session
|
* @param session the session
|
||||||
=======
|
|
||||||
* @param actor the actor
|
|
||||||
* @param session the session
|
|
||||||
>>>>>>> 18a55bc14... Add new experimental snapshot API (#524)
|
|
||||||
* @param position position
|
* @param position position
|
||||||
*/
|
*/
|
||||||
void explainPrimarySelection(Actor actor, LocalSession session, BlockVector3 position);
|
void explainPrimarySelection(Actor actor, LocalSession session, BlockVector3 position);
|
||||||
@ -167,7 +163,7 @@ public interface RegionSelector {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
default List<String> getInformationLines() {
|
default List<String> getInformationLines() {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lines of information about the selection.
|
* Get lines of information about the selection.
|
||||||
|
Loading…
Reference in New Issue
Block a user