Hazebyte / CrateReloaded

Issue tracker for the Bukkit plugin, CrateReloaded
17 stars 19 forks source link

'onetime:' reward feature breaks crates and spams the console with errors. #49

Closed mibby closed 8 years ago

mibby commented 8 years ago

CrateReloaded 1.3.70 PaperSpigot dev 706 ProtocolLib dev 273 PermissionsEx 1.23.5-SNAPSHOT

Using a crate that has onetime permission checks in the reward completely breaks the server. When you try to open the crate, it displays nothing but an empty chest window. In chat, it outputs Message not found: crate.reward.none a couple dozen times before it eventually stops. In console, this error occurs and the OutOfBoundException continues to spam non-stop until the server is restarted.

[23:04:52] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to CrateReloaded v1.3.70
org.bukkit.event.EventException
    at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched_1.9.2.jar:git-Paper-706]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.9.2.jar:git-Paper-706]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.9.2.jar:git-Paper-706]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched_1.9.2.jar:git-Paper-706]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched_1.9.2.jar:git-Paper-706]
    at org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:231) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.PlayerInteractManager.a(PlayerInteractManager.java:482) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:889) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.PacketPlayInUseItem.a(SourceFile:55) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.PacketPlayInUseItem.a(SourceFile:11) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) [patched_1.9.2.jar:git-Paper-706]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_92]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_92]
    at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:811) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:404) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:721) [patched_1.9.2.jar:git-Paper-706]
    at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:620) [patched_1.9.2.jar:git-Paper-706]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]
Caused by: java.lang.NullPointerException
    at cratereloaded.L.e(AnimationMenu.java:110) ~[?:?]
    at cratereloaded.N.az(CSGO.java:104) ~[?:?]
    at cratereloaded.N.a(CSGO.java:32) ~[?:?]
    at cratereloaded.ak.k(AnimationCrate.java:99) ~[?:?]
    at cratereloaded.ak.a(AnimationCrate.java:62) ~[?:?]
    at cratereloaded.aH.c(PlayerInteractListener.java:139) ~[?:?]
    at cratereloaded.aH.a(PlayerInteractListener.java:57) ~[?:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor344.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched_1.9.2.jar:git-Paper-706]
    ... 18 more
[23:04:52] [Craft Scheduler Thread - 2/WARN]: Exception in thread "Craft Scheduler Thread - 2" 
[23:04:52] [Craft Scheduler Thread - 2/WARN]: org.apache.commons.lang.UnhandledException: Plugin CrateReloaded v1.3.70 generated an exception while executing task 171
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at cratereloaded.N.aA(CSGO.java:124)
    at cratereloaded.O.run(CSGO.java:73)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more

[23:04:52] [Craft Scheduler Thread - 3/WARN]: Exception in thread "Craft Scheduler Thread - 3" 
[23:04:52] [Craft Scheduler Thread - 3/WARN]: org.apache.commons.lang.UnhandledException: Plugin CrateReloaded v1.3.70 generated an exception while executing task 171
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at cratereloaded.N.aA(CSGO.java:124)
    at cratereloaded.O.run(CSGO.java:73)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more

[23:04:52] [Craft Scheduler Thread - 5/WARN]: Exception in thread "Craft Scheduler Thread - 5" 
[23:04:52] [Craft Scheduler Thread - 5/WARN]: org.apache.commons.lang.UnhandledException: Plugin CrateReloaded v1.3.70 generated an exception while executing task 171
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at cratereloaded.N.aA(CSGO.java:124)
    at cratereloaded.O.run(CSGO.java:73)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more

[23:04:52] [Craft Scheduler Thread - 6/WARN]: Exception in thread "Craft Scheduler Thread - 6" 
[23:04:52] [Craft Scheduler Thread - 6/WARN]: org.apache.commons.lang.UnhandledException: Plugin CrateReloaded v1.3.70 generated an exception while executing task 171
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at cratereloaded.N.aA(CSGO.java:124)
    at cratereloaded.O.run(CSGO.java:73)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more

[23:04:52] [Craft Scheduler Thread - 7/WARN]: Exception in thread "Craft Scheduler Thread - 7" 
[23:04:52] [Craft Scheduler Thread - 7/WARN]: org.apache.commons.lang.UnhandledException: Plugin CrateReloaded v1.3.70 generated an exception while executing task 171
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at cratereloaded.N.aA(CSGO.java:124)
    at cratereloaded.O.run(CSGO.java:73)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more

[23:04:52] [Craft Scheduler Thread - 8/WARN]: Exception in thread "Craft Scheduler Thread - 8" 
[23:04:52] [Craft Scheduler Thread - 8/WARN]: org.apache.commons.lang.UnhandledException: Plugin CrateReloaded v1.3.70 generated an exception while executing task 171
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at cratereloaded.N.aA(CSGO.java:124)
    at cratereloaded.O.run(CSGO.java:73)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more

[23:04:52] [Craft Scheduler Thread - 9/WARN]: Exception in thread "Craft Scheduler Thread - 9" 
[23:04:52] [Craft Scheduler Thread - 9/WARN]: org.apache.commons.lang.UnhandledException: Plugin CrateReloaded v1.3.70 generated an exception while executing task 171
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at cratereloaded.N.aA(CSGO.java:124)
    at cratereloaded.O.run(CSGO.java:73)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 4 more

Test crate config.

TestCrate:
    type: CSGOKEYCRATE
    displayName: '&9Test Crate'
    holographic:
        - '&9Test Crate'
    preview:
        enabled: false
    buy:
        enabled: false
        cost: 0
    message:
        onOpen: ''
        broadcast: ''
    key:
        item: 'Tripwire_Hook'
        enchantment: '300:1'
        name: '&fTest &6Key!'
        lore: 
            - '&7Use on the chest at spawn!'
    effect:
        onOpenEffects: 'firework, ENTITY_GENERIC_DRINK'
        dormantEffects: 'instantspell'
        dormantRoulette: 'UI_BUTTON_CLICK'
        onRouletteEnd: 'ENTITY_BAT_TAKEOFF'
    reward:
        minimumRewards: 1
        maximumRewards: 1
        rewards:
        rewards:
            - 'cmd:(/pex user %player% add libsdisguises.disguise.bat.nooptions), onetime:(libsdisguises.disguise.bat.nooptions), chance:(1), broadcast:(%prefix%A permanent bat disguise unlock!), display:(383:65 1 &aA_Bat_Disguise! &f%chance% 300:1)'
            - 'cmd:(/pex user %player% add echopet.pet.type.spider), cmd:(/pex user %player% add echopet.pet.type.spider.*), onetime:(echopet.pet.type.spider), chance:(1), broadcast:(%prefix%A permanent pet spider unlock!), display:(383:55 1 &aA_Pet_Spider! &f%chance% 300:1)'
            - 'cmd:(/pex user %player% add trailgui.trails.hearts), cmd:(/pex user %player% add trailgui.inventory.hearts), onetime:(trailgui.trails.hearts), chance:(1), broadcast:(%prefix%A permanent hearts trail unlock!), display:(38 1 &aA_Hearts_Trail! &f%chance% 300:1)'
creative-control: true
display:
  chanceFormat: '#.#'

usage:
  cooldown: 1

csgo:
    length: 7
    topPrizeDisplay: 'REDSTONE_TORCH_ON 1 &6Prize!'
    botPrizeDisplay: 'REDSTONE_TORCH_ON 1 &6Prize!'

Removing the onetime feature from the rewards, the crate can spin just fine without any problems.

imWillX commented 8 years ago

Reverted Update. Issue is no longer relevant.