use of org.bukkit.plugin.PluginManager in project SiegeWar by TownyAdvanced.
the class SiegeWar method registerListeners.
private void registerListeners() {
PluginManager pm = getServer().getPluginManager();
if (siegeWarPluginError)
pm.registerEvents(new SiegeWarSafeModeListener(this), this);
else {
pm.registerEvents(new SiegeWarActionListener(this), this);
pm.registerEvents(new SiegeWarBukkitEventListener(this), this);
pm.registerEvents(new SiegeWarTownyEventListener(this), this);
pm.registerEvents(new SiegeWarNationEventListener(), this);
pm.registerEvents(new SiegeWarTownEventListener(this), this);
pm.registerEvents(new SiegeWarPlotEventListener(this), this);
pm.registerEvents(new SiegeWarStatusScreenListener(), this);
}
}
use of org.bukkit.plugin.PluginManager in project InventoryHelper by SrBlecaute01.
the class InventoryHelper method enable.
/**
* Enable inventory helper.
*
* @param plugin The @{@link Plugin}
*/
public static void enable(Plugin plugin) {
if (enabled)
return;
PluginManager manager = Bukkit.getPluginManager();
manager.registerEvents(new InventoryClickListener(), plugin);
enabled = true;
}
use of org.bukkit.plugin.PluginManager in project acidisland by tastybento.
the class ASkyBlock method restartEvents.
public void restartEvents() {
final PluginManager manager = getServer().getPluginManager();
lavaListener = new LavaCheck(this);
manager.registerEvents(lavaListener, this);
// Enables warp signs in ASkyBlock
warpSignsListener = new WarpSigns(this);
manager.registerEvents(warpSignsListener, this);
}
use of org.bukkit.plugin.PluginManager in project Bukkit by Bukkit.
the class Permission method addParent.
/**
* Adds this permission to the specified parent permission.
* <p>
* If the parent permission does not exist, it will be created and
* registered.
*
* @param name Name of the parent permission
* @param value The value to set this permission to
* @return Parent permission it created or loaded
*/
public Permission addParent(String name, boolean value) {
PluginManager pm = Bukkit.getServer().getPluginManager();
String lname = name.toLowerCase();
Permission perm = pm.getPermission(lname);
if (perm == null) {
perm = new Permission(lname);
pm.addPermission(perm);
}
addParent(perm, value);
return perm;
}
use of org.bukkit.plugin.PluginManager in project HawkEye by oliverwoodings.
the class HawkEye method onEnable.
/**
* Starts up HawkEye initiation process
*/
@Override
public void onEnable() {
// Set up config and permissions
PluginManager pm = getServer().getPluginManager();
server = getServer();
name = this.getDescription().getName();
version = this.getDescription().getVersion();
Util.info("Starting HawkEye " + version + " initiation process...");
// Load config and permissions
config = new Config(this);
new Permission(this);
versionCheck();
new SessionManager();
// Initiate database connection
try {
new DataManager(this);
} catch (Exception e) {
Util.severe("Error initiating HawkEye database connection, disabling plugin");
pm.disablePlugin(this);
return;
}
checkDependencies(pm);
containerManager = new ContainerAccessManager();
registerListeners(pm);
registerCommands();
Util.info("Version " + version + " enabled!");
}
Aggregations