summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-10-04 06:54:45 +0100
committerKHobbits <rob@khobbits.co.uk>2011-10-04 06:54:45 +0100
commit7a27be54f83ccd5646072a38ec7c86839cb33e17 (patch)
tree0312ee9ac171b8a3ab97bafa507c40c7fd1d50b2
parent6ce07931341245b6b5a5b225838dc62f1a6c18a2 (diff)
downloadEssentials-7a27be54f83ccd5646072a38ec7c86839cb33e17.tar
Essentials-7a27be54f83ccd5646072a38ec7c86839cb33e17.tar.gz
Essentials-7a27be54f83ccd5646072a38ec7c86839cb33e17.tar.lz
Essentials-7a27be54f83ccd5646072a38ec7c86839cb33e17.tar.xz
Essentials-7a27be54f83ccd5646072a38ec7c86839cb33e17.zip
Updating to CB 1240
Bukkit 875
-rw-r--r--Essentials/src/com/earth2me/essentials/FakeWorld.java18
-rw-r--r--Essentials/src/com/earth2me/essentials/OfflinePlayer.java15
-rw-r--r--Essentials/src/com/earth2me/essentials/PlayerWrapper.java12
-rw-r--r--Essentials/test/com/earth2me/essentials/FakeServer.java73
4 files changed, 110 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/FakeWorld.java b/Essentials/src/com/earth2me/essentials/FakeWorld.java
index 8894e8df1..0b5d68be1 100644
--- a/Essentials/src/com/earth2me/essentials/FakeWorld.java
+++ b/Essentials/src/com/earth2me/essentials/FakeWorld.java
@@ -5,6 +5,7 @@ import java.util.UUID;
import org.bukkit.BlockChangeDelegate;
import org.bukkit.Chunk;
import org.bukkit.ChunkSnapshot;
+import org.bukkit.Difficulty;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.TreeType;
@@ -437,4 +438,21 @@ public class FakeWorld implements World
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
+ public Difficulty getDifficulty()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDifficulty(Difficulty difficulty)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getSeaLevel()
+ {
+ 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 07092d0bb..1b0058f24 100644
--- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
+++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
@@ -695,7 +695,7 @@ public class OfflinePlayer implements Player
{
throw new UnsupportedOperationException("Not supported yet.");
}
-
+
@Override
public Location getBedSpawnLocation()
{
@@ -713,5 +713,16 @@ public class OfflinePlayer implements Player
{
throw new UnsupportedOperationException("Not supported yet.");
}
-
+
+ @Override
+ public void setPlayerListName(String name)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getPlayerListName()
+ {
+ 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 2b6dd92ad..4b998af47 100644
--- a/Essentials/src/com/earth2me/essentials/PlayerWrapper.java
+++ b/Essentials/src/com/earth2me/essentials/PlayerWrapper.java
@@ -744,4 +744,16 @@ public class PlayerWrapper implements Player
base.setSprinting(bln);
}
+ @Override
+ public void setPlayerListName(String name)
+ {
+ base.setPlayerListName(name);
+ }
+
+ @Override
+ public String getPlayerListName()
+ {
+ return base.getPlayerListName();
+ }
+
}
diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java
index ac5636c61..2344c4513 100644
--- a/Essentials/test/com/earth2me/essentials/FakeServer.java
+++ b/Essentials/test/com/earth2me/essentials/FakeServer.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials;
import com.avaje.ebean.config.ServerConfig;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -14,7 +15,9 @@ import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.World.Environment;
+import org.bukkit.WorldCreator;
import org.bukkit.command.CommandSender;
+import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.generator.ChunkGenerator;
@@ -43,41 +46,48 @@ public class FakeServer implements Server
return "1.0";
}
+ @Override
public Player[] getOnlinePlayers()
{
return players.toArray(new Player[0]);
}
-
+
public void setOnlinePlayers(List<Player> players)
{
this.players = players;
}
+ @Override
public int getMaxPlayers()
{
return 100;
}
+ @Override
public int getPort()
{
return 25565;
}
+ @Override
public String getIp()
{
return "127.0.0.1";
}
+ @Override
public String getServerName()
{
return "Test Server";
}
+ @Override
public String getServerId()
{
return "Test Server";
}
+ @Override
public int broadcastMessage(String string)
{
int i = 0;
@@ -89,11 +99,19 @@ public class FakeServer implements Server
return i;
}
+ @Override
public String getUpdateFolder()
{
return "update";
}
+ @Override
+ public File getUpdateFolderFile()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
public Player getPlayer(String string)
{
for (Player player : players)
@@ -106,6 +124,7 @@ public class FakeServer implements Server
return null;
}
+ @Override
public List<Player> matchPlayer(String string)
{
List<Player> matches = new ArrayList<Player>();
@@ -119,15 +138,17 @@ public class FakeServer implements Server
return matches;
}
+ @Override
public PluginManager getPluginManager()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public BukkitScheduler getScheduler()
{
- return new BukkitScheduler() {
-
+ return new BukkitScheduler()
+ {
@Override
public int scheduleSyncDelayedTask(Plugin plugin, Runnable r, long l)
{
@@ -215,16 +236,19 @@ public class FakeServer implements Server
};
}
+ @Override
public ServicesManager getServicesManager()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public List<World> getWorlds()
{
return worlds;
}
+ @Override
public World createWorld(String string, Environment e)
{
World w = new FakeWorld(string, e);
@@ -232,6 +256,7 @@ public class FakeServer implements Server
return w;
}
+ @Override
public World createWorld(String string, Environment e, long l)
{
World w = new FakeWorld(string, e);
@@ -239,45 +264,54 @@ public class FakeServer implements Server
return w;
}
+ @Override
public World getWorld(String string)
{
for (World world : worlds)
{
- if (world.getName().equalsIgnoreCase(string)) {
+ if (world.getName().equalsIgnoreCase(string))
+ {
return world;
}
}
return null;
}
+ @Override
public void reload()
{
}
+ @Override
public Logger getLogger()
{
return Logger.getLogger("Minecraft");
}
+ @Override
public PluginCommand getPluginCommand(String string)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void savePlayers()
{
}
+ @Override
public boolean dispatchCommand(CommandSender cs, String string)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void configureDbConfig(ServerConfig sc)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean addRecipe(Recipe recipe)
{
throw new UnsupportedOperationException("Not supported yet.");
@@ -287,7 +321,7 @@ public class FakeServer implements Server
{
players.add(base1);
}
-
+
public OfflinePlayer createPlayer(String name, IEssentials ess)
{
OfflinePlayer player = new OfflinePlayer(name, ess);
@@ -295,41 +329,55 @@ public class FakeServer implements Server
return player;
}
+ @Override
public World createWorld(String string, Environment e, ChunkGenerator cg)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public World createWorld(String string, Environment e, long l, ChunkGenerator cg)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
+ public World createWorld(WorldCreator creator)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
public boolean unloadWorld(String string, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean unloadWorld(World world, boolean bln)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public Map<String, String[]> getCommandAliases()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public int getSpawnRadius()
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public void setSpawnRadius(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public boolean getOnlineMode()
{
throw new UnsupportedOperationException("Not supported yet.");
@@ -340,6 +388,7 @@ public class FakeServer implements Server
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
public World getWorld(UUID uuid)
{
throw new UnsupportedOperationException("Not supported yet.");
@@ -454,7 +503,19 @@ public class FakeServer implements Server
}
@Override
- public void setDefaultGameMode(GameMode gm)
+ public void setDefaultGameMode(GameMode gamemode)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public ConsoleCommandSender getConsoleSender()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Set getOperators()
{
throw new UnsupportedOperationException("Not supported yet.");
}