Code Monkey home page Code Monkey logo

expansion-rng's People

Contributors

blitzoffline avatar kqliber avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

badomensurvival

expansion-rng's Issues

Placeholder in placeholder

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.

RNG Variable problem

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.

Suggestion: weighted numbers

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!

Idea

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!!

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.