Updating to CB 1240

Bukkit 875
This commit is contained in:
KHobbits 2011-10-04 06:54:45 +01:00
parent aa0935c64b
commit 9f4d79a756
6 changed files with 110 additions and 8 deletions

View file

@ -5,6 +5,7 @@ import java.util.UUID;
import org.bukkit.BlockChangeDelegate; import org.bukkit.BlockChangeDelegate;
import org.bukkit.Chunk; import org.bukkit.Chunk;
import org.bukkit.ChunkSnapshot; import org.bukkit.ChunkSnapshot;
import org.bukkit.Difficulty;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.TreeType; import org.bukkit.TreeType;
@ -437,4 +438,21 @@ public class FakeWorld implements World
throw new UnsupportedOperationException("Not supported yet."); 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.");
}
} }

View file

@ -714,4 +714,15 @@ public class OfflinePlayer implements Player
throw new UnsupportedOperationException("Not supported yet."); 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.");
}
} }

View file

@ -744,4 +744,16 @@ public class PlayerWrapper implements Player
base.setSprinting(bln); base.setSprinting(bln);
} }
@Override
public void setPlayerListName(String name)
{
base.setPlayerListName(name);
}
@Override
public String getPlayerListName()
{
return base.getPlayerListName();
}
} }

View file

@ -1,6 +1,7 @@
package com.earth2me.essentials; package com.earth2me.essentials;
import com.avaje.ebean.config.ServerConfig; import com.avaje.ebean.config.ServerConfig;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -14,7 +15,9 @@ import org.bukkit.Location;
import org.bukkit.Server; import org.bukkit.Server;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.World.Environment; import org.bukkit.World.Environment;
import org.bukkit.WorldCreator;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand; import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator;
@ -43,6 +46,7 @@ public class FakeServer implements Server
return "1.0"; return "1.0";
} }
@Override
public Player[] getOnlinePlayers() public Player[] getOnlinePlayers()
{ {
return players.toArray(new Player[0]); return players.toArray(new Player[0]);
@ -53,31 +57,37 @@ public class FakeServer implements Server
this.players = players; this.players = players;
} }
@Override
public int getMaxPlayers() public int getMaxPlayers()
{ {
return 100; return 100;
} }
@Override
public int getPort() public int getPort()
{ {
return 25565; return 25565;
} }
@Override
public String getIp() public String getIp()
{ {
return "127.0.0.1"; return "127.0.0.1";
} }
@Override
public String getServerName() public String getServerName()
{ {
return "Test Server"; return "Test Server";
} }
@Override
public String getServerId() public String getServerId()
{ {
return "Test Server"; return "Test Server";
} }
@Override
public int broadcastMessage(String string) public int broadcastMessage(String string)
{ {
int i = 0; int i = 0;
@ -89,11 +99,19 @@ public class FakeServer implements Server
return i; return i;
} }
@Override
public String getUpdateFolder() public String getUpdateFolder()
{ {
return "update"; return "update";
} }
@Override
public File getUpdateFolderFile()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Player getPlayer(String string) public Player getPlayer(String string)
{ {
for (Player player : players) for (Player player : players)
@ -106,6 +124,7 @@ public class FakeServer implements Server
return null; return null;
} }
@Override
public List<Player> matchPlayer(String string) public List<Player> matchPlayer(String string)
{ {
List<Player> matches = new ArrayList<Player>(); List<Player> matches = new ArrayList<Player>();
@ -119,15 +138,17 @@ public class FakeServer implements Server
return matches; return matches;
} }
@Override
public PluginManager getPluginManager() public PluginManager getPluginManager()
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public BukkitScheduler getScheduler() public BukkitScheduler getScheduler()
{ {
return new BukkitScheduler() { return new BukkitScheduler()
{
@Override @Override
public int scheduleSyncDelayedTask(Plugin plugin, Runnable r, long l) public int scheduleSyncDelayedTask(Plugin plugin, Runnable r, long l)
{ {
@ -215,16 +236,19 @@ public class FakeServer implements Server
}; };
} }
@Override
public ServicesManager getServicesManager() public ServicesManager getServicesManager()
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public List<World> getWorlds() public List<World> getWorlds()
{ {
return worlds; return worlds;
} }
@Override
public World createWorld(String string, Environment e) public World createWorld(String string, Environment e)
{ {
World w = new FakeWorld(string, e); World w = new FakeWorld(string, e);
@ -232,6 +256,7 @@ public class FakeServer implements Server
return w; return w;
} }
@Override
public World createWorld(String string, Environment e, long l) public World createWorld(String string, Environment e, long l)
{ {
World w = new FakeWorld(string, e); World w = new FakeWorld(string, e);
@ -239,45 +264,54 @@ public class FakeServer implements Server
return w; return w;
} }
@Override
public World getWorld(String string) public World getWorld(String string)
{ {
for (World world : worlds) for (World world : worlds)
{ {
if (world.getName().equalsIgnoreCase(string)) { if (world.getName().equalsIgnoreCase(string))
{
return world; return world;
} }
} }
return null; return null;
} }
@Override
public void reload() public void reload()
{ {
} }
@Override
public Logger getLogger() public Logger getLogger()
{ {
return Logger.getLogger("Minecraft"); return Logger.getLogger("Minecraft");
} }
@Override
public PluginCommand getPluginCommand(String string) public PluginCommand getPluginCommand(String string)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public void savePlayers() public void savePlayers()
{ {
} }
@Override
public boolean dispatchCommand(CommandSender cs, String string) public boolean dispatchCommand(CommandSender cs, String string)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public void configureDbConfig(ServerConfig sc) public void configureDbConfig(ServerConfig sc)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public boolean addRecipe(Recipe recipe) public boolean addRecipe(Recipe recipe)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
@ -295,41 +329,55 @@ public class FakeServer implements Server
return player; return player;
} }
@Override
public World createWorld(String string, Environment e, ChunkGenerator cg) public World createWorld(String string, Environment e, ChunkGenerator cg)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public World createWorld(String string, Environment e, long l, ChunkGenerator cg) public World createWorld(String string, Environment e, long l, ChunkGenerator cg)
{ {
throw new UnsupportedOperationException("Not supported yet."); 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) public boolean unloadWorld(String string, boolean bln)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public boolean unloadWorld(World world, boolean bln) public boolean unloadWorld(World world, boolean bln)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public Map<String, String[]> getCommandAliases() public Map<String, String[]> getCommandAliases()
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public int getSpawnRadius() public int getSpawnRadius()
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public void setSpawnRadius(int i) public void setSpawnRadius(int i)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public boolean getOnlineMode() public boolean getOnlineMode()
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
@ -340,6 +388,7 @@ public class FakeServer implements Server
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public World getWorld(UUID uuid) public World getWorld(UUID uuid)
{ {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
@ -454,7 +503,19 @@ public class FakeServer implements Server
} }
@Override @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."); throw new UnsupportedOperationException("Not supported yet.");
} }

Binary file not shown.

Binary file not shown.