MyPetORG / MyPet

🐕 Extensive pet plugin for Bukkit/Spigot
https://www.spigotmc.org/resources/mypet.12725/
GNU Lesser General Public License v3.0
183 stars 99 forks source link

Issue with SpigotPatch #465

Closed Darkool closed 9 years ago

Darkool commented 9 years ago

Hello, Im using spigot patch, and I have an issue when I capture a mob, my minecraft crash and show this

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Byte at xy.a(SourceFile:92) at wu.l(SourceFile:71) at wu.j_(SourceFile:156) at cqv.a(SourceFile:95) at cqz.a(SourceFile:40) at cqz.a(SourceFile:15) at cpt.a(SourceFile:294) at cpt.a(SourceFile:259) at cpt.a(SourceFile:226) at ckn.a(RenderGlobal.java:776) at cjh.a(EntityRenderer.java:1576) at cjh.a(EntityRenderer.java:1469) at cjh.b(EntityRenderer.java:1254) at bss.at(SourceFile:906) at bss.a(SourceFile:317) at net.minecraft.client.main.Main.main(SourceFile:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27)


Entity Type: Pig (acc)
Entity ID: 61
Entity Name: §bCerdo
Entity's Exact location: 339,94, 157,00, -233,66
Entity's Block location: 339,00,157,00,-234,00 - World: (339,157,-234), Chunk: (at 3,9,6 in 21,-15; contains blocks 336,0,-240 to 351,255,-225), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Entity's Momentum: 0,00, -0,08, 0,00
Entity's Rider: ~~ERROR~~ NullPointerException: null                          <------------------
Entity's Vehicle: ~~ERROR~~ NullPointerException: null                      <------------------------

Stacktrace: at cem.a(WorldClient.java:399) at bss.b(SourceFile:2278) at bss.a(SourceFile:326) at net.minecraft.client.main.Main.main(SourceFile:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

can you help me please? Im using SPIGOT protocol hack(1.7X-1.8X)

zerafox commented 9 years ago

Version of MyPet you are running on your server? And a Server Error Log is more helpful than your Client's crash report when dealing with a Server Plugin. ;P

Darkool commented 9 years ago

Im using 1.2.0 version, and I uploaded client's crash report because server not show errors on console.

zerafox commented 9 years ago

If you're running a 1.8 client, it's a good chance that's causing it. I would also think that MyPet running on a protocol hacked server would be an issue in itself too and I feel it's safe to bet that this issue wouldn't be supported.

If you're running a 1.8 version client, try playing on a 1.7 client instead. If that resolves your issue, than you're all set. That's my bet anyway. If the problem persists, your other option is to stop using the protocol hacked server option and use an actual 1.8 or 1.7 server version.

scomans commented 9 years ago

This is a problem with the protocol hack. 1.8 clients need other datatypes for certain fields than 1.7 and the hacky protocol Server thing can't translate them correctly. MyPet is written for either one of the versions and will not work for both (unfortunately).

Darkool commented 9 years ago

Ok, thanks, another question, it's possible disable pet on certain region?, I know that I can set flag to not allowed pets atack, but I would disable this on certain pvp zones, thanks Mypets have an api?

scomans commented 9 years ago

Out of the box this is not possible.

It has some sort of API and you can remove the pets when a player enters an area but there is no (good) way to prevent them from calling them again.

zerafox commented 9 years ago

Wouldn't say for example having a flag designed to check and cancel that "call event" that is run when a player uses the command to call their pet work?

Darkool commented 9 years ago

well Im will use that for hide pet when a player enters an area and will add a flag cmd-block, to block call command, thanks

scomans commented 9 years ago

Would a call event be something you would use?

Darkool commented 9 years ago

petsendaway event

scomans commented 9 years ago

You mean MyPetCallEvent?

Darkool commented 9 years ago

yes, well I need to show all code to find events that I can use. Else I can use player.performcommand ("psa") on enter area.

scomans commented 9 years ago

I added the MyPetCallEvent and you can find the events here: https://github.com/xXKeyleXx/MyPet/tree/master/src/main/java/de/Keyle/MyPet/api

You have to use the latest build in order to use the MyPetCallEvent

Darkool commented 9 years ago

Okey, thanks a lot ;)