ZHorse

ZHorse

10.4k Downloads

Bug Command Issues & Clones

Midnight9746 opened this issue ยท 5 comments

commented

Bug report

Server Version: Spigot 1.12.2
ZH Version: 1.6.9 (the update recently posted)
Issue is was the same at first like in #82
Possible #68 repeat

What are you trying to do ?

Use /zh here and have the horse tp to stable on logout.

I've set the default 'stable' settings to:

  # Set to true to use the location defined by default-stable-location for
  # horses whose stable has not been defined when using /zh stable go or
  # when a player logout and send-to-stable-on-owner-logout is enabled.
  use-default-stable: true
  
  # Set to true to send horses to stable when their owner logout.
  # This only works if a regular or default stable has been defined.
  # Leashing horses and enabling block-leashed-teleport is recommended.
  send-to-stable-on-owner-logout: true

  default-stable-location:
    world: world
    x: 123
    y: 73
    z: -1977

And it didn't send the horse to the stables. I kept changing the cords values, while it kept saying 'reloaded with errors', so restarted the server with everything remove to regen and the problem I'm getting (and was getting before the wipe) was that the horse would start with "'Name' could not be found on the server" so I tried /zh free/claim, /zh reload, and it let me tp it. Then it turned invisible, where I couldn't see it unless I left the area and tped back. But the server said their was a horse in front of me as /zh tp, tped me to the horse and action health said it's HP. It also was rendering at it's old area. I tried toggling the tp method and that seemed to work but then now no matter what that's on, it tps the horse to me now, but it makes a copy of the horse with no gear, keeping the old one and making new ones each /zh tp. Another thing that it did after the regen was it does tp the horse to the stable like it should, but it's tping another horse clone.

So summary:

  • set up stables
  • horses didn't tp
  • horses couldn't be found
  • I tried freeing and reloading
  • horses worked
  • horses went invisible
  • I regened ZH
  • horses worked and tped to the stables but is now cloning itself
  • After a moment, the clones loses their names and the original horse keeps it's name, but is not the main
  • restarts stable horse (last one /zh tp'ed) despawns

I'm not sure if I screwed up the config, so here's this:

Config:
https://pastebin.com/Hf9L8Jcm

Additional things:

  • /zh list and /zh info won't work, along with some other commands
  • 3 horses, same type https://imgur.com/q4AmWla
  • I got 2 of them to show names https://imgur.com/rcy1uVc
  • As you can see from this https://imgur.com/0Bjf6l7 there's two horses that are named Zigsa (ignore the health, that goes away after some time, and you know they are the same too because the health are at the same mark) The diamond one in the background is the original.
  • By this one, https://imgur.com/U81ModM I'm showing that the armor less on lost it's name
  • This guy is at the stables but nameless https://imgur.com/3med71B, and he's marked as the default horse even though he's the clone. Each clone becomes the new horse which I think is what's bugging out /zh list.

What is the expected behavior ?

This:

  • Stables get set
  • Horses can then freely tp to it when the owner leaves
  • Owners can freely call on the horse anytime and without the horse 'no longer on the server' error

What is the actual behavior ?

This:

  • Stables get set (current)
  • Horses go invisible (at first)
  • Horses clone themselves, lose their name, commands bug, & become 'null' (can't be found)

How to reproduce the bug ?

Not sure you have this bug since it be the first thing you notice but,

  • set up stables
  • tp the horse
  • oh hey a bug!

Console output

Log:
https://pastebin.com/YtXK9ExC

Plugins:
https://imgur.com/aUcn9bP You can also see that the horse 'Zigsa' can't be found
https://imgur.com/Y1cN197

Note: I don't think it's a plugin conflict but it's there just incase, and no worldguard is not what's messing with it. It worked just fine before I tried using stables

commented

I think that all these issues are related to the fact that ZHorse cannot manage to find the entity corresponding to your horse when it needs to be teleported (either by /zh tp, here, stable or send-to-stable-on-owner-logout). For example, horse duplication happens when the horse to teleport cannot be found and thus removed by ZHorse.

If you horse becomes invisible, this might indeed be a similar case to that of issue #82, which was fixed by its author but I don't know how.

As I do not experience this issue, there are high chances that it is caused by an incompatibility with another of your plugins. Usually, such plugins are WG-like (area protection) or ZH-like (entity management).

The easiest way for both of us to fix this is that you set up a test server with only ZHorse installed and try to reproduce the issue. If it works fine, iteratively add your other plugins until it no longer works.

PS: There is no issue related to ZHorse is your console output

commented

Hmm, I wonder if it's worldguard, I have regions set up in every walkable area but horses were originally able to warp there. if it's not worldguard, my I'm not sure what it would be other than the health plugins. I'll try removing plugins then.

commented

I tried adding / removing plugins, and this:

  • Just ZH, didn't load
  • Added vault worked (aka now loaded) but didn't let me use /zh claim or anything
  • Added groupmanger (with permissions), it worked, but /zh list still doesn't and the horse still copys itself.

The thing is, it's just those 3 plugins now... :/

  • Deleted file folders completely (leaving ZH folder alone) and running with just the 3 plugins
  • Failed, same errors.

So at this point it's either the Spigot server's build or something in the config/language. In the meantime, I'm going to update the build.

Running this on my pc, so it's not ran with the exact same as the server but, here's this:
When trying to use /Zh list
https://pastebin.com/urmWM22r

commented

I fixed it, the problem came down to the server's build version. The fix was using the BuildTool thing to compile the latest build. Not only did I fix it, but I'm finally up to date! XD

  • /zh list works
  • /zh here works properly
  • Stables work as intended

I originally posted this just incase it was the plugin. Sorry to waste time.

Edited - Forgot to lock issue