From 29a15dfe18913b160a615581c0dec9ab1293f090 Mon Sep 17 00:00:00 2001 From: ementalo Date: Sun, 17 Jul 2011 22:31:12 +0100 Subject: CB #1000 Bukkit #700 --- .../src/com/earth2me/essentials/Essentials.java | 2 +- .../src/com/earth2me/essentials/FakeWorld.java | 30 +++++++++- .../src/com/earth2me/essentials/OfflinePlayer.java | 65 +++++++++++++++++++++ .../src/com/earth2me/essentials/PlayerWrapper.java | 64 ++++++++++++++++++++ .../test/com/earth2me/essentials/FakeServer.java | 6 ++ lib/bukkit-0.0.1-SNAPSHOT.jar | Bin 2698682 -> 2723856 bytes lib/craftbukkit-0.0.1-SNAPSHOT.jar | Bin 7710866 -> 8505020 bytes 7 files changed, 165 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index a7252b1c5..de51196a6 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -46,7 +46,7 @@ import org.bukkit.plugin.java.*; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 974; + public static final int BUKKIT_VERSION = 1000; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/Essentials/src/com/earth2me/essentials/FakeWorld.java b/Essentials/src/com/earth2me/essentials/FakeWorld.java index 976566704..7f5acae03 100644 --- a/Essentials/src/com/earth2me/essentials/FakeWorld.java +++ b/Essentials/src/com/earth2me/essentials/FakeWorld.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import java.util.List; +import java.util.UUID; import org.bukkit.BlockChangeDelegate; import org.bukkit.Chunk; import org.bukkit.ChunkSnapshot; @@ -8,6 +9,7 @@ import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.TreeType; import org.bukkit.World; +import org.bukkit.block.Biome; import org.bukkit.block.Block; import org.bukkit.entity.Arrow; import org.bukkit.entity.Boat; @@ -392,7 +394,33 @@ public class FakeWorld implements World throw new UnsupportedOperationException("Not supported yet."); } - public long getUID() + public UUID getUID() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public Block getHighestBlockAt(int i, int i1) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public Block getHighestBlockAt(Location lctn) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + + public Biome getBiome(int i, int i1) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public double getTemperature(int i, int i1) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public double getHumidity(int i, int i1) { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index ff0b73fbd..1e15c30a0 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -3,6 +3,7 @@ package com.earth2me.essentials; import java.net.InetSocketAddress; import java.util.HashSet; import java.util.List; +import java.util.Set; import java.util.UUID; import org.bukkit.Achievement; import org.bukkit.Effect; @@ -23,6 +24,10 @@ import org.bukkit.entity.Vehicle; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; +import org.bukkit.permissions.Permission; +import org.bukkit.permissions.PermissionAttachment; +import org.bukkit.permissions.PermissionAttachmentInfo; +import org.bukkit.plugin.Plugin; import org.bukkit.util.Vector; @@ -513,4 +518,64 @@ public class OfflinePlayer implements Player { throw new UnsupportedOperationException("Not supported yet."); } + + public boolean isPermissionSet(String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public boolean isPermissionSet(Permission prmsn) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public boolean hasPermission(String string) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public boolean hasPermission(Permission prmsn) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public PermissionAttachment addAttachment(Plugin plugin) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln, int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public PermissionAttachment addAttachment(Plugin plugin, int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public void removeAttachment(PermissionAttachment pa) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public void recalculatePermissions() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public Set getEffectivePermissions() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public void setOp(boolean bln) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/PlayerWrapper.java b/Essentials/src/com/earth2me/essentials/PlayerWrapper.java index 99ade90ce..8acd7fed6 100644 --- a/Essentials/src/com/earth2me/essentials/PlayerWrapper.java +++ b/Essentials/src/com/earth2me/essentials/PlayerWrapper.java @@ -7,6 +7,10 @@ import org.bukkit.block.Block; import org.bukkit.entity.*; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.inventory.*; +import org.bukkit.permissions.Permission; +import org.bukkit.permissions.PermissionAttachment; +import org.bukkit.permissions.PermissionAttachmentInfo; +import org.bukkit.plugin.Plugin; import org.bukkit.util.Vector; public class PlayerWrapper implements Player @@ -560,4 +564,64 @@ public class PlayerWrapper implements Player { base.resetPlayerTime(); } + + public boolean isPermissionSet(String string) + { + return base.isPermissionSet(string); + } + + public boolean isPermissionSet(Permission prmsn) + { + return base.isPermissionSet(prmsn); + } + + public boolean hasPermission(String string) + { + return base.hasPermission(string); + } + + public boolean hasPermission(Permission prmsn) + { + return base.hasPermission(prmsn); + } + + public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln) + { + return base.addAttachment(plugin, string, bln); + } + + public PermissionAttachment addAttachment(Plugin plugin) + { + return base.addAttachment(plugin); + } + + public PermissionAttachment addAttachment(Plugin plugin, String string, boolean bln, int i) + { + return base.addAttachment(plugin, string, bln, i); + } + + public PermissionAttachment addAttachment(Plugin plugin, int i) + { + return base.addAttachment(plugin, i); + } + + public void removeAttachment(PermissionAttachment pa) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + public void recalculatePermissions() + { + base.recalculatePermissions(); + } + + public Set getEffectivePermissions() + { + return base.getEffectivePermissions(); + } + + public void setOp(boolean bln) + { + base.setOp(bln); + } } diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java index 1d2ddd9c1..a8e8dd89b 100644 --- a/Essentials/test/com/earth2me/essentials/FakeServer.java +++ b/Essentials/test/com/earth2me/essentials/FakeServer.java @@ -4,6 +4,7 @@ import com.avaje.ebean.config.ServerConfig; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.UUID; import java.util.logging.Logger; import org.bukkit.Location; import org.bukkit.Server; @@ -244,4 +245,9 @@ public class FakeServer implements Server { throw new UnsupportedOperationException("Not supported yet."); } + + public World getWorld(UUID uuid) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/lib/bukkit-0.0.1-SNAPSHOT.jar b/lib/bukkit-0.0.1-SNAPSHOT.jar index e6adbd697..011a54e63 100644 Binary files a/lib/bukkit-0.0.1-SNAPSHOT.jar and b/lib/bukkit-0.0.1-SNAPSHOT.jar differ diff --git a/lib/craftbukkit-0.0.1-SNAPSHOT.jar b/lib/craftbukkit-0.0.1-SNAPSHOT.jar index f66289350..7aff0e06c 100644 Binary files a/lib/craftbukkit-0.0.1-SNAPSHOT.jar and b/lib/craftbukkit-0.0.1-SNAPSHOT.jar differ -- cgit v1.2.3