In a single player world with cheats disabled, sending lots of messages in the chat repeatedly causes the player to be kicked from the world for spamming.
Steps to Reproduce:
Create or join a world with cheats disabled
Spam messages in chat (sleeping in a bed can make this easier)
Expected & Observed Results:
β - Player is kicked from the world.
β - The player would not be kicked, as it's a singleplayer world, and the only player that can see the messages is the one who sent them.
Screenshots/Videos:
[media]Notes:
When kicked, the player is sent to the multiplayer screen. (Tracked in MC-45602)
Related issues
is duplicated by
Attachments
Comments

Your Java version is out of date. Please update your Java to the latest version: http://www.java.com/en/download/. Keep in mind that when using a 32-bit browser on a 64-bit OS the automatic version detection will only show the 32-bit version of Java, the 64-bit version needs to be downloaded manually: http://www.java.com/en/download/manual.jsp.
Please report if the issue persists with the latest Java version.
Downloaded java version 7 update 21, and verified that I have the most recent update on Internet Explorer 64-bit. This cleared up the crash, however I was still kicked from my world. It seems to have only solved half of the problem. I'm still trying to figure out why some worlds I get kicked and others not.
Ok, I think I figured out the source-this bug only occurs on worlds where cheats are NOT enabled. It had nothing to do with previous world generation, besides from the fact that cheats were not given to worlds created before cheats were introduced (I haven't made a survival world since 1.1). I just made a survival world in 1.5.2 , no cheats, and started to spam the chat in a bed and got kicked.
Confirmed in 13w21b.
I generated a world in 1.5.2 and I had this happen to me.
It also sends you to the Multiplayer Server selection
I'm surprised this didn't get buried. I just tested it in 1.8.8, it hard crashed me again (no crash log or screen). You probably did not spam fast enough, it takes about 15-20 entries within 3 seconds to get it. This issue can probably be taken down though, it was a sort of a joke when I submitted this. Either way I attached the log.

Still happens in 15w45a. Too late John Smith, it's taken on a life of its own!!
EDIT: I am not able to get a proper kick, with a kick message, rather just a freeze and a crash. Can anyone confirm?
I get the disconnect.spam
message.

Confirmed for
15w51b
The reason why "disconnect.spam" is shown is because the method processChatMessage(C01PacketChatMessage packetIn)
of the net.minecraft.network.NetHandlerPlayServer
class (MCP 1.8 names) calls the kicking method with the translation string:
this.kickPlayerFromServer("disconnect.spam");
The string parameter is however not a translated chat component, but only a normal chat component. This could be probably fixed by creating a ChatTranslationComponent
first an receiving the translation:
this.kickPlayerFromServer(new ChatComponentTranslation("disconnect.spam", new Object[0]).getFormattedText());

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w43a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

Reopened, as the duplicate tickets don't cover being kicked in single player for spamming.
This works on Demo mode, allowing non premium players access to the server screen. (And cracked servers)
I can't reproduce in 1.16.3. Edit: nevermind, is really needed to test with cheats disabled.
This is still a problem in 1.16.4. I successfully reproduced the bug.
One extra thing: It takes you to multiplayer tab instead of the main menu OR the single player tab, proving that this is in fact a bug.
Can confirm in 20w48a. I've attached a video which shows this issue in action.
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 21w11a.
Can confirm in 21w15a. @unknown 1.16.4 has already been marked as affected. π
Can confirm in 21w17a.
Can confirm in 1.17.

Can confirm in 1.17.1 Pre-release 1.
Can confirm in 1.17.1.
Affects 22w13a
I've tested this in 1.18.2 and I can confirm that the kickΒ does occur in this version. The reason why this doesn't occur with cheats enabled is the fact that the user is granted operator status when cheats are enabled while the world is loaded. With cheats disabled, the player won't be granted operator status upon loading the world. Operator has immunity from the built-in anti spam feature of the server.
Can confirm in 1.19 Pre-release 3
Can confirm in 1.19.
I think it is because minecraft singleplayer runs as an integrated server which therefore has server features like anti spam
Can confirm in 1.19.2.
Can confirm in 1.20.4. I'd like to request ownership of this issue, as @unknown has been inactive since 2015.