summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--BuildAll/nbproject/build-impl.xml8
-rw-r--r--BuildAll/nbproject/genfiles.properties4
-rw-r--r--Essentials/nbproject/build-impl.xml8
-rw-r--r--Essentials/nbproject/genfiles.properties4
-rw-r--r--Essentials/nbproject/project.properties6
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsCommandHandler.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/IUser.java24
-rw-r--r--Essentials/src/com/earth2me/essentials/OfflinePlayer.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/Trade.java16
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java110
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandheal.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkillall.java (renamed from Essentials/src/com/earth2me/essentials/commands/Commandbutcher.java)46
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtree.java8
-rw-r--r--Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java58
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java13
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignTrade.java14
-rw-r--r--Essentials/src/items.csv20
-rw-r--r--Essentials/src/plugin.yml8
-rw-r--r--Essentials/test/com/earth2me/essentials/FakeServer.java24
-rw-r--r--EssentialsChat/nbproject/build-impl.xml8
-rw-r--r--EssentialsChat/nbproject/genfiles.properties4
-rw-r--r--EssentialsChat/nbproject/project.properties4
-rw-r--r--EssentialsGeoIP/nbproject/build-impl.xml8
-rw-r--r--EssentialsGeoIP/nbproject/genfiles.properties4
-rw-r--r--EssentialsGeoIP/nbproject/project.properties4
-rw-r--r--EssentialsGroupBridge/nbproject/build-impl.xml8
-rw-r--r--EssentialsGroupBridge/nbproject/genfiles.properties4
-rw-r--r--EssentialsGroupBridge/nbproject/project.properties4
-rw-r--r--EssentialsGroupManager/.classpath4
-rw-r--r--EssentialsGroupManager/nbproject/build-impl.xml8
-rw-r--r--EssentialsGroupManager/nbproject/genfiles.properties4
-rw-r--r--EssentialsGroupManager/nbproject/project.properties4
-rw-r--r--EssentialsGroupManager/src/Changelog.txt8
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java92
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java217
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java16
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java17
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java29
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java57
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java32
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java59
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEvent.java22
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java42
-rw-r--r--EssentialsGroupManager/src/plugin.yml2
-rw-r--r--EssentialsProtect/nbproject/build-impl.xml8
-rw-r--r--EssentialsProtect/nbproject/genfiles.properties4
-rw-r--r--EssentialsProtect/nbproject/project.properties4
-rw-r--r--EssentialsSpawn/nbproject/build-impl.xml8
-rw-r--r--EssentialsSpawn/nbproject/genfiles.properties4
-rw-r--r--EssentialsSpawn/nbproject/project.properties4
-rw-r--r--EssentialsUpdate/nbproject/build-impl.xml8
-rw-r--r--EssentialsUpdate/nbproject/genfiles.properties4
-rw-r--r--EssentialsUpdate/nbproject/project.properties4
-rw-r--r--EssentialsXMPP/nbproject/build-impl.xml8
-rw-r--r--EssentialsXMPP/nbproject/genfiles.properties4
-rw-r--r--EssentialsXMPP/nbproject/project.properties6
-rw-r--r--lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jarbin17873 -> 22335 bytes
-rw-r--r--lib/bukkit.jar (renamed from lib/bukkit-1.0.0-R1-SNAPSHOT.jar)bin4402175 -> 4405577 bytes
-rw-r--r--lib/craftbukkit.jar (renamed from lib/craftbukkit-1.0.0-SNAPSHOT.jar)bin9808831 -> 9818144 bytes
61 files changed, 768 insertions, 346 deletions
diff --git a/.gitignore b/.gitignore
index adc931227..6c25fbdd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,4 +35,6 @@
/EssentialsUpdate/dist/
/EssentialsUpdate/build/
/WebPush/apikey.php
-/WebPush/nbproject/private \ No newline at end of file
+/WebPush/nbproject/private
+/.idea
+*.iml \ No newline at end of file
diff --git a/BuildAll/nbproject/build-impl.xml b/BuildAll/nbproject/build-impl.xml
index 34bc10d88..7c88bb114 100644
--- a/BuildAll/nbproject/build-impl.xml
+++ b/BuildAll/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="BuildAll-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/BuildAll/nbproject/genfiles.properties b/BuildAll/nbproject/genfiles.properties
index d832e2cec..64276c0d9 100644
--- a/BuildAll/nbproject/genfiles.properties
+++ b/BuildAll/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.44.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=51b33957
-nbproject/build-impl.xml.script.CRC32=66b89647
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=c8376938
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/Essentials/nbproject/build-impl.xml b/Essentials/nbproject/build-impl.xml
index 0816b04c9..8ee1561bd 100644
--- a/Essentials/nbproject/build-impl.xml
+++ b/Essentials/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Essentials-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/Essentials/nbproject/genfiles.properties b/Essentials/nbproject/genfiles.properties
index d39edfe18..d261d97cb 100644
--- a/Essentials/nbproject/genfiles.properties
+++ b/Essentials/nbproject/genfiles.properties
@@ -4,8 +4,8 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=a830bc14
-nbproject/build-impl.xml.script.CRC32=64a00ba6
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=40df7eaf
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
nbproject/profiler-build-impl.xml.data.CRC32=ab78ce15
nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
nbproject/profiler-build-impl.xml.stylesheet.CRC32=f10cf54c@1.11.1
diff --git a/Essentials/nbproject/project.properties b/Essentials/nbproject/project.properties
index 59540b809..87e522254 100644
--- a/Essentials/nbproject/project.properties
+++ b/Essentials/nbproject/project.properties
@@ -66,7 +66,8 @@ endorsed.classpath=
excludes=
file.reference.BOSEconomy7.jar=../lib/BOSEconomy7.jar
file.reference.bPermissions.jar=../lib/bPermissions.jar
-file.reference.craftbukkit-1.0.0-SNAPSHOT.jar=../lib/craftbukkit-1.0.0-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
+file.reference.craftbukkit.jar=../lib/craftbukkit.jar
file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.iCo6.jar=../lib/iCo6.jar
@@ -91,7 +92,8 @@ javac.classpath=\
${file.reference.PermissionsBukkit-1.2.jar}:\
${file.reference.lombok-0.10.1.jar}:\
${reference.EssentialsGroupManager.jar}:\
- ${file.reference.craftbukkit-1.0.0-SNAPSHOT.jar}
+ ${file.reference.bukkit.jar}:\
+ ${file.reference.craftbukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 70d16b3fe..f39a8267b 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -58,7 +58,7 @@ import org.yaml.snakeyaml.error.YAMLException;
public class Essentials extends JavaPlugin implements IEssentials
{
- public static final int BUKKIT_VERSION = 1566;
+ public static final int BUKKIT_VERSION = 1597;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private transient ISettings settings;
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsCommandHandler.java b/Essentials/src/com/earth2me/essentials/EssentialsCommandHandler.java
index feca7b652..500b551d5 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsCommandHandler.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsCommandHandler.java
@@ -62,7 +62,7 @@ public class EssentialsCommandHandler implements ICommandHandler
public boolean handleCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args)
{
// Allow plugins to override the command via onCommand
- if (!ess.getSettings().isCommandOverridden(command.getName()) && !commandLabel.startsWith("e"))
+ if (!ess.getSettings().isCommandOverridden(command.getName()) && (!commandLabel.startsWith("e") || commandLabel.equalsIgnoreCase(command.getName()))
{
final PluginCommand pc = getAlternative(commandLabel);
if (pc != null)
diff --git a/Essentials/src/com/earth2me/essentials/IUser.java b/Essentials/src/com/earth2me/essentials/IUser.java
index ce7e19c77..f11343f6d 100644
--- a/Essentials/src/com/earth2me/essentials/IUser.java
+++ b/Essentials/src/com/earth2me/essentials/IUser.java
@@ -11,16 +11,8 @@ import org.bukkit.inventory.PlayerInventory;
* @deprecated This will be moved to the api package soon
*/
@Deprecated
-public interface IUser extends com.earth2me.essentials.api.IUser
+public interface IUser extends Player, com.earth2me.essentials.api.IUser
{
- int getHealth();
-
- Location getLocation();
-
- boolean isOnline();
-
- void sendMessage(String string);
-
long getLastTeleportTimestamp();
boolean isAuthorized(String node);
@@ -41,10 +33,6 @@ public interface IUser extends com.earth2me.essentials.api.IUser
void giveMoney(double value);
- PlayerInventory getInventory();
-
- void updateInventory();
-
String getGroup();
void setLastLocation();
@@ -53,19 +41,9 @@ public interface IUser extends com.earth2me.essentials.api.IUser
Location getHome(Location loc) throws Exception;
- String getName();
-
- InetSocketAddress getAddress();
-
- String getDisplayName();
-
boolean isHidden();
Teleport getTeleport();
void setJail(String jail);
-
- public int getTotalExperience();
-
- public void setTotalExperience(int l);
}
diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
index 45359a837..e05a07576 100644
--- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
+++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
@@ -816,4 +816,10 @@ public class OfflinePlayer implements Player
{
throw new UnsupportedOperationException("Not supported yet.");
}
+
+ @Override
+ public Player getKiller()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java
index fabe1e06c..51f1feccd 100644
--- a/Essentials/src/com/earth2me/essentials/Trade.java
+++ b/Essentials/src/com/earth2me/essentials/Trade.java
@@ -1,9 +1,13 @@
package com.earth2me.essentials;
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
+<<<<<<< HEAD
import com.earth2me.essentials.api.IUser;
import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.ISettings;
+=======
+import com.earth2me.essentials.craftbukkit.SetExpFix;
+>>>>>>> refs/heads/master
import static com.earth2me.essentials.I18n._;
import java.io.File;
import java.io.FileWriter;
@@ -86,10 +90,16 @@ public class Trade
{
throw new ChargeException(_("notEnoughMoney"));
}
+<<<<<<< HEAD
if (exp != null && exp > 0
&& user.getTotalExperience() < exp)
{
+=======
+
+ if (exp != null && exp > 0
+ && SetExpFix.getTotalExperience(user) < exp) {
+>>>>>>> refs/heads/master
throw new ChargeException(_("notEnoughExperience"));
}
}
@@ -124,7 +134,7 @@ public class Trade
}
if (getExperience() != null)
{
- user.setTotalExperience(user.getTotalExperience() + getExperience());
+ SetExpFix.setTotalExperience(user, SetExpFix.getTotalExperience(user) + getExperience());
}
return success;
}
@@ -166,12 +176,12 @@ public class Trade
}
if (getExperience() != null)
{
- final int experience = user.getTotalExperience();
+ final int experience = SetExpFix.getTotalExperience(user);
if (experience < getExperience() && getExperience() > 0)
{
throw new ChargeException(_("notEnoughExperience"));
}
- user.setTotalExperience(experience - getExperience());
+ SetExpFix.setTotalExperience(user, experience - getExperience());
}
}
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index 3a2fb8b3f..ecc0fe744 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -27,32 +27,32 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
private boolean hidden = false;
private transient Location afkPosition;
private static final Logger logger = Logger.getLogger("Minecraft");
-
+
User(final Player base, final IEssentials ess)
{
super(base, ess);
teleport = new Teleport(this, ess);
afkPosition = getLocation();
}
-
+
User update(final Player base)
{
setBase(base);
return this;
}
-
+
@Override
public boolean isAuthorized(final IEssentialsCommand cmd)
{
return isAuthorized(cmd, "essentials.");
}
-
+
@Override
public boolean isAuthorized(final IEssentialsCommand cmd, final String permissionPrefix)
{
return isAuthorized(permissionPrefix + (cmd.getName().equals("r") ? "msg" : cmd.getName()));
}
-
+
@Override
public boolean isAuthorized(final String node)
{
@@ -60,20 +60,20 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
return false;
}
-
+
if (isOp())
{
return true;
}
-
+
if (isJailed())
{
return false;
}
-
+
return ess.getPermissionsHandler().hasPermission(base, node);
}
-
+
public void healCooldown() throws Exception
{
final Calendar now = new GregorianCalendar();
@@ -91,13 +91,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
setLastHealTimestamp(now.getTimeInMillis());
}
-
+
@Override
public void giveMoney(final double value)
{
giveMoney(value, null);
}
-
+
public void giveMoney(final double value, final CommandSender initiator)
{
if (value == 0)
@@ -111,7 +111,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName()));
}
}
-
+
public void payUser(final User reciever, final double value) throws Exception
{
if (value == 0)
@@ -130,13 +130,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
throw new Exception(_("notEnoughMoney"));
}
}
-
+
@Override
public void takeMoney(final double value)
{
takeMoney(value, null);
}
-
+
public void takeMoney(final double value, final CommandSender initiator)
{
if (value == 0)
@@ -150,36 +150,36 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName()));
}
}
-
+
public boolean canAfford(final double cost)
{
final double mon = getMoney();
return mon >= cost || isAuthorized("essentials.eco.loan");
}
-
+
public void dispose()
{
this.base = new OfflinePlayer(getName(), ess);
}
-
+
@Override
public void setReplyTo(final CommandSender user)
{
replyTo = user;
}
-
+
@Override
public CommandSender getReplyTo()
{
return replyTo;
}
-
+
@Override
public int compareTo(final User other)
{
return Util.stripColor(this.getDisplayName()).compareToIgnoreCase(Util.stripColor(other.getDisplayName()));
}
-
+
@Override
public boolean equals(final Object object)
{
@@ -188,58 +188,58 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
return false;
}
return this.getName().equalsIgnoreCase(((User)object).getName());
-
+
}
-
+
@Override
public int hashCode()
{
- return this.getName().hashCode();
+ return this.getName().hashCode();
}
-
+
public Boolean canSpawnItem(final int itemId)
{
return !ess.getSettings().itemSpawnBlacklist().contains(itemId);
}
-
+
public Location getHome() throws Exception
{
return getHome(getHomes().get(0));
}
-
+
public void setHome()
{
setHome("home", getLocation());
}
-
+
public void setHome(final String name)
{
setHome(name, getLocation());
}
-
+
@Override
public void setLastLocation()
{
setLastLocation(getLocation());
}
-
+
public void requestTeleport(final User player, final boolean here)
{
teleportRequestTime = System.currentTimeMillis();
teleportRequester = player;
teleportRequestHere = here;
}
-
+
public User getTeleportRequest()
{
return teleportRequester;
}
-
+
public boolean isTeleportRequestHere()
{
return teleportRequestHere;
}
-
+
public String getNick(boolean addprefixsuffix)
{
final StringBuilder nickname = new StringBuilder();
@@ -263,7 +263,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
}
}
-
+
if (addprefixsuffix && ess.getSettings().addPrefixSuffix())
{
if (!ess.getSettings().disablePrefix())
@@ -285,10 +285,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
nickname.append("§f");
}
}
-
+
return nickname.toString();
}
-
+
public void setDisplayNick()
{
String name = getNick(true);
@@ -310,7 +310,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Use a shorter displayname prefix.");
}
}
-
+
@Override
public String getDisplayName()
{
@@ -320,22 +320,22 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
return super.getDisplayName() == null ? super.getName() : super.getDisplayName();
}
-
+
public Teleport getTeleport()
{
return teleport;
}
-
+
public long getLastOnlineActivity()
{
return lastOnlineActivity;
}
-
+
public void setLastOnlineActivity(final long timestamp)
{
lastOnlineActivity = timestamp;
}
-
+
@Override
public double getMoney()
{
@@ -357,7 +357,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
return super.getMoney();
}
-
+
@Override
public void setMoney(final double value)
{
@@ -379,7 +379,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
super.setMoney(value);
}
-
+
@Override
public void setAfk(final boolean set)
{
@@ -390,7 +390,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
super.setAfk(set);
}
-
+
@Override
public boolean toggleAfk()
{
@@ -398,13 +398,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
this.setSleepingIgnored(this.isAuthorized("essentials.sleepingignored") ? true : now);
return now;
}
-
+
@Override
public boolean isHidden()
{
return hidden;
}
-
+
public void setHidden(final boolean hidden)
{
this.hidden = hidden;
@@ -455,7 +455,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
return false;
}
-
+
public void updateActivity(final boolean broadcast)
{
if (isAfk())
@@ -468,7 +468,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
lastActivity = System.currentTimeMillis();
}
-
+
public void checkActivity()
{
final long autoafkkick = ess.getSettings().getAutoAfkKick();
@@ -478,8 +478,8 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
final String kickReason = _("autoAfkKickReason", autoafkkick / 60.0);
lastActivity = 0;
kickPlayer(kickReason);
-
-
+
+
for (Player player : ess.getServer().getOnlinePlayers())
{
final User user = ess.getUser(player);
@@ -499,12 +499,12 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
}
}
-
+
public Location getAfkPosition()
{
return afkPosition;
}
-
+
@Override
public boolean toggleGodModeEnabled()
{
@@ -514,7 +514,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
return super.toggleGodModeEnabled();
}
-
+
@Override
public boolean isGodModeEnabled()
{
@@ -526,17 +526,17 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
return super.isGodModeEnabled();
}
-
+
public String getGroup()
{
return ess.getPermissionsHandler().getGroup(base);
}
-
+
public boolean inGroup(final String group)
{
return ess.getPermissionsHandler().inGroup(base, group);
}
-
+
public boolean canBuild()
{
return ess.getPermissionsHandler().canBuild(base, getGroup());
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
index 26e644331..578457bbb 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
@@ -61,6 +61,8 @@ public class Commandheal extends EssentialsCommand
continue;
}
p.setHealth(20);
+ p.setFoodLevel(20);
+ p.sendMessage(_("heal"));
sender.sendMessage(_("healOther", p.getDisplayName()));
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbutcher.java b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java
index fa628f8e0..b9679e8b9 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbutcher.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.Mob;
import static com.earth2me.essentials.I18n._;
import java.util.Collections;
+import java.util.Locale;
import org.bukkit.Chunk;
import org.bukkit.Server;
import org.bukkit.World;
@@ -22,11 +23,12 @@ import org.bukkit.entity.WaterMob;
import org.bukkit.entity.Wolf;
import org.bukkit.event.entity.EntityDeathEvent;
-public class Commandbutcher extends EssentialsCommand
+
+public class Commandkillall extends EssentialsCommand
{
- public Commandbutcher()
+ public Commandkillall()
{
- super("butcher");
+ super("killall");
}
//TODO: Tidy - missed this during command cleanup
@@ -79,10 +81,23 @@ public class Commandbutcher extends EssentialsCommand
world = ess.getWorld(args[1]);
}
}
- if (radius >=0) {
+ if (radius >= 0)
+ {
radius *= radius;
}
- String killType = type.toLowerCase();
+ String killType = type.toLowerCase(Locale.ENGLISH);
+ boolean animals = killType.startsWith("animal");
+ boolean monster = killType.startsWith("monster") || killType.startsWith("mob");
+ boolean all = killType.equals("all");
+ Class<? extends Entity> entityClass = null;
+ if (!animals && !monster && !all)
+ {
+ if (Mob.fromName(killType) == null)
+ {
+ throw new Exception(_("invalidMob"));
+ }
+ entityClass = Mob.fromName(killType).getType().getEntityClass();
+ }
int numKills = 0;
for (Chunk chunk : world.getLoadedChunks())
{
@@ -90,7 +105,7 @@ public class Commandbutcher extends EssentialsCommand
{
if (sender instanceof Player)
{
- if (((Player)sender).getLocation().distanceSquared(entity.getLocation()) > radius && radius >= 0)
+ if (radius >= 0 && ((Player)sender).getLocation().distanceSquared(entity.getLocation()) > radius)
{
continue;
}
@@ -106,7 +121,7 @@ public class Commandbutcher extends EssentialsCommand
continue;
}
}
- if (killType.contains("animal"))
+ if (animals)
{
if (entity instanceof Animals || entity instanceof NPC || entity instanceof Snowman || entity instanceof WaterMob)
{
@@ -116,7 +131,7 @@ public class Commandbutcher extends EssentialsCommand
numKills++;
}
}
- else if (killType.contains("monster"))
+ else if (monster)
{
if (entity instanceof Monster || entity instanceof ComplexLivingEntity || entity instanceof Flying || entity instanceof Slime)
{
@@ -126,22 +141,19 @@ public class Commandbutcher extends EssentialsCommand
numKills++;
}
}
- else if (killType.contains("all"))
+ else if (all)
{
EntityDeathEvent event = new EntityDeathEvent(entity, Collections.EMPTY_LIST);
ess.getServer().getPluginManager().callEvent(event);
entity.remove();
numKills++;
}
- else
+ else if (entityClass != null && entityClass.isAssignableFrom(entity.getClass()))
{
- if (Mob.fromName(killType).getType().getEntityClass().isAssignableFrom(entity.getClass()))
- {
- EntityDeathEvent event = new EntityDeathEvent(entity, Collections.EMPTY_LIST);
- ess.getServer().getPluginManager().callEvent(event);
- entity.remove();
- numKills++;
- }
+ EntityDeathEvent event = new EntityDeathEvent(entity, Collections.EMPTY_LIST);
+ ess.getServer().getPluginManager().callEvent(event);
+ entity.remove();
+ numKills++;
}
}
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
index b3847d32a..314aa6420 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtree.java
@@ -35,6 +35,14 @@ public class Commandtree extends EssentialsCommand
{
tree = TreeType.TREE;
}
+ else if (args[0].equalsIgnoreCase("redmushroom"))
+ {
+ tree = TreeType.RED_MUSHROOM;
+ }
+ else if (args[0].equalsIgnoreCase("brownmushroom"))
+ {
+ tree = TreeType.BROWN_MUSHROOM;
+ }
else
{
throw new NotEnoughArgumentsException();
diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java b/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java
new file mode 100644
index 000000000..5b1161851
--- /dev/null
+++ b/Essentials/src/com/earth2me/essentials/craftbukkit/SetExpFix.java
@@ -0,0 +1,58 @@
+package com.earth2me.essentials.craftbukkit;
+
+import org.bukkit.entity.Player;
+
+
+public class SetExpFix
+{
+ public static void setTotalExperience(final Player player, final int exp)
+ {
+ if (exp < 0)
+ {
+ throw new IllegalArgumentException("Experience is negative!");
+ }
+ player.setExp(0);
+ player.setLevel(0);
+ player.setTotalExperience(0);
+ int amount = exp;
+ while (amount > 0)
+ {
+ final int expToLevel = getExpToLevel(player);
+ amount -= expToLevel;
+ if (amount >= 0)
+ {
+ // give until next level
+ player.giveExp(expToLevel);
+ }
+ else
+ {
+ // give the rest
+ amount += expToLevel;
+ player.giveExp(amount);
+ amount = 0;
+ }
+ }
+ }
+
+ private static int getExpToLevel(final Player player)
+ {
+ return getExpToLevel(player.getLevel());
+ }
+
+ private static int getExpToLevel(final int level)
+ {
+ return 7 + (level * 7 >> 1);
+ }
+
+ public static int getTotalExperience(final Player player)
+ {
+ int exp = (int) (getExpToLevel(player) * player.getExp());
+ int currentLevel = player.getLevel();
+
+ while (currentLevel > 0) {
+ currentLevel--;
+ exp += getExpToLevel(currentLevel);
+ }
+ return exp;
+ }
+}
diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
index fe2a42a0b..a6057f6ab 100644
--- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
+++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
@@ -275,6 +275,13 @@ public class EssentialsSign
protected final void validateTrade(final ISign sign, final int amountIndex, final int itemIndex,
final IUser player, final IEssentials ess) throws SignException
{
+ if (sign.getLine(itemIndex).equalsIgnoreCase("exp") || sign.getLine(itemIndex).equalsIgnoreCase("xp"))
+ {
+ int amount = getIntegerPositive(sign.getLine(amountIndex));
+ sign.setLine(amountIndex, Integer.toString(amount));
+ sign.setLine(itemIndex, "exp");
+ return;
+ }
final Trade trade = getTrade(sign, amountIndex, itemIndex, player, ess);
final ItemStack item = trade.getItemStack();
sign.setLine(amountIndex, Integer.toString(item.getAmount()));
@@ -284,7 +291,11 @@ public class EssentialsSign
protected final Trade getTrade(final ISign sign, final int amountIndex, final int itemIndex,
final IUser player, final IEssentials ess) throws SignException
{
-
+ if (sign.getLine(itemIndex).equalsIgnoreCase("exp") || sign.getLine(itemIndex).equalsIgnoreCase("xp"))
+ {
+ final int amount = getIntegerPositive(sign.getLine(amountIndex));
+ return new Trade(amount, ess);
+ }
final ItemStack item = getItemStack(sign.getLine(itemIndex), 1, ess);
final int amount = Math.min(getIntegerPositive(sign.getLine(amountIndex)), item.getType().getMaxStackSize() * player.getInventory().getSize());
if (item.getTypeId() == 0 || amount < 1)
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
index aaec002d4..04db5511c 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
@@ -8,7 +8,8 @@ import org.bukkit.inventory.ItemStack;
//TODO: Sell Enchantment on Trade signs?
public class SignTrade extends EssentialsSign
-{
+{
+
public SignTrade()
{
super("Trade");
@@ -269,6 +270,11 @@ public class SignTrade extends EssentialsSign
{
changeAmount(sign, index, -item.getAmount(), ess);
}
+ final Integer exp = trade.getExperience();
+ if (exp != null)
+ {
+ changeAmount(sign, index, -exp.intValue(), ess);
+ }
}
protected final void addAmount(final ISign sign, final int index, final Trade trade, final IEssentials ess) throws SignException
@@ -283,10 +289,16 @@ public class SignTrade extends EssentialsSign
{
changeAmount(sign, index, item.getAmount(), ess);
}
+ final Integer exp = trade.getExperience();
+ if (exp != null)
+ {
+ changeAmount(sign, index, exp.intValue(), ess);
+ }
}
private void changeAmount(final ISign sign, final int index, final double value, final IEssentials ess) throws SignException
{
+
final String line = sign.getLine(index).trim();
if (line.isEmpty())
{
diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv
index 44a4de473..95a197aec 100644
--- a/Essentials/src/items.csv
+++ b/Essentials/src/items.csv
@@ -1425,13 +1425,13 @@ btable,116,0
bdesk,116,0
mtable,116,0
mdesk,116,0
-brewingstand,117,0
-brewer,117,0
-potionstand,117,0
-potionbrewer,117,0
-pstand,117,0
-bstand,117,0
-pbrewer,117,0
+brewingstandblock,117,0
+brewerblock,117,0
+potionstandblock,117,0
+potionbrewerblock,117,0
+pstandblock,117,0
+bstandblock,117,0
+pbrewerblock,117,0
cauldron,118,0
steelcauldron,118,0
ironcauldron,118,0
@@ -2405,8 +2405,10 @@ gcream,378,0
bcream,378,0
combinedcream,378,0
ccream,378,0
-brewingstanditem,379,0
-potionstanditem,379,0
+bstand,379,0
+pstand,379,0
+brewingstand,379,0
+potionstand,379,0
cauldronitem,380,0
ironcauldronitem,380,0
steelcauldronitem,380,0
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index c3ed49ad1..2cb225390 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -55,10 +55,6 @@ commands:
description: Set a player on fire.
usage: /<command> <player> <seconds>
aliases: [eburn]
- butcher:
- description: Kill all mobs in a world.
- usage: /<command> <mobType> <radius>
- aliases: [ebutcher]
clearinventory:
description: Clear all items in your inventory.
usage: /<command>
@@ -186,6 +182,10 @@ commands:
description: Kills specified player.
usage: /<command> <player>
aliases: [ekill]
+ killall:
+ description: Kill all mobs in a world.
+ usage: /<command> [mobType] [radius]
+ aliases: [ekillall,butcher,ebutcher]
list:
description: List all online players.
usage: /<command>
diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java
index bc70d430b..12d7b6f60 100644
--- a/Essentials/test/com/earth2me/essentials/FakeServer.java
+++ b/Essentials/test/com/earth2me/essentials/FakeServer.java
@@ -532,6 +532,24 @@ public class FakeServer implements Server
{
throw new UnsupportedOperationException("Not supported yet.");
}
+
+ @Override
+ public long getFirstPlayed()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public long getLastPlayed()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean hasPlayedBefore()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
};
}
@@ -600,4 +618,10 @@ public class FakeServer implements Server
{
throw new UnsupportedOperationException("Not supported yet.");
}
+
+ @Override
+ public boolean getAllowEnd()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
diff --git a/EssentialsChat/nbproject/build-impl.xml b/EssentialsChat/nbproject/build-impl.xml
index 4dc2d2659..520e8a1d5 100644
--- a/EssentialsChat/nbproject/build-impl.xml
+++ b/EssentialsChat/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsChat-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsChat/nbproject/genfiles.properties b/EssentialsChat/nbproject/genfiles.properties
index 95704bf4b..b6146a42a 100644
--- a/EssentialsChat/nbproject/genfiles.properties
+++ b/EssentialsChat/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=7c7f517b
-nbproject/build-impl.xml.script.CRC32=2447bdf5
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=4e36cf00
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsChat/nbproject/project.properties b/EssentialsChat/nbproject/project.properties
index e59815e40..8cf7e9081 100644
--- a/EssentialsChat/nbproject/project.properties
+++ b/EssentialsChat/nbproject/project.properties
@@ -63,12 +63,12 @@ dist.jar=${dist.dir}/EssentialsChat.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
+ ${file.reference.bukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsGeoIP/nbproject/build-impl.xml b/EssentialsGeoIP/nbproject/build-impl.xml
index 41af95ec2..77f4373b4 100644
--- a/EssentialsGeoIP/nbproject/build-impl.xml
+++ b/EssentialsGeoIP/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsGeoIP-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsGeoIP/nbproject/genfiles.properties b/EssentialsGeoIP/nbproject/genfiles.properties
index 397a15928..55370a872 100644
--- a/EssentialsGeoIP/nbproject/genfiles.properties
+++ b/EssentialsGeoIP/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.44.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=cbf94f59
-nbproject/build-impl.xml.script.CRC32=e7684555
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=ae9285d7
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsGeoIP/nbproject/project.properties b/EssentialsGeoIP/nbproject/project.properties
index d20b3418f..cec81b0c2 100644
--- a/EssentialsGeoIP/nbproject/project.properties
+++ b/EssentialsGeoIP/nbproject/project.properties
@@ -63,12 +63,12 @@ dist.jar=${dist.dir}/EssentialsGeoIP.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
+ ${file.reference.bukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsGroupBridge/nbproject/build-impl.xml b/EssentialsGroupBridge/nbproject/build-impl.xml
index c0958cd2d..b6dfa7cef 100644
--- a/EssentialsGroupBridge/nbproject/build-impl.xml
+++ b/EssentialsGroupBridge/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsGroupBridge-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -198,6 +198,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -384,6 +385,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -514,7 +516,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsGroupBridge/nbproject/genfiles.properties b/EssentialsGroupBridge/nbproject/genfiles.properties
index e2ec78d4f..2a94f2294 100644
--- a/EssentialsGroupBridge/nbproject/genfiles.properties
+++ b/EssentialsGroupBridge/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=475c8f4d
-nbproject/build-impl.xml.script.CRC32=6ab1a006
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=aa68bcd9
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsGroupBridge/nbproject/project.properties b/EssentialsGroupBridge/nbproject/project.properties
index d23aed45b..b114e24e3 100644
--- a/EssentialsGroupBridge/nbproject/project.properties
+++ b/EssentialsGroupBridge/nbproject/project.properties
@@ -39,14 +39,14 @@ dist.jar=${dist.dir}/EssentialsGroupBridge.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${reference.EssentialsGroupManager.jar}:\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
+ ${file.reference.bukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsGroupManager/.classpath b/EssentialsGroupManager/.classpath
index eafae0c2b..61f808b2d 100644
--- a/EssentialsGroupManager/.classpath
+++ b/EssentialsGroupManager/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="../lib/bukkit-0.0.1-SNAPSHOT.jar"/>
- <classpathentry kind="lib" path="../lib/craftbukkit-0.0.1-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="../lib/craftbukkit.jar"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/EssentialsGroupManager/nbproject/build-impl.xml b/EssentialsGroupManager/nbproject/build-impl.xml
index 9382e257b..5012acdb9 100644
--- a/EssentialsGroupManager/nbproject/build-impl.xml
+++ b/EssentialsGroupManager/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsGroupManager-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -198,6 +198,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -384,6 +385,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -514,7 +516,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsGroupManager/nbproject/genfiles.properties b/EssentialsGroupManager/nbproject/genfiles.properties
index d5696760f..48463b7ff 100644
--- a/EssentialsGroupManager/nbproject/genfiles.properties
+++ b/EssentialsGroupManager/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=a6709b83
-nbproject/build-impl.xml.script.CRC32=4191e2b2
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=142d30c4
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsGroupManager/nbproject/project.properties b/EssentialsGroupManager/nbproject/project.properties
index 6fe938f17..5b58a2c8c 100644
--- a/EssentialsGroupManager/nbproject/project.properties
+++ b/EssentialsGroupManager/nbproject/project.properties
@@ -39,11 +39,11 @@ dist.jar=${dist.dir}/EssentialsGroupManager.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.craftbukkit.jar=../lib/craftbukkit.jar
includes=**
jar.compress=true
javac.classpath=\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
+ ${file.reference.craftbukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 71e9f4225..47a0f6b79 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -79,4 +79,10 @@ v 1.6:
- Optimize sorting to speedup permission tests.
- Fix superperms to pass all tests http://dev.bukkit.org/server-mods/superpermstest/
- Optimizations include changing the return of comparePermissionString.
- - Added file details in error messages for loading groups/users. \ No newline at end of file
+ - Added file details in error messages for loading groups/users.
+v 1.7:
+ - GM now supports offline players without having to mantogglevalidate
+ - Offline player checks now support partial name matches.
+ - Added custom events so plugins can now be notified of changes within GroupManager.
+ - GM now registers with Bukkits ServicesManager.
+ - deleting the contents of GlobalGroups.yml will no longer thrown a NullPointerException. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
index d7971d424..f1bf10985 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
@@ -14,6 +14,8 @@ import java.util.Set;
import java.util.logging.Level;
import org.anjocaido.groupmanager.data.Group;
+import org.anjocaido.groupmanager.events.GMGroupEvent;
+import org.anjocaido.groupmanager.events.GroupManagerEventHandler;
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
import org.anjocaido.groupmanager.utils.Tasks;
import org.bukkit.configuration.MemorySection;
@@ -105,49 +107,53 @@ public class GlobalGroups {
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + GlobalGroupsFile.getPath(), ex);
}
- // Read all global groups
- Map<String, Object> allGroups = (Map<String, Object>) GGroups.getConfigurationSection("groups").getValues(false);
-
- // Load each groups permissions list.
- if (allGroups != null) {
- // Clear out old groups
- resetGlobalGroups();
- for (String groupName : allGroups.keySet()) {
- Group newGroup = new Group(groupName.toLowerCase());
- Object element;
-
- // Permission nodes
- element = GGroups.get("groups." + groupName + ".permissions");
-
- if (element != null)
- if (element instanceof List) {
- for (String node : (List<String>) element) {
- newGroup.addPermission(node);
- }
- } else if (element instanceof String) {
- newGroup.addPermission((String) element);
- } else
- throw new IllegalArgumentException("Unknown type of permission node for global group: " + groupName);
-
- // Info nodes
- element = GGroups.get("groups." + groupName + ".info");
-
- if (element != null)
- if (element instanceof MemorySection) {
- Map<String, Object> vars = new HashMap<String, Object>();
- for (String key : ((MemorySection) element).getKeys(false)) {
- vars.put(key, ((MemorySection) element).get(key));
- }
- newGroup.setVariables(vars);
- } else
- throw new IllegalArgumentException("Unknown type of info node for global group: " + groupName);
-
- // Push a new group
- addGroup(newGroup);
+ // Clear out old groups
+ resetGlobalGroups();
+
+ if (!GGroups.getKeys(false).isEmpty()) {
+ // Read all global groups
+ Map<String, Object> allGroups = (Map<String, Object>) GGroups.getConfigurationSection("groups").getValues(false);
+
+ // Load each groups permissions list.
+ if (allGroups != null) {
+ for (String groupName : allGroups.keySet()) {
+ Group newGroup = new Group(groupName.toLowerCase());
+ Object element;
+
+ // Permission nodes
+ element = GGroups.get("groups." + groupName + ".permissions");
+
+ if (element != null)
+ if (element instanceof List) {
+ for (String node : (List<String>) element) {
+ newGroup.addPermission(node);
+ }
+ } else if (element instanceof String) {
+ newGroup.addPermission((String) element);
+ } else
+ throw new IllegalArgumentException("Unknown type of permission node for global group: " + groupName);
+
+ // Info nodes
+ element = GGroups.get("groups." + groupName + ".info");
+
+ if (element != null)
+ if (element instanceof MemorySection) {
+ Map<String, Object> vars = new HashMap<String, Object>();
+ for (String key : ((MemorySection) element).getKeys(false)) {
+ vars.put(key, ((MemorySection) element).get(key));
+ }
+ newGroup.setVariables(vars);
+ } else
+ throw new IllegalArgumentException("Unknown type of info node for global group: " + groupName);
+
+ // Push a new group
+ addGroup(newGroup);
+ }
}
+
+ removeGroupsChangedFlag();
}
-
- removeGroupsChangedFlag();
+
setTimeStampGroups(GlobalGroupsFile.lastModified());
GroupManager.setLoaded(true);
//GlobalGroupsFile = null;
@@ -243,6 +249,8 @@ public class GlobalGroups {
newGroup(groupToAdd);
haveGroupsChanged = true;
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(groupToAdd, GMGroupEvent.Action.GROUP_ADDED);
}
/**
@@ -270,6 +278,8 @@ public class GlobalGroups {
if (groups.containsKey(groupName.toLowerCase())) {
groups.remove(groupName.toLowerCase());
this.setGroupsChanged(true);
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(groupName.toLowerCase(), GMGroupEvent.Action.GROUP_REMOVED);
return true;
}
return false;
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index d8b7a15e1..2d46e74c8 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -16,6 +16,7 @@ import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -25,18 +26,22 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import org.anjocaido.groupmanager.dataholder.worlds.WorldsHolder;
import org.anjocaido.groupmanager.events.GMWorldListener;
+import org.anjocaido.groupmanager.events.GroupManagerEvent;
import org.anjocaido.groupmanager.utils.GMLoggerHandler;
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
import org.anjocaido.groupmanager.utils.Tasks;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
+import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
+import org.bukkit.event.Event.Priority;
import org.bukkit.event.world.WorldListener;
import org.bukkit.plugin.PluginDescriptionFile;
+import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;
@@ -87,6 +92,9 @@ public class GroupManager extends JavaPlugin {
@Override
public void onDisable() {
setLoaded(false);
+
+ // Un-register this service.
+ this.getServer().getServicesManager().unregister(this);
disableScheduler(); // Shutdown before we save, so it doesn't interfere.
if (worldsHolder != null) {
@@ -151,6 +159,9 @@ public class GroupManager extends JavaPlugin {
}
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!");
+
+ // Register as a service
+ this.getServer().getServicesManager().register(AnjoPermissionsHandler.class, this.permissionHandler, this, ServicePriority.Normal);
}
public static boolean isLoaded() {
@@ -325,7 +336,7 @@ public class GroupManager extends JavaPlugin {
PermissionCheckResult permissionResult = null;
ArrayList<User> removeList = null;
String auxString = null;
- List<Player> match = null;
+ List<String> match = null;
User auxUser = null;
Group auxGroup = null;
Group auxGroup2 = null;
@@ -373,15 +384,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <group>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -427,15 +435,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -467,15 +472,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <group>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -509,15 +511,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/manudelsub <user> <group>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -596,15 +595,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <permission>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -664,15 +660,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <permission>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -718,17 +711,13 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> (+))");
return false;
}
-
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- } else
- targetPlayer = this.getServer().getPlayer(match.get(0).getName());
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -765,6 +754,7 @@ public class GroupManager extends JavaPlugin {
// bukkit perms
if ((args.length == 2) && (args[1].equalsIgnoreCase("+"))) {
+ targetPlayer = this.getServer().getPlayer(auxUser.getName());
if (targetPlayer != null) {
sender.sendMessage(ChatColor.YELLOW + "Superperms reports: ");
for (String line : BukkitPermissions.listPerms(targetPlayer))
@@ -786,19 +776,16 @@ public class GroupManager extends JavaPlugin {
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- } else
- targetPlayer = this.getServer().getPlayer(match.get(0).getName());
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
+ targetPlayer = this.getServer().getPlayer(auxUser.getName());
// VALIDANDO PERMISSAO
permissionResult = permissionHandler.checkFullUserPermission(auxUser, args[1]);
if (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {
@@ -1089,15 +1076,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <user> <variable> <value>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1124,15 +1108,12 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <user> <variable>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
+
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1155,15 +1136,11 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <user>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1192,15 +1169,11 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <user> <variable>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1359,15 +1332,11 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1393,15 +1362,11 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1431,15 +1396,11 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1613,15 +1574,11 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <group>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1673,15 +1630,11 @@ public class GroupManager extends JavaPlugin {
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <group>)");
return false;
}
- if (validateOnlinePlayer) {
- match = this.getServer().matchPlayer(args[0]);
- if (match.size() != 1) {
- sender.sendMessage(ChatColor.RED + "Player not found!");
+ if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
return false;
- }
}
if (match != null) {
- auxUser = dataHolder.getUser(match.get(0).getName());
+ auxUser = dataHolder.getUser(match.get(0));
} else {
auxUser = dataHolder.getUser(args[0]);
}
@@ -1841,6 +1794,58 @@ public class GroupManager extends JavaPlugin {
}
}
+
+ /**
+ * Load a List of players matching the name given. If none online, check
+ * Offline.
+ *
+ * @param playerName, sender
+ * @return true if a single match is found
+ */
+ private List<String> validatePlayer(String playerName, CommandSender sender) {
+
+ List<Player> players = new ArrayList<Player>();
+ List<String> match = new ArrayList<String>();
+
+ players = this.getServer().matchPlayer(playerName);
+ if (players.isEmpty()) {
+ // Check for an offline player (exact match).
+ if (Arrays.asList(this.getServer().getOfflinePlayers()).contains(Bukkit.getOfflinePlayer(playerName))) {
+ match.add(playerName);
+ } else {
+ //look for partial matches
+ for (OfflinePlayer offline : this.getServer().getOfflinePlayers()) {
+ if (offline.getName().toLowerCase().startsWith(playerName.toLowerCase()))
+ match.add(offline.getName());
+ }
+ }
+
+ } else {
+ for (Player player : players) {
+ match.add(player.getName());
+ }
+ }
+
+ if (match.isEmpty() || match == null) {
+ sender.sendMessage(ChatColor.RED + "Player not found!");
+ return null;
+ } else if (match.size() > 1) {
+ sender.sendMessage(ChatColor.RED + "Too many matches found! (" + match.toString() + ")");
+ return null;
+ }
+
+ return match;
+
+ }
+
+ /**
+ * Triggers all GroupManager events for other plugins to see.
+ *
+ * @param event
+ */
+ public static void callEvent(GroupManagerEvent event) {
+ Bukkit.getServer().getPluginManager().callEvent(event);
+ }
/**
* @return the config
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java
index ba8915a18..5a39600b6 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java
@@ -6,6 +6,9 @@ package org.anjocaido.groupmanager.data;
import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
+import org.anjocaido.groupmanager.events.GMGroupEvent.Action;
+import org.anjocaido.groupmanager.events.GroupManagerEventHandler;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -13,7 +16,7 @@ import java.util.Map;
/**
*
- * @author gabrielcouto
+ * @author gabrielcouto/ElgarL
*/
public class Group extends DataUnit implements Cloneable {
@@ -45,7 +48,7 @@ public class Group extends DataUnit implements Cloneable {
public Group(String name) {
super(name);
}
-
+
/**
* Clone this group
* @return a clone of this group
@@ -114,14 +117,17 @@ public class Group extends DataUnit implements Cloneable {
inherits.add(inherit.getName().toLowerCase());
}
flagAsChanged();
- if (GroupManager.isLoaded())
+ if (GroupManager.isLoaded()) {
GroupManager.BukkitPermissions.updateAllPlayers();
+ GroupManagerEventHandler.callEvent(this, Action.GROUP_INHERITANCE_CHANGED);
+ }
}
public boolean removeInherits(String inherit) {
if (this.inherits.contains(inherit.toLowerCase())) {
this.inherits.remove(inherit.toLowerCase());
flagAsChanged();
+ GroupManagerEventHandler.callEvent(this, Action.GROUP_INHERITANCE_CHANGED);
return true;
}
return false;
@@ -145,7 +151,9 @@ public class Group extends DataUnit implements Cloneable {
variables.addVar(key, temp.getVarObject(key));
}
flagAsChanged();
- if (GroupManager.isLoaded())
+ if (GroupManager.isLoaded()) {
GroupManager.BukkitPermissions.updateAllPlayers();
+ GroupManagerEventHandler.callEvent(this, Action.GROUP_INFO_CHANGED);
+ }
}
}
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
index 10757475d..1f2be9875 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
@@ -9,6 +9,9 @@ import java.util.ArrayList;
import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
+import org.anjocaido.groupmanager.events.GMUserEvent.Action;
+import org.anjocaido.groupmanager.events.GroupManagerEventHandler;
+
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@@ -16,7 +19,7 @@ import org.bukkit.entity.Player;
/**
*
- * @author gabrielcouto
+ * @author gabrielcouto/ElgarL
*/
public class User extends DataUnit implements Cloneable {
@@ -139,6 +142,8 @@ public class User extends DataUnit implements Cloneable {
if (notify)
GroupManager.notify(this.getName(), String.format(" moved to the group %s.", group.getName()));
+
+ GroupManagerEventHandler.callEvent(this, Action.USER_GROUP_CHANGED);
}
}
@@ -153,9 +158,11 @@ public class User extends DataUnit implements Cloneable {
removeSubGroup(subGroup);
subGroups.add(subGroup.getName());
flagAsChanged();
- if (GroupManager.isLoaded())
+ if (GroupManager.isLoaded()) {
if (GroupManager.BukkitPermissions.player_join = false)
GroupManager.BukkitPermissions.updateAllPlayers();
+ GroupManagerEventHandler.callEvent(this, Action.USER_SUBGROUP_CHANGED);
+ }
}
public int subGroupsSize() {
@@ -177,6 +184,7 @@ public class User extends DataUnit implements Cloneable {
if (GroupManager.isLoaded())
if (GroupManager.BukkitPermissions.player_join = false)
GroupManager.BukkitPermissions.updateAllPlayers();
+ GroupManagerEventHandler.callEvent(this, Action.USER_SUBGROUP_CHANGED);
return true;
}
} catch (Exception e) {
@@ -220,9 +228,11 @@ public class User extends DataUnit implements Cloneable {
variables.addVar(key, varList.get(key));
}
flagAsChanged();
- if (GroupManager.isLoaded())
+ if (GroupManager.isLoaded()) {
if (GroupManager.BukkitPermissions.player_join = false)
GroupManager.BukkitPermissions.updateAllPlayers();
+ GroupManagerEventHandler.callEvent(this, Action.USER_INFO_CHANGED);
+ }
}
public User updatePlayer(Player player) {
@@ -238,5 +248,4 @@ public class User extends DataUnit implements Cloneable {
}
return bukkitPlayer;
}
-
}
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index 4ef77687a..2a944856b 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -22,6 +22,11 @@ import java.util.logging.Logger;
import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.data.Group;
import org.anjocaido.groupmanager.data.User;
+import org.anjocaido.groupmanager.events.GMGroupEvent;
+import org.anjocaido.groupmanager.events.GMSystemEvent;
+import org.anjocaido.groupmanager.events.GMUserEvent;
+import org.anjocaido.groupmanager.events.GMUserEvent.Action;
+import org.anjocaido.groupmanager.events.GroupManagerEventHandler;
import org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler;
import org.bukkit.Server;
import org.bukkit.plugin.Plugin;
@@ -144,6 +149,8 @@ public class WorldDataHolder {
removeUser(theUser.getName());
users.put(theUser.getName().toLowerCase(), theUser);
haveUsersChanged = true;
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(theUser, Action.USER_ADDED);
}
/**
@@ -155,6 +162,8 @@ public class WorldDataHolder {
if (users.containsKey(userName.toLowerCase())) {
users.remove(userName.toLowerCase());
haveUsersChanged = true;
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(userName, GMUserEvent.Action.USER_REMOVED);
return true;
}
return false;
@@ -179,6 +188,8 @@ public class WorldDataHolder {
}
defaultGroup = this.getGroup(group.getName());
haveGroupsChanged = true;
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(GMSystemEvent.Action.DEFAULT_GROUP_CHANGED);
}
/**
@@ -221,6 +232,7 @@ public class WorldDataHolder {
public void addGroup(Group groupToAdd) {
if (groupToAdd.getName().toLowerCase().startsWith("g:")) {
GroupManager.getGlobalGroups().addGroup(groupToAdd);
+ GroupManagerEventHandler.callEvent(groupToAdd, GMGroupEvent.Action.GROUP_ADDED);
return;
}
@@ -230,10 +242,12 @@ public class WorldDataHolder {
removeGroup(groupToAdd.getName());
groups.put(groupToAdd.getName().toLowerCase(), groupToAdd);
haveGroupsChanged = true;
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(groupToAdd, GMGroupEvent.Action.GROUP_ADDED);
}
/**
- * Remove the group to the list
+ * Remove the group from the list
* @param groupName
* @return true if had something to remove. false the group was default or non-existant
*/
@@ -248,6 +262,8 @@ public class WorldDataHolder {
if (groups.containsKey(groupName.toLowerCase())) {
groups.remove(groupName.toLowerCase());
haveGroupsChanged = true;
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(groupName.toLowerCase(), GMGroupEvent.Action.GROUP_REMOVED);
return true;
}
return false;
@@ -345,6 +361,7 @@ public class WorldDataHolder {
Logger.getLogger(WorldDataHolder.class.getName()).log(Level.WARNING, null, ex);
}
GroupManager.setLoaded(true);
+ GroupManagerEventHandler.callEvent(GMSystemEvent.Action.RELOADED);
}
/**
@@ -375,6 +392,7 @@ public class WorldDataHolder {
Logger.getLogger(WorldDataHolder.class.getName()).log(Level.WARNING, null, ex);
}
GroupManager.setLoaded(true);
+ GroupManagerEventHandler.callEvent(GMSystemEvent.Action.RELOADED);
}
/**
@@ -936,6 +954,9 @@ public class WorldDataHolder {
ph.groupsFile = groupsFile;
ph.setTimeStampGroups(groupsFile.lastModified());
ph.removeGroupsChangedFlag();
+
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(GMSystemEvent.Action.SAVED);
/*FileWriter tx = null;
try {
@@ -1010,6 +1031,9 @@ public class WorldDataHolder {
ph.setTimeStampUsers(usersFile.lastModified());
ph.removeUsersChangedFlag();
+ if (GroupManager.isLoaded())
+ GroupManagerEventHandler.callEvent(GMSystemEvent.Action.SAVED);
+
/*FileWriter tx = null;
try {
tx = new FileWriter(usersFile, false);
@@ -1191,5 +1215,6 @@ public class WorldDataHolder {
setTimeStampGroups(groupsFile.lastModified());
if (usersFile != null)
setTimeStampUsers(usersFile.lastModified());
- }
+ }
+
}
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java
new file mode 100644
index 000000000..9a44a21b8
--- /dev/null
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMGroupEvent.java
@@ -0,0 +1,57 @@
+package org.anjocaido.groupmanager.events;
+
+import org.anjocaido.groupmanager.data.Group;
+
+
+/**
+ * @author ElgarL
+ *
+ */
+public class GMGroupEvent extends GroupManagerEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5294917600434510451L;
+
+ protected Group group;
+
+ protected String groupName;
+
+ protected Action action;
+
+ public GMGroupEvent(Group group, Action action) {
+ super(action.toString());
+
+ this.group = group;
+ this.action = action;
+ this.groupName = group.getName();
+ }
+
+ public GMGroupEvent(String groupName, Action action) {
+ super(action.toString());
+
+ this.groupName = groupName;
+ this.action = action;
+ }
+
+ public Action getAction(){
+ return this.action;
+ }
+
+ public Group getGroup() {
+ return group;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public enum Action {
+ GROUP_PERMISSIONS_CHANGED,
+ GROUP_INHERITANCE_CHANGED,
+ GROUP_INFO_CHANGED,
+ GROUP_ADDED,
+ GROUP_REMOVED,
+ }
+} \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java
new file mode 100644
index 000000000..f7ecf79de
--- /dev/null
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMSystemEvent.java
@@ -0,0 +1,32 @@
+package org.anjocaido.groupmanager.events;
+
+
+/**
+ * @author ElgarL
+ *
+ */
+public class GMSystemEvent extends GroupManagerEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8786811924448821548L;
+ protected Action action;
+
+ public GMSystemEvent(Action action) {
+ super(action.toString());
+
+ this.action = action;
+ }
+
+ public Action getAction(){
+ return this.action;
+ }
+
+ public enum Action {
+ RELOADED,
+ SAVED,
+ DEFAULT_GROUP_CHANGED,
+ VALIDATE_TOGGLE,
+ }
+} \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java
new file mode 100644
index 000000000..68483c036
--- /dev/null
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GMUserEvent.java
@@ -0,0 +1,59 @@
+package org.anjocaido.groupmanager.events;
+
+import org.anjocaido.groupmanager.data.User;
+
+
+/**
+ * @author ElgarL
+ *
+ */
+public class GMUserEvent extends GroupManagerEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5294917600434510451L;
+
+ protected User user;
+
+ protected String userName;
+
+ protected Action action;
+
+ public GMUserEvent(User user, Action action) {
+ super(action.toString());
+
+ this.user = user;
+ this.action = action;
+ this.userName = user.getName();
+ }
+
+ public GMUserEvent(String userName, Action action) {
+ super(action.toString());
+
+ this.userName = userName;
+ this.action = action;
+ }
+
+ public Action getAction(){
+ return this.action;
+ }
+
+ public User getUser() {
+ return user;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public enum Action {
+ USER_PERMISSIONS_CHANGED,
+ USER_INHERITANCE_CHANGED,
+ USER_INFO_CHANGED,
+ USER_GROUP_CHANGED,
+ USER_SUBGROUP_CHANGED,
+ USER_ADDED,
+ USER_REMOVED,
+ }
+} \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEvent.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEvent.java
new file mode 100644
index 000000000..856abbc28
--- /dev/null
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEvent.java
@@ -0,0 +1,22 @@
+package org.anjocaido.groupmanager.events;
+
+
+import org.bukkit.event.Event;
+
+/**
+ * @author ElgarL
+ *
+ */
+public abstract class GroupManagerEvent extends Event {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8790362185329926951L;
+
+ protected GroupManagerEvent(String name) {
+ super(name);
+ }
+
+
+} \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java
new file mode 100644
index 000000000..83cac393d
--- /dev/null
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java
@@ -0,0 +1,42 @@
+package org.anjocaido.groupmanager.events;
+
+import org.anjocaido.groupmanager.GroupManager;
+import org.anjocaido.groupmanager.data.Group;
+import org.anjocaido.groupmanager.data.User;
+
+
+
+/**
+ * @author ElgarL
+ *
+ */
+public class GroupManagerEventHandler {
+
+ protected static void callEvent(GMGroupEvent event) {
+ GroupManager.callEvent(event);
+ }
+ protected static void callEvent(GMUserEvent event) {
+ GroupManager.callEvent(event);
+ }
+ protected static void callEvent(GMSystemEvent event) {
+ GroupManager.callEvent(event);
+ }
+
+ public static void callEvent(Group group, GMGroupEvent.Action action) {
+ callEvent(new GMGroupEvent(group, action));
+ }
+ public static void callEvent(String groupName, GMGroupEvent.Action action) {
+ callEvent(new GMGroupEvent(groupName, action));
+ }
+
+ public static void callEvent(User user, GMUserEvent.Action action) {
+ callEvent(new GMUserEvent(user, action));
+ }
+ public static void callEvent(String userName, GMUserEvent.Action action) {
+ callEvent(new GMUserEvent(userName, action));
+ }
+
+ public static void callEvent(GMSystemEvent.Action action) {
+ callEvent(new GMSystemEvent(action));
+ }
+} \ No newline at end of file
diff --git a/EssentialsGroupManager/src/plugin.yml b/EssentialsGroupManager/src/plugin.yml
index 3c8657c12..115e92ba2 100644
--- a/EssentialsGroupManager/src/plugin.yml
+++ b/EssentialsGroupManager/src/plugin.yml
@@ -1,5 +1,5 @@
name: GroupManager
-version: "1.6 (Phoenix)"
+version: "1.7 (Phoenix)"
main: org.anjocaido.groupmanager.GroupManager
website: http://www.anjocaido.info/
description: Provides on-the-fly system for permissions system created by Nijikokun. But all in memory, and with flat-file saving schedule.
diff --git a/EssentialsProtect/nbproject/build-impl.xml b/EssentialsProtect/nbproject/build-impl.xml
index 1c9bf07bf..7931eda6c 100644
--- a/EssentialsProtect/nbproject/build-impl.xml
+++ b/EssentialsProtect/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsProtect-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsProtect/nbproject/genfiles.properties b/EssentialsProtect/nbproject/genfiles.properties
index 728aaf424..a5a167f5e 100644
--- a/EssentialsProtect/nbproject/genfiles.properties
+++ b/EssentialsProtect/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.3.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=40644caa
-nbproject/build-impl.xml.script.CRC32=0e9dab07
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=a451c39a
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsProtect/nbproject/project.properties b/EssentialsProtect/nbproject/project.properties
index 5224b3af6..77c12c248 100644
--- a/EssentialsProtect/nbproject/project.properties
+++ b/EssentialsProtect/nbproject/project.properties
@@ -63,7 +63,7 @@ dist.jar=${dist.dir}/original-EssentialsProtect.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
file.reference.c3p0-0.9.1.2.jar=..\\lib\\c3p0-0.9.1.2.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
@@ -72,7 +72,7 @@ jar.index=${jnlp.enabled}
javac.classpath=\
${reference.Essentials.jar}:\
${file.reference.c3p0-0.9.1.2.jar}:\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
+ ${file.reference.bukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsSpawn/nbproject/build-impl.xml b/EssentialsSpawn/nbproject/build-impl.xml
index 1f4e8e9fb..84746698d 100644
--- a/EssentialsSpawn/nbproject/build-impl.xml
+++ b/EssentialsSpawn/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsSpawn-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsSpawn/nbproject/genfiles.properties b/EssentialsSpawn/nbproject/genfiles.properties
index bf3a6888d..531fe7094 100644
--- a/EssentialsSpawn/nbproject/genfiles.properties
+++ b/EssentialsSpawn/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=e7b96939
-nbproject/build-impl.xml.script.CRC32=fd1c94f8
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=2b257042
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsSpawn/nbproject/project.properties b/EssentialsSpawn/nbproject/project.properties
index 96f4448ec..f78c2be3d 100644
--- a/EssentialsSpawn/nbproject/project.properties
+++ b/EssentialsSpawn/nbproject/project.properties
@@ -63,12 +63,12 @@ dist.jar=${dist.dir}/EssentialsSpawn.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
includes=**
jar.compress=true
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
+ ${file.reference.bukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsUpdate/nbproject/build-impl.xml b/EssentialsUpdate/nbproject/build-impl.xml
index 7a38ac1d4..4e62c50ea 100644
--- a/EssentialsUpdate/nbproject/build-impl.xml
+++ b/EssentialsUpdate/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsUpdate-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsUpdate/nbproject/genfiles.properties b/EssentialsUpdate/nbproject/genfiles.properties
index 992379672..0791ac507 100644
--- a/EssentialsUpdate/nbproject/genfiles.properties
+++ b/EssentialsUpdate/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.44.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=fd4b98a9
-nbproject/build-impl.xml.script.CRC32=1cab9494
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=6c5a1616
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsUpdate/nbproject/project.properties b/EssentialsUpdate/nbproject/project.properties
index b73c58ae9..88315dfa0 100644
--- a/EssentialsUpdate/nbproject/project.properties
+++ b/EssentialsUpdate/nbproject/project.properties
@@ -63,11 +63,11 @@ dist.jar=${dist.dir}/EssentialsUpdate.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
includes=**
jar.compress=true
javac.classpath=\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}
+ ${file.reference.bukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/EssentialsXMPP/nbproject/build-impl.xml b/EssentialsXMPP/nbproject/build-impl.xml
index 08076c6cb..c0dfd2504 100644
--- a/EssentialsXMPP/nbproject/build-impl.xml
+++ b/EssentialsXMPP/nbproject/build-impl.xml
@@ -20,10 +20,10 @@ is divided into following sections:
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="EssentialsXMPP-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
+ <fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
- <antversion atleast="1.7.1"/>
+ <antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
@@ -223,6 +223,7 @@ is divided into following sections:
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
+ <property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
</target>
<target name="-post-init">
@@ -409,6 +410,7 @@ is divided into following sections:
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
@@ -539,7 +541,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
diff --git a/EssentialsXMPP/nbproject/genfiles.properties b/EssentialsXMPP/nbproject/genfiles.properties
index 3df7372ea..bb3b3a973 100644
--- a/EssentialsXMPP/nbproject/genfiles.properties
+++ b/EssentialsXMPP/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.42.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=1012a5dd
-nbproject/build-impl.xml.script.CRC32=6ad41b28
-nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
+nbproject/build-impl.xml.script.CRC32=4ece3e29
+nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
diff --git a/EssentialsXMPP/nbproject/project.properties b/EssentialsXMPP/nbproject/project.properties
index 90aba36fa..66d780451 100644
--- a/EssentialsXMPP/nbproject/project.properties
+++ b/EssentialsXMPP/nbproject/project.properties
@@ -63,7 +63,7 @@ dist.jar=${dist.dir}/original-EssentialsXMPP.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+file.reference.bukkit.jar=../lib/bukkit.jar
file.reference.smack-3.2.1.jar=../lib/smack-3.2.1.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
@@ -71,8 +71,8 @@ jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${reference.Essentials.jar}:\
- ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}:\
- ${file.reference.smack-3.2.1.jar}
+ ${file.reference.smack-3.2.1.jar}:\
+ ${file.reference.bukkit.jar}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked
javac.deprecation=false
diff --git a/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
index 5ee71d2e3..01aed63a2 100644
--- a/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
+++ b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
Binary files differ
diff --git a/lib/bukkit-1.0.0-R1-SNAPSHOT.jar b/lib/bukkit.jar
index ddaaa3368..283d2224d 100644
--- a/lib/bukkit-1.0.0-R1-SNAPSHOT.jar
+++ b/lib/bukkit.jar
Binary files differ
diff --git a/lib/craftbukkit-1.0.0-SNAPSHOT.jar b/lib/craftbukkit.jar
index ab3f075ac..28b3e3f7e 100644
--- a/lib/craftbukkit-1.0.0-SNAPSHOT.jar
+++ b/lib/craftbukkit.jar
Binary files differ