Commit Graph

522 Commits

Author SHA1 Message Date
Spottedleaf 6316a50dbd Make CraftServer#isPrimaryThread use TickThread check
This diff was accidentally dropped when updating to hard fork.

This diff importantly:
 - Does not return true if the async catcher is disabled
 - Does not return true during shutdown
 - Returns true for any instance of TickThread (enables
   watchdog and Folia threads to be considered main)
2025-01-11 00:13:45 -08:00
Nassim Jahnke 1dd52bed49 Use playerlist whitelist status instead of properties
The actual property value is final, only the serialized output is changed. This uses the correct value from PlayerList instead
Fixes #11878
2025-01-01 18:53:23 +01:00
Nassim Jahnke e0593e9286 More diff/changed variable name cleanup 2024-12-21 12:15:25 +01:00
Spottedleaf 48f34f8c90 Port CB changes from Moonrise patch 2024-12-20 10:52:51 -08:00
Lulu13022002 6126012369 readd beacon effect cause 2024-12-18 19:29:39 +01:00
Bjarne Koll 35afd218f5 net/minecraft/server/level 2024-12-15 06:22:17 +01:00
Nassim Jahnke 2a20fde332 Add feature patch hook for overrides 2024-12-05 13:00:22 +01:00
Abel 7294ae3022 API to allow/disallow tick sleeping 2024-11-12 22:25:20 +01:00
Abel b4c394a1c6 API to check if the server is sleeping 2024-11-10 16:32:34 +01:00
Riley Park 855db272b1 Bundle spark 2024-07-16 14:55:23 -07:00
Owen1212055 977543c545 Brigadier based command API
== AT ==
public net.minecraft.commands.arguments.blocks.BlockInput tag
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.server.ReloadableServerResources registryLookup
public net.minecraft.server.ReloadableServerResources

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
2022-08-01 22:50:34 -04:00
Yannick Lamprecht 61c73ee83e improve BanList types 2024-02-10 20:50:01 +01:00
Jake Potrebic ef5bac21b2 Add Lifecycle Event system
This event system is separate from Bukkit's event system and is
meant for managing resources across reloads and from points in the
PluginBootstrap.
2023-07-18 17:49:38 -07:00
Jake Potrebic e46ee8e55e Deprecate and replace methods with old StructureType 2022-12-10 17:52:38 -08:00
Jake Potrebic 06b00246a2 API for updating recipes on clients 2021-08-21 17:25:38 -07:00
Florian Schmidt 8a4e4f4066 Use correct seed on api world load 2023-07-28 14:14:35 +02:00
Spottedleaf a13bff4a5f Folia scheduler and owned region API
Pulling Folia API to Paper is primarily intended for plugins
that want to target both Paper and Folia without unnecessary
compatibility layers.

Add both a location based scheduler, an entity based scheduler,
and a global region scheduler.

Owned region API may be useful for plugins which want to perform
operations over large areas outside of the buffer zone provided
by the regionaliser, as it is not guaranteed that anything
outside of the buffer zone is owned. Then, the plugins may use
the schedulers depending on the result of the ownership check.
2023-06-17 11:52:52 +02:00
TheMeinerLP a652ca1f5c Don't enforce icanhasbukkit default if alias block exists 2023-06-13 16:10:59 +02:00
Andrew Steinborn a1051ff388 Add Velocity IP Forwarding Support
While Velocity supports BungeeCord-style IP forwarding, it is not secure. Users
have a lot of problems setting up firewalls or setting up plugins like IPWhitelist.
Further, the BungeeCord IP forwarding protocol still retains essentially its original
form, when there is brand new support for custom login plugin messages in 1.13.

Velocity's modern IP forwarding uses an HMAC-SHA256 code to ensure authenticity
of messages, is packed into a binary format that is smaller than BungeeCord's
forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
2018-10-08 14:36:14 -04:00
Jake Potrebic 5cf40e45af Don't broadcast messages to command blocks
Previously the broadcast method would update the last output
in command blocks, and if called asynchronously, would throw
an error
2022-06-16 14:22:56 -07:00
Jake Potrebic 6a51d13dbf Throw exception on world create while being ticked
There are no plans to support creating worlds while worlds are
being ticked themselvess.
2022-03-22 12:44:30 -07:00
Shane Freeder 2bf4b6e53d WorldCreator#keepSpawnLoaded 2021-07-03 21:18:28 +01:00
Philip Kelley 1e2e8f4643 Fix saving in unloadWorld
Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true
2022-03-16 12:05:59 +00:00
Jake Potrebic 0b5d7ad8d6 Custom Potion Mixes
== AT ==
public-f net.minecraft.server.MinecraftServer potionBrewing
2021-10-07 14:34:55 -07:00
Spottedleaf 299d7beee0 Put world into worldlist before initing the world
Some parts of legacy conversion will need the overworld
to get the legacy structure data storage
2022-02-22 14:21:35 -08:00
Jake Potrebic 809e0ae069 Add GameEvent tags 2021-01-03 20:03:35 -08:00
Jason Penilla fd7f4e0d1a Add missing Validate calls to CraftServer#getSpawnLimit
Copies appropriate checks from CraftWorld#getSpawnLimit
2022-02-12 12:40:50 -07:00
Jason Penilla c0e7761df1 API for creating command sender which forwards feedback 2022-02-01 15:51:55 -07:00
Jason Penilla 25af4f1bec Expose vanilla BiomeProvider from WorldInfo 2022-01-06 15:59:06 -08:00
Jason Penilla b67ec825d2 Add '/paper mobcaps' and '/paper playermobcaps'
Add commands to get the mobcaps for a world, as well as the mobcaps for
each player when per-player mob spawning is enabled.

Also has a hover text on each mob category listing what entity types are
in said category
2021-08-16 01:31:54 -05:00
underscore11code b9b53341c3 Add System.out/err catcher 2021-07-23 23:01:42 -07:00
Connor Linfoot f283a61ad3 Add basic Datapack API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-05-16 15:07:34 +01:00
Jake Potrebic d0185eb56e Expand world key API 2021-01-06 00:34:04 -08:00
Jake Potrebic 239e7a6b37 Add RegistryAccess for managing Registries
RegistryAccess is independant from CraftServer and
doesn't require one to be created allowing the
org.bukkit.Registry class to be loaded earlier.

== AT ==
public net.minecraft.server.RegistryLayer STATIC_ACCESS
2023-02-27 18:28:39 -08:00
oxygencraft 30de939553 Add getOfflinePlayerIfCached(String) 2020-10-25 18:34:50 +11:00
Aikar 2e3c775b68 Fix Per World Difficulty / Remembering Difficulty
Fixes per world difficulty with /difficulty command and also
makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load.
2020-06-28 03:59:10 -04:00
Aikar 74343ef1be Wait for Async Tasks during shutdown
Server.reload() had this logic to give time for tasks to shutdown,
however shutdown did not...

Adds a 5 second grace period for any async tasks to finish and warns
if any are still running after that delay just as reload does.
2020-05-10 22:16:17 -04:00
MiniDigger | Martin 82290d3060 Implement Mob Goal API 2020-01-03 16:26:19 +01:00
Shane Freeder 35b7f788a9 misc debugging dumps 2021-02-18 20:23:28 +00:00
JRoy 167f0e69c8 Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
2020-04-10 21:24:12 -04:00
William Blake Galbreath db792f5e1d Add tick times API and /mspt command 2020-04-05 22:23:14 -05:00
William Blake Galbreath 3084b4ce9b Expose the internal current tick 2019-04-20 19:47:34 -05:00
Shane Freeder f944b0b8d6 Make the default permission message configurable 2018-11-18 19:49:56 +00:00
miclebrick 31fc02af68 Add Early Warning Feature to WatchDog
Detect when the server has been hung for a long duration, and start printing
thread dumps at an interval until the point of crash.

This will help diagnose what was going on in that time before the crash.
2018-08-08 15:30:52 -04:00
Aikar 3f0a574e10 getPlayerUniqueId API
Gets the unique ID of the player currently known as the specified player name
In Offline Mode, will return an Offline UUID

This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
2018-03-22 01:40:24 -04:00
Jason Penilla ed76af5637 AsyncTabCompleteEvent
Let plugins be able to control tab completion of commands and chat async.

This will be useful for frameworks like ACF so we can define async safe completion handlers,
and avoid going to main for tab completions.

Especially useful if you need to query a database in order to obtain the results for tab
completion, such as offline players.

Also adds isCommand and getLocation to the sync TabCompleteEvent

Co-authored-by: Aikar <aikar@aikar.co>
2017-11-26 13:19:58 -05:00
Sweepyoface 551d6ee71e Add UnknownCommandEvent
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2017-06-17 18:48:21 -04:00
Aikar bb90110894 Basic PlayerProfile API
Establishes base extension of profile systems for future edits too

== AT ==
public org.bukkit.craftbukkit.profile.CraftProfileProperty
public org.bukkit.craftbukkit.profile.CraftPlayerTextures
public org.bukkit.craftbukkit.profile.CraftPlayerTextures copyFrom(Lorg/bukkit/profile/PlayerTextures;)V
public org.bukkit.craftbukkit.profile.CraftPlayerTextures rebuildPropertyIfDirty()V
public org.bukkit.craftbukkit.profile.CraftPlayerProfile toString(Lcom/mojang/authlib/properties/PropertyMap;)Ljava/lang/String;
public org.bukkit.craftbukkit.profile.CraftPlayerProfile getProperty(Ljava/lang/String;)Lcom/mojang/authlib/properties/Property;
public org.bukkit.craftbukkit.profile.CraftPlayerProfile setProperty(Ljava/lang/String;Lcom/mojang/authlib/properties/Property;)V
2018-01-15 22:11:48 -05:00
Riley Park 52c71f2edc Add configuration option to prevent player names from being suggested 2017-06-09 07:24:34 -07:00
willies952002 76de1e898e Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
2016-11-28 10:21:52 -05:00