DUXPLIMA Documentation

FFA

The free-for-all event, setting up a profile and arena, how a match runs, item rules, anti-camping, random events, the shrinking border and rewards.

FFA is a free-for-all event. When it opens, players type /ffa join and wait in a lobby. When joining closes, everyone is spread over an arena, and the last player alive wins. The Event Manager starts it on a schedule and pays rewards by placement.

Files: configs/extensions/FFA.yml and configs/extensions/ffa-commands.yml. FFA needs WorldGuard and the Event Manager.

Setting it up

Add a profile before the first start

A new FFA.yml has an empty profiles list, and FFA does not start without a profile: the console says "No FFA profiles found" and the /ffa commands do not exist. Add the profile below by hand, then restart or reload.

  1. Make a WorldGuard region around the arena, for example /rg define ffa_arena.

  2. Add a profile to FFA.yml; the keys you leave out are filled with the defaults:

    enabled: true
    defaultProfileId: default
    profiles:
      - id: default
        eventName: FFA
        arenaRegionName: ffa_arena
    
  3. /pvpcore reload FFA.

  4. Stand where waiting players should be and type /ffa admin setlobby.

  5. Stand where players should go when they leave or lose: /ffa admin setexit.

  6. Stand in the arena and add one or more spawn areas: /ffa admin addspawn default 10. Players are spread at random within 10 blocks of where you stand.

  7. /ffa admin saveconfig. The commands above change the settings in memory only; without this, a restart loses them.

  8. Test with /event start FFA.

A profile is ready only with a lobby, an exit, at least one spawn area, and an arena region that exists in WorldGuard. Until then /ffa join says the event is not set up.

How a match runs

StateWhat happens
WAITINGClosed. Nothing runs
JOINABLEThe Event Manager opened it. Everyone is told, and /ffa join takes players to the lobby, up to maxPlayers. Reminders go out with 300, 60 and 30 seconds left. Lasts joinWindowSeconds (300)
STARTINGJoining closed. With fewer than minPlayersToStart (2), the event stops and nothing is paid. Otherwise a countdown of lobbyCountdownSeconds (10) runs with titles
RUNNINGPlayers are teleported to the spawn areas and fight. A player who dies or leaves is out
ENDINGOne player is left: they win, rewards are paid, and everyone goes to the exit

Details:

TopicBehaviour
ItemsPlayers fight with what they carry. On joining, health and food are filled and potion effects removed
DeathWith useKeepInventory: true (the default) players keep their items and drop nothing. They respawn at the exit
LeavingLeaving the server in the lobby takes the player out; in the arena it counts as a loss
CommandsBlocked in the lobby and arena, except those in whitelistCommands
TeleportingRefused in the lobby. In the arena, ender pearls follow allowEnderPearl
BuildingNever in the lobby. In the arena, by allowBlockPlace and allowBlockBreak
DamageOnly between two players in the arena. A player outside cannot hit one inside, or the other way
Combat tagPlayers in the arena are never tagged, so FFA kills give no uxmPVPCore statistics, rating or battle logs
RejoiningA player who logs in inside the arena while no match holds them is sent to the exit

/ffa leave leaves the lobby or the match and teleports to the exit. In the arena, it counts as a loss.

Profile settings

A profile is one FFA event with its own arena. Several profiles can run side by side, each with its own id and eventName.

KeyDefaultMeaning
iddefaultThe profile's id, used in commands
eventNameFFAThe name the Event Manager schedules, eventName in EventManager.yml
displayNameFFA EventShown in messages and placeholders
minPlayersToStart2Fewer players when joining closes stops the event
maxPlayers20The lobby is full at this many
lobbyLocation, exitLocationnot setSet with setlobby and setexit
spawnAreasemptyAdded with addspawn. Each is a centre and a radius
arenaRegionNameffa_arenaThe WorldGuard region of the arena
arenaCenternot setThe centre of the border. Without it, the region's centre
joinWindowSeconds300How long joining stays open
lobbyCountdownSeconds10The countdown before the match
useKeepInventorytruePlayers keep their items when they die in the arena
blockedCommands*Commands refused in FFA. * means all
whitelistCommandsffa leave, msg, r, tell, mute, banCommands that always work in FFA
winCommandseco give %player% 1000, a sayConsole commands for the winner. %player%
countdownTitle, startTitleTitles during the countdown and at the start. {time} in the countdown

winCommands run in addition to the Event Manager's rewardTiers. Use one or the other for the winner, or they get paid twice.

Item rules

gameSettings decides what may be used in the arena:

KeyDefault
allowMacetrue
allowPotionThrowtrue
allowTridentThrowfalse
allowWindChargetrue
allowBowUsagetrue
allowEnderPearlfalse
allowElytrafalse
allowTotemtrue
allowGoldenAppletrue
allowEnchantedGoldenApplefalse
allowBlockPlacefalse
allowBlockBreakfalse

Keeping the match moving

Player tracking

playerTracking: when nobody has hurt anyone for startAfterSeconds (120), every player in the arena glows for revealDurationSeconds (5), and again every revealIntervalSeconds (30), until fighting starts again.

Anti-camping and anti-teaming

stalematePrevention punishes players who avoid fighting or work together.

KeyDefaultMeaning
enabledtrueTurns both checks on or off
antiCampEnabledtruePunish players who have not hurt or been hurt by anyone
antiCampThresholdSeconds45For this long
antiTeamEnabledtruePunish two players who stay together without fighting
antiTeamProximityRadius6Within this many blocks of each other
antiTeamForgivenessSeconds15For this long without hurting each other
antiTeamDamageThreshold15One hit of at least this much between them clears them
actionTypesGLOW, DAMAGE, FORCE_PUSHThe punishments: glow, damage, a push. NONE for a warning only
actionDurationSeconds10How long the glow lasts
actionDamageAmount4Damage dealt, in half hearts
actionPushForce0.9How hard the push is
broadcastWarningtrueTell the arena with warningMessageCamping or warningMessageTeaming
ignoreZeroDamageHitstrueHits that deal no damage do not count as fighting

Random events

randomEvents changes the rules for a while during the match.

KeyDefaultMeaning
enabledtrueTurns random events on or off
startDelaySeconds240No random event in the first 4 minutes
intervalMinSeconds, intervalMaxSeconds600, 1200Time between two events, picked at random
historySize4The last this many events are not picked again
maxConsecutiveEvents-1No limit
eventsseven eventsThe events that can be picked

Each event has type, enabled, durationSeconds, weight (higher is picked more often), minPlayersRequired, displayName, startMessage, endMessage, startTitle, endTitle, startSound and endSound. The messages can use {event_name} and {duration}.

TypeEffect
NO_ENDER_PEARL, NO_MACE, NO_BOW, NO_POTION, NO_GOLDEN_APPLEThat item cannot be used. In the default list
NO_TOTEM, NO_TRIDENT, NO_SHIELD, NO_ELYTRAThat item cannot be used
SPEED_BOOSTSpeed for everyone. In the default list
LOW_GRAVITYJump boost for everyone. In the default list
STRENGTH_BOOST, SLOWNESS, BLINDNESSThat effect for everyone
DOUBLE_DAMAGEEvery hit deals double damage
HALF_HEALTHEveryone's health is halved until the event ends
NO_HEALINGNobody regains health

The shrinking border

safeZone closes the arena in over time, so the match cannot last forever.

KeyDefaultMeaning
enabledtrueTurns the border on or off
initialRadius100The border's radius at the start, around arenaCenter
minRadius15It never gets smaller than this
shrinkIntervalSeconds60How often it shrinks
shrinkAmount15By how many blocks each time
damagePerSecond2Damage to players outside it, in half hearts

With the defaults the border is at its smallest after 6 minutes.

Commands

CommandDoes
/ffa join (profile), /ffaJoins the open event
/ffa leaveLeaves it
/ffa admin gui (profile)A menu to edit a profile
/ffa admin profilesLists the profiles and their state
/ffa admin setlobby (profile)Sets the lobby to where you stand
/ffa admin setexit (profile)Sets the exit to where you stand
/ffa admin addspawn <profile> <radius>Adds a spawn area around where you stand
/ffa admin clearspawns (profile)Removes every spawn area
/ffa admin setregion <profile> <region>Sets the WorldGuard arena region
/ffa admin saveconfigWrites the changes to FFA.yml
/ffa admin players (profile)Who is in the lobby and the arena
/ffa admin kick <player>Takes a player out of FFA
/ffa admin add (profile) <player>Puts a player into the running match

With a single profile, (profile) can be left out. Players need uxmpvpcore.ffa.use, staff uxmpvpcore.ffa.admin. Messages are under messages in each profile, and the texts the FFA placeholders show are under placeholderMessages.

Related: Event Manager, Placeholders