Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 1.18 KB

File metadata and controls

36 lines (32 loc) · 1.18 KB

hytale-plugin-docs

Unofficial Hytale Plugin documentation containing features I found

Commands

📦 Package: com.hypixel.hytale.server.core.command

package me.mrbernard.hytale.command

import com.hypixel.hytale.component.Ref
import com.hypixel.hytale.component.Store
import com.hypixel.hytale.server.core.Message
import com.hypixel.hytale.server.core.command.system.CommandContext
import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand
import com.hypixel.hytale.server.core.universe.PlayerRef
import com.hypixel.hytale.server.core.universe.world.World
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore
import com.hypixel.hytale.server.core.util.EventTitleUtil

class PingPlayerCommand : AbstractPlayerCommand("ping", "Sends a pong title") {

    override fun execute(
        context: CommandContext,
        store: Store<EntityStore>,
        ref: Ref<EntityStore>,
        playerRef: PlayerRef,
        world: World
    ) {
        EventTitleUtil.showEventTitleToPlayer(
            playerRef,
            Message.raw("Pong"),
            Message.raw("You performed the Ping Player Command"),
            true
        )
    }
}