### Simple Match Format Configuration (XML) Source: https://github.com/pgmdev/website/blob/master/docs/events/examples.mdx This XML snippet defines a simple match format where the first player to win 2 matches wins the round. It's a basic 'best-of-3' setup. ```xml Facility TE Ascendance Limbo II ``` -------------------------------- ### XML Kit and Action Definition Example Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/actions-triggers.mdx This example demonstrates how to define a kit with items and actions, and how to set up actions that can be triggered. It includes nested scope switching for messages and kit distribution within a team. ```xml ``` -------------------------------- ### Install OpenJDK 21 (Bash) Source: https://github.com/pgmdev/website/blob/master/docs/guides/preparing/local-server-setup.mdx This command installs OpenJDK 21 on Debian-based Linux distributions. It first updates the package list and then installs the Java Development Kit. This is a prerequisite for running the SportPaper server on Linux. ```bash sudo apt update && sudo apt install openjdk-21-jdk ``` -------------------------------- ### XML World Border Configuration Examples Source: https://github.com/pgmdev/website/blob/master/docs/modules/environment/border.mdx Demonstrates how to configure world borders using XML. Includes examples for time-based shrinking borders and dynamically controlled borders based on game objectives. ```xml control-point control-point ``` -------------------------------- ### Make Server Start Script Executable (Bash) Source: https://github.com/pgmdev/website/blob/master/docs/guides/preparing/local-server-setup.mdx This command makes the server start script executable. You need to replace '' with the actual path to your script. This is a necessary step before running the script. ```bash chmod a+x ``` -------------------------------- ### XML Potion Customization Examples Source: https://github.com/pgmdev/website/blob/master/docs/reference/items/potions.mdx These examples demonstrate how to create custom potions in XML by specifying damage values for base potion types and effects, and how to override default durations and amplifiers. ```xml speed instant_health ``` ```xml absorption fast_digging speed ``` -------------------------------- ### Create SportPaper Server Start Script (Bash) Source: https://github.com/pgmdev/website/blob/master/docs/guides/preparing/local-server-setup.mdx This bash script is used to start the SportPaper server. It navigates to the script's directory, sets Java memory allocation, and runs the SportPaper JAR file with specific terminal settings. Ensure SportPaper.jar is in the same directory. ```bash #!/bin/sh cd "$( dirname "$0" )" java -Xms128M -Xmx2G -Dterminal.jline=false -Dterminal.ansi=true -jar SportPaper.jar nogui ``` -------------------------------- ### Region Mirror Example - XML Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/regions.mdx An example showcasing the 'mirror' transformation to create a symmetrical region. This example defines an 'underside' region and mirrors it to cover both sides. ```xml ``` -------------------------------- ### Start SportPaper Server Script (Bash) Source: https://github.com/pgmdev/website/blob/master/docs/guides/preparing/local-server-setup.mdx This bash script is used to start the SportPaper server. It sets JVM memory arguments, disables JLine and ANSI terminals, and runs the SportPaper.jar file in nogui mode. Ensure SportPaper.jar is in the same directory. ```bash #!/bin/sh java -Xms128M -Xmx2G -Dterminal.jline=false -Dterminal.ansi=true -jar SportPaper.jar nogui ``` -------------------------------- ### Set Player Walk Speed with Kit Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/kits.mdx These XML examples show how to adjust a player's walk speed using the walk-speed kit. The value is a multiplier of the normal walking speed, with examples for increasing and decreasing speed. ```xml 1.8 0.5 ``` -------------------------------- ### XML Basic Armor Setup Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/items.mdx Assigns basic armor pieces to player slots using predefined material tags. This is a fundamental way to equip players with armor. ```xml ``` -------------------------------- ### Smelt Recipe Example (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/crafting.mdx An example of a smelt recipe in XML format. This defines the input ingredient and the resulting output material and amount when smelted in a furnace. Smelt recipes accept only a single ingredient. ```xml stick ``` -------------------------------- ### Start Minecraft Server with SportPaper (Batch) Source: https://github.com/pgmdev/website/blob/master/docs/guides/preparing/local-server-setup.mdx This batch script is used to start a Minecraft server running SportPaper. It sets Java memory allocation, terminal properties, and specifies the server JAR file. Ensure 'SportPaper.jar' is in the same directory and the file is saved as 'start.bat'. ```batch @ECHO OFF TITLE SportPaper 1.8 java -Xms128M -Xmx2G -Dterminal.jline=false -Dterminal.ansi=true -jar SportPaper.jar nogui PAUSE ``` -------------------------------- ### XML Examples for Translatable Objective Names and Descriptors Source: https://github.com/pgmdev/website/blob/master/docs/reference/misc/objective-names.mdx Demonstrates how to use translatable objective names and descriptor patterns within XML configurations. These examples show how specific names are localized for different languages, such as Spanish and French. ```xml ``` -------------------------------- ### XML Configuration for Fly Kit Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/kits.mdx This snippet demonstrates how to configure the Fly Kit using XML. It shows examples of enabling/disabling flight, controlling the flying state, and setting fly speed. ```xml ``` -------------------------------- ### Half-space Region Example (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/regions.mdx Provides an example of defining a half-space region with a diagonal boundary using origin and normal attributes. ```xml ``` -------------------------------- ### Match Format with Veto System (XML) Source: https://github.com/pgmdev/website/blob/master/docs/events/examples.mdx This XML snippet illustrates a 'best-of-3' match format incorporating a veto system. It includes options for matches and rules for banning. ```xml No Return Ascendance 02 Facility TE Nartica Desert Sanctuary Smoke ``` -------------------------------- ### Broadcast Message Examples (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/information/broadcasts.mdx Demonstrates various ways to configure broadcast messages using and tags with attributes like 'after', 'every', and 'count'. ```xml A [Tip] displayed 30 seconds into the match An [Alert] displayed after 5 minutes Repeated [Tip] at 10m, 20m, and 30m Repeated every 99 seconds, forever Displayed at 20m and every minute after that At 30m, 40m, and 50m ``` -------------------------------- ### Shapeless Crafting Recipe Example (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/crafting.mdx An example of a shapeless crafting recipe in XML format. It defines a result material and a list of ingredients, where the 'amount' attribute specifies the quantity of an ingredient and can include item data. ```xml sugar ink sack:1 ``` -------------------------------- ### Destroy the Core Map Example (XML) Source: https://context7.com/pgmdev/website/llms.txt A complete XML map configuration for a 'Destroy the Core' game mode in PGM. This example demonstrates defining map properties, teams, kits, spawn points, regions, core objectives, and various game mechanics. ```xml Battle Arena 1.0.0 2024-01-15 Leak lava from the enemy's core into the void. Red Blue red-team blue-team obsidian iron sword bow diamond pickaxe iron helmet chainmail chestplate leather leggings leather boots arrow 100 ``` -------------------------------- ### Kit Configuration (XML) Source: https://github.com/pgmdev/website/blob/master/docs/examples/warlock.mdx Defines the equipment and effects players receive upon spawning. This includes weapons, armor, consumables, and status effects, ensuring a balanced starting loadout. ```xml infinity protection projectile heal damage resistance ``` -------------------------------- ### Kill-Streak Filter Examples (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx Demonstrates how to use the kill-streak filter with 'min', 'max', and 'count' attributes to match players based on their kill count. The 'repeat' and 'persistent' attributes can also be configured. ```XML ``` -------------------------------- ### Match Phase Filter Options Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx Matches for specific states of a match, such as started, running, or finished. More specific filters like `` are recommended over the generic `` tag. ```xml running finished started starting idle ``` -------------------------------- ### XML Time Period Examples Source: https://github.com/pgmdev/website/blob/master/docs/reference/misc/time-periods.mdx Demonstrates how to represent time periods in XML using suffixes for days, hours, minutes, and seconds. It also shows how to combine units for more specific durations. ```xml ``` -------------------------------- ### After Filter Example Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx The After filter activates after a specified duration once a child filter starts allowing matches. It requires a duration and a child filter, and can display an optional message. The example demonstrates a 15-second delay after a player achieves first place. ```xml 1 ``` -------------------------------- ### Make Script Executable (Bash) Source: https://github.com/pgmdev/website/blob/master/docs/guides/preparing/local-server-setup.mdx This command makes the 'start.sh' script executable. Run this in your terminal within the server's directory. ```bash sudo chmod +x start.sh ``` -------------------------------- ### Countdown Filter Example Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx The Countdown filter matches for a specified duration after a child filter starts matching. It requires a duration and a child filter, and can optionally display a message. The example shows a 30-second countdown after a player picks up the blue flag. ```xml blue-flag ``` -------------------------------- ### Configure Simple Monument Mode Source: https://github.com/pgmdev/website/blob/master/docs/modules/objectives/monument-modes.mdx Sets a monument mode to change the material of objectives to gold blocks after a specified duration from the start of the match. This is a basic setup for material transformation. ```xml ``` -------------------------------- ### XML Portal Configuration Examples Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/portals.mdx Demonstrates various ways to configure portal behavior using XML. This includes setting absolute and relative coordinates for destinations, specifying regions for entry and exit, applying filters for team-based access, and controlling player orientation (yaw and pitch). ```xml ``` -------------------------------- ### Objective Filter Examples (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx Examples showcasing the use of Objective Filters. These filters check if an objective has been completed or captured, with options to specify the objective ID and team. ```xml red-core south-hill north-hill central-hill goal-id goal-id goal-id ``` -------------------------------- ### Player Count Filter Examples (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx Examples demonstrating the usage of the Player Count Filter. It can match based on a minimum and maximum number of players, and optionally include participants or observers. ```xml ``` -------------------------------- ### Rank Filter Examples (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx Provides examples for the rank filter, which matches players or teams based on their rank. It supports exact ranks, ranges (e.g., [1,3]), and can be filtered by team. ```XML 2 [1,3] 1 ``` -------------------------------- ### XML Potion Effect Examples Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/potions.mdx Examples of the `` element in XML, demonstrating how to apply potion effects with specified duration and amplifier. These are commonly used in game development kits. ```xml jump boost damage resistance ``` -------------------------------- ### Implement Dynamic Structure Behavior (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/blocks/structures.mdx This snippet demonstrates how to make structures appear or move dynamically based on game conditions. It uses filters for team control of points and time-based events to control structure visibility and location. ```XML hill ``` -------------------------------- ### Random Filter Examples (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx Shows examples of the random filter, which randomly ALLOWs or DENYs based on a probability. The value can be a decimal fraction or an interval (e.g., [0.25, 0.75)). Applicable to instantaneous events. ```XML 0.5 [0.25, 0.75) ``` -------------------------------- ### Apply Dynamic Kits with Filters Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/kits.mdx Kits can be given, taken, or loaned dynamically based on matching a Dynamic Filter. The ``, ``, and `` elements reference kits and filters to control kit application. ```xml flag ``` -------------------------------- ### Lives Filter Examples (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx Shows examples of the lives filter, which matches players based on their number of lives. It supports 'min', 'max', and 'count' attributes for specifying the life count criteria. Requires the Blitz module. ```XML ``` -------------------------------- ### Dynamic Kit Properties in XML Source: https://github.com/pgmdev/website/blob/master/docs/modules/general/proto.mdx Kits can now be dynamically applied using 'give', 'take', and 'lend' properties within the XML configuration. This allows for more flexible management of player gear. ```xml ``` -------------------------------- ### Region Union Example - XML Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/regions.mdx An example demonstrating the use of the 'union' modifier to combine multiple cuboid regions into a single, larger region. This is often used for defining complex areas like team bases. ```xml ``` -------------------------------- ### Configure Blitz Mode Actions and Variables (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/actions-triggers.mdx This XML configuration sets up actions to enable and disable 'Blitz Mode' and defines a variable to track its state. Moderators can trigger these actions using the '/action' command, provided they have 'GAMEPLAY' permissions. The configuration also includes a filter to modify gameplay when Blitz Mode is active. ```xml 1 ``` -------------------------------- ### Blitz Player Life Filter Example Source: https://github.com/pgmdev/website/blob/master/docs/modules/objectives/blitz.mdx This example demonstrates how to apply a filter to when a player loses a life in the Blitz gamemode. Players only lose a life if they die 30 seconds after the match begins, otherwise, they respawn without penalty. ```xml 5 ``` -------------------------------- ### Define Kit Structure with Items and Effects (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/kits.mdx This XML snippet demonstrates the basic structure of a kit, including defining items with specific slots and materials, and applying potion effects with durations. It also shows how to use parent kits for inheritance and the 'force' attribute for overriding. ```xml instant_health ``` -------------------------------- ### XML Example: Custom Shaped Crafting Recipes Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/crafting.mdx This XML snippet demonstrates how to define custom shaped crafting recipes using the `` element. It includes examples of overriding vanilla recipes and creating recipes with different grid dimensions. ```xml durability FFF .S. .S. flint stick GGG gold nugget ``` -------------------------------- ### Kill Rewards with Actions and Filters (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/kill-rewards.mdx Sets up kill rewards that trigger specific actions or kits, with options to apply actions to the victim or use referenced actions. This example illustrates using the `victim-action` attribute and referencing actions or kits by ID, as well as defining inline actions. ```xml ``` -------------------------------- ### XML Spawn Point Configurations Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/spawns.mdx Defines spawn points for different teams and default spawn areas using XML. Includes cuboid regions and yaw orientation for precise placement. ```xml ``` ```xml 1.5,8,0.5 1.5,8,0.5 ``` -------------------------------- ### XML Net Configuration Example for Classic CTF Source: https://github.com/pgmdev/website/blob/master/docs/modules/objectives/ctf.mdx This XML snippet demonstrates the configuration of nets for a classic Capture The Flag (CTF) game mode. It includes score limits, flag definitions with pickup restrictions, and net configurations that specify which flag can be captured and which flag is rescued. ```xml 3 2,5,11 24,5,11 ``` -------------------------------- ### XML Example: Deny Yellow Explosions with 'not' and 'all' Modifiers Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx This XML snippet demonstrates the use of the '' and '' filter modifiers. The '' modifier inverts the result of its child filter, while '' requires all its child filters to match. This specific example denies matches where the team is 'yellow' AND the cause is 'explosion'. ```xml yellow explosion ``` -------------------------------- ### XML Constant Comparison Examples Source: https://github.com/pgmdev/website/blob/master/docs/modules/general/preprocessing.mdx Illustrates various ways to compare constants using the 'constant-comparison' attribute within an '' element. This includes checking for defined values, specific values, regular expressions, and ranges. ```xml ``` ```xml ``` ```xml ``` -------------------------------- ### General Score Increment and Notification Example Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/variables.mdx This example demonstrates incrementing team and player scores upon region entry and sending a notification when a score threshold is met. It defines variables for scores, actions for score updates, and filters to trigger events based on score values. ```xml [100,oo) ``` -------------------------------- ### Pulse Filter Examples Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx The Pulse filter creates a repeating signal, activating and deactivating within a defined period. It requires a period, duration, and a child filter. The examples show pulsing activation for 15 seconds within a 60-second period and another pulse with an inner match filter. ```xml ``` -------------------------------- ### Defining Actions and Triggers with XML Source: https://context7.com/pgmdev/website/llms.txt Sets up in-game actions and triggers based on specific conditions or events using XML. This includes sending messages, applying kits, or triggering effects based on player actions or game state. ```xml slowness ``` -------------------------------- ### Offset Filter Examples Source: https://github.com/pgmdev/website/blob/master/docs/modules/mechanics/filters.mdx The Offset filter checks for blocks at specific coordinates relative to the player or absolute positions. It can use exact vectors, relative coordinates (with '~'), or directional vectors (with '^'). Examples include checking for bedrock at an exact location, cobblestone below the player, and water in front of the player. ```xml bedrock cobblestone water ``` -------------------------------- ### Player Kit Configuration (XML) Source: https://github.com/pgmdev/website/blob/master/docs/examples/ozone.mdx Defines the starting kit for players, including unbreakable stone sword, bow with infinity, arrows, golden apple, and team-colored leather armor. It also applies projectile protection and speed effects. ```xml infinity protection projectile damage resistance speed ``` -------------------------------- ### Define Blocks an Item Can Be Placed On (XML) Source: https://github.com/pgmdev/website/blob/master/docs/modules/gear/items.mdx The `` element allows an item to be placed on specific block materials. It can use individual `` tags or the `` tag to permit placement on any block. Using `show-can-place-on="false"` is recommended with `` to avoid large tooltips. ```xml ``` -------------------------------- ### CTF XML Configuration Example Source: https://github.com/pgmdev/website/blob/master/docs/modules/objectives/ctf.mdx This XML snippet demonstrates the basic structure for configuring flags, posts, and nets in a Capture the Flag gamemode. It defines a red flag, its associated respawn post, and the capture net for the opposing team. Filters can be applied to control interactions. ```xml 2,5,11 ``` -------------------------------- ### XML Block Drops for Kit Assignment Source: https://github.com/pgmdev/website/blob/master/docs/modules/blocks/blockdrops.mdx A rule that assigns a specific 'kit' to the player when a certain block is broken. This example assigns the 'chest-kit' when a chest block is broken. ```xml chest ``` -------------------------------- ### XML Protocol Versioning Examples Source: https://github.com/pgmdev/website/blob/master/docs/modules/general/proto.mdx Demonstrates how built-in filters are referenced in different PGM protocol versions. In proto 1.5.0, filters like 'alive' are recognized by default, eliminating the need for explicit definition in the tag. For older versions (e.g., 1.4.2), the filter must be explicitly defined. ```xml ```