Daniel12321 / AdventureMMO

MIT License
11 stars 11 forks source link

Another issue with enchant and one for saitama #39

Open aWitch-Doctor opened 7 years ago

aWitch-Doctor commented 7 years ago

We will start with saitama, I was told that a player activated saitama, opened their inventory and held an item with the mouse (click it so you can move it around but dont set it down). Once saitama wore off he lost the item he was holding with his mouse. I haven't been able to recreate this and I'm not searching logs to find the error cause another plugin glitched and spammed the crap out of the log. I restarted the server and it worked fine.

For the enchantment not being removed this is a different issue from the other one i created about enchants. A server restart fixed this but I wanted to let you know it happened. A player activated mad miner and used it, once it wore off the pick they had was not the super tool (the name super tool was gone) but the enchant for efficiency was still what it was while mad miner was active. The error log is below. I'm guessing the server/adventuremmo couldn't save the info of the original item so adventuremmo just removed what it could from the tool like the name and left what it wasn't sure about, the efficiency enchant.

[Server thread/DEBUG] [Sponge]: An exception occurred when setting data: java.lang.ClassCastException: org.spongepowered.api.data.MemoryDataContainer cannot be cast to org.spongepowered.api.data.meta.ItemEnchantment at org.spongepowered.common.data.util.NbtDataUtil.setItemEnchantments(NbtDataUtil.java:388) ~[NbtDataUtil.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.data.processor.data.item.ItemEnchantmentDataProcessor.set(ItemEnchantmentDataProcessor.java:63) ~[ItemEnchantmentDataProcessor.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.data.processor.data.item.ItemEnchantmentDataProcessor.set(ItemEnchantmentDataProcessor.java:49) ~[ItemEnchantmentDataProcessor.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.data.processor.common.AbstractSingleDataSingleTargetProcessor.offerToStore(AbstractSingleDataSingleTargetProcessor.java:185) ~[AbstractSingleDataSingleTargetProcessor.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.data.util.ValueProcessorDelegate.offerToStore(ValueProcessorDelegate.java:106) ~[ValueProcessorDelegate.class:1.10.2-5.2.0-BETA-385] at net.minecraft.item.ItemStack.offer(SourceFile:1125) ~[adz.class:?] at me.mrdaniel.adventuremmo.data.manipulators.SuperToolData.restore(SuperToolData.java:72) ~[SuperToolData.class:?] at me.mrdaniel.adventuremmo.utils.ItemUtils.lambda$null$0(ItemUtils.java:104) ~[ItemUtils.class:?] at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_72-internal] at me.mrdaniel.adventuremmo.utils.ItemUtils.lambda$null$1(ItemUtils.java:104) ~[ItemUtils.class:?] at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_72-internal] at me.mrdaniel.adventuremmo.utils.ItemUtils.lambda$restoreSuperTool$2(ItemUtils.java:104) ~[ItemUtils.class:?] at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_72-internal] at me.mrdaniel.adventuremmo.utils.ItemUtils.restoreSuperTool(ItemUtils.java:104) ~[ItemUtils.class:?] at me.mrdaniel.adventuremmo.catalogtypes.abilities.abilities.SuperTool.deactivate(SuperTool.java:27) ~[SuperTool.class:?] at me.mrdaniel.adventuremmo.listeners.AbilitiesListener.lambda$onBlockClick$6(AbilitiesListener.java:108) ~[AbilitiesListener.class:?] at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$0(Task.java:139) ~[Task$Builder.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:183) ~[SchedulerBase.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.scheduler.SyncScheduler.executeTaskRunnable(SyncScheduler.java:81) ~[SyncScheduler.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.scheduler.SchedulerBase.startTask(SchedulerBase.java:179) ~[SchedulerBase.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.scheduler.SchedulerBase.processTask(SchedulerBase.java:165) ~[SchedulerBase.class:1.10.2-5.2.0-BETA-385] at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) [?:1.8.0_72-internal] at org.spongepowered.common.scheduler.SchedulerBase.runTick(SchedulerBase.java:108) [SchedulerBase.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.scheduler.SyncScheduler.tick(SyncScheduler.java:51) [SyncScheduler.class:1.10.2-5.2.0-BETA-385] at org.spongepowered.common.scheduler.SpongeScheduler.tickSyncScheduler(SpongeScheduler.java:191) [SpongeScheduler.class:1.10.2-5.2.0-BETA-385] at net.minecraft.server.dedicated.DedicatedServer.handler$onTick$znp000(SourceFile:1253) [ld.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:340) [ld.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:554) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(SourceFile:458) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72-internal]