PaperMC / PaperLib

Plugin Library for interfacing with Paper Specific API's with graceful fallback that maintains Spigot Compatibility, such as Async Chunk Loading.
MIT License
267 stars 32 forks source link

GH-64 Implement inventory open options. #64

Closed vLuckyyy closed 1 year ago

electronicboy commented 1 year ago

This won't work on spigot? The return value is meaningless

vLuckyyy commented 1 year ago

This won't work on spigot? The return value is meaningless

You are right, however, I was looking for solutions and in the end this seemed to make the most sense. You can also consider playing with packages.

You can make a check as to whether the paper is on the server. What do you think about this?

electronicboy commented 1 year ago

The entire idea of this library is to offer access to paper API with sane fallbacks, i.e. async chunk loads falling back to a sync load; "just blows up" is not a sane fallback; I don't think that there is a sane fallback here either, given that any fallback would either involve server internals through reflection or offering an entirely functionally different inventory which would defeat the point

vLuckyyy commented 1 year ago

The entire idea of this library is to offer access to paper API with sane fallbacks, i.e. async chunk loads falling back to a sync load; "just blows up" is not a sane fallback; I don't think that there is a sane fallback here either, given that any fallback would either involve server internals through reflection or offering an entirely functionally different inventory which would defeat the point

Of course, if you continue to believe that it is pointless for PaperLib. You can close this PR. I, on the other hand, will leave it for my own use only 😀. I solve it in such a way that I check when registering a command if the paper is on the server. If it is not there the command is not registered.

JRoy commented 1 year ago

Closing as per cat's comment