Spigot DeluxeMenus 1.13.5

The all in one GUI menu plugin!

  1. I want players to buy an item from the menu, but the item has lore, so I'm getting errors. Is it possible to have an item with lore and/or a long /give command?
     
  2. so any way to use the Items tag with bundles?
     
  3. SlimeDog

    Moderator Patron

    Spigot 1.17.1-3219
    DeluxeMenus 1.13.4-DEV-117

    Code (Text):
    [10:03:36] [Craft Scheduler Thread - 126/WARN]: [DeluxeMenus] Plugin DeluxeMenus v1.13.4-DEV-117 generated an exception while executing task 45293
    java.lang.AssertionError: Failed generating bytecode for <eval>:-1
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.CompilationPhase$BytecodeGenerationPhase.transform(CompilationPhase.java:437) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:614) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.Compiler.compile(Compiler.java:641) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.compile(Context.java:1528) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.compileScript(Context.java:1449) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.compileScript(Context.java:759) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151) ~[?:?]
            at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) ~[java.scripting:?]
            at com.extendedclip.deluxemenus.requirement.JavascriptRequirement.evaluate(JavascriptRequirement.java:43) ~[?:?]
            at com.extendedclip.deluxemenus.requirement.RequirementList.evaluate(RequirementList.java:21) ~[?:?]
            at com.extendedclip.deluxemenus.menu.Menu.lambda$openMenu$5(Menu.java:345) ~[?:?]
            at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.17.1-3219.jar:3219-Spigot-b166a49-8c6d60c]
            at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.17.1-3219.jar:3219-Spigot-b166a49-8c6d60c]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
            at java.lang.Thread.run(Thread.java:831) [?:?]
    Caused by: java.lang.IllegalStateException: zip file closed
            at java.util.zip.ZipFile.ensureOpen(ZipFile.java:829) ~[?:?]
            at java.util.zip.ZipFile.getEntry(ZipFile.java:328) ~[?:?]
            at java.util.jar.JarFile.getEntry(JarFile.java:519) ~[?:?]
            at java.util.jar.JarFile.getJarEntry(JarFile.java:474) ~[?:?]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:154) ~[spigot-1.17.1-3219.jar:3219-Spigot-b166a49-8c6d60c]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:586) ~[?:?]
            at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:104) ~[spigot-1.17.1-3219.jar:3219-Spigot-b166a49-8c6d60c]
            at org.bukkit.plugin.java.JavaPluginLoader.getClassByName(JavaPluginLoader.java:207) ~[spigot-1.17.1-3219.jar:3219-Spigot-b166a49-8c6d60c]
            at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:117) ~[spigot-1.17.1-3219.jar:3219-Spigot-b166a49-8c6d60c]
            at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-1.17.1-3219.jar:3219-Spigot-b166a49-8c6d60c]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:573) ~[?:?]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
            at java.lang.Class.forName0(Native Method) ~[?:?]
            at java.lang.Class.forName(Class.java:466) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.lambda$forStructureClass$5(Context.java:1054) ~[?:?]
            at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.forStructureClass(Context.java:1052) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.FieldObjectCreator.findClass(FieldObjectCreator.java:214) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.FieldObjectCreator.<init>(FieldObjectCreator.java:89) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.CodeGenerator$6.<init>(CodeGenerator.java:1932) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.CodeGenerator.initLocals(CodeGenerator.java:1932) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.CodeGenerator.enterBlock(CodeGenerator.java:1268) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.ir.Block.accept(Block.java:235) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.ir.Block.accept(Block.java:507) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:405) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:47) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:57) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.CompilationPhase.transformFunction(CompilationPhase.java:618) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.codegen.CompilationPhase$BytecodeGenerationPhase.transform(CompilationPhase.java:424) ~[?:?]
            ... 18 more
     
  4. Hi! I am making a rankup menu and the idea is that users need a permission and an amount of money to buy the rank, but, i cannot make money requirement neccesary, my code is:
    Code (Text):
        left_click_requirement:
          stop_at_success: false
          minimum_requirements: 2
          requirements:
            has_permission:
              type: has permission
              permission: rango.madera2
            has_money:
              type: has money
              amount: 250
    Without op, I don't know why, it lets you buy the rank even if you don't have money, the permissions works well
     
  5. hi how to add url? open menu
     
  6. did this plugins has anti spam click delay, because some bugs may appear because of click spam problem
     
  7. How to make nbt_int for shield? I'd like to make the shield with color.
     
  8. Before I was torn between using this plugin or using trmenu
    But since I used this plugin, I ditched, trmenu
     
    • Funny Funny x 1
  9. SlimeDog

    Moderator Patron

    It's early days with Java 17, so just a heads up from our testing.

    CentOS Linux (up-to-date via yum)
    Java 17
    Spigot 1.17.1-3241 or Paper 1.17.1-266
    JSEngine 3.0.5
    DeluxeMenus 1.13.4-DEV-117

    JSEngine provides the Nashorn interface.
    Opening a menu triggers
    Code (Text):
    /deluxemenus open navigation4
    [21:08:10] [Craft Scheduler Thread - 15/WARN]: [DeluxeMenus] Plugin DeluxeMenus v1.13.4-DEV-117 generated an exception while executing task 9999
    java.lang.ExceptionInInitializerError: null
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.compile(Context.java:1509) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.compileScript(Context.java:1449) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context.compileScript(Context.java:759) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151) ~[?:?]
            at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262) ~[java.scripting:?]
            at com.extendedclip.deluxemenus.requirement.JavascriptRequirement.evaluate(JavascriptRequirement.java:43) ~[?:?]
            at com.extendedclip.deluxemenus.requirement.RequirementList.evaluate(RequirementList.java:21) ~[?:?]
            at com.extendedclip.deluxemenus.menu.Menu.lambda$openMenu$5(Menu.java:345) ~[?:?]
            at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.17.1-3241.jar:3241-Spigot-6c1c1b2-1492826]
            at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.17.1-3241.jar:3241-Spigot-6c1c1b2-1492826]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
            at java.lang.Thread.run(Thread.java:833) [?:?]
    Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:335) ~[?:?]
            at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.getDefineAnonymousClass(Context.java:327) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.<clinit>(Context.java:317) ~[?:?]
            ... 16 more
    Caused by: java.lang.NoSuchMethodException: no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
            at java.lang.invoke.MemberName.makeAccessException(MemberName.java:976) ~[?:?]
            at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1117) ~[?:?]
            at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3649) ~[?:?]
            at java.lang.invoke.MethodHandles$Lookup.findVirtual(MethodHandles.java:2680) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:329) ~[?:?]
            at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.getDefineAnonymousClass(Context.java:327) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.<clinit>(Context.java:317) ~[?:?]
            ... 16 more
    Caused by: java.lang.NoSuchMethodError: 'java.lang.Class sun.misc.Unsafe.defineAnonymousClass(java.lang.Class, byte[], java.lang.Object[])'
            at java.lang.invoke.MethodHandleNatives.resolve(Native Method) ~[?:?]
            at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:1085) ~[?:?]
            at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1114) ~[?:?]
            at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3649) ~[?:?]
            at java.lang.invoke.MethodHandles$Lookup.findVirtual(MethodHandles.java:2680) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:329) ~[?:?]
            at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.getDefineAnonymousClass(Context.java:327) ~[?:?]
            at com.extendedclip.deluxemenus.libs.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.<clinit>(Context.java:317) ~[?:?]
            ... 16 more
    Same configuration works fine on Java 16.
     
    #2909 SlimeDog, Sep 18, 2021
    Last edited: Sep 18, 2021
  10. It uses the shaded nashorn, which needs to be updated.
     
  11. SlimeDog

    Moderator Patron

    Thanks.
     
  12. help me!!!
    My CustomModelData its doesn't work when i update to the latest version

    Code (YAML):
    items:
      'CongBaDAo-11'
    :
        display_name
    : '&7( &b&lHiếm&7 ) &aLục Tinh'
        slot
    : 21
        material
    : feather
        nbt_int
    : CustomModelData:20
        lore
    :
       - ''
        - '&f ?'
        - ''
        - '&a Giá Bán&7:&e 10 Việt &cKim'
        - ''
        left_click_commands
    :
         - '[console] mi give material donate1 %player_name%'
          - "[message] &7&l«&e Vip Shop &7&l»&f Đã mua thành công &bx1&a Lục Tinh"
          - "[console] points take %player_name% 10"
          - "[sound] ENTITY_PLAYER_LEVELUP"
          - '[refresh]'
        left_click_requirement
    :
          requirements
    :
            Test
    :
              type
    : '>='
              input
    : '%playerpoints_points%'
              output
    : '10'
          deny_commands
    :
           - "[message] &7&l«&c LỖI &7&l»&f Bạn không đủ &e10 Việt&c Kim"
            - "[sound] ENTITY_VILLAGER_NO"
     
    #2912 Corbi123, Sep 23, 2021
    Last edited: Sep 23, 2021
  13. if you are on spigot 1.16.4 or newer you need the development builds of deluxemenus. you can get the latest from here: https://ci.extendedclip.com/job/DeluxeMenus/lastSuccessfulBuild/
     
  14. I'm afraid that is not possible at the moment. I believe deluxemenus supports only simple nbt tags.
     
  15. help with what exactly? if it is with nbt read 2 messages above please (above this message)
     
  16. I believe this bug was also fixed in the latest development build. maybe 2 builds ago actually. you can get it from here: https://ci.extendedclip.com/job/DeluxeMenus/lastSuccessfulBuild/
     
  17. you want to open an url from a menu? then you can't. that is a limitation with minecraft itself. the best you can do is send a link in chat that they can then click. which is using the [json] action
     
    • Friendly Friendly x 1
  18. you need to make sure you have the vault plugin installed and an economy plugin that hooks into it. you can see here an example of a rankup menu made in deluxemenus: https://wiki.helpch.at/clips-plugins/deluxemenus/example-gui-menus#ranks