1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fake Player Running On Walls [Fun Plugin Idea].

Discussion in 'Plugins/Codes' started by ExtendedHorizons, Dec 6, 2015.

  1. ExtendedHorizons

    ExtendedHorizons Member

    Joined:
    Oct 4, 2014
    Messages:
    206
    Likes Received:
    166
    Trophy Points:
    43
    Gender:
    Male
    Occupation:
    Drawing 24/7
    Location:
    Utah
    Home Page:
    I have a plugin Idea that I've somewhat tested out to see if it works properly, and from what I can tell it does. So the concept is that a command or event creates a fake entity player at a certain location with a wall (PacketPlayOutNamedEntity & PacketPlayOutBed). Then you could teleport the real player to safe area. Then set the players camera to fake players (PacketPlayOutEntityCamera? I think). Also if you use PacketPlayOutBed (makes a player in the position they are in when they sleep) they can only face upwards from what I can tell. And If you don't want the bed to be "visible" set its y to 1 then use PacketPlayOutEntityMove.Relative to the y level you want it to be at. So the main problem that I cant find out a good way to get the way the player is moving in so that you can then move the fake player in that direction as well. Maybe you can do it by putting a player on a minecart or something xD. You can move the fake player by using PacketPlayOutEntityMove.Relative as I mentioned earlier, at least i'm pretty sure if thats not the right packet name sorry. But anyways I thought this was a cool idea that people could do if they wanted to, I would but I'm working on a much larger project . If you guys do it feel free to show it here!
    public static Location lowestLocation(org.bukkit.entity.Entity entity) {
    for (int i = (int) Math.round(entity.getLocation().getY()); i > 1; i--) {
    org.bukkit.World world = entity.getWorld();
    Location loc = new Location(world, entity.getLocation().getX(), i, entity.getLocation().getZ());
    if (!loc.getBlock().getType().equals(org.bukkit.Material.AIR) && !loc.getBlock().isLiquid()) {
    Location loc1 = loc.add(0,-1,0);
    return loc1;
    }
    }
    return null;
    }
     
  2. ExtendedHorizons

    ExtendedHorizons Member

    Joined:
    Oct 4, 2014
    Messages:
    206
    Likes Received:
    166
    Trophy Points:
    43
    Gender:
    Male
    Occupation:
    Drawing 24/7
    Location:
    Utah
    Home Page:
    Sorry if the code in the spoiler is a bit meh, this was made a while ago.
     
  3. johnyestaloca

    johnyestaloca Member

    Joined:
    Oct 12, 2014
    Messages:
    1,171
    Likes Received:
    2,118
    Trophy Points:
    113
    Gender:
    Male
    Location:
    The land of the holy icecreams