Event Plugin 图标

Event Plugin

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 26.1.X
本资源为搬运资源,原资源地址: https://modrinth.com/mod/event-plugin
资源信息

Minecraft 版本: 26.1 26.1.1 26.1.2

平台: paper

标签: management utility

资源介绍

EVENT PHASE SYSTEM (BACKEND OVERVIEW)

PURPOSE:

Allows a Paper plugin event system to execute console commands at timed intervals after /event start.


SUMMARY

  • Event starts
  • Players teleported
  • Phases loaded from config
  • Each phase scheduled using Bukkit scheduler
  • Console commands executed at defined ticks

  • CONFIG STRUCTURE (config.yml)


start:
phases:

  • after:
    commands:

    • "command 1"
    • "command 2"
  • after:
    commands:

    • "command 3"

NOTES:

  • phases is a LIST (not a map)
  • each entry is an independent timed phase
  • after = delay in ticks from event start
  • commands = list of console commands

ADMIN COMMANDS


  1. SET CENTER POSITION
    /event cornucopia center

    • Sets the center of the circle to the player's current location
    • This is the origin point for all spawn calculations

  1. SET RADIUS
    /event cornucopia radius

    Example:
    /event cornucopia radius 15

    • Controls distance from center to each spawn point
    • Larger radius = more spread out players
    • Smaller radius = tighter cornucopia

  1. ENABLE AUTO MODE
    /event mode auto

    • Switches spawn system from manual coordinates to generated circle spawns
    • Required for cornucopia system to activate

    /event mode manual

    • Disables circle generation and uses saved spawn points instead

  1. START EVENT

    /event start

    BEHAVIOR:

    • Counts online players
    • Generates N evenly spaced points on a circle
    • Teleports each player to a unique position
    • Spawns are distributed using angular spacing

BACKEND


  1. Player runs:
    /event start

  2. EventManager.startEvent() executes:

    • Teleports players (manual or auto circle)
    • Calls runStartPhases()
  3. runStartPhases():

    FOR each phase in config "start.phases":

    read:
        delay = phase.after
        commands = phase.commands
    
    schedule task:
        BukkitScheduler.runTaskLater(plugin, task, delay)
  4. When delay expires:

    FOR each command in phase.commands:
    Bukkit.dispatchCommand(CONSOLE, command)


SCHEDULING BEHAVIOR

Example:

phase A:
after: 1
commands:

  • "pvp disable"

phase B:
after: 20
commands:

  • "say Event started"

RESULT:

tick 1 -> pvp disabled
tick 20 -> message broadcast

IMPORTANT:

  • delays are relative to EVENT START
  • phases do NOT chain automatically
  • each phase schedules independently

COMMON ERRORS FIXED

WRONG (invalid YAML):
start:
phases:
after: 1
commands:
after: 20
commands:

CAUSE:

  • duplicate keys
  • not a list structure

CORRECT EXAMPLE:
start:
phases:

  • after: 1
    commands:
    • "clear"
  • after: 20
    commands:
    • "say This is 1 second after the event start!"
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
The other's plushie mod

价格:0 墨喵币
下载量:0

查看详情
InstaClumps

价格:0 墨喵币
下载量:0

查看详情
EggSmile!

价格:0 墨喵币
下载量:0

查看详情
Consistent Empty Armor Slot GUI

价格:0 墨喵币
下载量:0

查看详情