Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teleport web clients who exit the sandbox back to within it? #63

Open
satoshinm opened this issue May 20, 2017 · 2 comments
Open

Teleport web clients who exit the sandbox back to within it? #63

satoshinm opened this issue May 20, 2017 · 2 comments

Comments

@satoshinm
Copy link
Owner

No description provided.

@satoshinm
Copy link
Owner Author

--- a/src/main/java/io/github/satoshinm/WebSandboxMC/bridge/WebPlayerBridge.java
+++ b/src/main/java/io/github/satoshinm/WebSandboxMC/bridge/WebPlayerBridge.java
@@ -120,6 +120,8 @@ public class WebPlayerBridge {
 
         if (constrainToSandbox && !webSocketServerThread.blockBridge.withinSandboxRange(location)) {
             webSocketServerThread.log(Level.FINEST, "client tried to move outside of sandbox: "+location);
+            webSocketServerThread.sendLine(channel, "P,"+entity.getEntityId()+","+
+                    webSocketServerThread.playersBridge.encodeLocation(webSocketServerThread.blockBridge.spawnLocation));
             return;
         }

has no apparent effect

@satoshinm
Copy link
Owner Author

Or now that barrier blocks #55 are implemented, they could be spawned around the sandbox for an invisible wall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant