Skellett error

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Jordan

Member
Jan 25, 2017
190
12
18
25
Scotland
When using most of the entity features you get an internal error?

https://hastebin.com/vumevewute.vbs

[04:01:49] [Server thread/ERROR]: #!#! Version Information:
[04:01:49] [Server thread/ERROR]: #!#! Skript: 2.2-dev23
[04:01:49] [Server thread/ERROR]: #!#! Bukkit: 1.10.2-R0.1-SNAPSHOT
[04:01:49] [Server thread/ERROR]: #!#! Minecraft: 1.10.2

Using the latest release of skellett from your github, tried all version and none work.

Thanks. @LimeGlass
 
That errors telling me that you're trying to get the age of a player. You can't do that. Make some checks to go around it if you're looping all entities for example.
 
A player is still considered an entity. Use
code_language.skript:
if loop-entity is not a player:

Also I will look into adding a checker for this in Skellett
 
A player is still considered an entity. Use
code_language.skript:
if loop-entity is not a player:

Also I will look into adding a checker for this in Skellett
I'm not looping anything? I'm spawning a zombie in and trying to find return the age of the zombie using age of last spawned entity however i still get the same error
 
I'm not looping anything? I'm spawning a zombie in and trying to find return the age of the zombie using age of last spawned entity however i still get the same error
My guess is that you have Citizens or some sort of Npc plugin installed. Correct?

Try
Code:
last spawned zombie
 
My guess is that you have Citizens or some sort of Npc plugin installed. Correct?

Try
Code:
last spawned zombie
I do not have any npc plugins installed no.

and last spawned zombie also returns the same error or well it says this now

code_language.skript:
[08:14:44] [Server thread/ERROR]: #!#! java.lang.ClassCastException: org.bukkit.craftbukkit.v1_10_R1.entity.CraftZombie cannot be cast to org.bukkit.entity.Ageable
[08:14:44] [Server thread/ERROR]: #!#!     at com.gmail.thelimeglass.Expressions.ExprAge.get(ExprAge.java:47)
[08:14:44] [Server thread/ERROR]: #!#!     at com.gmail.thelimeglass.Expressions.ExprAge.get(ExprAge.java:1)
 
I do not have any npc plugins installed no.

and last spawned zombie also returns the same error or well it says this now

code_language.skript:
[08:14:44] [Server thread/ERROR]: #!#! java.lang.ClassCastException: org.bukkit.craftbukkit.v1_10_R1.entity.CraftZombie cannot be cast to org.bukkit.entity.Ageable
[08:14:44] [Server thread/ERROR]: #!#!     at com.gmail.thelimeglass.Expressions.ExprAge.get(ExprAge.java:47)
[08:14:44] [Server thread/ERROR]: #!#!     at com.gmail.thelimeglass.Expressions.ExprAge.get(ExprAge.java:1)
Can you send the skript code you are using?
 
code_language.skript:
command /spawnmob:
    trigger:
        spawn 1 of zombie
        broadcast "%age of last spawned zombie%"
I just tested this and fixed it so this error doesn't happen. Apparently Zombies aren't contained in the Ageabe section in Spigot. They don't use age. They use their own Zombie class to change the age of them. Very strange but it's spigot, what can you do.

I will add a fix for this in the next version of Skellett

You will need to use these syntax in the next version to get the age of a zombie

Code:
[(make|set)] [entity] %entity% [to] [a[n]] (1¦baby|2¦adult)
#and
[entity] %entity% (1¦is|2¦is(n't| not)) [a[n]] adult
 
Last edited by a moderator:
I just tested this and fixed it so this error doesn't happen. Apparently Zombies aren't contained in the Ageabe section in Spigot. They don't use age. They use their own Zombie class to change the age of them. Very strange but it's spigot, what can you do.

I will add a fix for this in the next version of Skellett

You will need to use these syntax in the next version to get the age of a zombie

Code:
[(make|set)] [entity] %entity% [to] [a[n]] (1¦baby|2¦adult)
#and
[entity] %entity% (1¦is|2¦is(n't| not)) [a[n]] adult
Can you also look into uuid of entity? i don't get an error however when i try use uuid of last spawned entity or uuid of zombie ect. it returns <none>
 
Can you also look into uuid of entity? i don't get an error however when i try use uuid of last spawned entity or uuid of zombie ect. it returns <none>
Skellett already has entity UUID. I will test a few things and then release a bug fix update.

Here is the syntax for Entity UUID

code_language.skript:
[skellett] entity (uuid|[universal] unique id) of [entity] %entity%

[entity] %entity%'s entity (uuid|[universal] unique id)
 
PigZombies extend off of the Zombie class as well, so you can just use something like this:
Java:
if (entity instanceof Zombie){
    ((Zombie)entity).setAdult();
}
 
PigZombies extend off of the Zombie class as well, so you can just use something like this:
Java:
if (entity instanceof Zombie){
    ((Zombie)entity).setAdult();
}
I just posted the update.

I used
code_language.skript:
if (Ageable.class.isAssignableFrom(entity.getSingle(e).getClass())) {
Then test for zombie stuff if else. To support future versions aswell.

@Jordan You can check out the fixed version here https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/update?update=50
 
Status
Not open for further replies.