summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/OfflinePlayer.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/OfflinePlayer.java286
1 files changed, 286 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
new file mode 100644
index 000000000..f1bac2ae4
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
@@ -0,0 +1,286 @@
+package com.earth2me.essentials;
+
+import java.net.InetSocketAddress;
+import java.util.HashSet;
+import java.util.List;
+import org.bukkit.Location;
+import org.bukkit.Server;
+import org.bukkit.World;
+import org.bukkit.block.Block;
+import org.bukkit.entity.Arrow;
+import org.bukkit.entity.Egg;
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.Player;
+import org.bukkit.entity.Snowball;
+import org.bukkit.entity.Vehicle;
+import org.bukkit.inventory.ItemStack;
+import org.bukkit.inventory.PlayerInventory;
+import org.bukkit.util.Vector;
+
+
+public class OfflinePlayer implements Player
+{
+ private final String name;
+ private Location location = new Location(null, 0, 0, 0, 0, 0);
+
+ public OfflinePlayer(String name)
+ {
+ this.name = name;
+ }
+
+ public boolean isOnline()
+ {
+ return false;
+ }
+
+ public boolean isOp()
+ {
+ return false;
+ }
+
+ public void sendMessage(String string)
+ {
+ }
+
+ public String getDisplayName()
+ {
+ return name;
+ }
+
+ public void setDisplayName(String string)
+ {
+ }
+
+ public void setCompassTarget(Location lctn)
+ {
+ }
+
+ public InetSocketAddress getAddress()
+ {
+ return null;
+ }
+
+ public void kickPlayer(String string)
+ {
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public PlayerInventory getInventory()
+ {
+ return null;
+ }
+
+ public ItemStack getItemInHand()
+ {
+ return null;
+ }
+
+ public void setItemInHand(ItemStack is)
+ {
+ }
+
+ public int getHealth()
+ {
+ return 0;
+ }
+
+ public void setHealth(int i)
+ {
+ }
+
+ public Egg throwEgg()
+ {
+ return null;
+ }
+
+ public Snowball throwSnowball()
+ {
+ return null;
+ }
+
+ public Arrow shootArrow()
+ {
+ return null;
+ }
+
+ public boolean isInsideVehicle()
+ {
+ return false;
+ }
+
+ public boolean leaveVehicle()
+ {
+ return false;
+ }
+
+ public Vehicle getVehicle()
+ {
+ return null;
+ }
+
+ public Location getLocation()
+ {
+ return location;
+ }
+
+ public World getWorld()
+ {
+ return null;
+ }
+
+ public void teleportTo(Location lctn)
+ {
+ }
+
+ public void teleportTo(Entity entity)
+ {
+ }
+
+ public int getEntityId()
+ {
+ return -1;
+ }
+
+ public boolean performCommand(String string)
+ {
+ return false;
+ }
+
+ public boolean isPlayer()
+ {
+ return false;
+ }
+
+ public int getRemainingAir()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setRemainingAir(int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public int getMaximumAir()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setMaximumAir(int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public boolean isSneaking()
+ {
+ return false;
+ }
+
+ public void setSneaking(boolean bln)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void updateInventory()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void chat(String string)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public double getEyeHeight()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public double getEyeHeight(boolean bln)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public List<Block> getLineOfSight(HashSet<Byte> hs, int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public Block getTargetBlock(HashSet<Byte> hs, int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public List<Block> getLastTwoTargetBlocks(HashSet<Byte> hs, int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public int getFireTicks()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public int getMaxFireTicks()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setFireTicks(int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public Server getServer()
+ {
+ return Essentials.getStatic() == null ? null : Essentials.getStatic().getServer();
+ }
+
+ public Vector getMomentum()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setMomentum(Vector vector)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setVelocity(Vector vector)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public Vector getVelocity()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void damage(int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void damage(int i, Entity entity)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public Location getEyeLocation()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void sendRawMessage(String string) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+}