1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-11 09:05:01 +02:00

More API work

This commit is contained in:
Iaccidentally
2013-05-25 15:40:44 -04:00
parent 1129a6af88
commit bc29f9d4b1
2 changed files with 51 additions and 34 deletions

View File

@@ -134,11 +134,8 @@ public class Essentials implements IEssentials
storageQueue.setEnabled(true);
execTimer = new ExecuteTimer();
execTimer.start();
execTimer.mark("I18n1");
execTimer.mark("BukkitCheck");
reloadList = new ArrayList<IReload>();
settings = new SettingsHolder(this);
reloadList.add(settings);
@@ -166,13 +163,9 @@ public class Essentials implements IEssentials
spawns = new SpawnsHolder(this);
reloadList.add(spawns);
onReload();
backup = new Backup(this);
jails = new Jails(this);
reloadList.add(jails);
timer = new EssentialsTimer(this);
getPlugin().scheduleSyncRepeatingTask(timer, 1, 100);
execTimer.mark("RegListeners");
@@ -211,7 +204,6 @@ public class Essentials implements IEssentials
iReload.onReload();
execTimer.mark("Reload(" + iReload.getClass().getSimpleName() + ")");
}
i18n.updateLocale(settings.getLocale());
}
@@ -253,7 +245,6 @@ public class Essentials implements IEssentials
delivered++;
}
}
return delivered;
}

View File

@@ -20,161 +20,187 @@ public interface IEssentials extends IComponent
void addReloadListener(IReload listener);
/**
* Used to send a message to one or more users
*
* @param sender
* @param message
* @return
* @param sender the user sending the message
* @param message the message to send
* @return the number users the message was sent to
*/
int broadcastMessage(IUser sender, String message);
/**
* Used to get the i18n interface
*
* @return
* @return the interface
*/
II18n getI18n();
/**
* Used to get the Settings interface
*
* @return
* @return the interface
*/
ISettings getSettings();
/**
* Used to get the Ranks interface
*
* @return
* @return the interface
*/
IRanks getRanks();
/**
* Used to get the Jails interface
*
* @return
* @return the interface
*/
IJails getJails();
/**
* Used to get the Kits interface
*
* @return
* @return the interface
*/
IKits getKits();
/**
* Used to get the Warps interface
*
* @return
* @return the interface
*/
IWarps getWarps();
/**
* Used to get the Worth interface
*
* @return
* @return the interface
*/
IWorth getWorth();
/**
* Used to get the ItemDb interface
*
* @return
* @return the interface
*/
IItemDb getItemDb();
/**
* Used to get the UserMap interface
*
* @return
* @return the interface
*/
IUserMap getUserMap();
/**
* Used to get the Backup interface
*
* @return
* @return the interface
*/
IBackup getBackup();
/**
* Used to get the CommandHandler interface
*
* @return
* @return the interface
*/
ICommandHandler getCommandHandler();
/**
* Used to get a world with the given name
*
* @param name
* @return
* @param name the name of the world
* @return the world
*/
World getWorld(String name);
/**
* Used to get the payment method being used, such as Vault or Boseconomy
*
* @return
* @return the current payment method
*/
Methods getPaymentMethod();
/**
*
*
* @param groups
*/
void setRanks(IRanks groups);
/**
*
*
* @param groups
*/
void removeReloadListener(IReload groups);
/**
* Used to get the Economy interface
*
* @return
* @return the interface
*/
IEconomy getEconomy();
/**
* Used to get the Server instance
*
* @return
* @return the instance of Server
*/
Server getServer();
/**
* Used to get the Logger instance
*
* @return
* @return the instance of Logger
*/
Logger getLogger();
/**
* Used to get the Plugin Interface
*
* @return
* @return the interface
*/
IPlugin getPlugin();
/**
* Used to get a List of vanished players by name
*
* @return
* @return a List of vanished players
*/
List<String> getVanishedPlayers();
/**
* Used to get the timer
*
* @return
* @return the instance of EssentialsTimer
*/
EssentialsTimer getTimer();
/**
* Used internally. **maybe we should make this private**
*
* @return
*/
Metrics getMetrics();
/**
* Used internally. **maybe we should make this private**
*
* @param metrics
*/
void setMetrics(Metrics metrics);
/**
* Used to get the instance of SpawnsHolder
*
* @return
* @return the instance
*/
SpawnsHolder getSpawns();
/**
* Used to get the instance of StorageQueue
*
* @return
* @return the instance
*/
StorageQueue getStorageQueue();
}