package com.awesomeman.xtrapunish.punish;

import org.spongepowered.api.command.CommandException;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;
import org.spongepowered.api.command.spec.CommandExecutor;
import org.spongepowered.api.entity.living.player.Player;

/**
 * Spams a player's chat with random characters.
 */
public class PlayerChatSpam implements CommandExecutor {
    
    public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
        Player player = args.<Player>getOne("player").get();
        return CommandResult.success();
    }
}

@@ -36,16 +36,42 @@
 unish;%0A%0A
+import java.util.Random;%0A%0A
 import o
@@ -117,16 +117,16 @@
 eption;%0A
-
 import o
@@ -395,16 +395,109 @@
 .Player;
+%0Aimport org.spongepowered.api.text.Text;%0Aimport org.spongepowered.api.text.format.TextColors;
 %0A%0A/**%0A *
@@ -708,16 +708,16 @@
 ption %7B%0A
-
         
@@ -765,24 +765,593 @@
 er%22).get();%0A
+        Random random = new Random();%0A        String message = %22%22;%0A        char letter;%0A        %0A        // We send 40 messages%0A        for(int i = 0; i %3C 40; i++) %7B%0A            // With 50 chars in each%0A            for(int i2 = 0; i2 %3C 50; i2++) %7B%0A                letter = (char) (random.nextInt(26) + 'a');%0A                message += letter;%0A            %7D%0A            player.sendMessage(Text.of(message));%0A            message = %22%22;%0A        %7D%0A        %0A        src.sendMessage(Text.of(TextColors.GREEN, %22Success! Player %22 + player.getName() + %22 cannot see his chat!%22));%0A
         retu

Implement PlayerChatSpam