Command Blocks cannot teleport players?

I’m an extreme novice when it comes to Sponge, so please bear with my idiocy. I put what I’m nearly sure is the error below. Command blocks work for other things. I have a plugin that overwrites /tp, but I made sure to disable it in the config, as it was causing a different error. Any help is appreciated. :confounded:

> [19:21:28] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'tp @p[rm=1,r=3] -1372 54 1159' for source net.minecraft.tileentity.TileEntityCommandBlock@1c9effe7: net.minecraft.tileentity.TileEntityCommandBlock$1 cannot be cast to net.minecraft.entity.player.EntityPlayerMP
> java.lang.ClassCastException: net.minecraft.tileentity.TileEntityCommandBlock$1 cannot be cast to net.minecraft.entity.player.EntityPlayerMP
> 	at net.minecraft.command.server.CommandTeleport.func_71515_b(SourceFile:142) ~[bn.class:?]
> 	at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:100) ~[j.class:?]
> 	at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:141) ~[MinecraftCommandWrapper.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at org.spongepowered.common.command.MinecraftCommandWrapper.process(MinecraftCommandWrapper.java:127) ~[MinecraftCommandWrapper.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:331) ~[SimpleDispatcher.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:269) [SpongeCommandManager.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:80) [bd.class:?]
> 	at net.minecraft.command.server.CommandBlockLogic.func_145755_a(SourceFile:97) [adc.class:?]
> 	at net.minecraft.block.BlockCommandBlock.func_180650_b(SourceFile:54) [afw.class:?]
> 	at org.spongepowered.common.event.CauseTracker.updateTickBlock(CauseTracker.java:1135) [CauseTracker.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at net.minecraft.world.WorldServer.redirect$onUpdateTick$0(WorldServer.java:263) [le.class:?]
> 	at net.minecraft.world.WorldServer.func_72955_a(WorldServer.java:611) [le.class:?]
> 	at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:219) [le.class:?]
> 	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:690) [MinecraftServer.class:?]
> 	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:605) [MinecraftServer.class:?]
> 	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:250) [bpo.class:?]
> 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:481) [MinecraftServer.class:?]
> 	at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
> [19:22:52] [Client thread/WARN]: Unable to play empty soundEvent: minecraft:music.game.creative
> [19:23:56] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'tp @p[rm=1,r=3] -1372 54 1159' for source net.minecraft.tileentity.TileEntityCommandBlock@1c9effe7: net.minecraft.tileentity.TileEntityCommandBlock$1 cannot be cast to net.minecraft.entity.player.EntityPlayerMP
> java.lang.ClassCastException: net.minecraft.tileentity.TileEntityCommandBlock$1 cannot be cast to net.minecraft.entity.player.EntityPlayerMP
> 	at net.minecraft.command.server.CommandTeleport.func_71515_b(SourceFile:142) ~[bn.class:?]
> 	at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:100) ~[j.class:?]
> 	at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:141) ~[MinecraftCommandWrapper.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at org.spongepowered.common.command.MinecraftCommandWrapper.process(MinecraftCommandWrapper.java:127) ~[MinecraftCommandWrapper.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:331) ~[SimpleDispatcher.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:269) [SpongeCommandManager.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:80) [bd.class:?]
> 	at net.minecraft.command.server.CommandBlockLogic.func_145755_a(SourceFile:97) [adc.class:?]
> 	at net.minecraft.block.BlockCommandBlock.func_180650_b(SourceFile:54) [afw.class:?]
> 	at org.spongepowered.common.event.CauseTracker.updateTickBlock(CauseTracker.java:1135) [CauseTracker.class:1.8.9-1890-4.1.0-BETA-1379]
> 	at net.minecraft.world.WorldServer.redirect$onUpdateTick$0(WorldServer.java:263) [le.class:?]
> 	at net.minecraft.world.WorldServer.func_72955_a(WorldServer.java:611) [le.class:?]
> 	at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:219) [le.class:?]
> 	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:690) [MinecraftServer.class:?]
> 	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:605) [MinecraftServer.class:?]
> 	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:250) [bpo.class:?]
> 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:481) [MinecraftServer.class:?]
> 	at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]

This is definitely some sort of sponge bug. What version of Sponge are you running?

SpongeAPI: 4.1.0-SNAPSHOT-60438ad
Spongeforge: 1.8.9-1890-4.1.0-BETA-1379

There’s been a few changes recently to Teleportation. try build 1380, if it still occurs report on github

1 Like

Fixed in build 1381

1 Like