Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Entity could not teleport' message regardless of mob's leash status #5

Closed
RhythmicSys opened this issue Nov 22, 2022 · 6 comments · Fixed by #10
Closed

'Entity could not teleport' message regardless of mob's leash status #5

RhythmicSys opened this issue Nov 22, 2022 · 6 comments · Fixed by #10
Assignees
Labels
Enhancement New feature or request Resolved Issue/question has been addressed

Comments

@RhythmicSys
Copy link

I am not sure if this qualifies as a bug or a feature request- but if you teleport anywhere while near an entity, it will show the 'Entity could not teleport' message
image
It would be nice if it only displayed this message if the mob was leashed previously, or is a pet

@CoolLord22 CoolLord22 self-assigned this Nov 22, 2022
@CoolLord22 CoolLord22 added the Enhancement New feature or request label Nov 22, 2022
@CoolLord22
Copy link
Owner

CoolLord22 commented Nov 22, 2022

Thanks for the suggestion! The teleport error message actually is meant to just serve as a notification that a ‘teleportable’ entity was unable to be teleported due to a failed check (whether that be a permission error, blocked region, or if something went wrong with the teleporting event ran for the entity.

Just to double check, do you have any blocked regions set up, that teleporting entities into is disabled for? Because in that regard I believe the error message gets sent, which might be considered a bug; I will do some code checking to see if that needs to be redone.

If desired, I could split the message into two separate clauses; one that indicates a TP error (and would stay the same) and another for a failed perm check/blocked region (open to suggestions for what this message should say!)

EDIT: I think I do see what you’re saying though, I believe the message gets sent if an entity existed but was not allowed to be teleported, right? Maybe this could be replaced with a new message saying “An entity was left behind at xyz.” Main purpose of this was to let the user know an entity might have been forgotten, so they have a way of going back and getting it! I definitely can try to split it into a new message though, I think that might work better, once I’m back at my PC after break :)

@RhythmicSys
Copy link
Author

Yeah, the issue is it happens a lot, maybe it could be toggleable? The issue that comes up is mostly when trading with villagers or using mob farms, and teleporting back and forth from one place to another, which ends up kinda being spammy when you need to keep going back and forth for supplies 😅

2022-11-22.10-02-53.mp4
2022-11-22.10-08-21.mp4
#######################
# Config ##############
#######################
# Set this to "low" to reduce number of boot messages or to high, highest, extreme for more debugging info
verbosity: normal

#######################
# Should we check for updates? - set this to false if you don't want to be notified of new versions
update_checker: true

#######################
# Color log messages - disable if they annoy you
color_log_messages: true

#######################
# Radius for the area around the player
radius: 2

#######################
# World groups to prevent cross-flow of entities
world_groups:
- [world, world_nether]
- [world2, world2_nether]

#######################
# List of entities to allow the teleportation of, by default set to all
# Note, just because you specify an entity here, does not mean it will be teleported! The entity
# still has to be attached to a lead, and if it is not, then it will not TP!
#
# Note 2: these entities are taken from the Spigot Entity List enum, a file containing the entity
# values is generated by the plugin at known_EntityType.txt
# allowed_entities: [COW, PIG, CHICKEN, WOLF]
allowed_entities: [ANY]

#######################
# List of regions to deny teleporting animals into and out of. Requires world and region name separated by @
#
# The format is "worldName@regionName" where worldName is the name of world containing the regionName. Note if a 
# region cannot be found it will be logged in console so please check that the name and region are written correctly! 
#
# Ex. blocked_regions: ["world@region1", "world@region2"]
blocked_regions: []

#######################
# Message handling
#
# Set any message to "" to disable
use_prefix: true
prefix: "&7[&aOtherAnimalTeleport&7] "

fail_teleport: "&7An entity could not be teleported and is located near (&c%x&7, &c%y&7, &c%z&7)."

@CoolLord22
Copy link
Owner

2.2 (see above commits) adds new config option that can be disabled (just set to "")
Essentially, this will be sent when

  1. an entity type is set as allowed in the config and was found nearby, but was not leashed by the player
  2. an entity is tameable, but does not belonging to player
  3. a tamed entity is sitting (and can't be teleported)

Be sure to add this to your config!

entity_left: "&7An entity was left behind near (&c%x&7, &c%y&7, &c%z&7)."

Since this is still a beta release, it won't be out on Spigot yet (at least not until more features get added). Feel free to download and compile it (using maven) yourself! I have also uploaded a zipped file containing the jar file below, if that's easier. Let me know if you have any issues with this version! If this is not exactly what you were hoping for, please let me know and I can try to make some more changes. Thanks for requesting this, and if you have any other requests please feel free to open more tickets!

@CoolLord22
Copy link
Owner

@RhythmicSys Just wanted to follow up and check if this was what you expected :)

@RhythmicSys
Copy link
Author

Ah sorry about the late reply
Yes! That's exactly what I was looking for :3 thanks
The message doesn't update on /otheranimalteleport reload - have to restart
(As a side note- leaving a boat/minecart is counted as a teleport, so the 'entity left' message broadcasts then as well, unsure if that's intentional or not)

@CoolLord22
Copy link
Owner

(Reopening until 2.2 branch gets merged into master, issue will close itself at that time!)

As for the other two issues:

  • I'll look into why it doesn't save with the reload, that shouldn't be too big of an issue
  • The vehicle exiting does throw a teleport event, yes, I can make it ignore that entirely and maybe add it as a config option in case some servers need to include that check!

@CoolLord22 CoolLord22 reopened this Dec 7, 2022
@CoolLord22 CoolLord22 added the Resolved Issue/question has been addressed label Dec 28, 2022
@CoolLord22 CoolLord22 mentioned this issue Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Resolved Issue/question has been addressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants