CoolLord22 / OtherAnimalTeleport

Mob teleportation plugin allowing users to take any leashed or tamed animals in their proximity while teleporting!
https://www.spigotmc.org/resources/mob-teleporter-otheranimalteleport.63497/
GNU General Public License v3.0
6 stars 1 forks source link

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

Closed RhythmicSys closed 1 year ago

RhythmicSys commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 😅

https://user-images.githubusercontent.com/45906780/203389958-5c62de86-3d42-429a-b309-633a3adc56aa.mp4

https://user-images.githubusercontent.com/45906780/203389989-68a3be37-f459-4cdc-89d0-498c495e453a.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 commented 1 year ago

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 commented 1 year ago

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

RhythmicSys commented 1 year ago

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 commented 1 year ago

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

As for the other two issues: