1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skript skeleton bug?

Discussion in 'Skript' started by Hackusater, Nov 29, 2017.

Thread Status:
Not open for further replies.
  1. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    Hello, I am having trouble with a skript of mine. When I give a skeleton an iron sword it crashes the server when the skeleton tries to attack someone. Code I am using:
    Code (Skript):
    1. command /test:
    2.     trigger:
    3.         spawn a skeleton at player's location
    4.         set the weapon of the last spawned skeleton to iron sword
    Is there a way to fix this?

    EDIT:
    I also figured out that this bug stops when the server restarts. (The skeleton that was spawned in before it crashed is working fine and kills people with the sword. but the new ones i spawn in crash the server. Also a funny thing I found was if I spawn it in normally without giving it a bow the skeleton will kill people like it has a sword (it wont shoot arrows it will hit people and it doesnt crash) and i dont know why it does that. Another weird thing is if I add "delete last spawned skeleton's held item" it only removes it once I leave the chunk the skeleton is in and go back in. Also when I do this it doesn't crash the server when it damages people.
     
    #1 Hackusater, Nov 29, 2017
    Last edited: Nov 29, 2017
  2. St0medy

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
    Code (Skript):
    1. command /test:
    2.     trigger:
    3.         spawn a skeleton at player's location
    4.         set the weapon of the last spawned skeleton to bow or iron sword
    The skeleton need bow to shot arrows
    When you restart the server the entities are deleted
     
  3. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    I don't understand what you are saying... BTW that code still has the same outcome.
     
  4. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
    Some is shit happens with you Server :/

    For me works fine with your code.

    Maybe post Console error. would be helpfull
     
  5. Hackusater

    Hackusater Active Member

    Joined:
    Aug 5, 2017
    Messages:
    74
    Likes Received:
    2
    ---- Minecraft Crash Report ----
    // Oh - I know what I did wrong!

    Time: 30/11/17 10:08
    Description: Ticking entity

    java.util.NoSuchElementException
    at org.bukkit.craftbukkit.v1_8_R3.util.UnsafeList$Itr.next(UnsafeList.java:248)
    at net.minecraft.server.v1_8_R3.PathfinderGoalSelector.a(PathfinderGoalSelector.java:90)
    at net.minecraft.server.v1_8_R3.EntityInsentient.doTick(EntityInsentient.java:473)
    at net.minecraft.server.v1_8_R3.EntityLiving.m(EntityLiving.java:1626)
    at net.minecraft.server.v1_8_R3.EntityInsentient.m(EntityInsentient.java:338)
    at net.minecraft.server.v1_8_R3.EntityMonster.m(EntityMonster.java:20)
    at net.minecraft.server.v1_8_R3.EntitySkeleton.m(EntitySkeleton.java:110)
    at net.minecraft.server.v1_8_R3.EntityLiving.t_(EntityLiving.java:1487)
    at net.minecraft.server.v1_8_R3.EntityInsentient.t_(EntityInsentient.java:193)
    at net.minecraft.server.v1_8_R3.EntityMonster.t_(EntityMonster.java:24)
    at net.minecraft.server.v1_8_R3.World.entityJoinedWorld(World.java:1607)
    at net.minecraft.server.v1_8_R3.World.g(World.java:1582)
    at net.minecraft.server.v1_8_R3.World.tickEntities(World.java:1425)
    at net.minecraft.server.v1_8_R3.WorldServer.tickEntities(WorldServer.java:597)
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:786)
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
    at java.lang.Thread.run(Thread.java:748)


    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------

    -- Head --
    Stacktrace:
    at org.bukkit.craftbukkit.v1_8_R3.util.UnsafeList$Itr.next(UnsafeList.java:248)
    at net.minecraft.server.v1_8_R3.PathfinderGoalSelector.a(PathfinderGoalSelector.java:90)
    at net.minecraft.server.v1_8_R3.EntityInsentient.doTick(EntityInsentient.java:473)
    at net.minecraft.server.v1_8_R3.EntityLiving.m(EntityLiving.java:1626)
    at net.minecraft.server.v1_8_R3.EntityInsentient.m(EntityInsentient.java:338)
    at net.minecraft.server.v1_8_R3.EntityMonster.m(EntityMonster.java:20)
    at net.minecraft.server.v1_8_R3.EntitySkeleton.m(EntitySkeleton.java:110)
    at net.minecraft.server.v1_8_R3.EntityLiving.t_(EntityLiving.java:1487)
    at net.minecraft.server.v1_8_R3.EntityInsentient.t_(EntityInsentient.java:193)
    at net.minecraft.server.v1_8_R3.EntityMonster.t_(EntityMonster.java:24)
    at net.minecraft.server.v1_8_R3.World.entityJoinedWorld(World.java:1607)
    at net.minecraft.server.v1_8_R3.World.g(World.java:1582)

    -- Entity being ticked --
    Details:
    Entity Type: Skeleton (net.minecraft.server.v1_8_R3.EntitySkeleton)
    Entity ID: 98
    Entity Name: Skeleton
    Entity's Exact location: -31.82, 30.00, 192.05
    Entity's Block location: -32.00,30.00,192.00 - World: (-32,30,192), Chunk: (at 0,1,0 in -2,12; contains blocks -32,0,192 to -17,255,207), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Entity's Momentum: 0.00, -0.08, 0.00
    Entity's Rider: ~~ERROR~~ NullPointerException: null
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
    Stacktrace:
    at net.minecraft.server.v1_8_R3.World.tickEntities(World.java:1425)
    at net.minecraft.server.v1_8_R3.WorldServer.tickEntities(WorldServer.java:597)

    -- Affected level --
    Details:
    Level name: world
    All players: 1 total; [EntityPlayer['XPussySlayer69X'/97, l='world', x=-31.59, y=30.00, z=190.73](XPussySlayer69X at -31.590046782735484,30.0,190.72823857525643)]
    Chunk stats: ServerChunkCache: 257 Drop: 0
    Level seed: 0
    Level generator: ID 01 - flat, ver 0. Features enabled: false
    Level generator options: ;0
    Level spawn location: -10.00,85.00,204.00 - World: (-10,85,204), Chunk: (at 6,5,12 in -1,12; contains blocks -16,0,192 to -1,255,207), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 88165165 game time, 11010000 day time
    Level dimension: 0
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 87630 (now: false), thunder time: 112140 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: true
    Stacktrace:
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:786)
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
    at java.lang.Thread.run(Thread.java:748)
     

    Attached Files:

Thread Status:
Not open for further replies.

Share This Page

Loading...