mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-12 03:13:40 +01:00
Fixed for iConomy 3.0 and
fixed tha tabs in plugin.yml
This commit is contained in:
parent
e54b201aa5
commit
881dc38a18
@ -36,6 +36,6 @@ commands:
|
||||
usage: /<command> <region id> ...
|
||||
aliases: tpr
|
||||
buyregion:
|
||||
description: Buy a buyable region
|
||||
usage: /<command> <region id> [info]
|
||||
description: Buy a buyable region
|
||||
usage: /<command> <region id> [info]
|
||||
|
@ -38,10 +38,10 @@
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
import com.nijiko.iConomy.configuration.PropertyHandler;
|
||||
import com.nijikokun.bukkit.iConomy.iConomy;
|
||||
import com.sk89q.bukkit.migration.PermissionsResolverManager;
|
||||
import com.sk89q.bukkit.migration.PermissionsResolverServerListener;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardServerListener;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
import com.sk89q.worldguard.TickSyncDelayLoggerFilter;
|
||||
@ -69,6 +69,8 @@ public class WorldGuardPlugin extends JavaPlugin {
|
||||
new WorldGuardBlockListener(this);
|
||||
private final WorldGuardEntityListener entityListener =
|
||||
new WorldGuardEntityListener(this);
|
||||
private final WorldGuardServerListener serverListener =
|
||||
new WorldGuardServerListener(this);
|
||||
|
||||
private PermissionsResolverServerListener permsListener;
|
||||
private PermissionsResolverManager perms;
|
||||
@ -199,23 +201,15 @@ private void registerEvents() {
|
||||
registerEvent(Event.Type.PLAYER_JOIN, playerListener, Priority.Normal);
|
||||
registerEvent(Event.Type.PLAYER_LOGIN, playerListener, Priority.Normal);
|
||||
registerEvent(Event.Type.PLAYER_QUIT, playerListener, Priority.Normal);
|
||||
|
||||
|
||||
this.getServer().getPluginManager().registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Priority.Monitor, this);
|
||||
|
||||
permsListener.register(this);
|
||||
|
||||
// 25 equals about 1s real time
|
||||
this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new TimedFlagsTimer(this), 25*5, 25*5);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if iConomy is enabled on this server
|
||||
*/
|
||||
public void onPluginEnabled(PluginEvent event) {
|
||||
if(event.getPlugin().getDescription().getName().equals("iConomy")) {
|
||||
this.iConomy = (iConomy)event.getPlugin();
|
||||
logger.info("WorldGuard: Attached to iConomy.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register an event.
|
||||
|
@ -0,0 +1,54 @@
|
||||
// $Id$
|
||||
/*
|
||||
* WorldGuard
|
||||
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sk89q.worldguard.bukkit;
|
||||
|
||||
import org.bukkit.event.server.PluginEvent;
|
||||
import org.bukkit.event.server.ServerListener;
|
||||
|
||||
import com.nijiko.iConomy.configuration.PropertyHandler;
|
||||
import com.nijikokun.bukkit.iConomy.iConomy;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DarkLiKally
|
||||
*/
|
||||
public class WorldGuardServerListener extends ServerListener {
|
||||
/**
|
||||
* Plugin.
|
||||
*/
|
||||
private WorldGuardPlugin plugin;
|
||||
|
||||
/**
|
||||
* Construct the object;
|
||||
*
|
||||
* @param plugin
|
||||
*/
|
||||
public WorldGuardServerListener(WorldGuardPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPluginEnabled(PluginEvent event) {
|
||||
if(event.getPlugin().getDescription().getName().equals("iConomy")) {
|
||||
WorldGuardPlugin.iConomy = (iConomy)event.getPlugin();
|
||||
}
|
||||
}
|
||||
}
|
@ -18,11 +18,7 @@
|
||||
*/
|
||||
package com.sk89q.worldguard.bukkit.commands;
|
||||
|
||||
import static com.sk89q.worldguard.bukkit.BukkitUtil.matchSinglePlayer;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user