Changed project name to WorldGuard.

This commit is contained in:
sk89q 2010-11-17 12:05:07 -08:00
parent 6d56273682
commit 447f192027
9 changed files with 39 additions and 39 deletions

View File

@ -5,11 +5,11 @@ This plugin requires Hey0's server modification.
1. Create a "plugins" folder inside your "bin" folder.
2. Copy WorldProtect.jar into "plugins".
2. Copy WorldGuard.jar into "plugins".
3. Add "WorldProtect" to the "plugins" line of your server.properties file.
3. Add "WorldGuard" to the "plugins" line of your server.properties file.
If it's not already there, add the line. The line should look like this:
plugins=WorldProtect
plugins=WorldGuard
If you have multiple plugins, separate plugin names with commas.

View File

@ -1,11 +1,11 @@
WorldProtect
WorldGuard
Copyright (c) 2010 sk89q <http://www.sk89q.com>
Licensed under the GNU Lesser General Public License v3
Introduction
------------
WorldProtect has a number of features, any of which you can choose to
WorldGuard has a number of features, any of which you can choose to
use or not:
- Enforce only one session for a player on a server (can't login twice).
@ -25,14 +25,14 @@ use or not:
- Log the use, destruction, and/or placement of some blocks/items.
- Kick for the use, destruction, and/or placement of some blocks.
hMod is required as WorldProtect is a plugin for hMod.
hMod is required as WorldGuard is a plugin for hMod.
Configuration
-------------
A "worldprotect.properties" will be created the first the time that you load
WorldProtect on your server. You can either restart your server or use
/reloadplugin WorldProtect to reload the configuraton file after editing it.
A "worldguard.properties" will be created the first the time that you load
WorldGuard on your server. You can either restart your server or use
/reloadplugin WorldGuard to reload the configuraton file after editing it.
- classic-water (def. false)
Toggle use of classic water. Be foreward that your world may be
@ -106,5 +106,5 @@ WorldProtect on your server. You can either restart your server or use
Blacklists
----------
Edit the included worldprotect-blacklist.txt file and follow the
Edit the included worldguard-blacklist.txt file and follow the
instructions inside.

View File

@ -1,2 +1,2 @@
Manifest-Version: 1.0
WorldProtect-Version: 1.1
WorldGuard-Version: 1.1

View File

@ -1,6 +1,6 @@
// $Id$
/*
* WorldProtect
* WorldGuard
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
*
* This program is free software: you can redistribute it and/or modify
@ -37,7 +37,7 @@ public class BlacklistEntry {
/**
* Logger.
*/
private static final Logger logger = Logger.getLogger("WorldProtect.Blacklist");
private static final Logger logger = Logger.getLogger("WorldGuard.Blacklist");
/**
* List of groups to not affect.
*/
@ -142,7 +142,7 @@ public boolean shouldIgnore(Player player) {
public void notifyAdmins(String str) {
for (Player player : etc.getServer().getPlayerList()) {
if (player.canUseCommand("/wprotectalerts")) {
player.sendMessage(Colors.LightPurple + "WorldProtect: " + str);
player.sendMessage(Colors.LightPurple + "WorldGuard: " + str);
}
}
}

View File

@ -1,6 +1,6 @@
// $Id$
/*
* WorldProtect
* WorldGuard
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
*
* This program is free software: you can redistribute it and/or modify
@ -29,16 +29,16 @@
*
* @author sk89q
*/
public class WorldProtect extends Plugin {
public class WorldGuard extends Plugin {
/**
* Logger.
*/
private static final Logger logger = Logger.getLogger("Minecraft.WorldProtect");
private static final Logger logger = Logger.getLogger("Minecraft.WorldGuard");
/**
* Listener for the plugin system.
*/
private static final WorldProtectListener listener =
new WorldProtectListener();
private static final WorldGuardListener listener =
new WorldGuardListener();
/**
* Initializes the plugin.
@ -70,7 +70,7 @@ public void initialize() {
public void enable() {
listener.loadConfiguration();
logger.log(Level.INFO, "WorldProtect version " + getVersion() + " loaded");
logger.log(Level.INFO, "WorldGuard version " + getVersion() + " loaded");
}
/**
@ -82,18 +82,18 @@ public void disable() {
}
/**
* Get the WorldProtect version.
* Get the WorldGuard version.
*
* @return
*/
private String getVersion() {
try {
String classContainer = WorldProtect.class.getProtectionDomain()
String classContainer = WorldGuard.class.getProtectionDomain()
.getCodeSource().getLocation().toString();
URL manifestUrl = new URL("jar:" + classContainer + "!/META-INF/MANIFEST.MF");
Manifest manifest = new Manifest(manifestUrl.openStream());
Attributes attrib = manifest.getMainAttributes();
String ver = (String)attrib.getValue("WorldProtect-Version");
String ver = (String)attrib.getValue("WorldGuard-Version");
return ver != null ? ver : "(unavailable)";
} catch (IOException e) {
return "(unknown)";

View File

@ -1,6 +1,6 @@
// $Id$
/*
* WorldProtect
* WorldGuard
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
*
* This program is free software: you can redistribute it and/or modify
@ -29,7 +29,7 @@
import java.util.ArrayList;
import java.util.Random;
import java.io.*;
import com.sk89q.worldprotect.*;
import com.sk89q.worldguard.*;
import java.util.logging.FileHandler;
/**
@ -37,15 +37,15 @@
*
* @author sk89q
*/
public class WorldProtectListener extends PluginListener {
public class WorldGuardListener extends PluginListener {
/**
* Logger.
*/
private static final Logger logger = Logger.getLogger("Minecraft.WorldProtect");
private static final Logger logger = Logger.getLogger("Minecraft.WorldGuard");
/**
* Properties file for CraftBook.
*/
private PropertiesFile properties = new PropertiesFile("worldprotect.properties");
private PropertiesFile properties = new PropertiesFile("worldguard.properties");
/**
* Random number generator.
*/
@ -86,7 +86,7 @@ private static Set<Integer> toBlockIDSet(String str) {
if (id != 0) {
result.add(id);
} else {
logger.log(Level.WARNING, "WorldProtect: Unknown block name: "
logger.log(Level.WARNING, "WorldGuard: Unknown block name: "
+ item);
}
}
@ -114,15 +114,15 @@ public void loadConfiguration() {
blockLagFix = properties.getBoolean("block-lag-fix", false);
try {
blacklist = loadBlacklist(new File("worldprotect-blacklist.txt"));
blacklist = loadBlacklist(new File("worldguard-blacklist.txt"));
} catch (FileNotFoundException e) {
logger.log(Level.WARNING, "WorldProtect blacklist does not exist.");
logger.log(Level.WARNING, "WorldGuard blacklist does not exist.");
} catch (IOException e) {
logger.log(Level.WARNING, "Could not load WorldProtect blacklist: "
logger.log(Level.WARNING, "Could not load WorldGuard blacklist: "
+ e.getMessage());
}
Logger blacklistLogger = Logger.getLogger("WorldProtect.Blacklist");
Logger blacklistLogger = Logger.getLogger("WorldGuard.Blacklist");
blacklistLogger.setUseParentHandlers(false);
for (Handler handler : blacklistLogger.getHandlers()) {
blacklistLogger.removeHandler(handler);
@ -452,7 +452,7 @@ public Map<Integer,BlacklistEntry> loadBlacklist(File file)
} catch (NumberFormatException e) {
id = etc.getDataSource().getItem(item.trim());
if (id == 0) {
logger.log(Level.WARNING, "WorldProtect: Unknown block name: "
logger.log(Level.WARNING, "WorldGuard: Unknown block name: "
+ item);
break;
}

View File

@ -1,6 +1,6 @@
// $Id$
/*
* WorldProtect
* WorldGuard
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
*
* This program is free software: you can redistribute it and/or modify
@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.sk89q.worldprotect;
package com.sk89q.worldguard;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;

View File

@ -1,6 +1,6 @@
// $Id$
/*
* WorldProtect
* WorldGuard
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
*
* This program is free software: you can redistribute it and/or modify
@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.sk89q.worldprotect;
package com.sk89q.worldguard;
import java.text.SimpleDateFormat;
import java.util.Date;

View File

@ -1,5 +1,5 @@
#
# This is the blacklist for WorldProtect. Comments start with # and they
# This is the blacklist for WorldGuard. Comments start with # and they
# are ignored so you can put your own notes.
#
# Format: