Giter Club home page Giter Club logo

paperlib's People

Contributors

aikar avatar billygalbreath avatar denwav avatar donotspampls avatar egg82 avatar electronicboy avatar hafarooki avatar hexedhero avatar jpenilla avatar jroy avatar jwpjrdev avatar kennytv avatar me4502 avatar notmyfault avatar theminecoder avatar toffikk avatar viomck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paperlib's Issues

Instructions for hand compiling the JAR

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.

Suggestion: add an <artifactSet><includes> section to <configuration> in the maven example

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.

NullPointerException if bedLocation is in unloaded world

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]


Here we do not check whether or not the World actually exists.
According to the getPotentialBedLocation documentation:

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 ;)

SpigotMC has assessed that plugins calling SuggestPaper() are advertising

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.

old combat

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

PaperLib 1.8 Suggest Paper

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.

Steps to Reproduce

  • Download 1.8.8 Paper (here)
  • Make a quick plugin with spigot as the dependency, and paper lib shaded
  • Call the suggest paper method on startup.

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?

Gradle setup in README is incorrect

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.

Current Maintenance Status of PaperLib

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

ClassNotFound Exception

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?

Find a better approach to detecting the Environment

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.

ParticleBuilder support

Currently there is no way to use the particle builder with PaperLib.

Would it be possible to add support for this?

TNT

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

pre MC versions support

PaperLib.getMinecraftVersion() returns 0 on spigot 1.14.3-pre4 (git-Spigot-f16400e-8a3d3f4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.