Posted September 14, 201510 yr So, I have a block that will teleport players to a new dimension when they right click on it. But I got reports of players on servers, where they need to get OP in order for the Teleportation to work. Any idea what could be the problem? Maybe the teleportation itself, or something else around the code I'm not sure of? /** Teleports a player to a specific location in a dimension. */ public static void teleport(EntityPlayerMP player, int dimension, int x, int y, int z, float yaw) { if (player.dimension == dimension) { player.rotationYaw = yaw; player.setPositionAndUpdate(x + 0.5, y, z + 0.5); } else { player.timeUntilPortal = player.getPortalCooldown(); WorldManager.theServer.getConfigurationManager().transferPlayerToDimension(player, dimension, new TeleporterHub(dimension, x, y, z, yaw)); } } And also public TeleporterHub(int dimension, int x, int y, int z, float yaw) { this(WorldManager.theServer.worldServerForDimension(dimension), x, y, z, yaw); } public TeleporterHub(WorldServer world, int x, int y, int z, float yaw) { super(world); this.theWorld = world; this.posX = x; this.posY = y; this.posZ = z; this.rotation = yaw; } I'm not sure what other code you should need to see what the problem is. Any ideas, any advice?
September 14, 201510 yr Author what happens if they dont have op? ur code looks fine to me I will try to get some logs or something. I think it just doesn't teleport them, no crashes as far as I know. Gonna try to get more info and post it.
September 14, 201510 yr I'm assuming your ran a client / server in dev environment and de-op'd your toon for testing? vs just running a singleplayer instance. Long time Bukkit & Forge Programmer Happy to try and help
September 14, 201510 yr Author I did all the tests on Single player. I will have to setup some server to make those tests. Thanks for the tip.
September 15, 201510 yr Are you using eclipse? you just run both a server and a client instance from inside it. Tons of tuts on it. Then connect to your own little temp fake server. Long time Bukkit & Forge Programmer Happy to try and help
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.