This commit is contained in:
Garbage Mule 2011-12-12 03:05:51 +01:00
parent c420568cb9
commit bc33ed5824
3 changed files with 28 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import java.io.InputStreamReader;
public class MAMessages
{
public static void init(MobArena plugin) {
public static void init(MobArenaPlugin plugin) {
// Grab the file
File msgFile = new File(MobArena.dir, "anouncements.properties");

View File

@ -73,7 +73,7 @@ public class MobArena extends JavaPlugin implements MobArenaPlugin
// Set up the ArenaMaster and the announcements
am = new ArenaMasterStandard(this);
am.initialize();
System.out.println(am.arenas);
MAMessages.init(this);
// Register event listeners

View File

@ -2,11 +2,35 @@ package com.garbagemule.MobArena;
import org.bukkit.command.CommandSender;
import com.garbagemule.MobArena.util.Config;
public interface MobArenaPlugin
{
/**
* Get the Config object associated with this MobArena instance.
* @return the Config object used by MobArena
*/
public Config getMAConfig();
/**
* Get the ArenaMaster used by this instance of MobArena.
* @return the ArenaMaster object
*/
public ArenaMaster getArenaMaster();
public void tell(CommandSender sender, String msg);
/**
* Send a message to a player or the console.
* The message is prefixed with [MobArena].
* @param recipient the player or console to send the message to
* @param msg the message to send
*/
public void tell(CommandSender recipient, String msg);
public void tell(CommandSender sender, Msg msg);
/**
* Send a predefined announcement to a player or the console.
* Convenience method: the above method is called with Msg.toString()
* @param recipient the player or console to send the message to
* @param msg the message to send
*/
public void tell(CommandSender recipient, Msg msg);
}