papermc / paperlib Goto Github PK
View Code? Open in Web Editor NEWPlugin Library for interfacing with Paper Specific API's with graceful fallback that maintains Spigot Compatibility, such as Async Chunk Loading.
License: MIT License
Plugin Library for interfacing with Paper Specific API's with graceful fallback that maintains Spigot Compatibility, such as Async Chunk Loading.
License: MIT License
Hi!
I'm running into some troubles using Maven, likely a PICNIC, but I figured it would be nice to at least request instructions for manually compiling the PaperLib JAR.
The gradle/maven dependency examples in README.md point to the 1.0.1 version of PaperLib; copy/pasting them gives users the broken PaperLib that doesn't detect the MC version correctly and always uses the async chunk loader/generator
When a .pom file doesn't set a scope for a dependency, it seems like the scope defaults to compile
, which in turn makes the maven shader include and shade all those dependencies.
For people who aren't proficient in maven, and just want to add PaperLib to an existing project, this means that suddenly a lot of libraries get pulled into the final jar, without an apparent reason.
Thus, I suggest expanding the maven example to
...
<configuration>
<artifactSet>
<includes>
<include>io.papermc:paperlib:jar:*</include>
</includes>
</artifactSet>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
...
This will make projects that start using the shader plugin shade just PaperLib, which is probably what's intended, and projects which have already been using the shader can easily remove or amend the part.
Title says it all:
java.lang.NullPointerException: null at com.earth2me.essentials.paperlib.features.asyncchunks.AsyncChunksPaper_15.getChunkAtAsync(AsyncChunksPaper_15.java:11) ~[?:?] at com.earth2me.essentials.paperlib.environments.Environment.getChunkAtAsync(Environment.java:84) ~[?:?] at com.earth2me.essentials.paperlib.PaperLib.getChunkAtAsync(PaperLib.java:146) ~[?:?] at com.earth2me.essentials.paperlib.features.bedspawnlocation.BedSpawnLocationPaper.getBedSpawnLocationAsync(BedSpawnLocationPaper.java:17) ~[?:?] at com.earth2me.essentials.paperlib.environments.Environment.getBedSpawnLocationAsync(Environment.java:104) ~[?:?] at com.earth2me.essentials.paperlib.PaperLib.getBedSpawnLocationAsync(PaperLib.java:201) ~[?:?] at com.earth2me.essentials.EssentialsPlayerListener.updateCompass(EssentialsPlayerListener.java:412) ~[?:?] at com.earth2me.essentials.EssentialsPlayerListener.access$500(EssentialsPlayerListener.java:46) ~[?:?] at com.earth2me.essentials.EssentialsPlayerListener$1DelayJoinTask.run(EssentialsPlayerListener.java:280) ~[?:?] at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.15.2.jar:git-Paper-387] at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468) ~[patched_1.15.2.jar:git-Paper-387] at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1265) ~[patched_1.15.2.jar:git-Paper-387] at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:431) ~[patched_1.15.2.jar:git-Paper-387] at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1182) ~[patched_1.15.2.jar:git-Paper-387] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:971) ~[patched_1.15.2.jar:git-Paper-387] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
https://github.com/PaperMC/Paper/blob/cebec202f85651f7a700e2af55c926d55ff4fc30/Spigot-Server-Patches/0514-Potential-bed-API.patch#L8
So in case the world does not exist it should return null directly, else it will throw the exception.
Hope i made the fix easier for you guys with my research ;)
I raise this to suggest that the wording of the Paperlib.suggestPaper() be modified to not breach the SpigotMC advertising rules. I actually tried to get an idea from them as to what that actually is ...but I couldnt get answer. I think removing the link is probably a start. At the end of the day no alternative reliable and safe plugin marketplace exists. If plugins that call this method breach the guidelines they get removed and in the end they are not assisting spreading the word about Paper's benefits.
In's only int parameter. But I want to scan double or float value
Hey,
I have a question about old combat.
Is it possible to add a feature in the config to activate the old combat(1.8) like knockback etc.
in server version like 1.16?
Best regards
LeBaasti
Calling PaperLib.teleportAsync(entity, location) from outside of the main thread causes it to not work when the target location is in another dimension/world than the entity to be teleported.
Expereincing this on paper 1.12.2 using PaperLib 1.0.6.
Somone has reported this error: https://hastebin.com/hizamidiko.yaml Does PaperLib not support 1.8?
I am using PaperLib for one of my plugins, and am using the PaperLib#suggestPaper
method. Someone mentioned to me that on their 1.8 server running Paper, they were getting the suggestion to switch to paper, and I tried it out and got the same thing.
I am assuming that the class used just didn't exist in 1.8.8, but is there a class that does exist across all versions that could be used instead?
I was just looking through the README of this, and noticed that it suggests that compileOnly
be used for depending on this project, however this is the Gradle equivalent of setting the dependency scope to provided
rather than compile
. The Gradle equivalent of the compile
scope would be implementation
(was just compile
on older versions before that was split to allow optionally exposing transitive dependencies)
Using compileOnly
obviously tells shadow that this dependency does not need to be shaded in to the final JAR, so not only is relocation entirely redundant, plugins that use this will also be blindly assuming that the software they run contains this dependency in it, which I do not believe is what we want here.
tl;dr replace compileOnly
with implementation
for the Gradle dependency in the README.
It takes forever to initialize the database so that I can;t add tags or folders
Hello,
I've been using the library and it’s been really helpful. I'm maintaining another plugin that could use it, but I noticed there haven’t been updates for a while. I would like to ask if the project still active?
Thanks for any info you can provide!
Best,
Majd
When I call block.isSolid - error: java.lang.NoSuchMethodError: org.bukkit.block.Block.isSolid()Z
My request is to add support for PlayerProfile for players and skulls.
can it be possible to add this https://papermc.io/javadocs/com/destroystokyo/paper/MaterialTags.html so that spigot/paper can be used
Hi there!
I'm trying to test this library's Spigot functionality, but when I call PaperLib.getChunkAtAsync(world,x,z), an exception is thrown.
I have the Maven dependency added through IntelliJ, and am running a regular Spigot server.
Am I missing something here?
Currently, PaperLib checks for the presence of environment-specific configuration classes, namely com.destroystokyo.paper.PaperConfig
and org.spigotmc.SpigotConfig
. This may work at the moment, but it presents possibilities for environment-detection to malfunction should these internal classes ever be refactored. Neither PaperConfig nor SpigotConfig are exposed in their respective APIs and may be removed in a later release by either development team, that of Paper or Spigot.
Because PaperLib is most frequently shaded into dependent plugins, the current latest version of PaperLib will likely continue to be in use for a long time, living on in relocated classes. As such, the mechanisms PaperLib uses to determine the environment should be somewhat future-proof, so as to provide some stability when updating server versions and reduce the need to recompile and re-shade every plugin with the latest PaperLib version.
What's more, and this is not something PaperLib is responsible for but still pertinent, PaperLib often serves as a kind of unofficial reference implementation for checking whether Paper is in use. It's often recommended that users look at the PaperLib source code if they wish to implement Paper-specific features. PaperLib should ideally do so by the best means possible which would provide a good example to these developers.
Currently there is no way to use the particle builder with PaperLib.
Would it be possible to add support for this?
Hi there! I am currently experiencing an issue on 1.16.2 Paper where when TNT explodes blocks, the items don't actually drop. I have tested this on multiple occasions but unfortunately no luck.
video.zip
PaperLib.getMinecraftVersion() returns 0 on spigot 1.14.3-pre4 (git-Spigot-f16400e-8a3d3f4)
I noticed this as I was given a WarmRoast profile, http://paste.enginehub.org/KCXC7u.profile
Here it can be seen that it's 1_13_R2 (Either 1.13.1/1.13.2 - But they've said it's 1.13.2), Paper (Got the generated event executor), and using BlockStateSnapshotBeforeSnapshots
in PaperLib.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.