Skocz do zawartości
  • 0

Problem z "if player's tool is set"


Tralek
 Udostępnij

Pytanie

Cytat

command /test:
    trigger:
        if player's tool is set:
            cos
        else:
            send "&7Musisz trzymac jakis item."
            stop

Siemka, mam problem z "if player's tool is set". Skript miał wysyłać wiadomość "Musisz trzymać jakis item" jeśli użyłem komendy /test nie trzymając żadnego przedmiotu, ale zamiast tego otrzymuję wiadomość "An internal error occurred while attempting to perform this command." Wie ktoś w czym tkwi błąd i jak go naprawić? Pozdrawiam :)

Odnośnik do komentarza
Udostępnij na innych stronach

5 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

command /test:
    trigger:
        if player's tool is set:
            send "Trzymasz coś"
        else:
            send "&7Musisz trzymać jakiś item."

 

Jak to Ci nie zadziała to wyślij log z konsoli

Edytowane przez neexipl
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
12 minut temu, neexipl napisał:

command /test:
    trigger:
        if player's tool is set:
            send "Trzymasz coś"
        else:
            send "&7Musisz trzymać jakiś item."

 

Jak to Ci nie zadziała to wyślij log z konsoli

Po wpisaniu owej komendy nie trzymając żadnego przedmiotu wyświetla się wiadomość "Trzymasz coś".

Logi:

Cytat


 
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! [Skript] Severe Error:
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[12:36:57 ERROR]: #!#! If you're a server admin however please go to Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść!
[12:36:57 ERROR]: #!#! and check whether this error has already been reported.
[12:36:57 ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it (or use paste service),
[12:36:57 ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[12:36:57 ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[12:36:57 ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! Stack trace:
[12:36:57 ERROR]: #!#! java.lang.NullPointerException
[12:36:57 ERROR]: #!#! at com.gmail.thelimeglass.Expressions.ExprHideEnchants.convert(ExprHideEnchants.java:41)
[12:36:57 ERROR]: #!#! at com.gmail.thelimeglass.Expressions.ExprHideEnchants.convert(ExprHideEnchants.java:1)
[12:36:57 ERROR]: #!#! at ch.njol.skript.registrations.Converters.convert(Converters.java:303)
[12:36:57 ERROR]: #!#! at ch.njol.skript.registrations.Converters.convertUnsafe(Converters.java:294)
[12:36:57 ERROR]: #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:103)
[12:36:57 ERROR]: #!#! at ch.njol.skript.expressions.base.SimplePropertyExpression.get(SimplePropertyExpression.java:55)
[12:36:57 ERROR]: #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:74)
[12:36:57 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:103)
[12:36:57 ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:268)
[12:36:57 ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
[12:36:57 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[12:36:57 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
[12:36:57 ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)
[12:36:57 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:220)
[12:36:57 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:182)
[12:36:57 ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:268)
[12:36:57 ERROR]: #!#! at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:163)
[12:36:57 ERROR]: #!#! at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
[12:36:57 ERROR]: #!#! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:36:57 ERROR]: #!#! at java.lang.reflect.Method.invoke(Method.java:498)
[12:36:57 ERROR]: #!#! at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
[12:36:57 ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[12:36:57 ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499)
[12:36:57 ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1377)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1220)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
[12:36:57 ERROR]: #!#! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[12:36:57 ERROR]: #!#! at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678)
[12:36:57 ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576)
[12:36:57 ERROR]: #!#! at java.lang.Thread.run(Thread.java:748)
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! Version Information:
[12:36:57 ERROR]: #!#! Skript: 2.2-dev29
[12:36:57 ERROR]: #!#! Bukkit: 1.12-R0.1-SNAPSHOT
[12:36:57 ERROR]: #!#! Minecraft: 1.12
[12:36:57 ERROR]: #!#! Java: 1.8.0_141 (Java HotSpot(TM) 64-Bit Server VM 25.141-b15)
[12:36:57 ERROR]: #!#! OS: Linux amd64 3.10.0-862.11.6.el7.x86_64
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! Running CraftBukkit: false
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! Current node: null
[12:36:57 ERROR]: #!#! Current item: set the tool of the player to the %itemstacks% with hid(den|ing) enchant[ment] of {_item}(as org.bukkit.inventory.ItemStack)
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! Thread: Server thread
[12:36:57 ERROR]: #!#!
[12:36:57 ERROR]: #!#! End of Error.
[12:36:57 ERROR]: #!#!

 

Edytowane przez Tralek
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

A sprobuj cos takiego:

command /test:
	trigger:
		if player's tool is not air:
			send "Trzymasz coś"
		else if player's tool is air:
			send "Nie masz nic"

Ten plik .sk w ktorym testujesz jest czysty czy masz w nim cos zwiazanego z: set the tool of the player to the %itemstacks% with hid(den|ing) enchant[ment] of {_item}(as org.bukkit.inventory.ItemStack) 

Edytowane przez neexipl
Odnośnik do komentarza
Udostępnij na innych stronach

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ę...