Remove the ability to teleport while being mountedFixed

There is an exploit which players can use to prevent losing their items when teleporting from a mounted position.

Adding this check to the CheckPlayer method and adding the appropriate lang message would solve this.

            if (player.isMounted)
            {
                return "TPMounted";
            }​
Sorry, remove your implemtation and find the method "CheckPlayer" and replace it with this.

        private string CheckPlayer(BasePlayer player, bool build = false, bool craft = false)
        {
            var onship = player.GetComponentInParent<CargoShip>();
            var onballoon = player.GetComponentInParent<HotAirBalloon>();
            if (!player.IsAlive())
            {
                return "TPDead";
            }

            if (player.IsWounded())
            {
                return "TPWounded";
            }

            if (!build && !player.CanBuild())
            {
                return "TPBuildingBlocked";
            }

            if (player.IsSwimming())
            {
                return "TPSwimming";
            }

            if (player.isMounted)
            {
                return "TPMounted";
            }

            if (onship)
            {
                return "TPCargoShip";
            }

            if (onballoon)
            {
                return "TPHotAirBalloon";
            }

            if (player.InSafeZone())
            {
                return "TPSafeZone";
            }

            if (!craft && player.inventory.crafting.queue.Count > 0)
            {
                return "TPCrafting";
            }

            return null;
        }​
In response to ctv ():
Sorry, remove your implemtation and find the method "CheckPlayer" and replace it with this.
i did it but i have another compiling error output http://prntscr.com/le5k6d i have never seen this one

thk again bro u do a great job ;D
I am not clear on why this is a problem.
In response to rfc1920 ():
I am not clear on why this is a problem.
"There is an exploit which players can use to prevent losing their items when teleporting from a mounted position."

Is there a reason for them to teleport while mounted? Likely not.
I read that.  I'm still not sure why it's an issue.  I suppose it could be made as an option to block it.  But why is it an exploit?
In response to rfc1920 ():
I read that.  I'm still not sure why it's an issue.  I suppose it could be made as an option to bloc...
I wouldn't say it is an exploit, rather an unfortunate and frustrating issue if players are losing items.
I wasn't aware that anyone was losing items when using this plugin.  What I read seemed the other way 'round.
In response to rfc1920 ():
I wasn't aware that anyone was losing items when using this plugin.  What I read seemed the other wa...
Ah yeah, misread it too. :P
Sorry for not explaining in detail, players can teleport from a mounted position and the die, their corpse will teleport to the mounted object they teleported from and will not be where they died.
I am sorry but that explanation confuses the crap out of me.? I have teleprted from boats to /sethome without losing anything but i cant teleport back because the boat might have moved, If i die after teleporting the corpse stays where it is, an example of this happened yesterday, i tp'ed to a saved point and was instantly killed by a bear, my corpse/loot stayed there not where i had teleported from, It has happened to me numerous times including forgetting to remove old save points and using one which found me 50+ ft off the ground , But my corpse was where I died (hit the ground) not where i teleported from,
I just did an experiment:  Place chair, sit in chair, /home 1, got the message about being teleported, woke up still in chair.  So, it may be more appropriate to let the player know that they can't teleport while mounted after all.  Not because they die at the target but rather because they don't teleport at all.

EDIT: However, on another server, I tried the same thing and the whole process worked just fine.  I teleported from a chair to /town and then /tpb back to the chair...
my experience is about 3 months ago, if a player sit in a chair and use /home or /town he was teleporting to his home point or town, and he can run use things and shoot and and.. BUT his physical body was in the chair, so he was invisible. if he die through fall or something like this, yes his body was at the chair again. so we blocked it now around over 3 months ago. maybe rust fix something? so it didnt happend again? we didnt test it anymore.
I have seen something like that happen with Portals.  The player would be duplicated at least for awhile.

Merged post

I plan to add this, but have some weird errors to hopefully clear up first.

Merged post

Since this was apparently an exploit on some servers, I went ahead and added a block for seated players to 1.0.33.
Locked automatically