Skip to content

DavidArchive/EventCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventCore

download license stars forks


Installation

  1. Download jar from here
  2. Put the jar in your plugins folder
  3. Restart your server (not reload)

Update

  1. Download the new jar from here
  2. Replace the old jar with the new one
  3. Delete the old config.yml and restart your server

Future updates

  • Possibility to create teams (for tournaments or similar)
  • Integrated fast world reset system
  • Placeholder Support in Messages

API Usage

Example Listener

Here is an example of how to process a custom KitGiveEvent:

@EventHandler
public void onKitGiven(final KitGiveEvent event) {
    final Player player = event.getPlayer();
    final String kit = event.getKitName();

    if (player == null || kit == null) {
        Logger.getAnonymousLogger().warning("Kit name or Player is equal to null");
        return;
    }

    if (kit.equalsIgnoreCase("default")) {
        Logger.getAnonymousLogger().warning("The kit name is equal to default");
        return;
    }

    final String broadcastMessage = "%player% has been given the %kit% kit!"
            .replace("%player%", player.getName())
            .replace("%kit%", kit);

    Bukkit.broadcast(Component.text(broadcastMessage).color(NamedTextColor.GREEN));
}

API Access

The main class EventCoreAPI provides the central access to essential managers and functions.

Accessing the API Instance

Before using the API, ensure it is initialized:

EventCoreAPI.initialize(plugin);

To retrieve the API instance, use:

EventCoreAPI api = EventCoreAPI.get();

Available Components

  • GameManager
    Access to game management functionality.

  • KitManager
    Manage kits (e.g., saving, loading, deleting).

  • MapManager
    Manage maps and map-related functions.


Commands

Command Action
/event start Start the event
/event stop <winner> Stop the event
/event drop Drop with the commands defined in the config.yml
/event autoBorder <on / off> Toggle AutoBorder
/event setSpawn Set the spawn location
/event kickspec Kick all spectators
/event kickall Kick all players (exclude players with event.command)
/event clearall Clear all player inventories
/kit <player> Give a player the saved kit
/kit * Give all players the saved kit
/kit enable <name> Enable a kit
/kit save <name> Saves your current inventory as kit
/kit delete <name> Delete a kit
/revive <player> Revive a player
/revive * Revive all players who are not in gamemode 0
/announce <message> Announce a message
/spawn Teleport to the spawn

Permissions

Permissions
event.bypass Disables protect while not started (break blocks, place blocks, interact, hit players)
event.command Use /event
event.spawn Use /spawn

Placeholders

Placeholder Description Example
%eventcore_total% Total players online 12
%eventcore_alive% Total players alive (players in gamemode 0) 4
%eventcore_kills% Kills of the player 6
%eventcore_deaths% Deaths of the player 3
%eventcore_kd% K/D of the player 2.00
%eventcore_totems% Totem count of the player 8
%eventcore_border% Current border size of the world the player is on 30
%eventcore_ping% Ping of the player 18ms
%eventcore_tps% Server TPS (via Spark) 20.00

About

Event Server System with tons of useful commands and features

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages