diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d564c4c6..453eb719 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -128,11 +128,21 @@ There are quite a few constants you may want to use in your pages, such as the l These constants can be imported and used in MDX, like so: ```mdxjs -import { LATEST_MC_RELEASE, LATEST_PAPER_RELEASE, LATEST_VELOCITY_RELEASE } from "/src/utils/versions"; +import { + LATEST_MC_RELEASE, + LATEST_PAPER_RELEASE, + LATEST_VELOCITY_RELEASE, + LATEST_FOLIA_RELEASE, + LATEST_WATERFALL_RELEASE, + LATEST_USERDEV_RELEASE, +} from "/src/utils/versions"; Latest Paper version is {LATEST_PAPER_RELEASE}. Latest Velocity version is {LATEST_VELOCITY_RELEASE}. Latest Minecraft version is {LATEST_MC_RELEASE}. +Latest Folia version is {LATEST_FOLIA_RELEASE}. +Latest Waterfall version is {LATEST_WATERFALL_RELEASE}. +Latest `paperweight-userdev` version is {LATEST_USERDEV_RELEASE}. ``` If you want to perform these replacements in code blocks, you need to use a special `replace` meta property. diff --git a/astro.config.ts b/astro.config.ts index a895f129..3eb58471 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -47,6 +47,7 @@ export default defineConfig({ Banner: "./src/components/overrides/Banner.astro", TableOfContents: "./src/components/overrides/TableOfContents.astro", MobileTableOfContents: "./src/components/overrides/MobileTableOfContents.astro", + SocialIcons: "./src/components/overrides/SocialIcons.astro", }, plugins: [ starlightLinksValidator({ @@ -382,6 +383,9 @@ export default defineConfig({ ), ], expressiveCode: { + frames: { + extractFileNameFromCode: false, + }, emitExternalStylesheet: false, }, }), diff --git a/src/components/PageCards.astro b/src/components/PageCards.astro index 7326814e..db1a04c8 100644 --- a/src/components/PageCards.astro +++ b/src/components/PageCards.astro @@ -39,7 +39,7 @@ const pages: Page[] = (await getCollection(Astro.locals.starlightRoute.entry.col { pages.map((p) => ( diff --git a/src/components/overrides/SocialIcons.astro b/src/components/overrides/SocialIcons.astro new file mode 100644 index 00000000..c1f615b5 --- /dev/null +++ b/src/components/overrides/SocialIcons.astro @@ -0,0 +1,52 @@ +--- +import config from "virtual:starlight/user-config"; +import { Icon } from "@astrojs/starlight/components"; +import { LATEST_RELEASES } from "../../utils/versions"; + +const { isPageWithTopic, topics } = Astro.locals.starlightSidebarTopics; +const currentTopic = isPageWithTopic ? topics.find((t) => t.isCurrent) : null; + +const links = (config.social || []).map((link) => { + const project = currentTopic?.label?.toLowerCase(); + if (!project) { + return link; + } + + const version = LATEST_RELEASES[project]; + if (!version) { + return link; + } + + switch (link.label) { + case "Javadoc": + return { ...link, href: `${link.href}/${project}/${version}` }; + case "GitHub": + return { ...link, href: `${link.href}/${project}` }; + } + return link; +}); +--- + +{ + links.length > 0 && ( + <> + {links.map(({ label, href, icon }) => ( + + {label} + + + ))} + + ) +} + + diff --git a/src/config/paper/paper-global.yml b/src/config/paper/paper-global.yml index 7ae7382e..348f47f5 100644 --- a/src/config/paper/paper-global.yml +++ b/src/config/paper/paper-global.yml @@ -57,6 +57,20 @@ block-updates: Disabling block updates leads to tripwires no longer updating their block state, allowing for technically invalid tripwires to remain in the world, which might be useful for mapmakers. + disable-chorus-plant-updates: + default: "false" + description: >- + Whether to disable any form of block updates for chorus plants on the + server. Disabling block updates leads to chorus plants no longer updating their block + state, allowing for technically invalid chorus plant configurations to remain in the world, + which might be useful for mapmakers. + disable-mushroom-block-updates: + default: "false" + description: >- + Whether to disable any form of block updates for mushroom blocks on the + server. Disabling block updates leads to mushroom blocks no longer updating their block + state, allowing for technically invalid mushroom block configurations to remain in the world, + which might be useful for mapmakers. chunk-loading-advanced: auto-config-send-distance: default: "true" @@ -523,6 +537,9 @@ unsupported-settings: This setting controls if equipment should be updated when handling certain player actions. If set to false this will allow players to exploit attributes by e.g. switching equipment before using it. + simplify-remote-item-matching: + default: "false" + description: Only checks an item's amount and type instead of its full data during inventory desync checks. watchdog: early-warning-delay: default: "10000" diff --git a/src/config/paper/paper-world-defaults.yml b/src/config/paper/paper-world-defaults.yml index e787f331..894d5616 100644 --- a/src/config/paper/paper-world-defaults.yml +++ b/src/config/paper/paper-world-defaults.yml @@ -249,6 +249,11 @@ entities: vanilla: "false" default: "true" description: "Prevents phantoms from attacking players who have slept " + player-insomnia-start-ticks: + default: "72000" + description: | + Number of ticks a player must stay awake before phantoms can start spawning. + Default (72000) is 3 Minecraft days, -1 disables phantom spawning. piglins-guard-chests: default: "true" description: If piglins should attempt to guard chests when angered @@ -357,6 +362,42 @@ entities: description: >- The rate, in ticks, at which arrows shot from players in creative mode are despawned + ticks-per-spawn: + ambient: + default: "-1" + description: | + Determines how many ticks there are between attempts to spawn ambient mobs (bats). + Default (-1) uses Vanilla spawn rate. + axolotls: + default: "-1" + description: | + Determines how many ticks there are between attempts to spawn axolotls. + Default (-1) uses Vanilla spawn rate. + creature: + default: "-1" + description: | + Determines how many ticks there are between attempts to spawn passive creatures (animals). + Default (-1) uses Vanilla spawn rate. + monster: + default: "-1" + description: | + Determines how many ticks there are between attempts to spawn hostile monsters. + Default (-1) uses Vanilla spawn rate. + underground_water_creature: + default: "-1" + description: | + Determines how many ticks there are between attempts to spawn underground water creatures (glow squid). + Default (-1) uses Vanilla spawn rate. + water_ambient: + default: "-1" + description: | + Determines how many ticks there are between attempts to spawn ambient water mobs (tropical fish). + Default (-1) uses Vanilla spawn rate. + water_creature: + default: "-1" + description: | + Determines how many ticks there are between attempts to spawn water creatures (squid, dolphins). + Default (-1) uses Vanilla spawn rate. despawn-range-shape: default: ELLIPSOID description: >- @@ -1026,6 +1067,18 @@ tick-rates: description: >- How often mob spawners should tick to calculate available spawn areas and spawn new entities into the world. A value of -1 will disable all spawners + dry-farmland: + default: "1" + description: | + Controls how frequently dry farmland blocks are ticked. + Higher values slow down the rate at which farmland checks for moisture updates. + Default (1) uses Vanilla behavior, -1 disables dry farmland random ticks. + wet-farmland: + default: "1" + description: | + Controls how frequently wet farmland blocks are ticked. + Higher values slow down the rate at which farmland checks for moisture updates. + Default (1) uses Vanilla behavior, -1 disables wet farmland random ticks. sensor: villager: secondarypoisensor: diff --git a/src/config/paper/server-properties.yml b/src/config/paper/server-properties.yml index 6f459216..a610484c 100644 --- a/src/config/paper/server-properties.yml +++ b/src/config/paper/server-properties.yml @@ -229,6 +229,11 @@ sync-chunk-writes: text-filtering-config: default: "" description: "The path to the text filtering configuration file. Leave blank to disable text filtering." +text-filtering-version: + default: "0" + description: | + The version of the configuration format used for [`text-filtering-config`](#text_filtering_config). + Valid values are 0 and 1. use-native-transport: default: "true" description: "Provides a performance boost for Linux servers." diff --git a/src/config/paper/spigot.yml b/src/config/paper/spigot.yml index 7c63d94f..ca15a020 100644 --- a/src/config/paper/spigot.yml +++ b/src/config/paper/spigot.yml @@ -39,6 +39,9 @@ commands: silent-commandblock-console: default: "false" description: Whether to log Vanilla command feedback to the Console. + enable-spam-exclusions: + default: "false" + description: Whether to apply spam exclusions from [`commands.spam-exclusions`](#commands_spam_exclusions). spam-exclusions: default: "[/skill]" description: >- diff --git a/src/content/docs/folia/admin/index.mdx b/src/content/docs/folia/admin/index.mdx index a0095358..b371d58a 100644 --- a/src/content/docs/folia/admin/index.mdx +++ b/src/content/docs/folia/admin/index.mdx @@ -1,5 +1,6 @@ --- title: Administration +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; @@ -7,4 +8,6 @@ import PageCards from "/src/components/PageCards.astro"; Welcome to the Folia administration guide! This guide includes information and tutorials regarding the administration of a Folia server. - +#### Reference + + diff --git a/src/content/docs/folia/admin/reference/index.mdx b/src/content/docs/folia/admin/reference/index.mdx index 6c7cd84b..bf95b04b 100644 --- a/src/content/docs/folia/admin/reference/index.mdx +++ b/src/content/docs/folia/admin/reference/index.mdx @@ -1,5 +1,6 @@ --- title: Reference +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/folia/index.mdx b/src/content/docs/folia/index.mdx index c67f42f1..79f6521c 100644 --- a/src/content/docs/folia/index.mdx +++ b/src/content/docs/folia/index.mdx @@ -1,5 +1,6 @@ --- title: Folia Documentation +tableOfContents: false --- import { CardGrid, LinkCard } from "@astrojs/starlight/components"; @@ -7,5 +8,9 @@ import { CardGrid, LinkCard } from "@astrojs/starlight/components"; Folia is a fork of Paper which adds regionized multithreading to the dedicated server. - + diff --git a/src/content/docs/misc/index.mdx b/src/content/docs/misc/index.mdx index 78a0f1a2..949ce70b 100644 --- a/src/content/docs/misc/index.mdx +++ b/src/content/docs/misc/index.mdx @@ -1,5 +1,6 @@ --- title: Miscellaneous +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/misc/tools/index.mdx b/src/content/docs/misc/tools/index.mdx index 1ee10076..532092fa 100644 --- a/src/content/docs/misc/tools/index.mdx +++ b/src/content/docs/misc/tools/index.mdx @@ -1,5 +1,6 @@ --- title: Tools +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/admin/getting-started/index.mdx b/src/content/docs/paper/admin/getting-started/index.mdx index facdcca6..7c77ae02 100644 --- a/src/content/docs/paper/admin/getting-started/index.mdx +++ b/src/content/docs/paper/admin/getting-started/index.mdx @@ -1,5 +1,6 @@ --- title: Getting started +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/admin/how-to/index.mdx b/src/content/docs/paper/admin/how-to/index.mdx index 103cc87e..edabca11 100644 --- a/src/content/docs/paper/admin/how-to/index.mdx +++ b/src/content/docs/paper/admin/how-to/index.mdx @@ -1,5 +1,6 @@ --- title: How-to guides +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/admin/index.mdx b/src/content/docs/paper/admin/index.mdx index 03a289f4..35ff6408 100644 --- a/src/content/docs/paper/admin/index.mdx +++ b/src/content/docs/paper/admin/index.mdx @@ -1,5 +1,6 @@ --- title: Administration +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; @@ -7,4 +8,18 @@ import PageCards from "/src/components/PageCards.astro"; Welcome to the Paper administration guide! This guide includes information and tutorials regarding the administration of a Paper server. - +#### Getting started + + + +#### How-to guides + + + +#### Reference + + + +#### Miscellaneous + + diff --git a/src/content/docs/paper/admin/misc/index.mdx b/src/content/docs/paper/admin/misc/index.mdx index 2d93725b..9abb7a98 100644 --- a/src/content/docs/paper/admin/misc/index.mdx +++ b/src/content/docs/paper/admin/misc/index.mdx @@ -1,5 +1,6 @@ --- title: Miscellaneous +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/admin/reference/index.mdx b/src/content/docs/paper/admin/reference/index.mdx index ae51994e..6224167d 100644 --- a/src/content/docs/paper/admin/reference/index.mdx +++ b/src/content/docs/paper/admin/reference/index.mdx @@ -1,5 +1,6 @@ --- title: Reference +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/admin/reference/system-properties.md b/src/content/docs/paper/admin/reference/system-properties.md index 2c342dfd..9f1e3f8a 100644 --- a/src/content/docs/paper/admin/reference/system-properties.md +++ b/src/content/docs/paper/admin/reference/system-properties.md @@ -224,6 +224,11 @@ It also remaps plugin CB calls to remove the version information. - **default**: `false` - **description**: Disables the folder walk and symlink validation when loading a world. Significantly improves world loading speed on massive worlds (>1TB). This does not disable symlink verification of datapacks. +#### paper.disableGameRuleLimits + +- **default**: `false` +- **description**: Disables limits on certain game rule values, e.g. `minecartMaxSpeed` and `spawnChunkRadius`. + #### minecraft.api.session.host - **default**: `https://sessionserver.mojang.com` @@ -234,6 +239,11 @@ It also remaps plugin CB calls to remove the version information. - **default**: `https://api.minecraftservices.com` - **description**: Allows specifying of a custom services API URL e.g. for caching. [`minecraft.api.session.host`](#minecraftapisessionhost) needs to be set too for this to apply. +#### com.mojang.eula.agree + +- **default**: `false` +- **description**: Setting this to true indicates that you have agreed with [Mojang's EULA](https://aka.ms/MinecraftEULA), skipping `eula.txt` checks. + ## List of environment variables #### PAPER_VELOCITY_SECRET diff --git a/src/content/docs/paper/admin/reference/vanilla-command-permissions.md b/src/content/docs/paper/admin/reference/vanilla-command-permissions.md index edccab61..6398a542 100644 --- a/src/content/docs/paper/admin/reference/vanilla-command-permissions.md +++ b/src/content/docs/paper/admin/reference/vanilla-command-permissions.md @@ -10,86 +10,87 @@ This page lists all permissions that are included in the default Paper server. The following is a list of permissions for Vanilla commands. -| Command | Aliases | Permission Node | Players Have Permission By Default? | -|----------------------------------------------------------------------|-------------|-----------------------------------|-----------------------------------------------------------| -| [advancement](https://minecraft.wiki/w/Commands/advancement) | | minecraft.command.advancement | No | -| [attribute](https://minecraft.wiki/w/Commands/attribute) | | minecraft.command.attribute | No | -| [ban](https://minecraft.wiki/w/Commands/ban) | | minecraft.command.ban | No | -| [ban-ip](https://minecraft.wiki/w/Commands/ban-ip) | | minecraft.command.ban-ip | No | -| [banlist](https://minecraft.wiki/w/Commands/banlist) | | minecraft.command.banlist | No | -| [bossbar](https://minecraft.wiki/w/Commands/bossbar) | | minecraft.command.bossbar | No | -| [clear](https://minecraft.wiki/w/Commands/clear) | | minecraft.command.clear | No | -| [clone](https://minecraft.wiki/w/Commands/clone) | | minecraft.command.clone | No | -| [damage](https://minecraft.wiki/w/Commands/damage) | | minecraft.command.damage | No | -| [data](https://minecraft.wiki/w/Commands/data) | | minecraft.command.data | No | -| [datapack](https://minecraft.wiki/w/Commands/datapack) | | minecraft.command.datapack | No | -| [debug](https://minecraft.wiki/w/Commands/debug) | | minecraft.command.debug | No | -| [defaultgamemode](https://minecraft.wiki/w/Commands/defaultgamemode) | | minecraft.command.defaultgamemode | No | -| [deop](https://minecraft.wiki/w/Commands/deop) | | minecraft.command.deop | No | -| [difficulty](https://minecraft.wiki/w/Commands/difficulty) | | minecraft.command.difficulty | No | -| [effect](https://minecraft.wiki/w/Commands/effect) | | minecraft.command.effect | No | -| [enchant](https://minecraft.wiki/w/Commands/enchant) | | minecraft.command.enchant | No | -| [execute](https://minecraft.wiki/w/Commands/execute) | | minecraft.command.execute | No | -| [fill](https://minecraft.wiki/w/Commands/fill) | | minecraft.command.fill | No | -| [fillbiome](https://minecraft.wiki/w/Commands/fillbiome) | | minecraft.command.fillbiome | No | -| [forceload](https://minecraft.wiki/w/Commands/forceload) | | minecraft.command.forceload | No | -| [function](https://minecraft.wiki/w/Commands/function) | | minecraft.command.function | No | -| [gamemode](https://minecraft.wiki/w/Commands/gamemode) | | minecraft.command.gamemode | No | -| [gamerule](https://minecraft.wiki/w/Commands/gamerule) | | minecraft.command.gamerule | No | -| [give](https://minecraft.wiki/w/Commands/give) | | minecraft.command.give | No | -| [help](https://minecraft.wiki/w/Commands/help) | | minecraft.command.help | Yes | -| [item](https://minecraft.wiki/w/Commands/item) | | minecraft.command.item | No | -| [jfr](https://minecraft.wiki/w/Commands/jfr) | | minecraft.command.jfr | No | -| [kick](https://minecraft.wiki/w/Commands/kick) | | minecraft.command.kick | No | -| [kill](https://minecraft.wiki/w/Commands/kill) | | minecraft.command.kill | No | -| [list](https://minecraft.wiki/w/Commands/list) | | minecraft.command.list | Yes | -| [locate](https://minecraft.wiki/w/Commands/locate) | | minecraft.command.locate | No | -| [loot](https://minecraft.wiki/w/Commands/loot) | | minecraft.command.loot | No | -| [me](https://minecraft.wiki/w/Commands/me) | | minecraft.command.me | Yes | -| [msg](https://minecraft.wiki/w/Commands/msg) | /w, /tell | minecraft.command.msg | Yes | -| [op](https://minecraft.wiki/w/Commands/op) | | minecraft.command.op | No | -| [pardon](https://minecraft.wiki/w/Commands/pardon) | | minecraft.command.pardon | No | -| [pardon-ip](https://minecraft.wiki/w/Commands/pardon-ip) | | minecraft.command.pardon-ip | No | -| [particle](https://minecraft.wiki/w/Commands/particle) | | minecraft.command.particle | No | -| [perf](https://minecraft.wiki/w/Commands/perf) | | minecraft.command.perf | No | -| [place](https://minecraft.wiki/w/Commands/place) | | minecraft.command.place | No | -| [playsound](https://minecraft.wiki/w/Commands/playsound) | | minecraft.command.playsound | No | -| [publish](https://minecraft.wiki/w/Commands/publish) | | minecraft.command.publish | No | -| [random](https://minecraft.wiki/w/Commands/random) | | minecraft.command.random | Yes without sequence argument, No with sequence argument. | -| [recipe](https://minecraft.wiki/w/Commands/recipe) | | minecraft.command.recipe | No | -| [reload](https://minecraft.wiki/w/Commands/reload) | | minecraft.command.reload | No | -| [return](https://minecraft.wiki/w/Commands/return) | | minecraft.command.return | No | -| [ride](https://minecraft.wiki/w/Commands/ride) | | minecraft.command.ride | No | -| [save-all](https://minecraft.wiki/w/Commands/save-all) | | minecraft.command.save-all | No | -| [save-off](https://minecraft.wiki/w/Commands/save-off) | | minecraft.command.save-off | No | -| [save-on](https://minecraft.wiki/w/Commands/save-on) | | minecraft.command.save-on | No | -| [say](https://minecraft.wiki/w/Commands/say) | | minecraft.command.say | No | -| [schedule](https://minecraft.wiki/w/Commands/schedule) | | minecraft.command.schedule | No | -| [scoreboard](https://minecraft.wiki/w/Commands/scoreboard) | | minecraft.command.scoreboard | No | -| [seed](https://minecraft.wiki/w/Commands/seed) | | minecraft.command.seed | No | -| [setblock](https://minecraft.wiki/w/Commands/setblock) | | minecraft.command.setblock | No | -| [setidletimeout](https://minecraft.wiki/w/Commands/setidletimeout) | | minecraft.command.setidletimeout | No | -| [setworldspawn](https://minecraft.wiki/w/Commands/setworldspawn) | | minecraft.command.setworldspawn | No | -| [spawnpoint](https://minecraft.wiki/w/Commands/spawnpoint) | | minecraft.command.spawnpoint | No | -| [spectate](https://minecraft.wiki/w/Commands/spectate) | | minecraft.command.spectate | No | -| [spreadplayers](https://minecraft.wiki/w/Commands/spreadplayers) | | minecraft.command.spreadplayers | No | -| [stop](https://minecraft.wiki/w/Commands/stop) | | minecraft.command.stop | No | -| [stopsound](https://minecraft.wiki/w/Commands/stopsound) | | minecraft.command.stopsound | No | -| [summon](https://minecraft.wiki/w/Commands/summon) | | minecraft.command.summon | No | -| [tag](https://minecraft.wiki/w/Commands/tag) | | minecraft.command.tag | No | -| [team](https://minecraft.wiki/w/Commands/team) | | minecraft.command.team | No | -| [teammsg](https://minecraft.wiki/w/Commands/teammsg) | /tm | minecraft.command.teammsg | Yes | -| [teleport](https://minecraft.wiki/w/Commands/teleport) | /tp | minecraft.command.teleport | No | -| [tellraw](https://minecraft.wiki/w/Commands/tellraw) | | minecraft.command.tellraw | No | -| [tick](https://minecraft.wiki/w/Commands/tick) | | minecraft.command.tick | No | -| [time](https://minecraft.wiki/w/Commands/time) | | minecraft.command.time | No | -| [title](https://minecraft.wiki/w/Commands/title) | | minecraft.command.title | No | -| [transfer](https://minecraft.wiki/w/Commands/transfer) | | minecraft.command.transfer | No | -| [trigger](https://minecraft.wiki/w/Commands/trigger) | | minecraft.command.trigger | Yes | -| [weather](https://minecraft.wiki/w/Commands/weather) | | minecraft.command.weather | No | -| [whitelist](https://minecraft.wiki/w/Commands/whitelist) | | minecraft.command.whitelist | No | -| [worldborder](https://minecraft.wiki/w/Commands/worldborder) | | minecraft.command.worldborder | No | -| [xp](https://minecraft.wiki/w/Commands/xp) | /experience | minecraft.command.xp | No | +| Command | Aliases | Permission Node | Players Have Permission By Default? | +|----------------------------------------------------------------------|-------------------------------------------------------|-----------------------------------|-----------------------------------------------------------| +| [advancement](https://minecraft.wiki/w/Commands/advancement) | | minecraft.command.advancement | No | +| [attribute](https://minecraft.wiki/w/Commands/attribute) | | minecraft.command.attribute | No | +| [ban](https://minecraft.wiki/w/Commands/ban) | | minecraft.command.ban | No | +| [ban-ip](https://minecraft.wiki/w/Commands/ban-ip) | | minecraft.command.ban-ip | No | +| [banlist](https://minecraft.wiki/w/Commands/banlist) | | minecraft.command.banlist | No | +| [bossbar](https://minecraft.wiki/w/Commands/bossbar) | | minecraft.command.bossbar | No | +| [clear](https://minecraft.wiki/w/Commands/clear) | | minecraft.command.clear | No | +| [clone](https://minecraft.wiki/w/Commands/clone) | | minecraft.command.clone | No | +| [damage](https://minecraft.wiki/w/Commands/damage) | | minecraft.command.damage | No | +| [data](https://minecraft.wiki/w/Commands/data) | | minecraft.command.data | No | +| [datapack](https://minecraft.wiki/w/Commands/datapack) | | minecraft.command.datapack | No | +| [debug](https://minecraft.wiki/w/Commands/debug) | | minecraft.command.debug | No | +| [defaultgamemode](https://minecraft.wiki/w/Commands/defaultgamemode) | | minecraft.command.defaultgamemode | No | +| [deop](https://minecraft.wiki/w/Commands/deop) | | minecraft.command.deop | No | +| [difficulty](https://minecraft.wiki/w/Commands/difficulty) | | minecraft.command.difficulty | No | +| [effect](https://minecraft.wiki/w/Commands/effect) | | minecraft.command.effect | No | +| [enchant](https://minecraft.wiki/w/Commands/enchant) | | minecraft.command.enchant | No | +| [execute](https://minecraft.wiki/w/Commands/execute) | | minecraft.command.execute | No | +| [fill](https://minecraft.wiki/w/Commands/fill) | | minecraft.command.fill | No | +| [fillbiome](https://minecraft.wiki/w/Commands/fillbiome) | | minecraft.command.fillbiome | No | +| [forceload](https://minecraft.wiki/w/Commands/forceload) | | minecraft.command.forceload | No | +| [function](https://minecraft.wiki/w/Commands/function) | | minecraft.command.function | No | +| [gamemode](https://minecraft.wiki/w/Commands/gamemode) | | minecraft.command.gamemode | No | +| [gamerule](https://minecraft.wiki/w/Commands/gamerule) | | minecraft.command.gamerule | No | +| [give](https://minecraft.wiki/w/Commands/give) | | minecraft.command.give | No | +| [help](https://minecraft.wiki/w/Commands/help) | | minecraft.command.help | Yes | +| [item](https://minecraft.wiki/w/Commands/item) | | minecraft.command.item | No | +| [jfr](https://minecraft.wiki/w/Commands/jfr) | | minecraft.command.jfr | No | +| [kick](https://minecraft.wiki/w/Commands/kick) | | minecraft.command.kick | No | +| [kill](https://minecraft.wiki/w/Commands/kill) | | minecraft.command.kill | No | +| [list](https://minecraft.wiki/w/Commands/list) | | minecraft.command.list | Yes | +| [locate](https://minecraft.wiki/w/Commands/locate) | | minecraft.command.locate | No | +| [loot](https://minecraft.wiki/w/Commands/loot) | | minecraft.command.loot | No | +| [me](https://minecraft.wiki/w/Commands/me) | | minecraft.command.me | Yes | +| [msg](https://minecraft.wiki/w/Commands/msg) | /w, /tell | minecraft.command.msg | Yes | +| [op](https://minecraft.wiki/w/Commands/op) | | minecraft.command.op | No | +| [pardon](https://minecraft.wiki/w/Commands/pardon) | | minecraft.command.pardon | No | +| [pardon-ip](https://minecraft.wiki/w/Commands/pardon-ip) | | minecraft.command.pardon-ip | No | +| [particle](https://minecraft.wiki/w/Commands/particle) | | minecraft.command.particle | No | +| [perf](https://minecraft.wiki/w/Commands/perf) | | minecraft.command.perf | No | +| [place](https://minecraft.wiki/w/Commands/place) | | minecraft.command.place | No | +| [playsound](https://minecraft.wiki/w/Commands/playsound) | | minecraft.command.playsound | No | +| [publish](https://minecraft.wiki/w/Commands/publish) | | minecraft.command.publish | No | +| [random](https://minecraft.wiki/w/Commands/random) | | minecraft.command.random | Yes without sequence argument, No with sequence argument. | +| [recipe](https://minecraft.wiki/w/Commands/recipe) | | minecraft.command.recipe | No | +| [reload](https://minecraft.wiki/w/Commands/reload) | | minecraft.command.reload | No | +| [return](https://minecraft.wiki/w/Commands/return) | | minecraft.command.return | No | +| [ride](https://minecraft.wiki/w/Commands/ride) | | minecraft.command.ride | No | +| [rotate](https://minecraft.wiki/w/Commands/rotate) | | minecraft.command.rotate | No | +| [save-all](https://minecraft.wiki/w/Commands/save-all) | | minecraft.command.save-all | No | +| [save-off](https://minecraft.wiki/w/Commands/save-off) | | minecraft.command.save-off | No | +| [save-on](https://minecraft.wiki/w/Commands/save-on) | | minecraft.command.save-on | No | +| [say](https://minecraft.wiki/w/Commands/say) | | minecraft.command.say | No | +| [schedule](https://minecraft.wiki/w/Commands/schedule) | | minecraft.command.schedule | No | +| [scoreboard](https://minecraft.wiki/w/Commands/scoreboard) | | minecraft.command.scoreboard | No | +| [seed](https://minecraft.wiki/w/Commands/seed) | | minecraft.command.seed | No | +| [setblock](https://minecraft.wiki/w/Commands/setblock) | | minecraft.command.setblock | No | +| [setidletimeout](https://minecraft.wiki/w/Commands/setidletimeout) | | minecraft.command.setidletimeout | No | +| [setworldspawn](https://minecraft.wiki/w/Commands/setworldspawn) | | minecraft.command.setworldspawn | No | +| [spawnpoint](https://minecraft.wiki/w/Commands/spawnpoint) | | minecraft.command.spawnpoint | No | +| [spectate](https://minecraft.wiki/w/Commands/spectate) | | minecraft.command.spectate | No | +| [spreadplayers](https://minecraft.wiki/w/Commands/spreadplayers) | | minecraft.command.spreadplayers | No | +| [stop](https://minecraft.wiki/w/Commands/stop) | | minecraft.command.stop | No | +| [stopsound](https://minecraft.wiki/w/Commands/stopsound) | | minecraft.command.stopsound | No | +| [summon](https://minecraft.wiki/w/Commands/summon) | | minecraft.command.summon | No | +| [tag](https://minecraft.wiki/w/Commands/tag) | | minecraft.command.tag | No | +| [team](https://minecraft.wiki/w/Commands/team) | | minecraft.command.team | No | +| [teammsg](https://minecraft.wiki/w/Commands/teammsg) | /tm | minecraft.command.teammsg | Yes | +| [teleport](https://minecraft.wiki/w/Commands/teleport) | /tp | minecraft.command.teleport | No | +| [tellraw](https://minecraft.wiki/w/Commands/tellraw) | | minecraft.command.tellraw | No | +| [tick](https://minecraft.wiki/w/Commands/tick) | | minecraft.command.tick | No | +| [time](https://minecraft.wiki/w/Commands/time) | | minecraft.command.time | No | +| [title](https://minecraft.wiki/w/Commands/title) | | minecraft.command.title | No | +| [transfer](https://minecraft.wiki/w/Commands/transfer) | | minecraft.command.transfer | No | +| [trigger](https://minecraft.wiki/w/Commands/trigger) | | minecraft.command.trigger | Yes | +| [weather](https://minecraft.wiki/w/Commands/weather) | | minecraft.command.weather | No | +| [whitelist](https://minecraft.wiki/w/Commands/whitelist) | | minecraft.command.whitelist | No | +| [worldborder](https://minecraft.wiki/w/Commands/worldborder) | | minecraft.command.worldborder | No | +| [xp](https://minecraft.wiki/w/Commands/xp) | /experience | minecraft.command.xp | No | ## Bukkit command permissions @@ -113,21 +114,22 @@ The following is a list of permissions for Paper commands. ## Vanilla permissions -The following is a list of all additional Vanilla Permissions. +The following is a list of all additional Vanilla permissions. -| Permission Node | Description | Players Have Permission By Default? | -|-----------------------------------|-----------------------------------------------------------------------------|-------------------------------------| -| minecraft | Gives the user the ability to use all vanilla utilities and commands. | No | -| minecraft.admin.command\_feedback | Receive command broadcasts when sendCommandFeedback is true. | No | -| minecraft.nbt.place | Gives the user the ability to place restricted blocks with NBT in creative. | No | -| minecraft.nbt.copy | Gives the user the ability to copy NBT in creative. | Yes | -| minecraft.debugstick | Gives the user the ability to use the debug stick in creative. | No | -| minecraft.debugstick.always | Gives the user the ability to use the debug stick in all game modes. | No | -| minecraft.commandblock | Gives the user the ability to use command blocks. | No | +| Permission Node | Description | Players Have Permission By Default? | +|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------| +| minecraft | Gives the user the ability to use all vanilla utilities and commands. | No | +| minecraft.admin.command\_feedback | Receive command broadcasts when sendCommandFeedback is true. | No | +| minecraft.nbt.place | Gives the user the ability to place restricted blocks with NBT in creative. | No | +| minecraft.nbt.copy | Gives the user the ability to copy NBT in creative. | Yes | +| minecraft.debugstick | Gives the user the ability to use the debug stick in creative. | No | +| minecraft.debugstick.always | Gives the user the ability to use the debug stick in all game modes. | No | +| minecraft.commandblock | Gives the user the ability to use command blocks. | No | +| minecraft.command.selector | Gives the user the ability to use [target selectors](https://minecraft.wiki/w/Target_selectors) in command arguments. | No | ## Bukkit permissions -The following is a list of all additional Bukkit Permissions. +The following is a list of all additional Bukkit permissions. | Permission Node | Description | Players Have Permission By Default? | |------------------------|------------------------------------------------------|-------------------------------------| @@ -137,7 +139,7 @@ The following is a list of all additional Bukkit Permissions. ## Paper permissions -The following is a list of all additional Paper Permissions. +The following is a list of all additional Paper permissions. | Permission Node | Description | Players Have Permission By Default? | |----------------------------------------|------------------------------------------------------------------|-------------------------------------| diff --git a/src/content/docs/paper/contributing/index.mdx b/src/content/docs/paper/contributing/index.mdx index b2d2322c..5e6121a1 100644 --- a/src/content/docs/paper/contributing/index.mdx +++ b/src/content/docs/paper/contributing/index.mdx @@ -1,5 +1,6 @@ --- title: Contributing +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/api/command-api/arguments/index.mdx b/src/content/docs/paper/dev/api/command-api/arguments/index.mdx index c868c1fd..2e1b5aa9 100644 --- a/src/content/docs/paper/dev/api/command-api/arguments/index.mdx +++ b/src/content/docs/paper/dev/api/command-api/arguments/index.mdx @@ -1,5 +1,6 @@ --- title: Arguments +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/api/command-api/basics/index.mdx b/src/content/docs/paper/dev/api/command-api/basics/index.mdx index b9db6076..bf67a551 100644 --- a/src/content/docs/paper/dev/api/command-api/basics/index.mdx +++ b/src/content/docs/paper/dev/api/command-api/basics/index.mdx @@ -1,5 +1,6 @@ --- title: Basics +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/api/command-api/index.mdx b/src/content/docs/paper/dev/api/command-api/index.mdx index 2ff37370..feb7fa8c 100644 --- a/src/content/docs/paper/dev/api/command-api/index.mdx +++ b/src/content/docs/paper/dev/api/command-api/index.mdx @@ -1,7 +1,18 @@ --- title: Command API +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; - +#### Basics + + + +#### Arguments + + + +#### Miscellaneous + + diff --git a/src/content/docs/paper/dev/api/command-api/misc/index.mdx b/src/content/docs/paper/dev/api/command-api/misc/index.mdx new file mode 100644 index 00000000..520b8a1f --- /dev/null +++ b/src/content/docs/paper/dev/api/command-api/misc/index.mdx @@ -0,0 +1,8 @@ +--- +title: Miscellaneous +tableOfContents: false +--- + +import PageCards from "/src/components/PageCards.astro"; + + diff --git a/src/content/docs/paper/dev/api/component-api/index.mdx b/src/content/docs/paper/dev/api/component-api/index.mdx index 6e994005..b57c4742 100644 --- a/src/content/docs/paper/dev/api/component-api/index.mdx +++ b/src/content/docs/paper/dev/api/component-api/index.mdx @@ -1,5 +1,6 @@ --- title: Component API +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/api/entity-api/index.mdx b/src/content/docs/paper/dev/api/entity-api/index.mdx index 3b53aa82..fb1fbe2d 100644 --- a/src/content/docs/paper/dev/api/entity-api/index.mdx +++ b/src/content/docs/paper/dev/api/entity-api/index.mdx @@ -1,5 +1,6 @@ --- title: Entity API +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/api/event-api/index.mdx b/src/content/docs/paper/dev/api/event-api/index.mdx index a5e405b3..c356a820 100644 --- a/src/content/docs/paper/dev/api/event-api/index.mdx +++ b/src/content/docs/paper/dev/api/event-api/index.mdx @@ -1,5 +1,6 @@ --- title: Event API +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/api/index.mdx b/src/content/docs/paper/dev/api/index.mdx index f6118787..9f6fa588 100644 --- a/src/content/docs/paper/dev/api/index.mdx +++ b/src/content/docs/paper/dev/api/index.mdx @@ -1,5 +1,6 @@ --- title: API +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/api/plugin-configs.md b/src/content/docs/paper/dev/api/plugin-configs.mdx similarity index 96% rename from src/content/docs/paper/dev/api/plugin-configs.md rename to src/content/docs/paper/dev/api/plugin-configs.mdx index 68d3d186..279c49ce 100644 --- a/src/content/docs/paper/dev/api/plugin-configs.md +++ b/src/content/docs/paper/dev/api/plugin-configs.mdx @@ -4,6 +4,8 @@ description: How to create configuration files for your plugins to customize beh slug: paper/dev/plugin-configurations --- +import { FileTree } from "@astrojs/starlight/components"; + Configuration files allow users to change certain behavior and functionality of plugins. This guide will outline how to use them. ## Format @@ -26,15 +28,16 @@ When accessing indented values, you separate the levels with dots (`.`). For exa By placing a `config.yml` file inside your plugin, you can specify the default values for certain settings. This will be located in the `resources` directory: -``` -example-plugin -└── src - └── main - ├── java - └── resources - ├── config.yml - └── plugin.yml -``` + + + - example-plugin/ + - src/ + - main/ + - java/ + - resources/ + - config.yml + - plugin.yml + When your plugin is initialized, you must save this resource into the plugin's data directory, so that a user can edit the values. Here is an example of how you would do this in your plugin's `onEnable`: diff --git a/src/content/docs/paper/dev/api/roadmap.md b/src/content/docs/paper/dev/api/roadmap.md index 4c804962..18d47c67 100644 --- a/src/content/docs/paper/dev/api/roadmap.md +++ b/src/content/docs/paper/dev/api/roadmap.md @@ -12,18 +12,15 @@ is intended to document any future API changes that are planned or possible depr ### Interface `ItemStack`s -When you create `ItemStack`s, you create an API representation of an [`ItemStack`](jd:paper:org.bukkit.inventory.ItemStack). -However, there are also places where you can obtain an `ItemStack` that is backed by a NMS object instead. -This can lead to inconsistencies and unnecessary upkeep, since we need to maintain our own `ItemStack` implementation and also -support the NMS-backed object using ugly methods due to it not being a plain interface. +When you create `ItemStack`s using the constructor, you create an API representation of an [`ItemStack`](jd:paper:org.bukkit.inventory.ItemStack). +This is an object that delegates to a NMS-backed object, you should instead use [`ItemStack#of`](jd:paper:org.bukkit.inventory.ItemStack#of(org.bukkit.Material)) to get the NMS-backed object directly. -In the future, `ItemStack` will be converted to an interface that allows developers to use an underlying -`ItemStack` directly, instead of going through the API implementation. +In the future, `ItemStack` will be converted to an interface and the constructor will be removed. #### Precautions - Avoid directly extending the `ItemStack` class. - - Custom implementations of this class are not supported. + - Custom implementations of this class are not supported and **will** break. ### `ServerPlayer` reuse *Note: Only applies to NMS usage, will not apply to API.* diff --git a/src/content/docs/paper/dev/getting-started/index.mdx b/src/content/docs/paper/dev/getting-started/index.mdx index 53370d92..576bdb6b 100644 --- a/src/content/docs/paper/dev/getting-started/index.mdx +++ b/src/content/docs/paper/dev/getting-started/index.mdx @@ -1,5 +1,6 @@ --- title: Getting started +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/getting-started/plugin-yml.mdx b/src/content/docs/paper/dev/getting-started/plugin-yml.mdx index c531a763..7414c24f 100644 --- a/src/content/docs/paper/dev/getting-started/plugin-yml.mdx +++ b/src/content/docs/paper/dev/getting-started/plugin-yml.mdx @@ -4,6 +4,7 @@ description: "A guide to Bukkit's plugin.yml file." slug: paper/dev/plugin-yml --- +import { FileTree } from "@astrojs/starlight/components"; import { LATEST_PAPER_RELEASE } from "/src/utils/versions"; The `plugin.yml` file is the main configuration file for your plugin. @@ -11,16 +12,17 @@ It contains information about your plugin, such as its name, version, and descri It also contains information about the plugin's dependencies, permissions, and commands. The `plugin.yml` file is located in the `resources` directory of your project. -``` -example-plugin -├── build.gradle.kts -├── settings.gradle.kts -└── src - └── main - ├── java - └── resources - └── plugin.yml -``` + + + - example-plugin/ + - build.gradle.kts + - settings.gradle.kts + - src/ + - main/ + - java/ + - resources/ + - plugin.yml + ## Example @@ -152,6 +154,29 @@ Each permission node can have children. When set to `true`, it will inherit the The default value that permissions that don't have a `default` specified will have. This can be `op`/`notop` or `true`/`false`. - `default-permission: true` +### paper-plugin-loader + +A fully qualified class name of a Paper plugin [loader](/paper/dev/getting-started/paper-plugins#loaders) class, if you want to use one. +- `paper-plugin-loader: com.example.paperplugin.MyPluginLoader` + +:::danger[Experimental] + +[Paper plugins](/paper/dev/getting-started/paper-plugins) (and therefore plugin loaders) are experimental and may be subject to change. + +::: + +### paper-skip-libraries + +If `true`, Paper will skip resolution of libraries defined in the [`libraries` section](#libraries). +This is useful for delegating library loading to a Paper plugin [loader](/paper/dev/getting-started/paper-plugins#loaders). +- `paper-skip-libraries: false` + +:::danger[Experimental] + +[Paper plugins](/paper/dev/getting-started/paper-plugins) (and therefore plugin loaders) are experimental and may be subject to change. + +::: + ## Commands This is a list of commands that your plugin uses. This is useful for plugins that use commands to provide features. diff --git a/src/content/docs/paper/dev/getting-started/project-setup.mdx b/src/content/docs/paper/dev/getting-started/project-setup.mdx index 1d4d8f47..a983ff6b 100644 --- a/src/content/docs/paper/dev/getting-started/project-setup.mdx +++ b/src/content/docs/paper/dev/getting-started/project-setup.mdx @@ -4,7 +4,7 @@ description: Step-by-step instructions on how to set up a plugin development env slug: paper/dev/project-setup --- -import { Tabs, TabItem } from "@astrojs/starlight/components"; +import { FileTree, Tabs, TabItem } from "@astrojs/starlight/components"; As the Paper team primarily uses [IntelliJ IDEA](https://www.jetbrains.com/idea/), this guide will be focused on that IDE. However, the steps below should apply to other IDEs as well, with some minor changes. @@ -95,38 +95,34 @@ Inside of `main`, create two new directories called `java` and `resources`. It should look like this: -``` -... -example-plugin -├── build.gradle.kts -├── settings.gradle.kts -└── src - └── main - ├── java - └── resources -... -``` + + - example-plugin/ + - build.gradle.kts + - settings.gradle.kts + - src/ + - main/ + - java/ + - resources/ + ### Setting up the `java` directory You will place your Java source files in the `java` directory. You first need to create some packages to organize your code. For this example, we will create three packages called `io.papermc.testplugin` and then create a class called `ExamplePlugin` inside of it. -``` -... -example-plugin -├── build.gradle.kts -├── settings.gradle.kts -└── src - └── main - ├── java - │ └── io - │ └── papermc - │ └── testplugin - │ └── ExamplePlugin.java - └── resources -... -``` + + - example-plugin/ + - build.gradle.kts + - settings.gradle.kts + - src/ + - main/ + - java/ + - io/ + - papermc/ + - testplugin/ + - ExamplePlugin.java + - resources/ + ### Packages diff --git a/src/content/docs/paper/dev/index.mdx b/src/content/docs/paper/dev/index.mdx index b56c22c5..37f897a8 100644 --- a/src/content/docs/paper/dev/index.mdx +++ b/src/content/docs/paper/dev/index.mdx @@ -1,5 +1,6 @@ --- title: Development +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; @@ -7,4 +8,14 @@ import PageCards from "/src/components/PageCards.astro"; Welcome to the Paper development guide! This guide includes information and tutorials for developers on how to create and expand on Paper plugins. - +#### Getting started + + + +#### API + + + +#### Miscellaneous + + diff --git a/src/content/docs/paper/dev/misc/index.mdx b/src/content/docs/paper/dev/misc/index.mdx index 1d229bca..0cd120dd 100644 --- a/src/content/docs/paper/dev/misc/index.mdx +++ b/src/content/docs/paper/dev/misc/index.mdx @@ -1,5 +1,6 @@ --- title: Miscellaneous +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/paper/dev/misc/internal-code.md b/src/content/docs/paper/dev/misc/internal-code.md index d2c36768..1208c9ce 100644 --- a/src/content/docs/paper/dev/misc/internal-code.md +++ b/src/content/docs/paper/dev/misc/internal-code.md @@ -8,7 +8,7 @@ The code that runs Minecraft is not open source. Bukkit is an API that allows pl is implemented by CraftBukkit and interacts with Minecraft's code. You will often hear the terms NMS and CraftBukkit when talking about Minecraft internals. -:::danger[Using Minecraft Internals] +:::danger[Using Minecraft internals] Using Minecraft internals is not recommended. This is because using internal code directly is not guaranteed to be stable and it changes often. This means that your plugin may break when a new version of Minecraft is released. @@ -24,7 +24,7 @@ NMS stands for `net.minecraft.server` and refers to a Java package that contains proprietary and is not open source. This code is not guaranteed to be stable when invoked externally and may change at any time. -## Accessing Minecraft Internals +## Accessing Minecraft internals In order to use Mojang and CraftBukkit code, you may either use the `paperweight-userdev` Gradle plugin or use reflection. [`paperweight-userdev`](https://github.com/PaperMC/paperweight-test-plugin) is the recommended way to access internal code @@ -42,17 +42,12 @@ you should cache the [`Field`](jd:java:java.lang.reflect.Field)/ [`Method`](jd:java:java.lang.reflect.Method) to prevent the performance impact of looking up the field/method each time. -The internal CraftBukkit code is relocated to `org.bukkit.craftbukkit.` unless you run a Mojang-mapped version -of Paper. This is unlikely to be the case in most production environments. This means that any attempts to reflect must -include the version. For example, `org.bukkit.craftbukkit.v1_20_R2.CraftServer` is the full class and package name -for the CraftServer class in version 1.20.2. You can access these classes easily with some reflection utilities. +:::caution[1.20.4 and older] -:::caution[Removal of relocation in 1.20.5] - -As of 1.20.5, the versioned relocation of the CraftBukkit package was removed and -CraftBukkit packages are now located in `org.bukkit.craftbukkit` and not in `org.bukkit.craftbukkit.`. - -::: +The internal CraftBukkit code was relocated to `org.bukkit.craftbukkit.` unless you ran a Mojang-mapped version +of Paper. This was unlikely to be the case in most production environments until 1.20.5. This means that any attempts to reflect had to +include the version. For example, `org.bukkit.craftbukkit.v1_20_R2.CraftServer` was the full class and package name +for the CraftServer class in version 1.20.2. You could access these classes easily with some reflection utilities. ```java private static final String CRAFTBUKKIT_PACKAGE = Bukkit.getServer().getClass().getPackageName(); @@ -65,28 +60,30 @@ public static String cbClass(String clazz) { Class.forName(cbClass("entity.CraftBee")); ``` -Minecraft's code is obfuscated. This means that the names of classes and methods are changed to make them harder to -understand. Paper deobfuscates these identifiers for development; however, to provide compatibility with legacy plugins, -Paper is re-obfuscated at runtime. You can use a library like [reflection-remapper](https://github.com/jpenilla/reflection-remapper) to automatically remap the -reflection references. This will allow you to use the de-obfuscated, Mojang-mapped, names in your code. This is recommended as -it makes the code easier to understand. +::: -### Mojang-Mapped Servers +Minecraft's code is obfuscated. This means that the names of classes and methods are changed to make them harder to +understand. Paper deobfuscates these identifiers for development and since 1.20.5, also for runtime. -:::note[Mojang-mapped runtime as of 1.20.5] +:::caution[1.20.4 and older] -As of 1.20.5, Paper ships with a Mojang-mapped runtime instead of reobfuscating the server to Spigot mappings. -For more information, see the [plugin remapping](/paper/dev/project-setup#plugin-remapping) section and [userdev](/paper/dev/userdev#1205-and-beyond) documentation covering these changes. +Previously, to provide compatibility with legacy plugins, Paper was reobfuscated at runtime. +You could use a library like [reflection-remapper](https://github.com/jpenilla/reflection-remapper) to automatically remap the +reflection references. This allowed you to use the deobfuscated, Mojang-mapped names in your code. This was recommended as +it made the code easier to understand. ::: -Running a Mojang-Mapped (moj-map) server is an excellent way to streamline your processes because you can develop using -the same mappings that will be present at runtime. This eliminates the need for remapping in your compilation. If you -are creating custom plugins for your server, we highly recommend running a moj-map server. It simplifies debugging and -allows you to hotswap plugins. +### Mojang-mapped servers + +Running a Mojang-mapped (moj-map) server is an excellent way to streamline your processes because you can develop using +the same mappings that will be present at runtime. This eliminates the need for remapping in your compilation, which in +turn simplifies debugging and allows you to hotswap plugins. -In the future, the Paper server will no longer undergo remapping. By adopting Mojang mappings now, you can ensure that -your plugin won't require internal remapping when we make the switch. +As of 1.20.5, Paper ships with a Mojang-mapped runtime by default instead of reobfuscating the server to Spigot mappings. +By adopting Mojang mappings, you ensure that your plugin won't require internal remapping at runtime. +For more information, see the [plugin remapping](/paper/dev/project-setup#plugin-remapping) section +and [userdev](/paper/dev/userdev#1205-and-beyond) documentation covering these changes. ### Getting the current Minecraft version diff --git a/src/content/docs/paper/index.mdx b/src/content/docs/paper/index.mdx index 630d49ba..1e6e8c60 100644 --- a/src/content/docs/paper/index.mdx +++ b/src/content/docs/paper/index.mdx @@ -1,13 +1,26 @@ --- title: Paper Documentation +tableOfContents: false --- import { CardGrid, LinkCard } from "@astrojs/starlight/components"; -Paper is a Minecraft game server based on Spigot, designed to greatly improve performance and offer more advanced features and API. +Paper is a Minecraft: Java Edition game server, designed to greatly improve performance and offer more advanced features and API. - - - + + + diff --git a/src/content/docs/velocity/admin/getting-started/faq.md b/src/content/docs/velocity/admin/getting-started/faq.md index ff28e5ff..5e0f428e 100644 --- a/src/content/docs/velocity/admin/getting-started/faq.md +++ b/src/content/docs/velocity/admin/getting-started/faq.md @@ -9,7 +9,7 @@ many of these questions from the user perspective. ## What version of Java does Velocity require? -Velocity 3.3.x requires at least Java 17, however it works best with 21 or above. +Velocity 3.3.x and above requires at least Java 17, however it works best with 21 or above. ## Where can I find Velocity plugins? diff --git a/src/content/docs/velocity/admin/getting-started/getting-started.md b/src/content/docs/velocity/admin/getting-started/getting-started.md index 8a7837e4..9ac57b86 100644 --- a/src/content/docs/velocity/admin/getting-started/getting-started.md +++ b/src/content/docs/velocity/admin/getting-started/getting-started.md @@ -1,5 +1,6 @@ --- title: Getting started +description: How to install and set up a minimal configuration of Velocity. slug: velocity/getting-started --- @@ -65,8 +66,8 @@ the output in the next section. Here's a sample of what you'll see once we've started the proxy: -```log -[05:41:13 INFO]: Booting up Velocity 3.3.0-SNAPSHOT (git-74c932e5-b363)... +```log replace +[05:41:13 INFO]: Booting up Velocity \{LATEST_VELOCITY_RELEASE} (git-74c932e5-b363)... [05:41:13 INFO]: Loading localizations... [05:41:13 INFO]: Connections will use epoll channels, libdeflate (Linux aarch64) compression, OpenSSL (Linux aarch64) ciphers [05:41:13 INFO]: Loading plugins... diff --git a/src/content/docs/velocity/admin/getting-started/index.mdx b/src/content/docs/velocity/admin/getting-started/index.mdx index a5841368..a782be71 100644 --- a/src/content/docs/velocity/admin/getting-started/index.mdx +++ b/src/content/docs/velocity/admin/getting-started/index.mdx @@ -1,5 +1,6 @@ --- title: Getting started +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/velocity/admin/how-to/index.mdx b/src/content/docs/velocity/admin/how-to/index.mdx index c613b017..03fc2baa 100644 --- a/src/content/docs/velocity/admin/how-to/index.mdx +++ b/src/content/docs/velocity/admin/how-to/index.mdx @@ -1,5 +1,6 @@ --- title: How-to guides +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/velocity/admin/index.mdx b/src/content/docs/velocity/admin/index.mdx index 08a9ad64..c2e8d1a9 100644 --- a/src/content/docs/velocity/admin/index.mdx +++ b/src/content/docs/velocity/admin/index.mdx @@ -1,5 +1,6 @@ --- title: Administration +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; @@ -7,4 +8,14 @@ import PageCards from "/src/components/PageCards.astro"; Welcome to the Velocity administration guide! This guide includes information and tutorials regarding the administration of a Velocity proxy. - +#### Getting started + + + +#### How-to guides + + + +#### Reference + + diff --git a/src/content/docs/velocity/admin/reference/index.mdx b/src/content/docs/velocity/admin/reference/index.mdx index 023d39a1..c862dcde 100644 --- a/src/content/docs/velocity/admin/reference/index.mdx +++ b/src/content/docs/velocity/admin/reference/index.mdx @@ -1,5 +1,6 @@ --- title: Reference +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/velocity/dev/api/index.mdx b/src/content/docs/velocity/dev/api/index.mdx index 34745af8..65ec5ef8 100644 --- a/src/content/docs/velocity/dev/api/index.mdx +++ b/src/content/docs/velocity/dev/api/index.mdx @@ -1,5 +1,6 @@ --- title: API +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/velocity/dev/getting-started/index.mdx b/src/content/docs/velocity/dev/getting-started/index.mdx index 3e6f48c4..2254856f 100644 --- a/src/content/docs/velocity/dev/getting-started/index.mdx +++ b/src/content/docs/velocity/dev/getting-started/index.mdx @@ -1,5 +1,6 @@ --- title: Getting started +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/velocity/dev/how-to/index.mdx b/src/content/docs/velocity/dev/how-to/index.mdx index 7cda1195..9a998d81 100644 --- a/src/content/docs/velocity/dev/how-to/index.mdx +++ b/src/content/docs/velocity/dev/how-to/index.mdx @@ -1,5 +1,6 @@ --- title: How-to guides +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; diff --git a/src/content/docs/velocity/dev/how-to/porting-from-velocity-1.md b/src/content/docs/velocity/dev/how-to/porting-from-velocity-1.md index 483c1c0c..4a452fd3 100644 --- a/src/content/docs/velocity/dev/how-to/porting-from-velocity-1.md +++ b/src/content/docs/velocity/dev/how-to/porting-from-velocity-1.md @@ -9,7 +9,7 @@ document very carefully**. ## Minimum supported Java version bump -Velocity 3.3.x now requires Java 17 and above. +Velocity 3.3.x and above now requires Java 17 and above. ## Removal of legacy dependencies diff --git a/src/content/docs/velocity/dev/index.mdx b/src/content/docs/velocity/dev/index.mdx index 03a67509..ec75b701 100644 --- a/src/content/docs/velocity/dev/index.mdx +++ b/src/content/docs/velocity/dev/index.mdx @@ -1,5 +1,6 @@ --- title: Development +tableOfContents: false --- import PageCards from "/src/components/PageCards.astro"; @@ -7,4 +8,14 @@ import PageCards from "/src/components/PageCards.astro"; Welcome to the Velocity development guide! This guide includes information and tutorials for developers to create and expand on Velocity plugins. - +#### Getting started + + + +#### How-to guides + + + +#### API + + diff --git a/src/content/docs/velocity/index.mdx b/src/content/docs/velocity/index.mdx index 15e1ea5c..4c3b2444 100644 --- a/src/content/docs/velocity/index.mdx +++ b/src/content/docs/velocity/index.mdx @@ -33,6 +33,14 @@ If you have searched the docs and didn't find the answer to your question, then [join our Discord](https://discord.gg/papermc) to ask your question. - - + + diff --git a/src/content/docs/waterfall/index.mdx b/src/content/docs/waterfall/index.mdx index 84fd1efc..39a550ca 100644 --- a/src/content/docs/waterfall/index.mdx +++ b/src/content/docs/waterfall/index.mdx @@ -1,5 +1,6 @@ --- title: Waterfall Documentation +tableOfContents: false banner: destructive: true content: We recommend you transition to Velocity. For more information, see the announcement. diff --git a/src/utils/versions.ts b/src/utils/versions.ts index 27d6be2d..34ded38c 100644 --- a/src/utils/versions.ts +++ b/src/utils/versions.ts @@ -36,8 +36,24 @@ const velocityProject: Project = await fetch("https://api.papermc.io/v2/projects export const LATEST_VELOCITY_RELEASE = velocityProject.versions[velocityProject.versions.length - 1]; +const foliaProject: Project = await fetch("https://api.papermc.io/v2/projects/folia").then((r) => r.json()); + +export const LATEST_FOLIA_RELEASE = foliaProject.versions[foliaProject.versions.length - 1]; + +const waterfallProject: Project = await fetch("https://api.papermc.io/v2/projects/waterfall").then((r) => r.json()); + +export const LATEST_WATERFALL_RELEASE = waterfallProject.versions[waterfallProject.versions.length - 1]; + const userdevVersions: string[] = await fetch("https://api.github.com/repos/PaperMC/paperweight/tags") .then((r) => r.json()) .then((json) => json.map((e) => e.name.substring(1))); export const LATEST_USERDEV_RELEASE = userdevVersions[0]; + +export const LATEST_RELEASES: Record = { + paper: LATEST_PAPER_RELEASE, + velocity: LATEST_VELOCITY_RELEASE, + folia: LATEST_FOLIA_RELEASE, + waterfall: LATEST_WATERFALL_RELEASE, + userdev: LATEST_USERDEV_RELEASE, +};