kqliber / expansion-rng Goto Github PK
View Code? Open in Web Editor NEWPlaceholderAPI RNG Expansion
Home Page: https://api.extendedclip.com/expansions/rng/
License: MIT License
PlaceholderAPI RNG Expansion
Home Page: https://api.extendedclip.com/expansions/rng/
License: MIT License
Hello,
I created a placeholder that is supposed to get a random number between two placeholders using math, which in itself also has a placeholder. This didn't work. The same problem appeared on another papi expansion, and was fixed. I will put a link below to that same issue to give you a better understanding of what i mean.
github issue link
He fixed it by adding not only a placeholder like this: {placheolder}
But also like this: $(placeholder)$
The question is, can you implement the same thing in your expansion?
I've also tried another solution which doesn't seem to work as intended: shortcut placeholder. It doesn't seem to like anything with curly brackets. Anyway, i hope you can fix this. Thanks in advance.
org.bukkit.command.CommandException: Unhandled exception executing command 'papi' in plugin PlaceholderAPI v2.9.2
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[Paper-1.12.2.jar:git-Paper-1574]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[Paper-1.12.2.jar:git-Paper-1574]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:685) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1479) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1284) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[Paper-1.12.2.jar:git-Paper-1574] at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[Paper-1.12.2.jar:git-Paper-1574]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_181]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_181]
at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:850) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[Paper-1.12.2.jar:git-Paper-1574]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[Paper-1.12.2.jar:git-Paper-1574]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_181]
Caused by: java.lang.NoClassDefFoundError: me/kaliber/rngExpansion/libs/jvm/internal/Intrinsics
at me.kaliber.expansions.rng.RNGExpansion.onRequest(RNGExpansion.kt) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:237) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:205) ~[?:?]
at me.clip.placeholderapi.commands.PlaceholderAPICommands.onCommand(PlaceholderAPICommands.java:186) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[Paper-1.12.2.jar:git-Paper-1574]
... 15 more
Caused by: java.lang.ClassNotFoundException: me.kaliber.rngExpansion.libs.jvm.internal.Intrinsics
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_181]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_181]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_181]
at me.kaliber.expansions.rng.RNGExpansion.onRequest(RNGExpansion.kt) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:237) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:205) ~[?:?]
at me.clip.placeholderapi.commands.PlaceholderAPICommands.onCommand(PlaceholderAPICommands.java:186) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[Paper-1.12.2.jar:git-Paper-1574]
... 15 more
The above is an error. No matter I put it on the lore of the menu or the command test of papi, the above error will be reported. It cannot be used normally. Both variables cannot be used. The papi version is 2.9.2 and the extended version is 1.3.
It'd be cool if you could specify weights for the returned numbers, for example %rng_0|75,1|25%
would have a 25% chance of returning 1 but a 75% chance of returning 0. Or even just being able to put in a list of numbers to pick from to return, like %rng_0|0|0|1%
has 3 chances to return a 0 and one chance to return a 1.
Thanks!
Please add the ability to generate different numbers in different cells, for example in the GUI menu. Here's an example: PlaceHolder can look something like %rng_name_number, number%, where name will be a limiter for PlaceHolder so that it doesn't generate the same values in different GUI cells. I hope you understand me, thank you!!
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.