mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-04-04 02:36:23 +02:00
37 lines
1.4 KiB
Java
37 lines
1.4 KiB
Java
package com.gmail.nossr50.vChat;
|
|
|
|
import java.io.File;
|
|
import java.util.HashMap;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.Server;
|
|
import org.bukkit.event.Event.Priority;
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.plugin.PluginDescriptionFile;
|
|
import org.bukkit.plugin.PluginLoader;
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
import org.bukkit.plugin.PluginManager;
|
|
|
|
/**
|
|
* vChat for Bukkit
|
|
*
|
|
* @author nossr50
|
|
* @author cerevisae
|
|
*/
|
|
public class vChat extends JavaPlugin {
|
|
private final vPlayerListener playerListener = new vPlayerListener(this);
|
|
private final HashMap<Player, Boolean> debugees = new HashMap<Player, Boolean>();
|
|
|
|
public void onEnable() {
|
|
PluginManager pm = getServer().getPluginManager();
|
|
pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Priority.Normal, this);
|
|
pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, playerListener, Priority.Normal, this);
|
|
pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Priority.Normal, this);
|
|
PluginDescriptionFile pdfFile = this.getDescription();
|
|
System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
|
|
//Load the users file
|
|
vUsers.getInstance().loadUsers();
|
|
}
|
|
public void onDisable() {
|
|
System.out.println("vChat Disabled!");
|
|
}
|
|
} |