Advanced Search
Search Results
98 total results found
Getting Started
BattleArena is designed to primarily be a framework to create games from both a user and development standpoint. Nearly everything is data driven, and many of the APIs provided from BattleArena allow you to further extend this. Follow the steps below to add t...
Overview
This is an overview of how to use the BattleArena API to create a custom gamemode. Before we start writing code, there's a few things to keep in mind regarding how BattleArena works and manages arenas: Arena: The Arena class contains the root logic of a game...
Creating Your Arena Class
Creating a Custom Arena Class The first step in creating a custom gamemode is creating the Arena class for your game. To do this, simply create a new class and extend the Arena class. package org.battleplugins.arena.example; import org.battleplugins.arena...
Adding Configurable Values to Your Arena
Now that you have a custom Arena instance and a corresponding YML file, you are now ready to add some configurable options to your game! The Configuration System - in a nutshell One of the main features BattleArena includes a fully custom configuration syste...
The Event System
The event system is at the heart of BattleArena, and is how game logic and most features will be configured. Most classes you will extend (i.e. Arena, Competition, Map, etc.) do not have (m)any overridable methods, but instead use events. The BattleArena even...
Adding Game Logic
Now that you have a basic understanding of how the event system works, along with a base to work off of. It's time to implement some game logic! Game logic can be implemented in two places: the Arena, or your Competition class. While we do not have a Competit...
Per-Competition Code
Now that you have an Arena class with functioning game logic, it's time to expand on that. Creating Competition Classes As mentioned in the Adding Game Logic page, you will need to create a custom Competition class. The following code below is how to create ...
Storing Map Information
In some competitions, it may be necessary to store additional information that varies on a per-map basis. An example of this is predefined layers in spleef. The game needs to know where the layers exist in order to handle logic such as only allowing block brea...
Creating a Custom Command Executor
BattleArena provides support for creating custom command executors for individual arenas. Each arena has its own executor that is utilized when running the /<arena> command (i.e. /arena, /battlegrounds, etc.). Continuing from this tutorial, there is also a /my...
Using the BattleArena API
BattleArena offers an API for developers to use if they wish to interface with the plugin. The main entrypoint into BattleArena is the BattleArenaApi class, which can be accessed by running BattleArenaApi.get(). The more important methods are documented bel...
Leaderboards and Statistic Tracking
BattleArena has support in companion with BattleTracker to track arena statistics and leaderboards. Tracking Statistics In order to track statistics, the first step is to simply download BattleTracker. Upon restarting the server with BattleTracker, the follo...
Custom Effect Format
BattleArena has support for custom effects in a few places that are primarily cosmetic. Particle Name Description Type particle The name of the particle. See Particle. <Particle> speed The speed of the particle. <number> count The...