geforkt von Mirrors/FastAsyncWorldEdit
Add debug messages
Dieser Commit ist enthalten in:
Ursprung
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;
|
||||||
@ -335,14 +336,18 @@ public class PlatformManager {
|
|||||||
Request.request().setSession(session);
|
Request.request().setSession(session);
|
||||||
Request.request().setWorld(player.getWorld());
|
Request.request().setWorld(player.getWorld());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Vector3 vector = location.toVector();
|
Vector3 vector = location.toVector();
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getType() == Interaction.HIT) {
|
if (event.getType() == Interaction.HIT) {
|
||||||
// superpickaxe is special because its primary interaction is a left click, not a right click
|
// superpickaxe is special because its primary interaction is a left click, not a right click
|
||||||
@ -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 session the session
|
|
||||||
=======
|
|
||||||
* @param actor the actor
|
* @param actor the actor
|
||||||
* @param session the session
|
* @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);
|
||||||
@ -90,8 +86,8 @@ public interface RegionSelector {
|
|||||||
/**
|
/**
|
||||||
* Tell the player information about his/her secondary selection.
|
* Tell the player information about his/her secondary selection.
|
||||||
*
|
*
|
||||||
* @param actor the actor
|
* @param actor the actor
|
||||||
* @param session the session
|
* @param session the session
|
||||||
* @param position position
|
* @param position position
|
||||||
*/
|
*/
|
||||||
void explainSecondarySelection(Actor actor, LocalSession session, BlockVector3 position);
|
void explainSecondarySelection(Actor actor, LocalSession session, BlockVector3 position);
|
||||||
@ -100,7 +96,7 @@ public interface RegionSelector {
|
|||||||
* The the player information about the region's changes. This may resend
|
* The the player information about the region's changes. This may resend
|
||||||
* all the defining region information if needed.
|
* all the defining region information if needed.
|
||||||
*
|
*
|
||||||
* @param actor the actor
|
* @param actor the actor
|
||||||
* @param session the session
|
* @param session the session
|
||||||
*/
|
*/
|
||||||
void explainRegionAdjust(Actor actor, LocalSession session);
|
void explainRegionAdjust(Actor actor, LocalSession session);
|
||||||
@ -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.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren