Source SRC Killmessage For Minecraft| Free Download

CrazyTrap

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Jul 18, 2023
Messages
707
Reaction score
3
Step into a realm where dreams become tangible and imagination knows no limits! Introducing "Killmessage" - your gateway to boundless exploration and unrivaled innovation. Unlock the secrets of an extraordinary universe and immerse yourself in Minecraft like never before! With meticulously curated resources, we empower you to bring your wildest ideas and aspirations to life.

i

Killmessage:​

JavaScript:
package paste.paste.impl.combat;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@Mod.EventBusSubscriber
public class ExampleMod {

    @SubscribeEvent
    public static void onPlayerDeath(PlayerEvent.PlayerRespawnEvent event) {
        EntityPlayer player = event.player;
        String playerName = player.getName();

        // Проверка на убийство игрока другим игроком.
        if (player.getCombatTracker().getDeathMessage() != null
                && player.getCombatTracker().getDeathMessage().getUnformattedText().contains("pvp")) {

            // Отправить сообщение в чат с текстом "ублюлок мать твою"
            player.sendMessage(new TextComponentString(playerName + ", ублюдок мать твою!"));
        }
    }
    
}
 
Top