Comments (3)
I just committed a fix that allows null for the source as far as I can tell (I will test to see if it actually works in a moment, and push any fixes if it doesn't). I will push another update soon but I have been super busy recently. I will close this issue once I've verified that null sources and observers work.
In the future though, when Contexts are properly pushed, you could have a source because displayname can be per player. Might be interesting to look into ;)
from placeholderapi.
Ok so it looks like I've got some more internal issues, so I am looking into that now. From now on, annotated methods will have to specify that they support nullable sources with the @Nullable
annotation. I will update my internals accordingly.
from placeholderapi.
Alright, I just pushed another commit that seems to support null sources and observers as much as I can internally. Parameters with the @Nullable
annotation CAN be null, while parameters without it are ALWAYS present. The token parameter only uses the annotation if it is a String
, because it doesn't make sense to have a null reference for an Optional<String>
.
This should fix this issue but I should point out that many of the placeholders I have are dependent on having a source (such as player
or rank
), so there isn't too much you can do with this. I might work on the economy
placeholder to support balance ranks that are source-independent, but I don't have enough time today so maybe another day.
from placeholderapi.
Related Issues (20)
- %player_displayname% has incorrect replacement HOT 5
- LuckPerms %rank% broke HOT 2
- BossBarMensager working with PlaceHodlerApi?
- player_prefix shows nothing
- in game replaceable placeholder
- could not load message HOT 2
- not support pieconomy 0.6.2 HOT 1
- Cannot use placeholders of player_perm HOT 1
- /papi parse can't be used properly from console.
- If I delete the config every restart it'll work, if not then this happens.
- Could not load the messages file! HOT 1
- JavaScript Expansion - EcmaScript 6 support
- Scheduler problem with CommandUtils
- Help cant download Placeholders HOT 3
- Publish source code on jitpack
- wrong repo
- How to access a scoreboard objective value with a placeholder???
- can java script get text from url?
- New expension for PLaceholderApi [scoreboard_objective]
- Incorrent Statistic placeholder?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from placeholderapi.