Skocz do zawartości
  • 0

Problem z pakietem entity equipment


KaWaNoS
 Udostępnij

Pytanie

Siema,

Mam tu taki kod (zmodyfikowany kod z tej strony Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść!)

command /test:
    trigger:
        set {_packet} to new play_server_entity_equipment packet
        set {_slot} to "HEAD"
        set {_entity} to player
        set {_item} to diamond helmet
        set {_nmsItem} to nms of (random item out of {_item})
        set field 0 of {_packet} to id of {_entity}
        set {_itemSlot} to enum {_slot} from nms class "world.entity.EnumItemSlot"
        set {_pair} to pair {_itemSlot} with {_nmsItem}
        set field 1 of {_packet} to {_pair}
        send all players packet {_packet}

Z użyciem addonu skript-packet. Po zreloadowaniu nie pokazuje się żaden błąd, ale przy użyciu komendy /test nic się nie dzieje. Błąd z konsoli:

[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! [Skript] Severe Error:
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! Something went horribly wrong with Skript.
[22:57:20 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[22:57:20 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[22:57:20 ERROR]: #!#! Here is full list of them:
[22:57:20 ERROR]: #!#! skript-reflect v2.2.3 (https://github.com/TPGamesNL/skript-reflect) Skript-Packet v2.1.0 (www.github.com/Anarchick/skript-packet) SkQuery v4.1.5 Skellett v2.0.2 (https://forums.skunity.com/resources/skellett.24/) MythicSkriptAddon v0.96a-SNAPSHOT
[22:57:20 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[22:57:20 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[22:57:20 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[22:57:20 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[22:57:20 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[22:57:20 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! Stack trace:
[22:57:20 ERROR]: #!#! java.lang.IllegalArgumentException: Can not set net.minecraft.server.v1_15_R1.EnumItemSlot field net.minecraft.server.v1_15_R1.PacketPlayOutEntityEquipment.b to com.mojang.datafixers.util.Pair
[22:57:20 ERROR]: #!#!     at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
[22:57:20 ERROR]: #!#!     at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
[22:57:20 ERROR]: #!#!     at java.base/jdk.internal.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)
[22:57:20 ERROR]: #!#!     at java.base/java.lang.reflect.Field.set(Field.java:780)
[22:57:20 ERROR]: #!#!     at com.comphenix.protocol.reflect.FieldUtils.writeField(FieldUtils.java:450)
[22:57:20 ERROR]: #!#!     at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:375)
[22:57:20 ERROR]: #!#!     at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:345)
[22:57:20 ERROR]: #!#!     at com.comphenix.protocol.reflect.StructureModifier.writeSafely(StructureModifier.java:410)
[22:57:20 ERROR]: #!#!     at fr.anarchick.skriptpacket.packets.PacketManager.setField(PacketManager.java:226)
[22:57:20 ERROR]: #!#!     at fr.anarchick.skriptpacket.elements.expressions.packet.ExprPacketField.change(ExprPacketField.java:118)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.effects.EffChange.execute(EffChange.java:281)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:51)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:60)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:285)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:250)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:255)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:258)
[22:57:20 ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:175)
[22:57:20 ERROR]: #!#!     at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37)
[22:57:20 ERROR]: #!#!     at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[22:57:20 ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[22:57:20 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1861)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1677)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:5)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1106)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1099)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1060)
[22:57:20 ERROR]: #!#!     at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:975)
[22:57:20 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:830)
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! Version Information:
[22:57:20 ERROR]: #!#!   Skript: 2.6.1 (latest)
[22:57:20 ERROR]: #!#!     Flavor: skriptlang-github
[22:57:20 ERROR]: #!#!     Date: 22:18:42.554713200
[22:57:20 ERROR]: #!#!   Bukkit: 1.15.2-R0.1-SNAPSHOT
[22:57:20 ERROR]: #!#!   Minecraft: 1.15.2
[22:57:20 ERROR]: #!#!   Java: 13 (OpenJDK 64-Bit Server VM 13+33)
[22:57:20 ERROR]: #!#!   OS: Windows 10 amd64 10.0
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! Server platform: Paper
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! Current node: null
[22:57:20 ERROR]: #!#! Current item: set [packet] field 1 of %packet% to {_pair} (as java.lang.Object)
[22:57:20 ERROR]: #!#! Current trigger: command /test (simple event) (packs.sk, line 1)
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! Thread: Server thread
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! Language: english
[22:57:20 ERROR]: #!#! Link parse mode: DISABLED
[22:57:20 ERROR]: #!#!
[22:57:20 ERROR]: #!#! End of Error.
[22:57:20 ERROR]: #!#!

Serwer mam na paperze 1.15.2

Wersja Skripta: 2.6.1

Wersja ProtocolLib: 4.7.0 

 

Odnośnik do komentarza
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...