Changes for new Bukkit

This commit is contained in:
snowleo 2011-10-11 12:48:44 +02:00
parent 1c1726cfa4
commit 5851c5a88b
4 changed files with 40 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package com.earth2me.essentials;
import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Achievement;
@ -725,4 +726,22 @@ public class OfflinePlayer implements Player
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getTicksLived()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setTicksLived(int i)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Map<String, Object> serialize()
{
throw new UnsupportedOperationException("Not supported yet.");
}
}

View File

@ -755,5 +755,23 @@ public class PlayerWrapper implements Player
{
return base.getPlayerListName();
}
@Override
public int getTicksLived()
{
return base.getTicksLived();
}
@Override
public void setTicksLived(int i)
{
base.setTicksLived(i);
}
@Override
public Map<String, Object> serialize()
{
return base.serialize();
}
}

View File

@ -159,7 +159,7 @@ public class GroupManager extends JavaPlugin {
}
};
scheduler = new ScheduledThreadPoolExecutor(1);
int minutes = getConfig().getSaveInterval();
int minutes = getGMConfig().getSaveInterval();
scheduler.scheduleAtFixedRate(commiter, minutes, minutes, TimeUnit.MINUTES);
GroupManager.logger.info("Scheduled Data Saving is set for every " + minutes + " minutes!");
}
@ -1749,7 +1749,7 @@ public class GroupManager extends JavaPlugin {
/**
* @return the config
*/
public GMConfiguration getConfig() {
public GMConfiguration getGMConfig() {
return config;
}

View File

@ -111,7 +111,7 @@ public class WorldsHolder {
@SuppressWarnings("rawtypes")
public void mirrorSetUp() {
mirrors.clear();
Map<String, Object> mirrorsMap = plugin.getConfig().getMirrorsMap();
Map<String, Object> mirrorsMap = plugin.getGMConfig().getMirrorsMap();
if (mirrorsMap != null) {
for (String source : mirrorsMap.keySet()) {
// Make sure all non mirrored worlds have a set of data files.