WiIIiam278 / HuskTowns

A simple and elegant proxy-compatible Towny-style protection plugin
https://william278.net/project/husktowns
Apache License 2.0
76 stars 43 forks source link

[Feature Request] Global message for town creation/disband #399

Open matipoirierg opened 9 months ago

matipoirierg commented 9 months ago

Global messages for town creation/disband. This is to improve the town server plugin feel, it's funny when people create a new town using Towny and everyone knows it and sends congratulations messages, or when a town is disbanded everyone says rip in chat.

MSCMDD commented 2 months ago

Perhaps we can implement it using Skript.

import:
    org.bukkit.Bukkit
    net.william278.husktowns.events.TownCreateEvent
    net.william278.husktowns.events.TownDisbandEvent
on load:
    set {_existHuskTowns} to Bukkit.getPluginManager().getPlugin("HuskTowns")
    if {_existHuskTowns} is set:
        send "HuskTowns Skript-Loaded!" to console

on TownDisbandEvent:
    set {_TownName} to event.getTownName()
    broadcast "> &cTown %{_TownName}% &cDisbanded!"
on TownCreateEvent:
    set {_TownName} to event.getTownName()
    broadcast "exam"