#paper

1 messages ยท Page 3 of 1

rustic folioBOT
rustic folioBOT
#

Adds an event that gets called before the ExperienceOrb is spawned because of using a Grindstone. Allows you to get a copy of the ItemStack, modify/get the amount of Experience and get the Player involved

Calling onTake with itemstack instead of itemstack1 should not be an issue since it is not used anywhere except in the onTake method of the resultslot (Calling the event). Though someone should probably double check that.

#

Adds an event that gets called before the ExperienceOrb is spawned because of using a Grindstone. Allows you to get a copy of the ItemStack, modify/get the amount of Experience and get the Player involved

Calling onTake with itemstack instead of itemstack1 should not be an issue since it is not used anywhere except in the onTake method of the resultslot (Calling the event). Though someone should probably double check that.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: fix/clientbrand-v2
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

'add-plugin' parameter should work on 1.20.2 version of paper.

Observed/Actual behavior

Configurate that comes from paper's libraries do not work with the updated snakeyaml 2.2

Steps/models to reproduce

create an empty paper server and use 'add-plugin' parameter to specify a plugin outside of the plugins folder.

this happens because configurate 4.1.2 does not support snakeyaml 2.2 and this is only the case when you use 'add-plugin' paramter because it tri...

rustic folioBOT
rustic folioBOT
#

Expected behavior

When I set the world's spawning point, players can spawn in the correct place

Observed/Actual behavior

When I set the world's spawning point, the place where the player revives after death is still the default spawning point on the map, and the player has not set home or bed. But /setspawn is work.

Steps/models to reproduce

/setworldspawn
/suicide or /kill

Plugin and Datapack List

CoreProtect, Essentials, EssentialsDiscord, EssentialsDiscordLink, Mult...

rustic folioBOT
rustic folioBOT
#

I remember that one of the three ViaPlugins caused a problem with villagers when using a new version.

Specifically in my case, it was when 1.19 was released, but the server was still on 1.18 and ViaVersion was used to allow players from 1.19, and all trades were not available, so probably this is not caused by Paper, but rather an existing problem caused by one of these plugins.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

//1.20.1
ClientboundSystemChatPacket packet = new ClientboundSystemChatPacket(IChatBaseComponent.ChatSerializer.a(line), false);
(((CraftPlayer) player).getHandle()).c.a(packet);

//1.20.2
ClientboundSystemChatPacket packet = new ClientboundSystemChatPacket(IChatBaseComponent.ChatSerializer.fromJson(line), false);
(((CraftPlayer) player).getHandle()).connection.send(packet);

It should send a player a chat message with the json formatting.

Example whe...

rustic folioBOT
#

Expected behavior

PlayerProfile profile = Bukkit.createProfile(uuid); should work

Observed/Actual behavior

java.lang.NullPointerException: Profile name must not be null
at java.util.Objects.requireNonNull(Objects.java:235) ~[?:?]
at com.mojang.authlib.GameProfile.(GameProfile.java:31) ~[authlib-5.0.47.jar:?]
at com.destroystokyo.paper.profile.CraftPlayerProfile.(CraftPlayerProfile.java:39) ~[paper-1.20.2.jar:git-Paper-"fe54a13"]
at org.bukkit.craftbukkit.v1_20_R2.CraftServe...

rustic folioBOT
#
[PaperMC/Paper] New branch created: profile
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Due to its special status, "BungeeCord" will never appear in Player#getListeningPluginChannels. This is not mentioned in the javadoc, however, nor in the documentation for Messenger, nor on docs.papermc.io.

Describe the solution you'd like.

Document that Player#getListeningPluginChannels does not return the BungeeCord channel.

Describe alternatives you've considered.

Continue to leave this information buried in the depths of B...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Attribute modifiers previously worked by applying that modifier to entities that are holding an item. For example giving a horse ar
mour with a +15 health modifier applied with: /give @p iron_horse_armor{AttributeModifiers:[{AttributeName:"generic.max_health",Name:"generic.max_health",Amount:15,Operation:0,UUID:[I;1449193714,-1470545029,-1967556178,-1026784851]}]} 1

![Screenshot 2023-09-28 133911](https://github.com/PaperMC/Paper/assets/61989733/bfdb753f-2eaa-4e7e...

rustic folioBOT
#

Expected behavior

Player heads should not kick a player in any way.

Observed/Actual behavior

If i get myself a player head with a SkullOwner, nothing happens at first, but when i open my inventory up, i get kicked out for the reason "Disconnected", both on the client and the server console. Interacting with the player head in any other way has a high chance of kicking too.

Steps/models to reproduce

Give myself a player head with a SkullOwner, for example /minecraft:give @p mi...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

As it currently exists, the BlockDropItemEvent is fired after the player has completed brushing a BrushableBlock. This event only controls the dropped items but occurs after the block has already changed from a 'suspicious ' to a normal block. A new event which controlled this change and controlled whether the BlockDropItemEvent would provide more customization to the brushing feature introduced in 1.20.

Describe the solution you'd like...

rustic folioBOT
#
[PaperMC/Paper] New branch created: upstream
#
[PaperMC/Paper] branch deleted: upstream
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Timings or Profile link

https://timings.aikar.co/dev/?id=6e5a232e57654669a5c168e0587c04ba

Description of issue

We are having some lag spikes in our paper server that we have not been able to fix for several weeks.
The server can usually handle 30 players at the same time without issue (perhaps with some drops to 19 tps).
However, other times, even with 1 or 2 players, TPS go down, to the point of every player being disconnected. Sometimes this lag spikes end in a server reboot (I...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Thank you for your detailed report, but this is not a Paper issue.

A spawnpoint lookup is a slow process that needs to be done on the main server thread. EssentialsX seems to cause such a spawnpoint search on join, but it can also happen on respawn. Especially if the chunks are not pre-generated, which seems to be the case here (currentGenStatus=null, requestedGenStatus=minecraft:full), it will be very slow because suddenly a lot of chunks have to be generated on the main thread.
This ...

rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Changing the rotation of using Entity#setRotation(float yaw, float pitch) requires a yaw and pitch.
I am currently using Player#getFacing() to get the facing of the player and wanting the entity to face the same direction but there is no method to set the entity facing using this method. I therefore have to call the alternative method I considered to convert it to a yaw then call the Entity#setRotation method.
I know some will say just ...

rustic folioBOT
rustic folioBOT
#

Expected behavior

When BlockDisplay is spawned and transformation is applied on it (for example 1 block down), display should go 1 block down in specified duration.

Observed/Actual behavior

When BlockDisplay is spawned and transformation is applied, it will be directly spawned with that transformation, this means if transformation was 1 block down, then it will be there instantly without animation.

Steps/models to reproduce

  1. Spawn BlockDisplay entity using `BlockDisplay dis...
rustic folioBOT
rustic folioBOT
#

Comments above aren't massively helpful or explicit - so to be clear it's worth being aware that WorldGuard duplicates the /locate command, which is a problem, but you can simply specify in this scenario that you want to use the minecraft version of the command and bypass the WorldGuard version: /minecraft:locate biome minecraft:savanna.

H/t here: https://github.com/EngineHub/WorldGuard/issues/2013#issuecomment-1615977690

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Setting the raw data should apply data such as rotation and whether the barrel is open.

Observed/Actual behavior

Upon setting the raw data for the barrel, and updating the block state, the barrel disappears from the world.

Steps/models to reproduce

  1. Place down a barrel block, either by code or manually
  2. Get the block's state
  3. Set the block's state's raw data equal to the raw data from getRawData()
  4. Update the block
  5. The barrel will now disappea...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

After getting the Container and the inventory, and after adding an item to the inventory, using the "BlockState#update(true,false)" method should update the blockstate, while preserving the new items in the inventory.

Observed/Actual behavior

The inventory is cleared upon forcing an update

Steps/models to reproduce

Container container = .....
container.getInventory().addItem(.....)
container.update(true,false)

This will clear the inventory of the new it...

rustic folioBOT
rustic folioBOT
#

Stack trace

mc-survival | Starting org.bukkit.craftbukkit.Main
mc-survival | System Info: Java 17 (OpenJDK 64-Bit Server VM 17.0.8+7-alpine-r0) Host: Linux 5.15.0-1042-oracle (aarch64)
mc-survival | Loading libraries, please wait...
mc-survival | 2023-10-02 17:35:15,842 ServerMain WARN Advanced terminal features are not available in this environment
mc-survival | [17:35:16 WARN]: [oshi.software.os.linux.LinuxOperatingSystem] Did not find udev library in operating system. Some fe...

rustic folioBOT
rustic folioBOT
#

Linked issue: #8925
As the previous pull request #9064 seems to have gone inactive I have reworked the changes, expanded the documentation and applied the requested changes from that pull request.

PDC now inherits Iterable, and adds these methods

#setIfAbsent(NamespacedKey, PersistentDataType, Object)
#computeIfAbsent(NamespacedKey, PersistentDataType, Function)
#computeIfPresent(NamespacedKey, PersistentDataType, BiFunction)
#compute(NamespacedKey, PersistentDataTyp...
rustic folioBOT
rustic folioBOT
#

Expected behavior

Bukkit.getMap(id) should return a MapView for plugin-created maps following a reboot.

Observed/Actual behavior

Bukkit.getMap(id) returns null upon a reboot, breaking plugins that use this API tool. Example:

[...]
[00:35:24 WARN]: [ImageMaps] Map 2848 referenced but does not exist!
[00:35:24 WARN]: [ImageMaps] Map 2849 referenced but does not exist!
[00:35:24 WARN]: [ImageMaps] Map 2850 referenced but does not exist!
[00:35:24 WARN]: [ImageMaps] Map 2...
rustic folioBOT
#

Upon some checking it looks like it's failing on this line in net.minecraft.server.level.ServerLevel#getMapData
final MapItemSavedData map = storage.readSavedData(factory.deserializer(), factory.type(), id);

readSavedData here is returning null, presumably because the file doesn't exist. This is because id needs map_ added to the beginning of it, it's attempting to load #.dat which isn't what map files look like.

There's also a logic issue where map isn't reassigned to `existin...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

Old ASM can't transform classfiles compiled on new Java. ASM used by spigot in the process of loading plugins. This efficiently prohibits usage of new java versions to every plugin developer, because no one want to write plugins that supported only on last version (only 50,5% of servers supports latest java (running 1.20.1+ now) and this number will not change in the future).

**Why this case is unique and unrelated to ideas of backporting...

#

At least my two cents on this.
We want the number of people running latest paper to change. Having large quantities of people run outdated versions means people have to jump through hoops to support these dead versions.

Log4J was updated because it allowed remote code execution and posed a real security risk. Given we still offered downloads to those old versions, we patched it as offering software with know vulnerabilities like this is just bad practice.

If people are planning on running o...

#

even if we would release updates, nobody would update their servers.

I think people don't update to new versions not because they are too lazy to drop new paper.jar. They think that new versions are less performant (it's true in some cases), and also to update to new version of game they should not just update server.jar, but a lot of plugins, that, for example, use NMS or works with packets. In this case of new build inside one game version you can just tell in plugin readme page to use...

#

no, I was saying even if we release a new build for a legacy version, which we are not going to do, nobody would download it. you could spend ages chasing your users to update to that new build.
many servers down even update when a version is still supported, they just download whatever is latest when they update to a new mc version and call it a day.

this wouldn't have the effect you want it to have and it would set a bad precedent of us supporting old versions for writing plugins for o...

#

Expected behavior

i think the issue become to bb1c0dd Implement tracking range y setting

Observed/Actual behavior

I noticed that monsters no longer spawn!

Steps/models to reproduce

When I updated the Paper 1.20.2 jar from build 207 to 212, I noticed that monsters no longer spawn! I haven't changed anything in my configuration; everything was working perfectly before the update. The gamerule "domobspawning" was set to true, and the world was set to difficulty hard. I tried...

rustic folioBOT
#

Can confirm, starting build 211. This is caused by the default value for monster-spawn-max-light-level (paper world config) being -1, and the server now using that for Monster spawning checks. Because the minimum light level is 0, this check will always fail, causing no monsters to spawn.

As a temporary workaround, setting monster-spawn-max-light-level to 0 fixes the issue.
Of course default config settings shouldn't break vanilla behaviour like this, so this will be fixed properly...

#

I would personally prefer having a setBlockData method in FallingBlock, so that its possible to just use the existing consumer-based methods with FallingBlocks.

FallingBlocks being the only entity that require a special spawning method in World is kinda weird, and the only reason for this is that they require BlockData to be spawned, which was impossible before the consumer methods existed.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I think, this is a WAI the barrel is a modern block that comes without legacy data (so it will fallback to air), supporting/adding legacy data to every new block entity to this system doesn't make sense. But this works fine when the block is old and has a legacy equivalent like chest (Material.LEGACY_CHEST) for example. In your case it might be better to implement this stuff yourself rather than reviving a deprecated things

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Timings or Profile link

https://spark.lucko.me/IIftkvHeLc

Description of issue

The new Entity visibility API is causing significant performance issues since my server's upgrade from 1.19.2 to 1.20.2. We were previously able to handle around 50 online around 20tps most of the time.

Since updating to 1.20.2, we've been unable to achieve this same level of performance or anywhere close. CraftPlayer#canSee() is adding an extreme amount of tick time to the server with our entity and ...

#

There is a level of this API wrapped internal implementation detail and so we often never really documented such aspects, half completed, mangled, profiles have always caused varying issues within the space of craftbukkit and mojang, The behavior around this stuff has always been kinda janky in varying ways, it was just generally predictable in how it would behave so most people often just ignored that given that the API wasn't exactly as integrated as it could be to make the full extent of p...

#

@electronicboy here's my timings report as well: https://timings.aikar.co/dev/?id=213eede3faf64bc095977d70634f748c
If you've got a plugin I can load in to take some stats on the usage of the API lmk, would love to be able to provide a bit of info. I don't think we do have anything plugin-wise like that though, the closest would be CrashClaim but that uses packet-based invisible magma cubes.

rustic folioBOT
rustic folioBOT
#

During low TPS I took a dump of everything affecting that map, here's what I got: https://pastebin.com/GnssCRVK
Code used to create this: https://pastebin.com/x5Cexwp1
Profile from shortly after: https://spark.lucko.me/Inbl9KdI0T

It doesn't look like there's a massive amount of entries in the hashmap at all, seems to be more so that the methods being called an incredible amount of times per tick while players are active on the server.

rustic folioBOT
#

Expected behavior

TAB Completion

Observed/Actual behavior

TAB Completion

Steps/models to reproduce

TAB Completion

Plugin and Datapack List

No mather, it happens without plugins.

Paper version

This server is running Paper version git-Paper-196 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 773dd72)
You are running the latest version
Previous version: git-Paper-167 (MC: 1.20.1)

Other

I have been removing and restarting plugins. It is givi...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

All chunks should successfully upgrade

Observed/Actual behavior

Many chunks fail to load and get reset to the seed:
comparison

The following error message showing every time a chunk is corrupted:

[22:41:01 ERROR]: [ChunkLoadTask] Failed to parse chunk data for task: GenericDataLoadTask{class: io.papermc.paper.chunk.system.scheduling.ChunkLoadTask$ChunkDataLoadTask...
#
[PaperMC/Paper] branch deleted: profile
rustic folioBOT
#

The following may be able to workaround this issue, and seems to clear up all of the corruption I was able to find:

โš ๏ธ I have no idea if this is an appropriate workaround, or if it's a kludge and turns out to silently drop mob related data. Use at your own risk and assume the worst! โš ๏ธ

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: lordpipe <lordpipe@protonmail.com>
Date: Wed, 4 Oct 2023 23:43:28 -0600
Subject: [PATCH] fix corruption bug


...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: pw-update
rustic folioBOT
rustic folioBOT
#

Expected behavior

If I call the method World#setAutoSave(boolean) with false as parameter, I would expect to disable the saving of the world as a whole, but in net.minecraft.server.MinecraftServer#tickServer(BooleanSupplier) is only an if-check respecting the paper level configuration.

The AutoSave-Property is still considered in the process but only a few instructions later and only for the chunk map. Some other world data, which is still accessing the world file, will still be ...

rustic folioBOT
#

I've replaced our Paper with a patched version of paper that replaces CraftPlayer#canSee with a simple return true;
Here are the timings from that experiment: https://spark.lucko.me/cxfJhAlvdn
It effectively accomplishes the same thing for us. Having these canSee checks execute on the main thread with the amount of calls they receive seems a bit non-ideal - even the getHandle call adds ms to the tick per entity type its iterating over. Not quite sure what the ideal solution would be sin...

rustic folioBOT
rustic folioBOT
#

But wouldn't it make more sense to disable all saving for the world if autosave is disabled?

Especially as it feels inconsistent here. If you set chunks.autoSaveInterval to 0 in the level config, then it prevents the saving completely. But disabling the autosave via API using World#setAutoSave(boolean) does it only prevent partial?

Both, setting the config value to 0 and calling the method translates imho to "Do not save the world automatically".
Even if you want to stick to the va...

rustic folioBOT
#

Expected behavior

For some inexplicable reason, Paper and Spigot used to work on IBMs AIX (IBMs UNIX)

Observed/Actual behavior

Anything that uses a database breaks in comical fashion

Steps/models to reproduce

Buy a currently supported IBM PowerVM server (Power8 and newer (THAT IS NOT THE "L" SERIES))
Try to run paper
JDBC explodes violently

Plugin and Datapack List

Literally anything that uses SQL

Paper version

Current

Other

Yes I know this is the "ed...

#

[STDERR] [org.sqlite.SQLiteJDBCLoader] Failed to load native library through System.loadLibrary
[03:02:42 WARN]: java.lang.UnsatisfiedLinkError: Can't load sqlitejdbc
[03:02:42 WARN]: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:1805)
[03:02:42 WARN]: at java.base/java.lang.System.loadLibrary(System.java:767)
[03:02:42 WARN]: at org.sqlite.SQLiteJDBCLoader.loadNativeLibraryJdk(SQLiteJDBCLoader.java:303)
[03:02:42 WARN]: at org.sqlite.SQLite...

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: pw-update
rustic folioBOT
#

Expected behavior

In previous versions, this returned the client brand properly

Observed/Actual behavior

Always returns null, regardless of how long I wait.
Debugger shows that the custom BrandPayload packet is received, and is assigned to this.clientBrandName in the ServerCommonPacketListenerImpl, but for some reason does not propagate to the player method.

Steps/models to reproduce

  1. Have a way to read out the brand of the player, for example using
@EventHan...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Some ideas
in net.minecraft.world.entity.decoration.ItemFrame#survives

 @Override
    public boolean survives() {
        if (this.fixed) {
            return true;
        } else if (!this.level().noCollision((Entity) this)) {
            return false;
        } else {
            BlockState iblockdata = this.level().getBlockState(this.pos.relative(this.direction.getOpposite()));

            return !iblockdata.isSolid() && (!this.direction.getAxis().isHorizontal() || !Diod...
rustic folioBOT
#

repair for https://github.com/PaperMC/Paper/issues/9805
in net.minecraft.world.entity.decoration.ItemFrame#survives

 @Override
    public boolean survives() {
        if (this.fixed) {
            return true;
        } else if (!this.level().noCollision((Entity) this)) {
            return false;
        } else {
            BlockState iblockdata = this.level().getBlockState(this.pos.relative(this.direction.getOpposite()));

            return !iblockdata.isSolid() && (!thi...
rustic folioBOT
#

I wonder if we can somehow pass if the entity noCollision should use the COLLISION_FLAG_CHECK_BORDER flag or not.
The instanceOf, while presumably fine, seems kind of meh there given we know the exact spot this check would have to trigger for so we could attempt to shortcut here a bit.

My brain is absolutely friend right now tho, so I sadly cannot look deeper into that.

rustic folioBOT
#

Expected behavior

When i piston pushes a TNT entity into a solid block, and then retracts, the TNT should not be misaligned, and a piston one block away cannot push the TNT

Observed/Actual behavior

When i piston pushes a TNT entity into a solid block, and then retracts, the TNT gets misaligned, and a piston one block away can to push the TNT

Steps/models to reproduce

Here is a video showing the Problem

https://streamable.com/8kl784

Plugin and Datapack List

No Plugins...

#

Expected behavior

On Spigot, if a custom Brigadier command throws a CommandSyntaxException, that exception can appear in the console:

>version
[11:26:28] [Server thread/INFO]: This server is running CraftBukkit version 3908-Spigot-e0e223f-b3efca5 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT)
[11:26:28] [Server thread/INFO]: Checking version, please wait...
[11:26:29] [Thread-12/INFO]: You are running the latest version
>test @p
[11:26:31] [Server thread/INFO]:...
rustic folioBOT
#

Closing this pr since this is hack not a fix, the proper way is to do what vanilla do instead of what the new system do. There's more issue with the world border collision. The item frame do indeed drop when near the border (<2*|boxSize|) but not when far outside of the border and that's the issue. Essentially in vanilla an entity collide with a border without collide epsilon and when the entity is near the border and inside (with a margin) but not far outside then the two voxel shape interse...

rustic folioBOT
#

Closing this pr since this is a hack not a fix, the proper way is to do what vanilla do instead of what the new system do. There's more issue with the world border collision. The item frame do indeed drop when near the border (<2*|boxSize|) but not when far outside of the border and that's the issue. Essentially in vanilla an entity collide with a border without collide epsilon and when the entity is near the border and inside (with a margin) but not far outside then the two voxel shape int...

rustic folioBOT
rustic folioBOT
#

@electronicboy I may have tracked down a large source of the lag, a lot of it being related to ChunkMap$TrackedEntity#updatePlayer(Player player) - as player count goes up, this was using drastically more and more ms to execute than it used to on 1.19. Doing some basic comparison work I found that this particular optimization was removed:

// Paper start - remove allocation of Vec3D here
// Vec3 vec3d = player.position().subtract(this.entity.position());
double vec3d_dx = playe...
rustic folioBOT
#

Should the predicate be for BlockState instead of Block?

No, Block is perfect for this. It is just a wrapper for a world and position so it is more efficient than creating BlockState for every position checked.

Is the cast to LevelAccessor fine? The passThrough predicate is only non-null when the BlockGetter is an instance of ServerLevel.

To be safe, I would also, in addition to the null check, have an instanceof check.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

I expect spiders to attack me when they see me. I also expect zombies and skeletons to catch fire during the day.

Observed/Actual behavior

They did not really try to come to attack me. In early morning, some zombies and skeletons do not catch fire even out in the sun.

Steps/models to reproduce

When I walk out in the night, I see spiders. However, they do not always come to attack me. In the morning, I usually see zombies and skeletons not catching fire.
...

rustic folioBOT
#

Is your feature request related to a problem?

When a stronger potion effect overrides the weaker potion effect, the weaker potion effect remains, but is hidden. It returns after the stronger potion effect expires, if the weaker potion effect has a higher duration than the stronger potion effect.

However, from the API, using LivingEntity#getActivePotionEffects() doesn't return the hidden potion effects. There doesn't seem to be any way to get these hidden effects.

Describe the s...

#

Is your feature request related to a problem?

This is probably the only sensible way to prevent achievements from becoming meaningless on servers that use an additional creative world (besides the survival world) without bungee/waterfall.

It would also be good if you could deactivate achievements in creative mode (not only on special creative worlds, also on survival worlds in creative mode).

Describe the solution you'd like.

Make PlayerAdvancementDoneEvent cancellable or anothe...

rustic folioBOT
rustic folioBOT
#

Given the plugin linked does not appear to have any straight forward replication code and you are dealing with internals, this is pretty much unsupported land, you are on your own.

Feel free to pop by our discord where people might be able to help you with this, but this is certainly not a straight forward paper issue as neither spigot nor paper promise you to be able to create a fake player, you are just hacking with internals.

rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: pw-158
#
[PaperMC/Paper] branch deleted: pw-158
rustic folioBOT
#

Currently calling the setVelocity() has undefined behavior at best, and in addition there is no way to set a fireballs direction to anything other than a normalized vector. This PR fixes both of these problems at once by overriding the setVelocity method of fireballs to set the travel direction while bypassing the vanilla normalization, allowing for things such as freezing a fireball in-place or changing its speed.

rustic folioBOT
#

Expected behavior

when you switch servers, your view distance should be the one in your options

Observed/Actual behavior

server sets your render distance to I think 2, you need to open options screen then close it and then it updates, I think closing options screen sends another options packet.

Steps/models to reproduce

on waterfall server, with 2 paper servers, switch from one to the other, your view distance gets set to 2 until you relog or open options menu.

Plugin an...

#

Expected behavior

loot table should not be null

Observed/Actual behavior

java.lang.NullPointerException: Cannot invoke "org.bukkit.loot.LootTable.getKey()" because the return value of "org.bukkit.event.world.LootGenerateEvent.getLootTable()" is null

it is marked as not null

/**
 * Get the loot table used to generate loot.
 *
 * @return the loot table
 */
@NotNull
public LootTable getLootTable() {
    return lootTable;
}

Steps/m...

#

Expected behavior

I would expect the PlayerProfile#setId method to set the UUID of the PlayerProfile.

Observed/Actual behavior

The UUID does not change.

Steps/models to reproduce

  1. Create a plugin and hook into the PlayerPreLoginEvent
  2. Attempt to modify the UUID to some arbitrary value
  3. Observe that the UUID does not change

Example snippet:

@EventHandler(priority = EventPriority.LOWEST)
public void onPreLogin(AsyncPlayerPreLoginEvent event) {
    var exi...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Either documentation or behavior regarding the position of any new advancement on the advancements screen.

Observed/Actual behavior

Any new advancement loaded via UnsafeValues#loadAdvancement is positioned in the top left (0, 0).

Steps/models to reproduce

this.getServer().getUnsafe().loadAdvancement(
    NamespacedKey.minecraft("adventure/spyglass_at_pig"),
    """
    {
      "parent": "minecraft:adventure/spyglass_at_parrot",
      "criteri...
rustic folioBOT
#

After some thought with MM about this, I think we have to rethink a bit how we want to handle the backoff ticks.

Mostly for the following scenario:
Plugin developer A sets the backoff ticks to 20.
Plugin developer A expects the spawner to start searching again in 20 ticks.
Server owner B set a tick delay for mob spawners in the paper world config to 20 ticks.
This means that every 20 ticks the spawner will attempt to search, only decrementing the backoff ticks every 20 ticks, leading t...

rustic folioBOT
rustic folioBOT
#

My reasoning for doing it this way has been that while the unknown entities are known to be actually unknown because of the continually increasing entity id, there could be already a sign placed at the location where the local sign should be opened, so when he closes the sign editor the sign change handling would be passed to the real api which shoots it doen before the event is called because he wasn't allowed to do so.

This wouldn't require searching for a free space around the player to s...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

11.10 16:31:55 [Server] ERROR [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.inventory.meta.ItemMeta org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta.deserialize(java.util.Map) throws java.lang.Throwable' of class org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta for deserialization
11.10 16:31:55 [Server] INFO java.lang.IllegalArgumentException: BlockStateTag(...

rustic folioBOT
#

Closes issue #8925
Accidentally closed the previous PR #9787

PDC now implements these methods
`
#put(Key, PersistentDataType, Object)
#has(Key, PersistentDataType)
#get(Key, PersistentDataType)
#remove(Key)
#has(Key)
#putIfAbsent(Key, PersistentDataType, Object)
#computeIfAbsent(Key, PersistentDataType, Function)
#computeIfPresent(Key, PersistentDataType, BiFunction)
#compute(Key, PersistentDataType, BiFunction)
#getOrThrow(Key, PersistentDataType, Supplier)
#getOrThrow(Key,...

#

Can you explain what you mean?
` @Override
public <T, Z> void set(NamespacedKey key, PersistentDataType<T, Z> type, Z value) {
Preconditions.checkArgument(key != null, "The NamespacedKey key cannot be null");
Preconditions.checkArgument(type != null, "The provided type cannot be null");
Preconditions.checkArgument(value != null, "The provided value cannot be null");

    this.customDataTags.put(key, this.registry.wrap(type.getPrimitiveType(), type.toP...
rustic folioBOT
#
- [ ] address Paper's locateNearestBiome methods

Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry
255b2aa1 SPIGOT-7080: Add World#locateNearestBiome
ff984826 Remove javadoc.io doc links

CraftBukkit Changes:
71b0135cc SPIGOT-5753: Back PotionType by a minecraft regi...

rustic folioBOT
rustic folioBOT
#

There are at least 2 events I know of that fire during the configuration stage before the ServerGamePacketListenerImpl has been created: PlayerClientOptionsChangeEvent and PlayerSpawnLocationEvent. In addition, there are the listeners for custom payloads that also run. This PR adds support for the functionality that is supported during the configuration phase, namely kicking players, sending custom resource packs, and sending custom payloads.

- [x] kick API
- [x] send...
rustic folioBOT
#

Expected behavior

Bees should fly faster or lower depending on the attribute set of generic fly speed but they don't.

Observed/Actual behavior

There is a bug on the mojang bug website since 1.15 but it never got fixed.

Steps/models to reproduce

Create a bee entity, change the attribute fly speed and the bee keeps the default value.

You can test also with the command: /summon minecraft:bee ~ ~ ~ {Attributes:[{Name:"generic.flying_speed",Base:3.0}]}

Plugin and Datapa...

rustic folioBOT
#

This patch adds a custom payload handler in ServerGamePacketListenerImpl to handle cancelled commands and cancelled chat messages from the proxy.

My current implementation wraps the cancelled packet into a plugin message, protocol changes will be handled by the updated implementation in Minecraft code and Velocity.

This is a draft and can/should be used for https://github.com/PaperMC/Velocity/pull/1100 and possible for Waterfall/BungeeCord.

rustic folioBOT
#

for a good while, I've wanted the means to "handshake" between the proxy and the server some form of capability -esque sysem, that way the proxy and the server can see if they support this stuff, i.e. we can detect if we're able to tell the server that chat cycled rather than just having to assume it based on proto version or whatever, but, I did kinda get veto'd on this, so, idk

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Tabbing commands should work no problem.

Observed/Actual behavior

When the player joins, they can use command tab completion just fine, but after a few minutes it seems to break randomly

It seems from packet logging, the client IS being sent tab completion packets, but refusing to show them:

S2C
TAB_COMPLETE
[a(int):0],
[b(com.mojang.brigadier.suggestion.Suggestions):Suggestions{range=StringRange{start=7, end=7}, suggestions=[Suggestion{range=StringRange...

#

Looking at MCP this behaviour makes no sense, it should be incrementing the transaction id:

public CompletableFuture<Suggestions> customSuggestion(CommandContext<?> p_212423_) {
      if (this.pendingSuggestionsFuture != null) {
         this.pendingSuggestionsFuture.cancel(false);
      }

      this.pendingSuggestionsFuture = new CompletableFuture<>();
      int i = ++this.pendingSuggestionsId;
      this.connection.send(new ServerboundCommandSuggestionPacket(i, p_212423_.get...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

It is confirmed to be caused by packetevents, but I don't know how it could
be happening, it could be because I'm using both protocol lib and packet
events within the same plugin.

On Fri, 13 Oct 2023, 13:41 Bjarne Koll, @.***> wrote:

I mean, potentially ? Not being able to replicate this on a plain server
does point in the direction of a plugin.
Can you please try to narrow down which plugin might be causing this, e.g.
via binary search
<https://docs.papermc.io/pap...

rustic folioBOT
#

Starting in 1.20.2, when a new ServerPlayer instance is created its client options are populated with defaults using the ServerPlayer.updateOptions method.

This results in PlayerClientOptionsChangeEvent and PlayerLocaleChangeEvent being called before the server has actually received that information from the client.

This PR just makes it so the events are not called in the initialisation of ServerPlayer (i.e. on player login), consistent with behaviour before 1.20.2.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

After a bit of thought, I think moving the time of computation and "ownership" of the experience value from the slot to the inventory is a tad of a dangerous game.

The experience does not exist, we move the time of computation here to a place that may potentially now be out of sync with the actual computation down the line.

Having the inventory "manage" the exp also allows plugins to magically change this value outside of any events being called if they simply keep a reference to it, l...

rustic folioBOT
#

I think the javadocs here are somewhat misleading.
The method only computes the collision shape of the block data in the passed location without any placement like logic running.

That is fine, I can 100% see the usage of this method, but I think we need to be very detailed about what this method does.
From a) the name and b) the documentation it is not instantly obvious that this, e.g., would not have a Material.OAK_FENCE.createBlockData() return the shape a fence would be in at locati...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

My general problem is that players get kicked for server closed after the plugins got disabled
this causes the problem of PlayerQuitEvent/PlayerKickEvent not being called
This can lead for example to something like data not being stored or so

Describe the solution you'd like.

I'd love to see the player disconnect logic being handled before the plugins unload

Describe alternatives you've considered.

Right now when deali...

rustic folioBOT
rustic folioBOT
#

Expected behavior

I expect Paper not to insert any erroneous characters into the motd field of my server.properties file when using non-standard characters and starting the server.

Observed/Actual behavior

When the motd in the server.properties file contains non-standard characters, Paper inserts erroneous characters before or after them. As a side effect, each time the server is restarted, additional erroneous characters are inserted, which can eventually cause the server.properti...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] New branch created: cleanup-at
#
[PaperMC/Paper] branch deleted: restore/MC-2025-patch
rustic folioBOT
rustic folioBOT
#

Expected behavior

Being able to create a GameProfile object with either the id or the name and therefore the following code working:

meta.setOwningPlayer(Bukkit.getOfflinePlayer(NOTCH_UUID)); // meta is a SkullMeta object,

See authlib v4.0.43:

public GameProfile(final UUID id, final String name) {
    this.properties = new PropertyMap();
    if (id == null && StringUtils.isBlank((CharSequence)name)) {
        throw new IllegalArgumentException("Name and I...
rustic folioBOT
#

I mean, it is writing the properties file using UTF-8. I presume whatever you use to edit the file saves it using something not UTF-8 which at least explains the initial "insertion" characters.

I was not able to have the server repeatedly insert these characters, are you mutating the server.properties file between server restarts somehow ?

My server.properties was already using UTF-8 when I noticed the issue and when I reproduced the issue.

This is peak encoding issues, usi...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Stack trace

hs_err_pid78872.log

[paste your stack trace or a paste.gg link here!](https://pastebin.com/raw/DbXvgCeD)

Other hs_error_pid files

# Problematic frame:
# J 81333 c2 net.minecraft.world.entity.EntityLiving.h(Lnet/minecraft/world/phys/Vec3D;)V (1286 bytes) @ 0x00007f92d5d4a499 [0x00007f92d5d49d80+0x0000000000000719]

# Problematic frame:
# J 68260 c2 net.minecraft.server.level.ChunkProviderServer.a(Ljava/util/function/BooleanSupplier;Z)V (193 bytes) @ 0x0...
#

Segmentation faults are pretty much a "we tried to access a memory address that we don't own", this is generally caused by software bugs (which would be inside of native code, i.e. in this instance, the JVM), or hardware faults.

We can't really aid with this stuff on the issue tracker, the fact that it happened with more than one pice of software would generally suggest a wider issue, all I could advise is to run your own memory tests or something, not really our avenue

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

On an older build of Paper this is what it looked like:

Raw terminal output: [07:12:52 INFO]: [0;38:5:59m[[0;38:5:167m![0;38:5:59m] [0;38:5:167mUnable to find a matching player for the name: [0;38:5:231mzombachu[0;38:5:167m.

Observed/Actual behavior

On a 1.20.2 build of Paper it now looks like this:

Raw terminal output: `[07:12:56 INFO]: [!] Unable to find a matching player for the name: zombachu[0;9...

rustic folioBOT
rustic folioBOT
#

The old color matches what It is in game. Here's a better example, sorry about that:
<img width="995" alt="Screenshot 2023-10-16 at 11 08 02 PM" src="https://github.com/PaperMC/Paper/assets/7826590/77b72acd-2171-4f47-92b7-538748dfa6db">
<img width="466" alt="Screenshot 2023-10-16 at 11 07 59 PM" src="https://github.com/PaperMC/Paper/assets/7826590/af9682df-7e2f-4be7-8816-80a3a0e71f46">

(and in-game for the command before)
<img width="1504" alt="Screenshot 2023-10-16 at 11 11 48 PM" src=...

rustic folioBOT
#

Is your feature request related to a problem?

There are no straightforward options for admins that want to freeze a world in an unchanging state. Specifically, to prevent world files from being written to. The best we can do is disable auto-save (in conjunction with Bukkit#unloadWorld(world, false) on disable) which is problematic because all chunk data is retained until a save which eats up RAM until the server inevitably crashes.

Side note: ChunkUnloadEvent#setSaveChunk(false) doesn...

#

We've been asked this a handful of times over the years, and it's just that theres never been enough of a demand for us to deal with the effort involved in such a change, especially with mojangs lack of decoupling of level state meaning that we cannot exactly assure where data comes from without wider modification, it's just a whole bunch of diff & engineering effort for such a niche use-case

rustic folioBOT
#

In a minigame context, you should just be calling Bukkit.unloadWorld(world, false) in order to unload the world without saving. This is quick, does not save, and pretty quick. We use it in our minigames plugin's onDisable(), but you could call it whenever you needed to unload a minigame world.

#

In a minigame context, you can call Bukkit.unloadWorld(world, false) in order to unload the world without saving. We use it in our minigames plugin's onDisable(), but you could call it whenever you needed to unload a minigame world.

Yeah I suppose it's suitable for minigames. I'm doing this already, but in my case I have several large worlds that remain loaded for a while, so it just eats up way too much ram. My solution now is to have a duplicate directory of all the worlds and it...

#

In a minigame context, you can call Bukkit.unloadWorld(world, false) in order to unload the world without saving. We use it in our minigames plugin's onDisable(), but you could call it whenever you needed to unload a minigame world.

Yeah I suppose it's suitable for minigames. I'm doing this already, but in my case I have several large worlds that remain loaded for a while, so it just eats up way too much ram. My solution now is to have a duplicate directory of all the worlds ...

rustic folioBOT
#

I cannot reproduce this though.
I just used a modified version of the getPlayers defined in CraftTeam:

@Override
public @NotNull Iterable<? extends Audience> audiences() {
    this.checkState();

    ImmutableSet.Builder<org.bukkit.entity.Player> players = ImmutableSet.builder();
    for (String playerName : this.team.getPlayers()) {
        org.bukkit.entity.Player player = Bukkit.getPlayerExact(playerName);
        if (player != null) {
            players.add(player);
...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

In CraftMapView#renderCache we store a map with player keys. We never remove from there. While the player instance is not to big. There might be other weak maps with player keys. Or the following scenario:

  • player joins (and it put into the map)
  • player switches worlds
  • player quits
  • second world is unloaded
  • observice that there is a hard reference from the renderCache -> player -> old unloaded world

Observed/Actual behavior

We should clear the map or a...

rustic folioBOT
#

The setChargingAttack and isChargingAttack stuff seems weird to me. isChargingAttack just checks if the entity is currently using an item (by redirecting to LivingEntity#isHandRaised), but setChargingAttack makes the entity aggressive which doesn't make the entity start/stop using an item immediately.

I'll deprecate them later today.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

[04:59:54] [Server thread/ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.inventory.meta.ItemMeta org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta.deserialize(java.util.Map) throws java.lang.Throwable' of class org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem$SerializableMeta for deserialization
java.lang.IllegalArgumentException: BlockStateTag({
honey_level: "0"
}) is not a valid...

rustic folioBOT
#
rustic folioBOT
#

Expected behavior

Simply get world of sculk block

Observed/Actual behavior

NullPointerException in Block#getWorld() method:
`[13:19:13 ERROR]: Could not pass event SculkBloomEvent to MyPlugin v1.0.0
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.GeneratorAccess.getMinecraftWorld()" because "this.world" is null
at org.bukkit.craftbukkit.v1_20_R2.block.CraftBlock.getWorld(CraftBlock.java:90) ~[paper-1.20.2.jar:git-Paper-241]
at com.myplug...

rustic folioBOT
rustic folioBOT
#

Cost is a property of individual enchantments, and is used by vanilla in combination with environmental aspects like tool enchantability and bookshelf count to determine the final cost of an enchantment as shown in an enchanting table.

Having access to the base cost of an enchantment using these vanilla methods can allow plugin developers to determine the "value" of an enchantment, and use it in custom logic where needed. I came across this recently when trying to assign an economic value ...

rustic folioBOT
#

The big problem with Spark is that it is not compatible with Java OpenJ9...
I had to remove it a long time ago because we are running Java OpenJ9 for performance reasons (to fix docker issue with GC and RAM) and unfortunately Spark killed the Java machine on startup. It still the case en October 2023.
The Paper devs will abandon support for Timings to make way for Spark but if it is not OpenJ9 compatible some servers will no longer have effective profiling solutions :/

In addition, when ...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I think the naming and javadocs of these methods need to make it more clear that its not the number of experience levels needed. As you briefly mention, its not the direct cost. I don't think calling it a "cost" is really correct. And the @return tag in the javadoc doesn't do anything to dispel that notion.

Maybe something like getMin/MaxModifiedCost? Since it is used when comparing it to the modified level amount on the enchant clicked.

rustic folioBOT
rustic folioBOT
#

For everyone who is able to build the server as long as this is not fixed:
In
src/main/java/net/minecraft/server/level/ChunkMap.java
replace
if (!player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
with
if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
That improved our servers performance a lot

And it might be worth to add it as a paper patch.

rustic folioBOT
rustic folioBOT
#

I agree this concept of "cost" is a bit confusing. The original method names were mainly to match the Mojang ones, as the existing similar surrounding methods all did, but I've changed it them to be clearer. I've also updated the javadocs a bit, to hopefully try make it more obvious the cost isn't directly related to experience levels and to add a bit more context.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I've pushed that one in your name, issue here is that the lack of that above patch means that we're apparently considering all entities for tracking, I did have a quick 2 second hit of applying it, but, it failed tragically, so going to need more effort than I can muster right now

That patch was actually done in Gale discord by me. There are a lot of areas where canSee can be skipped with more faster checks. I'll try to open a PR for that if i get some free time

#

For everyone who is able to build the server as long as this is not fixed: In src/main/java/net/minecraft/server/level/ChunkMap.java replace if (!player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { with if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { That improved our servers performance a lot

And it might be worth to add it as a paper patch.

This patch achieves similar MSPT performance improvements to my fork that just guts canSee enti...

#

See, the headache here is that it's in a stupidly hot area, and so reducing any calls will help
saving calls to that is good where possible, sadly not able to dig in too much because 0.6 eyes, but, there also looks to be a pretty severe binning issue here that we might want to see if we can look into

assuming by isTrackedChunk, you mean isChunkTracked, mojang got rid of that in .2, I did look into upgrading leafs patch but ended up with 0 entities, generally looks like a bunch of stuff wa...

rustic folioBOT
#

Vanilla's visualOnly field is the skeleton trap boolean. All other uses of it for anything else should be reverted. Instead of using the vanilla field for what it originally ways, we are just changing its meaning, and adding a field to replace it. It should be the other way around. Add an "isEffect" boolean that is checked in the correct places, and remove visualOnly from anywhere it's not used in vanilla. Then make the API isEffect method return that new boolean.

rustic folioBOT
#

Paper is not OpenJ9 compatible too

I've been using Paper on OpenJ9 for years and it works perfectly. Moreover, out of 86 plugins, all work in OpenJ9, except Spark...

I had the same problems a few months ago and was told on the Paper Discord that there was no support for OpenJ9.
But if you find out more, please let me know, ive been running on hotspot since then and the memory consumption is significantly higher. :/

https://discord.com/channels/289587909051416579/289587909051...

rustic folioBOT
#

It's a nbt key/field, when used to create a potion using a command or the api, the icon in the top right corner can be hidden in game (not in the inventory). By default it's set to follow the show_particles parameter but it could be different for custom effect. However in your method you ignore that, and so for those type of potions the getter (PotionEffect#hasIcon) will be wrong. It's really niche api but there's no reason to ignore it i think.

rustic folioBOT
rustic folioBOT
#

Expected behavior

https://youtu.be/H6BfOt7zBjo

Observed/Actual behavior

https://youtu.be/IMQO19HYNnU

Steps/models to reproduce

  1. Setup a fresh paper server
  2. Give yourself op so you can make the worldborder small
  3. Run against the world border

Plugin and Datapack List

Server Plugins (0):

Paper version

This server is running Paper version git-Paper-243 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 3a5c6f8)

Other

No response

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
5010ed00 PR-923: Back Particle by a minecraft registry
d47dd212 Increase clarity of errors when loading malformed plugin main classes
2c3c3337 PR-914: Make use of ApiStatus.Internal reather than deprecation
2b4c3b46 PR-922: Add keepSpawnInMemory setting to WorldCreator

CraftBukkit Changes:
75502b6dd S...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Paper is not OpenJ9 compatible too

I've been using Paper on OpenJ9 for years and it works perfectly. Moreover, out of 86 plugins, all work in OpenJ9, except Spark...

I had the same problems a few months ago and was told on the Paper Discord that there was no support for OpenJ9. But if you find out more, please let me know, ive been running on hotspot since then and the memory consumption is significantly higher. :/

[discord.com/channels/289587909051416579/...

rustic folioBOT
#

Rewrite the CustomPayload handler using Mojang mechanism
https://github.com/PaperMC/Paper/pull/9861#issuecomment-1774357124

public final class TestPlugin extends JavaPlugin implements Listener, PluginMessageListener {

    @Override
    public void onEnable() {
        this.getServer().getPluginManager().registerEvents(this, this);
        this.getServer().getMessenger().registerIncomingPluginChannel(this, "minecraft:brand", this);
    }

    @Override
    public void on...
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

this allows for simpler checks for if an advancement would be given to a player,
and denying it (as the advancement grant event is non-cancelable)

feedback wanted:

  • [ ] is isGrantingAdvancement() actually a good function name / should i find something else and rename it?
  • [ ] is the constructor of events "api"? should i keep the old constructor, or ditch it?
  • [ ] is it ok to rename the patch from just PlayerAdvancementCriterionGrantEvent?
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

When the online mode is set to false, the user must connect to the server first, and then be manually saved to the whitelist. After that, the user's UUID is saved to the JSON file automatically.

To ensure the user's UUID is added to the whitelist before they connect, an automatic process is good

Describe the solution you'd like.

I modified a news UUID in the client launcher and saved it to the server whitelist. when connecting to Pap...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Can confirm the same issue on my server: https://spark.lucko.me/GouO2WV6Ux

This is very similar to my server spark profile.

https://github.com/PaperMC/Paper/blob/4b0bc74c90582f2d52d720c795228130545cd103/patches/removed/1.20.2/0414-Use-distance-map-to-optimise-entity-tracker.patch#L127-L145

diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 28c6ec04750daca3d77a0cee2b9f17f2508662cc..994b07...
rustic folioBOT
#

The docs for the EntityEquipment drop chance-related methods all say

A drop chance of 1.0F will always drop

which is misleading/false. Setting the chance to 1.0F will make it always drop if a player is responsible for killing the entity. Setting it to 1.00001F (or anything above 1) will make it so that it will drop when killed by anything, not just a player. This either needs to be documented or API added to set guaranteed drops.

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Paper is not OpenJ9 compatible too

I've been using Paper on OpenJ9 for years and it works perfectly. Moreover, out of 86 plugins, all work in OpenJ9, except Spark...

I had the same problems a few months ago and was told on the Paper Discord that there was no support for OpenJ9. But if you find out more, please let me know, ive been running on hotspot since then and the memory consumption is significantly higher. :/
[discord.com/channels/289...

rustic folioBOT
rustic folioBOT
#

This issue is for planning and discussing Spark's future integration into Paper, not HotSpot's ability to run on docker or OpenJ9's performance metrics.

Except that many servers run on OpenJ9 because OpenJDK has a significant memory leak due to docker, especially among hosts using Ptero. So if Spark does not run on J9, by making the decision to integrate Spark instead of timings, you will put all these servers in difficulty.
Ignoring this and brushing it aside is irrelevant, especially...

rustic folioBOT
#

I've not heard of a memory leak inside of OpenJDK, just a general misunderstanding of how javas memory model works (and the odd once in a blue moon native leak nobody has ever managed to figure out), and its application of such when running in a resource-constrained environment.

But, even if there was a leak, that generally does not change the fact that we do not support non-hotspot JVMs. You are more than welcome to use them, many dozen people run paper inside of Graal or OpenJ9, however,...

#

It's not our role to go out of our way to cater towards hosts enforcing unsupported environments onto people, especially ones which are commonly known within the java community to come with their own host of headaches and potential caveats/issues.

timings is no longer a small inconsequential % of the servers mspt and is slowly becoming less and less useful over the years due to mojangs complexity meaning that we'd need to drastically increase timings coverage for it to remain to be useful,...

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Location location = ...
Location above = location.add(0, 1, 0);
Location below = location.subtract(0, 1, 0);
is the code that I have. For some reason, location, above and below all return the same values.

Observed/Actual behavior

Results of a Logger.info
Location=Location{world=CraftWorld{name=world},x=-3.0,y=-59.0,z=0.0,pitch=0.0,yaw=0.0}
above=Location{world=CraftWorld{name=world},x=-3.0,y=-59.0,z=0.0,pitch=0.0,yaw=0.0}...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#
[PaperMC/Paper] branch deleted: update-upstream
rustic folioBOT
#
[PaperMC/Paper] New branch created: paperweight-159
rustic folioBOT
#
[PaperMC/Paper] branch deleted: paperweight-159
rustic folioBOT
#

We generally don't assign issues, you are free to open a PR however to resolve this!
As cat said, we might want to look into creating tests for this to prevent us from missing stuff in the future, however I think it would be fine to merge a PR only fixing this specific issue too if you don't feel comfortable in creating test cases.

We can always open a new issue to create test cases later.

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

If a deserialized block does not have an associated tile entity, the passed customTileEntity will be null but customBlockData will not be. I am essentially using the non-null status of customBlockData as a flag to indicate that it should use the customTileEntity be it null or non-null instead of getting the tile entity from the world.
Would it be better to have a separate boolean argument specifying which block data and tile entity should be used?

rustic folioBOT
rustic folioBOT
#

Notes

I get the same error when I try to manually send a ClientboundSetEquipment Packet with an Skull_Item ItemStack containing the skin profile of a player to a target Armorstand Head Item Slot.

Expected behavior

The Armorstand shows the item fine like on other spigot 1.20.2 versions.

Observed/Actual behavior

The client crashes and disconnects from the server.

Paper version

Observed the same in git-Paper-249 and git-Paper-248. The log below is from 248....

#

The plugin is using reflections to set a profile incorrectlly.
Spigot should be spamming you with a warning that a plugin is messing up.
Paper has yet to pull the "fix" spigot added for this, in reality the plugin is simply incorrectly using internals.

If you want to set the profile in a CraftMetaSkull, make sure to also update serializedProfile manually or by using setProfile instead.

#

Expected behavior

A given PlayerProfile should be set to a SkullMeta.

Observed/Actual behavior

I get the following error:

java.lang.NullPointerException: Cannot invoke "org.bukkit.profile.PlayerProfile.getTextures()" because "ownerProfile" is null
	at org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaSkull.applyToItem(CraftMetaSkull.java:148) ~[paper-1.20.2.jar:git-Paper-249]
	at org.bukkit.craftbukkit.v1_20_R2.inventory.CraftItemStack.setItemMeta(CraftItemStack.java:659) ...
rustic folioBOT
#

Expected behavior

Clean start-up and plugin usage, as occurred with Paper build 246 and prior

Observed/Actual behavior

Errors reported on plugin enable or usage (depending on the plugin) for a number of plugins, including AdminVault and DeluxeMenus, similar in character to the following

[12:55:18] [Server thread/INFO]: [AdminVault] Enabling AdminVault v1.0.1
[12:55:18] [Server thread/ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call m...
#

Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
19830133 PR-925: Add hit entity/block to events extending ProjectileHitEvent

CraftBukkit Changes:
5a72c3c04 SPIGOT-7510: Try to fix broken reflection usage of plugins
6fa69f235 PR-1281: Add hit entity/block to events extending ProjectileHitEvent
224f733ac Fix NPE introduced in f4d977e


Closes...

rustic folioBOT
#

Is your feature request related to a problem?

getPromptText(ConversationContext) requires a return type of string, which is too old for me. I only create message handlers that only convert message to net.kyori.adventure.text.Component. I don't want to make another string converter.

Describe the solution you'd like.

  1. Change getPromptText(ConversationContext)'s return type to net.kyori.adventure.text.Component.
  2. Or create another basic prompt class to use net.kyori.adventure.tex...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

I think you should be able to stop players messages from being logged to the console without using a plugin. There is also a flag to keep commands executed by players from be logged to console in spigot.yml so i don't see a reason why not to add one for player messages aswell

Describe the solution you'd like.

Prevent the ConsoleSender from being added to the audience when a message is sent and also add a check in MinecraftServer#logChat...

rustic folioBOT
#

Stack trace

The server has stopped responding!
Please report this to PaperSpigot directly!
Be sure to include ALL relevant console errors and Minecraft crash reports
PaperSpigot version: git-PaperSpigot-445 (MC: 1.8.8)
------------------------------
Server thread dump (Look for plugins here before reporting to PaperSpigot!):
16.57.36
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.Sch...
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

Able to get client brand name

Observed/Actual behavior

Client brand name is null

Steps/models to reproduce

Run paper server with

  • player.getClientBrand() will return what client player use
    When run paper server behind velocity
  • player.getClientBrand() will return null
    When use the plugin to run on Velocity
  • player.getClientBrand() will return what client player use

plugin is just
@EventHandler
public void onJoin(PlayerJoinEvent event) {...

rustic folioBOT
#

Expected behavior

I think the solution is to change how the "natural" mobs are tracked. Just having a NATURAL spawn reason shouldn't be good enough. Instead, some other flag on "non-natural" mobs should be set, and only mobs without that flag should be counted.

For context:
https://github.com/PaperMC/Paper/issues/8283

Observed/Actual behavior

Steps/models to reproduce

Plugin and Datapack List

Paper version

Other

No response

rustic folioBOT
rustic folioBOT
#

This fixes players (which can't view the collector) seeing item pickups with themselves as the target, as the client defaults to themselves if the target entity can't be found.

Issue is reproducible by testing with 2 accounts and hiding one from the other.

Without fix: https://github.com/PaperMC/Paper/assets/53302036/c24e9000-b893-48e9-9288-39f4a5b4fc84
With fix: https://github.com/PaperMC/Paper/assets/53302036/ff6bf87a-e089-4e60-8236-1d45df0190ad

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

The various plugins haven't changed their usage. Only Paper has been updated

Yeah, I get that. This is all just caused by mojang making a name and uuid required for a gameprofile in 1.20.2 whereas previously it was a name or uuid.

Would an empty name be valid or we have to provide one, like Steve? This is what we did and it worked: (I'm not sure what version of paper was used for testing)

// Before
GameProfile profile = new GameProfile(UUID.randomUUID(), nul...
#

Would an empty name be valid or we have to provide one, like Steve? This is what we did to fix DeluxeMenus on 1.20.2 and it worked: (I'm not sure what version of paper was used for testing)

// Before
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
// After
GameProfile profile = new GameProfile(UUID.randomUUID(), "");

Well it just can't be Null. What you provide as name doesn't matter. Paper also just uses an Empty string afaik.

rustic folioBOT
#

Why this regression again? Are custom skulls allowed or not? This is causing issues when bukkit tries to load itemstacks from yaml in player vaults, player heads with a gameprofile containing no name but with textures in their gameprofile or have been valid since the beginning of time and widely used by plugins, please do not drop support for this as it results in corruption.

#

can we not just set a null name to an empty string and call it a day

Yes, however we are not going to modify mojangs auth lib to hack around plugins messing with unsupported internals

i heard there was a nag about "inconsistant skulls" added, seems kinda silly IMO.

Reflecting into skull meta to deal with profile related stuff has been broken in varying capacities for the past few years, as for why spigot doesn't just remove the applicable field that plugins reflect into and brea...

rustic folioBOT
#

can we not just set a null name to an empty string and call it a day

Yes, however we are not going to modify mojangs auth lib to hack around plugins messing with unsupported internals

i heard there was a nag about "inconsistant skulls" added, seems kinda silly IMO.

Reflecting into skull meta to deal with profile related stuff has been broken in varying capacities for the past few years, as for why spigot doesn't just remove the applicable field that plugins reflect ...

rustic folioBOT
#

Is there anything we (plugin devs) can do about this warning?

[16:53:28 WARN]: Found inconsistent skull meta, this should normally not happen and is not a Bukkit / Spigot issue, but one from a plugin you are using.
Bukkit will attempt to fix it this time for you, but may not be able to do this every time.
If you see this message after typing a command from a plugin, please report this to the plugin developer, they should use the api instead of relying on reflection (and doing it the w...
rustic folioBOT
rustic folioBOT
#

Expected behavior

In Vanilla, we can set the Duration of an area effect cloud to the integer max value (2,147,483,647) using the following comand :

summon area_effect_cloud ~ ~ ~ {Duration:2147483647}

This allow the area effect cloud to exists for 3.4 years, wich is "forever" in most uses. So, with Paper, the following code should be equivalent to the command :

world.spawnEntity(
    location,
    EntityType.AREA_EFFECT_CLOUD,
    CreatureSpawnEvent.SpawnReason....
rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Is your feature request related to a problem?

There isn't a way to set biomes to be per-player

Describe the solution you'd like.

In the PlayerChunkLoadEvent or a new superevent of that, there should be a way to change the biome data sent to the client in order for each player to be able to get a different set of biomes.

I think this has to be a new superevent of PlayerChunkLoadEvent because biomes can change independent of chunks being sent to the client with the new fillbiome...

rustic folioBOT
rustic folioBOT
rustic folioBOT
#

I dont really have a strong opinion on this. In our CraftLlama we could also remove some casts and for plugin devs it is always tedious to use ((X) ((CraftX) x).getHandle()).methodCall()
<img width="1682" alt="image" src="https://github.com/PaperMC/Paper/assets/31861387/ef3949a0-4a4e-4e4b-83c9-f9b295c72d8a">
We can also use casts but even with var it looks quite ugly using the fqn. Do you have fears of merge conflicts with upstream?

rustic folioBOT
rustic folioBOT
rustic folioBOT
rustic folioBOT
#

Expected behavior

After creating an anvil inventory with the Bukkit.createInventory() method, PrepareAnvilEvent must be called when controlled after it is opened to the player.

Observed/Actual behavior

However, PrepareAnvilEvent is not actually called and the inventory behaves as if the InventoryClickEvent was cancelled, and the item disappears on SHIFT+LEFT click control.

Steps/models to reproduce

The code is like this:

![image](https://github.com/PaperMC/Paper/assets/2...

#

This is not a bug as much as it's long missing functionality from bukkit, not all createInventory method calls will end up creating a "real" inventory of a specific type, right now, you have an inventory that looks like an anvil, but has literally 0 of its functionality, the only reason you see anything happening otherwise is because the client has its own logic which "predicts" the outcome

rustic folioBOT
#

Vanilla components were just converted to normal json strings without being translated by the GlobalTranslator. This caused custom name's of entities to no longer be translated properly after a server restart or an entity unload.

This does have a small performance cost, as all vanilla components (not backed by an adventure component) are now converted to an adventure component by serializing to json and deserializing from json again.

Test plugin diff

Index: test-plugin/s...
rustic folioBOT
rustic folioBOT
#

Expected behavior

I expected just connect to my server like a player.

Observed/Actual behavior

When I tried to start my server crashed

Steps/models to reproduce

I tried to use the Iris plugin but I had to downgrade server version, and so I did, but when it fired up it just crashed!
Then i created another server same plugins an all those things and that server just disconnects player on join.

Plugin and Datapack List

BountyPlus-1.0-SNAPSHOT.jar
Citizens.jar
CustomScor...

#

1.19.2 is no longer supported.
Additionally, if you can replicate this on latest paper, please provide the entire server log instead of a small video of what looks to be a console.

I'll be closing this issue as unsupported till then.
You can also simply ask in our discord as I doubt this is really a paper issue more an issue in figuring out what kills your server, which github is not a nice place to investiage.