From f63cde00fa8cc113d9d63d1ba8ccadbaebc7ac9b Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 25 Sep 2012 11:15:28 +0100 Subject: [PATCH 01/34] Minor typo fix - Necrodoom --- .../src/org/anjocaido/groupmanager/GroupManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index 46ec861a3..ee1130483 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -1654,7 +1654,7 @@ public class GroupManager extends JavaPlugin { try { worldsHolder.saveChanges(forced); - sender.sendMessage(ChatColor.YELLOW + " All changes were saved."); + sender.sendMessage(ChatColor.YELLOW + "All changes were saved."); } catch (IllegalStateException ex) { sender.sendMessage(ChatColor.RED + ex.getMessage()); } From d208c244aaebc1e6d9b3a373edb96c046b69d808 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 25 Sep 2012 11:25:19 +0100 Subject: [PATCH 02/34] Fix javadocs --- .../org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java | 2 +- .../org/anjocaido/groupmanager/dataholder/UsersDataHolder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java index fdd099c87..2ccca4f65 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java @@ -69,7 +69,7 @@ public class GroupsDataHolder { } /** - * @param groups the groups to set + * */ public void resetGroups() { this.groups.clear(); diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java index 8a3c4c102..ca6d7c9fc 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java @@ -52,7 +52,7 @@ public class UsersDataHolder { } /** - * @param users the users to set + * */ public void resetUsers() { this.users.clear(); From da89d75fbd66520642e8e74641c5dc73f589fca1 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 25 Sep 2012 11:27:36 +0100 Subject: [PATCH 03/34] Commenting --- .../org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java | 2 +- .../org/anjocaido/groupmanager/dataholder/UsersDataHolder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java index 2ccca4f65..418405f65 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java @@ -69,7 +69,7 @@ public class GroupsDataHolder { } /** - * + * Resets the Groups */ public void resetGroups() { this.groups.clear(); diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java index ca6d7c9fc..5f14a7d45 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java @@ -52,7 +52,7 @@ public class UsersDataHolder { } /** - * + * Resets the Users */ public void resetUsers() { this.users.clear(); From 91d83d909f730f2a8f59c1176a4633a8c238302f Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 25 Sep 2012 13:09:26 +0100 Subject: [PATCH 04/34] Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes]. --- EssentialsGroupManager/src/Changelog.txt | 3 +- .../dataholder/WorldDataHolder.java | 239 ++++++++---------- 2 files changed, 112 insertions(+), 130 deletions(-) diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index c170b725a..a877078d8 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -198,4 +198,5 @@ v 2.0: - Give a better error when a subgroup is null. - Include the GM version when logging errors. - Fix Synchronization on adding subgroups (thanks snowleo). - - Remove info node support from GlobalGroups. It should not have them as GlobalGroups are only permission collections. \ No newline at end of file + - Remove info node support from GlobalGroups. It should not have them as GlobalGroups are only permission collections. + - Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes]. \ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 4d85eff68..9790efa2a 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -37,9 +37,9 @@ import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.reader.UnicodeReader; /** - * One instance of this should exist per world/mirror - * it contains all functions to manage these data sets - * and points to the relevant users and groups objects. + * One instance of this should exist per world/mirror it contains all functions + * to manage these data sets and points to the relevant users and groups + * objects. * * @author gabrielcouto, ElgarL */ @@ -100,8 +100,8 @@ public class WorldDataHolder { } /** - * Search for a user. If it doesn't exist, create a new one with - * default group. + * Search for a user. If it doesn't exist, create a new one with default + * group. * * @param userName the name of the user * @return class that manage that user permission @@ -207,8 +207,8 @@ public class WorldDataHolder { } /** - * Check if a group exists. - * Its the same of getGroup, but check if it is null. + * Check if a group exists. Its the same of getGroup, but check if it is + * null. * * @param groupName the name of the group * @return true if exists. false if not. @@ -272,8 +272,7 @@ public class WorldDataHolder { } /** - * Creates a new User with the given name - * and adds it to this holder. + * Creates a new User with the given name and adds it to this holder. * * @param userName the username you want * @return null if user already exists. or new User @@ -291,8 +290,7 @@ public class WorldDataHolder { } /** - * Creates a new Group with the given name - * and adds it to this holder + * Creates a new Group with the given name and adds it to this holder * * @param groupName the groupname you want * @return null if group already exists. or new Group @@ -319,7 +317,8 @@ public class WorldDataHolder { * @return a collection of the groups */ public Collection getGroupList() { - synchronized(getGroups()) { + + synchronized (getGroups()) { return new ArrayList(getGroups().values()); } } @@ -329,7 +328,8 @@ public class WorldDataHolder { * @return a collection of the users */ public Collection getUserList() { - synchronized(getUsers()) { + + synchronized (getUsers()) { return new ArrayList(getUsers().values()); } } @@ -510,7 +510,7 @@ public class WorldDataHolder { } catch (Exception ex) { throw new IllegalArgumentException("Your " + groupsFile.getPath() + " file is invalid. See console for details.", ex); } - + if (allGroupsNode == null) { throw new IllegalArgumentException("You have no groups in " + groupsFile.getPath() + "."); } @@ -520,8 +520,7 @@ public class WorldDataHolder { Integer groupCount = 0; /* - * loop each group entry - * and process it's data. + * loop each group entry and process it's data. */ while (groupItr.hasNext()) { @@ -545,8 +544,7 @@ public class WorldDataHolder { } /* - * Create a new group with this name - * in the assigned data source. + * Create a new group with this name in the assigned data source. */ Group thisGrp = ph.createGroup(groupKey); @@ -569,8 +567,8 @@ public class WorldDataHolder { */ } else if ((Boolean.parseBoolean(nodeData.toString()))) { /* - * Set this as the default group. - * Warn if some other group has already claimed that position. + * Set this as the default group. Warn if some other group has + * already claimed that position. */ if (ph.getDefaultGroup() != null) { GroupManager.logger.warning("The group '" + thisGrp.getName() + "' is claiming to be default where '" + ph.getDefaultGroup().getName() + "' already was."); @@ -590,8 +588,7 @@ public class WorldDataHolder { if (nodeData == null) { /* - * If no permissions node is found, or it's empty - * do nothing. + * If no permissions node is found, or it's empty do nothing. */ } else { /* @@ -677,8 +674,8 @@ public class WorldDataHolder { if (nodeData == null || nodeData instanceof List) { if (nodeData == null) { /* - * If no inheritance node is found, or it's empty - * do nothing. + * If no inheritance node is found, or it's empty do + * nothing. */ } else if (nodeData instanceof List) { @@ -790,10 +787,10 @@ public class WorldDataHolder { // Attempt to fetch the next user name. node = usersItr.next(); if (node instanceof Integer) - usersKey = Integer.toString((Integer)node); + usersKey = Integer.toString((Integer) node); else usersKey = node.toString(); - + } catch (Exception ex) { throw new IllegalArgumentException("Invalid node type for user entry (" + userCount + ") in file: " + usersFile.getPath(), ex); } @@ -821,8 +818,8 @@ public class WorldDataHolder { if (nodeData == null) { /* - * If no permissions node is found, or it's empty - * do nothing. + * If no permissions node is found, or it's empty do + * nothing. */ } else { if (nodeData instanceof List) { @@ -858,8 +855,7 @@ public class WorldDataHolder { if (nodeData == null) { /* - * If no subgroups node is found, or it's empty - * do nothing. + * If no subgroups node is found, or it's empty do nothing. */ } else if (nodeData instanceof List) { for (Object o : ((List) nodeData)) { @@ -894,8 +890,7 @@ public class WorldDataHolder { if (nodeData == null) { /* - * If no info node is found, or it's empty - * do nothing. + * If no info node is found, or it's empty do nothing. */ } else if (nodeData instanceof Map) { thisUser.setVariables((Map) nodeData); @@ -946,29 +941,29 @@ public class WorldDataHolder { Map groupsMap = new HashMap(); root.put("groups", groupsMap); - synchronized(ph.getGroups()) { - for (String groupKey : ph.getGroups().keySet()) { - Group group = ph.getGroups().get(groupKey); + synchronized (ph.getGroups()) { + for (String groupKey : ph.getGroups().keySet()) { + Group group = ph.getGroups().get(groupKey); - Map aGroupMap = new HashMap(); - groupsMap.put(group.getName(), aGroupMap); + Map aGroupMap = new HashMap(); + groupsMap.put(group.getName(), aGroupMap); - if (ph.getDefaultGroup() == null) { - GroupManager.logger.severe("There is no default group for world: " + ph.getName()); + if (ph.getDefaultGroup() == null) { + GroupManager.logger.severe("There is no default group for world: " + ph.getName()); + } + aGroupMap.put("default", group.equals(ph.getDefaultGroup())); + + Map infoMap = new HashMap(); + aGroupMap.put("info", infoMap); + + for (String infoKey : group.getVariables().getVarKeyList()) { + infoMap.put(infoKey, group.getVariables().getVarObject(infoKey)); + } + + aGroupMap.put("inheritance", group.getInherits()); + + aGroupMap.put("permissions", group.getPermissionList()); } - aGroupMap.put("default", group.equals(ph.getDefaultGroup())); - - Map infoMap = new HashMap(); - aGroupMap.put("info", infoMap); - - for (String infoKey : group.getVariables().getVarKeyList()) { - infoMap.put(infoKey, group.getVariables().getVarObject(infoKey)); - } - - aGroupMap.put("inheritance", group.getInherits()); - - aGroupMap.put("permissions", group.getPermissionList()); - } } if (!root.isEmpty()) { @@ -1008,18 +1003,9 @@ public class WorldDataHolder { GroupManagerEventHandler.callEvent(GMSystemEvent.Action.SAVED); /* - * FileWriter tx = null; - * try { - * tx = new FileWriter(groupsFile, false); - * tx.write(yaml.dump(root)); - * tx.flush(); - * } catch (Exception e) { - * } finally { - * try { - * tx.close(); - * } catch (IOException ex) { - * } - * } + * FileWriter tx = null; try { tx = new FileWriter(groupsFile, false); + * tx.write(yaml.dump(root)); tx.flush(); } catch (Exception e) { } + * finally { try { tx.close(); } catch (IOException ex) { } } */ } @@ -1035,36 +1021,40 @@ public class WorldDataHolder { Map usersMap = new HashMap(); root.put("users", usersMap); - synchronized(ph.getUsers()) { - for (String userKey : ph.getUsers().keySet()) { - User user = ph.getUsers().get(userKey); - if ((user.getGroup() == null || user.getGroup().equals(ph.getDefaultGroup())) && user.getPermissionList().isEmpty() && user.getVariables().isEmpty() && user.isSubGroupsEmpty()) { - continue; - } - - Map aUserMap = new HashMap(); - usersMap.put(user.getName(), aUserMap); - - if (user.getGroup() == null) { - aUserMap.put("group", ph.getDefaultGroup().getName()); - } else { - aUserMap.put("group", user.getGroup().getName()); - } - // USER INFO NODE - BETA - if (user.getVariables().getSize() > 0) { - Map infoMap = new HashMap(); - aUserMap.put("info", infoMap); - for (String infoKey : user.getVariables().getVarKeyList()) { - infoMap.put(infoKey, user.getVariables().getVarObject(infoKey)); + synchronized (ph.getUsers()) { + for (String userKey : ph.getUsers().keySet()) { + User user = ph.getUsers().get(userKey); + if ((user.getGroup() == null || user.getGroup().equals(ph.getDefaultGroup())) && user.getPermissionList().isEmpty() && user.getVariables().isEmpty() && user.isSubGroupsEmpty()) { + continue; } - } - // END USER INFO NODE - BETA - aUserMap.put("permissions", user.getPermissionList()); - // SUBGROUPS NODE - BETA - aUserMap.put("subgroups", user.subGroupListStringCopy()); - // END SUBGROUPS NODE - BETA - } + Map aUserMap = new HashMap(); + usersMap.put(user.getName(), aUserMap); + + // GROUP NODE + if (user.getGroup() == null) { + aUserMap.put("group", ph.getDefaultGroup().getName()); + } else { + aUserMap.put("group", user.getGroup().getName()); + } + + // SUBGROUPS NODE + aUserMap.put("subgroups", user.subGroupListStringCopy()); + + // PERMISSIONS NODE + aUserMap.put("permissions", user.getPermissionList()); + + // USER INFO NODE - BETA + if (user.getVariables().getSize() > 0) { + Map infoMap = new HashMap(); + aUserMap.put("info", infoMap); + for (String infoKey : user.getVariables().getVarKeyList()) { + infoMap.put(infoKey, user.getVariables().getVarObject(infoKey)); + } + } + // END USER INFO NODE - BETA + + } } if (!root.isEmpty()) { @@ -1090,32 +1080,20 @@ public class WorldDataHolder { GroupManagerEventHandler.callEvent(GMSystemEvent.Action.SAVED); /* - * FileWriter tx = null; - * try { - * tx = new FileWriter(usersFile, false); - * tx.write(yaml.dump(root)); - * tx.flush(); - * } catch (Exception e) { - * } finally { - * try { - * tx.close(); - * } catch (IOException ex) { - * } - * } + * FileWriter tx = null; try { tx = new FileWriter(usersFile, false); + * tx.write(yaml.dump(root)); tx.flush(); } catch (Exception e) { } + * finally { try { tx.close(); } catch (IOException ex) { } } */ } /** * Don't use this. Unless you want to make this plugin to interact with - * original Nijikokun Permissions - * This method is supposed to make the original one reload the file, and - * propagate the changes made here. + * original Nijikokun Permissions This method is supposed to make the + * original one reload the file, and propagate the changes made here. * * Prefer to use the AnjoCaido's fake version of Nijikokun's Permission - * plugin. - * The AnjoCaido's Permission can propagate the changes made on this plugin - * instantly, - * without need to save the file. + * plugin. The AnjoCaido's Permission can propagate the changes made on this + * plugin instantly, without need to save the file. * * @param server the server that holds the plugin * @deprecated it is not used anymore... unless if you use original @@ -1165,13 +1143,13 @@ public class WorldDataHolder { if (users.HaveUsersChanged()) { return true; } - synchronized(users.getUsers()) { - for (User u : users.getUsers().values()) { - if (u.isChanged()) { - return true; + synchronized (users.getUsers()) { + for (User u : users.getUsers().values()) { + if (u.isChanged()) { + return true; + } } } - } return false; } @@ -1192,13 +1170,13 @@ public class WorldDataHolder { if (groups.HaveGroupsChanged()) { return true; } - synchronized(groups.getGroups()) { - for (Group g : groups.getGroups().values()) { - if (g.isChanged()) { - return true; + synchronized (groups.getGroups()) { + for (Group g : groups.getGroups().values()) { + if (g.isChanged()) { + return true; + } } } - } return false; } @@ -1208,10 +1186,10 @@ public class WorldDataHolder { public void removeUsersChangedFlag() { setUsersChanged(false); - synchronized(getUsers()) { - for (User u : getUsers().values()) { - u.flagAsSaved(); - } + synchronized (getUsers()) { + for (User u : getUsers().values()) { + u.flagAsSaved(); + } } } @@ -1221,10 +1199,10 @@ public class WorldDataHolder { public void removeGroupsChangedFlag() { setGroupsChanged(false); - synchronized(getGroups()) { - for (Group g : getGroups().values()) { - g.flagAsSaved(); - } + synchronized (getGroups()) { + for (Group g : getGroups().values()) { + g.flagAsSaved(); + } } } @@ -1281,11 +1259,13 @@ public class WorldDataHolder { * Resets Users */ public void resetUsers() { + users.resetUsers(); } /** * Note: Iteration over this object has to be synchronized! + * * @return the groups */ public Map getGroups() { @@ -1295,6 +1275,7 @@ public class WorldDataHolder { /** * Note: Iteration over this object has to be synchronized! + * * @return the users */ public Map getUsers() { From 25646b55bfde18b148ca27e56d7e7a949943f2cc Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 25 Sep 2012 13:23:19 +0100 Subject: [PATCH 05/34] Add alphabetically sorted user lists. --- EssentialsGroupManager/src/Changelog.txt | 3 ++- .../groupmanager/dataholder/WorldDataHolder.java | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index a877078d8..0c9b13a47 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -199,4 +199,5 @@ v 2.0: - Include the GM version when logging errors. - Fix Synchronization on adding subgroups (thanks snowleo). - Remove info node support from GlobalGroups. It should not have them as GlobalGroups are only permission collections. - - Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes]. \ No newline at end of file + - Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes]. + - Add alphabetically sorted user lists. \ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 9790efa2a..30a7e19e4 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -15,8 +15,10 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.TreeSet; import java.util.logging.Level; import java.util.logging.Logger; import org.anjocaido.groupmanager.GroupManager; @@ -1018,17 +1020,21 @@ public class WorldDataHolder { public static void writeUsers(WorldDataHolder ph, File usersFile) { Map root = new HashMap(); - - Map usersMap = new HashMap(); + LinkedHashMap usersMap = new LinkedHashMap(); + root.put("users", usersMap); synchronized (ph.getUsers()) { - for (String userKey : ph.getUsers().keySet()) { + + // A sorted list of users. + ArrayList names = new ArrayList(new TreeSet(ph.getUsers().keySet())); + + for (String userKey : names) { User user = ph.getUsers().get(userKey); if ((user.getGroup() == null || user.getGroup().equals(ph.getDefaultGroup())) && user.getPermissionList().isEmpty() && user.getVariables().isEmpty() && user.isSubGroupsEmpty()) { continue; } - Map aUserMap = new HashMap(); + LinkedHashMap aUserMap = new LinkedHashMap(); usersMap.put(user.getName(), aUserMap); // GROUP NODE From 15f71ea45d92462294a60a683081d115145b471e Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 25 Sep 2012 20:39:24 +0100 Subject: [PATCH 06/34] No need for a new array. --- .../anjocaido/groupmanager/dataholder/WorldDataHolder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 30a7e19e4..a4b346154 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -1026,9 +1026,7 @@ public class WorldDataHolder { synchronized (ph.getUsers()) { // A sorted list of users. - ArrayList names = new ArrayList(new TreeSet(ph.getUsers().keySet())); - - for (String userKey : names) { + for (String userKey : new TreeSet(ph.getUsers().keySet())) { User user = ph.getUsers().get(userKey); if ((user.getGroup() == null || user.getGroup().equals(ph.getDefaultGroup())) && user.getPermissionList().isEmpty() && user.getVariables().isEmpty() && user.isSubGroupsEmpty()) { continue; From 717b38aad7f8f847da23fe6e1e032ba5f8481437 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 25 Sep 2012 20:41:16 +0100 Subject: [PATCH 07/34] Update users.yml to follow new ordering. --- EssentialsGroupManager/src/users.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EssentialsGroupManager/src/users.yml b/EssentialsGroupManager/src/users.yml index 72a7b652f..19496ad84 100644 --- a/EssentialsGroupManager/src/users.yml +++ b/EssentialsGroupManager/src/users.yml @@ -1,15 +1,15 @@ # "For a more advanced configuration example utilizing the advanced features of GroupManager, see http://pastebin.com/a8ZA0j5G" users: snowleo: - subgroups: [] - permissions: [] group: Builder + subgroups: [] + permissions: [] KHobbits: + group: Moderator subgroups: [] permissions: [] - group: Moderator ElgarL: + group: Moderator subgroups: [] permissions: [] - group: Moderator From 765e849b0fdc7603e56c806acd464d8f5dde1ff4 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 25 Sep 2012 22:21:15 +0100 Subject: [PATCH 08/34] Handle negated wildcard perms in generic superperms --- .../essentials/perm/SuperpermsHandler.java | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java b/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java index 5dbe9eb93..0b4b93058 100644 --- a/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/SuperpermsHandler.java @@ -31,29 +31,26 @@ public class SuperpermsHandler implements IPermissionsHandler } @Override - public boolean hasPermission(final Player base, final String node) + public boolean hasPermission(final Player base, String node) { - if (base.hasPermission("*")) + String permCheck = node; + int index; + while (true) { - return true; - } - if (base.hasPermission("-" + node)) - { - return false; - } - final String[] parts = node.split("\\."); - final StringBuilder builder = new StringBuilder(node.length()); - for (String part : parts) - { - builder.append('*'); - if (base.hasPermission(builder.toString())) + if (base.isPermissionSet(permCheck)) { - return true; + return base.hasPermission(permCheck); } - builder.deleteCharAt(builder.length() - 1); - builder.append(part).append('.'); + + index = node.lastIndexOf('.'); + if (index < 1) + { + return base.hasPermission("*"); + } + + node = node.substring(0, index); + permCheck = node + ".*"; } - return base.hasPermission(node); } @Override From 758d8f52b5524f7239bba68a675291dba62f40f5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 25 Sep 2012 22:37:58 +0100 Subject: [PATCH 09/34] Remove debug comments. --- Essentials/src/com/earth2me/essentials/signs/SignWarp.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java index ae49f743b..8f470bc6b 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; @@ -17,15 +18,13 @@ public class SignWarp extends EssentialsSign @Override protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException { - ess.getLogger().info("triggered warp sign create"); validateTrade(sign, 3, ess); final String warpName = sign.getLine(1); if (warpName.isEmpty()) { - ess.getLogger().info("trying to change sign to show error"); sign.setLine(1, "§c"); - return false; + throw new SignException(_("invalidSignLine", 1)); } else { From 9cabb9978470e259dab5f3e6e76878f97b48097f Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Thu, 27 Sep 2012 15:19:14 +0300 Subject: [PATCH 10/34] typo fix in config.yml --- Essentials/src/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 4707cd3b0..740faa8c6 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -8,7 +8,7 @@ # If you receive an error when Essentials loads, ensure that: # - No tabs are present: YAML only allows spaces # - Indents are correct: YAML hierarchy is based entirely on indentation -# - You have "escaped" all apostrophes in your text: If you want to write "don't", for example, write "don''t" instead (note the doubled apostrphe) +# - You have "escaped" all apostrophes in your text: If you want to write "don't", for example, write "don''t" instead (note the doubled apostrophe) # - Text with symbols is enclosed in single or double quotation marks # If you have problems join the Essentials help support channel: http://tiny.cc/EssentialsChat From a44edfaa966d0dcb6b60dcdc51bf4e5cb43e46bf Mon Sep 17 00:00:00 2001 From: evonuts Date: Fri, 28 Sep 2012 00:42:25 +1200 Subject: [PATCH 11/34] Minor spelling/grammatical fixes --- Essentials/src/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 740faa8c6..9fa0f8c4c 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -246,7 +246,7 @@ debug: false # Set the locale for all messages # If you don't set this, the default locale of the server will be used. -# Don't forget to remove the # infront of the line +# Don't forget to remove the # in front of the line #locale: de_DE # Turn off god mode when people exit @@ -277,7 +277,7 @@ disable-item-pickup-while-afk: false # Disable this to reduce server lag. cancel-afk-on-move: true -# You can disable the death messages of minecraft here +# You can disable the death messages of Minecraft here death-messages: true # Add worlds to this list, if you want to automatically disable god mode there @@ -287,17 +287,17 @@ no-god-in-worlds: # Set to true to enable per-world permissions for teleporting between worlds with essentials commands # This applies to /world, /back, /tp[a|o][here|all], but not warps. # Give someone permission to teleport to a world with essentials.worlds. -# This does not effect the /home command, there is a seperate toggle below for this. +# This does not effect the /home command, there is a separate toggle below for this. world-teleport-permissions: false # The number of items given if the quantity parameter is left out in /item or /give. -# If this number is below 1, the maximum stack size size is given. If oversized stacks -# is not enabled, any number higher then the maximum stack size results in more than one stack. +# If this number is below 1, the maximum stack size size is given. If over-sized stacks +# are not enabled, any number higher then the maximum stack size results in more than one stack. default-stack-size: -1 -# Oversized stacks are stacks that ignore the normal max stacksize. +# Over-sized stacks are stacks that ignore the normal max stack size. # They can be obtained using /give and /item, if the player has essentials.oversizedstacks permission. -# How many items should be in an oversized stack? +# How many items should be in an over-sized stack? oversized-stacksize: 64 # Allow repair of enchanted weapons and armor. @@ -357,7 +357,7 @@ starting-balance: 0 # These are now defined in worth.yml # Defines the cost to use the given commands PER USE -# Some commands like /repair have subcosts, check the wiki for more information. +# Some commands like /repair have sub-costs, check the wiki for more information. command-costs: # /example costs $1000 PER USE #example: 1000 From df528cf4316e4fecab58a1c16346a79b5ff9bb02 Mon Sep 17 00:00:00 2001 From: "Paul A." Date: Thu, 27 Sep 2012 16:39:23 +0200 Subject: [PATCH 12/34] Fix updating version on items.csv --- Essentials/src/items.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index 1bffb4248..d8c60cb36 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -1,4 +1,4 @@ -#version: teamcity +#version: TeamCity #If you change this file, it will not be automatically updated after the next release, #item,id,metadata stone,1,0 From a1a9b112b4fa6767d1859e63ae59a5a213cea6a6 Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Fri, 28 Sep 2012 17:02:43 +0300 Subject: [PATCH 13/34] update potion aliases- add all unused potions items.csv version 2.1_13 --- Essentials/src/items.csv | 275 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 272 insertions(+), 3 deletions(-) diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index d8c60cb36..0e66d61e2 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -1329,7 +1329,6 @@ burningfurnace,62,0 bfurnace,62,0 signpost,63,0 spost,63,0 -door,64,0 woodendoorhalf,64,0 wooddoorhalf,64,0 wdoorhalf,64,0 @@ -1589,6 +1588,7 @@ doort,96,0 trapd,96,0 dtrap,96,0 silverfish,97,0 +monsteregg,97,0 monstereggsmoothstone,97,0 monstereggsstone,97,0 meggsmoothstone,97,0 @@ -3397,6 +3397,7 @@ sign,323,0 woodendoor,324,0 wooddoor,324,0 wdoor,324,0 +door,324,0 bucket,325,0 bukkit,325,0 waterbucket,326,0 @@ -3946,14 +3947,98 @@ waterbottle,373,0 fullbottle,373,0 watervase,373,0 fullvase,373,0 +clearpotion,373,6 +clearpot,373,6 +clearextendedpotion,373,7 +clearexpotion,373,7 +clear2potion,373,7 +clearextendedpot,373,7 +clearexpot,373,7 +clear2pot,373,7 +diffusepotion,373,11 +diffusepot,373,11 +artlesspotion,373,13 +artlesspot,373,13 +thinpotion,373,14 +thinpot,373,14 +thinextendedpotion,373,15 +thinexpotion,373,15 +thin2potion,373,15 +thinextendedpot,373,15 +thinexpot,373,15 +thin2pot,373,15 awkwardpotion,373,16 awkwardpot,373,16 +bunglingpotion,373,22 +bunglingpot,373,22 +bunglingextendedpotion,373,23 +bunglingexpotion,373,23 +bungling2potion,373,23 +bunglingextendedpot,373,23 +bunglingexpot,373,23 +bungling2pot,373,23 +smoothpotion,373,27 +smoothpot,373,27 +suavepotion,373,29 +suavepot,373,29 +debonairpotion,373,30 +debonairpot,373,30 +debonairextendedpotion,373,31 +debonairexpotion,373,31 +debonair2potion,373,31 +debonairextendedpot,373,31 +debonairexpot,373,31 +debonair2pot,373,31 thickpotion,373,32 thickpot,373,32 -mundaneexpotion,373,64 +charmingpotion,373,38 +charmingpot,373,38 +charmingextendedpotion,373,39 +charmingexpotion,373,39 +charming2potion,373,39 +charmingextendedpot,373,39 +charmingexpot,373,39 +charming2pot,373,39 +refinedpotion,373,43 +refinedpot,373,43 +cordialpotion,373,45 +cordialpot,373,45 +sparklingpotion,373,46 +sparklingpot,373,46 +sparklingextendedpotion,373,47 +sparklingexpotion,373,47 +sparkling2potion,373,47 +sparklingextendedpot,373,47 +sparklingexpot,373,47 +sparkling2pot,373,47 +potentpotion,373,48 +potentpot,373,48 +rankpotion,373,54 +rankpot,373,54 +rankextendedpotion,373,55 +rankexpotion,373,55 +rank2potion,373,55 +rankextendedpot,373,55 +rankexpot,373,55 +rank2pot,373,55 +acridpotion,373,59 +acridpot,373,59 +grosspotion,373,61 +grosspot,373,61 +stinkypotion,373,62 +stinkypot,373,62 +stinkyextendedpotion,373,63 +stinkyexpotion,373,63 +stinky2potion,373,63 +stinkyextendedpot,373,63 +stinkyexpot,373,63 +stinky2pot,373,63 mundaneextendedpotion,373,64 -mundaneexpot,373,64 +mundaneexpotion,373,64 +mundane2potion,373,64 mundaneextendedpot,373,64 +mundaneexpot,373,64 +mundane2pot,373,64 mundanepotion,373,8192 mundanepot,373,8192 regenerationpotion,373,8193 @@ -4308,6 +4393,22 @@ splhealingpot,373,16389 splhealpot,373,16389 spllifepot,373,16389 sphpot,373,16389 +splashclearpotion,373,16390 +splashclearpot,373,16390 +splclearpotion,373,16390 +splclearpot,373,16390 +splashclearextendedpotion,373,16391 +splashclearexpotion,373,16391 +splashclear2potion,373,16391 +splashclearextendedpot,373,16391 +splashclearexpot,373,16391 +splashclear2pot,373,16391 +splclearextendedpotion,373,16391 +splclearexpotion,373,16391 +splclear2potion,373,16391 +splclearextendedpot,373,16391 +splclearexpot,373,16391 +splclear2pot,373,16391 splashweaknesspotion,373,16392 splashweakpotion,373,16392 splashweaknesspot,373,16392 @@ -4339,6 +4440,10 @@ splslowpotion,373,16394 splslownesspot,373,16394 splslowpot,373,16394 spslpot,373,16394 +splashdiffusepotion,373,16395 +splashdiffusepot,373,16395 +spldiffusepotion,373,16395 +spldiffusepot,373,16395 splashharmingpotion,373,16396 splashdamagepotion,373,16396 splashdmgpotion,373,16396 @@ -4352,6 +4457,74 @@ splharmingpot,373,16396 spldamagepot,373,16396 spldmgpot,373,16396 spdpot,373,16396 +splashartlesspotion,373,16397 +splashartlesspot,373,16397 +splartlesspotion,373,16397 +splartlesspot,373,16397 +splashthinpotion,373,16398 +splashthinpot,373,16398 +splthinpotion,373,16398 +splthinpot,373,16398 +splashthinextendedpotion,373,16399 +splashthinexpotion,373,16399 +splashthin2potion,373,16399 +splashthinextendedpot,373,16399 +splashthinexpot,373,16399 +splashthin2pot,373,16399 +splthinextendedpotion,373,16399 +splthinexpotion,373,16399 +splthin2potion,373,16399 +splthinextendedpot,373,16399 +splthinexpot,373,16399 +splthin2pot,373,16399 +splashawkwardpotion,373,16400 +splashawkwardpot,373,16400 +splawkwardpotion,373,16400 +splawkwardpot,373,16400 +splashbunglingpotion,373,16406 +splashbunglingpot,373,16406 +splbunglingpotion,373,16406 +splbunglingpot,373,16406 +splashbunglingextendedpotion,373,16407 +splashbunglingexpotion,373,16407 +splashbungling2potion,373,16407 +splashbunglingextendedpot,373,16407 +splashbunglingexpot,373,16407 +splashbungling2pot,373,16407 +splbunglingextendedpotion,373,16407 +splbunglingexpotion,373,16407 +splbungling2potion,373,16407 +splbunglingextendedpot,373,16407 +splbunglingexpot,373,16407 +splbungling2pot,373,16407 +splashsmoothpotion,373,16411 +splashsmoothpot,373,16411 +splsmoothpotion,373,16411 +splsmoothpot,373,16411 +splashsuavepotion,373,16413 +splashsuavepot,373,16413 +splsuavepotion,373,16413 +splsuavepot,373,16413 +splashdebonairpotion,373,16414 +splashdebonairpot,373,16414 +spldebonairpotion,373,16414 +spldebonairpot,373,16414 +splashdebonairextendedpotion,373,16415 +splashdebonairexpotion,373,16415 +splashdebonair2potion,373,16415 +splashdebonairextendedpot,373,16415 +splashdebonairexpot,373,16415 +splashdebonair2pot,373,16415 +spldebonairextendedpotion,373,16415 +spldebonairexpotion,373,16415 +spldebonair2potion,373,16415 +spldebonairextendedpot,373,16415 +spldebonairexpot,373,16415 +spldebonair2pot,373,16415 +splashthickpotion,373,16416 +splashthickpot,373,16416 +splthickpotion,373,16416 +splthickpot,373,16416 splashregenerationleveliipotion,373,16417 splashregenerateleveliipotion,373,16417 splashregenleveliipotion,373,16417 @@ -4476,6 +4649,22 @@ splheallevel2pot,373,16421 splhealingiipot,373,16421 splhealiipot,373,16421 sph2pot,373,16421 +splashcharmingpotion,373,16422 +splashcharmingpot,373,16422 +splcharmingpotion,373,16422 +splcharmingpot,373,16422 +splashcharmingextendedpotion,373,16423 +splashcharmingexpotion,373,16423 +splashcharming2potion,373,16423 +splashcharmingextendedpot,373,16423 +splashcharmingexpot,373,16423 +splashcharming2pot,373,16423 +splcharmingextendedpotion,373,16423 +splcharmingexpotion,373,16423 +splcharming2potion,373,16423 +splcharmingextendedpot,373,16423 +splcharmingexpot,373,16423 +splcharming2pot,373,16423 splashstrengthleveliipotion,373,16425 splashstrongleveliipotion,373,16425 splashstrleveliipotion,373,16425 @@ -4513,6 +4702,10 @@ splstrengthiipot,373,16425 splstrongiipot,373,16425 splstriipot,373,16425 spst2pot,373,16425 +splashrefinedpotion,373,16427 +splashrefinedpot,373,16427 +splrefinedpotion,373,16427 +splrefinedpot,373,16427 splashharmingleveliipotion,373,16428 splashdamageleveliipotion,373,16428 splashdmgleveliipotion,373,16428 @@ -4550,6 +4743,82 @@ splharmingiipot,373,16428 spldamageiipot,373,16428 spldmgiipot,373,16428 spd2pot,373,16428 +splashcordialpotion,373,16429 +splashcordialpot,373,16429 +splcordialpotion,373,16429 +splcordialpot,373,16429 +splashsparklingpotion,373,16430 +splashsparklingpot,373,16430 +splsparklingpotion,373,16430 +splsparklingpot,373,16430 +splashsparklingextendedpotion,373,16431 +splashsparklingexpotion,373,16431 +splashsparkling2potion,373,16431 +splashsparklingextendedpot,373,16431 +splashsparklingexpot,373,16431 +splashsparkling2pot,373,16431 +splsparklingextendedpotion,373,16431 +splsparklingexpotion,373,16431 +splsparkling2potion,373,16431 +splsparklingextendedpot,373,16431 +splsparklingexpot,373,16431 +splsparkling2pot,373,16431 +splashpotentpotion,373,16432 +splashpotentpot,373,16432 +splpotentpotion,373,16432 +splpotentpot,373,16432 +splashrankpotion,373,16438 +splashrankpot,373,16438 +splrankpotion,373,16438 +splrankpot,373,16438 +splashrankextendedpotion,373,16439 +splashrankexpotion,373,16439 +splashrank2potion,373,16439 +splashrankextendedpot,373,16439 +splashrankexpot,373,16439 +splashrank2pot,373,16439 +splrankextendedpotion,373,16439 +splrankexpotion,373,16439 +splrank2potion,373,16439 +splrankextendedpot,373,16439 +splrankexpot,373,16439 +splrank2pot,373,16439 +splashacridpotion,373,16443 +splashacridpot,373,16443 +splacridpotion,373,16443 +splacridpot,373,16443 +splashgrosspotion,373,16445 +splashgrosspot,373,16445 +splgrosspotion,373,16445 +splgrosspot,373,16445 +splashstinkypotion,373,16446 +splashstinkypot,373,16446 +splstinkypotion,373,16446 +splstinkypot,373,16446 +splashstinkyextendedpotion,373,16447 +splashstinkyexpotion,373,16447 +splashstinky2potion,373,16447 +splashstinkyextendedpot,373,16447 +splashstinkyexpot,373,16447 +splashstinky2pot,373,16447 +splstinkyextendedpotion,373,16447 +splstinkyexpotion,373,16447 +splstinky2potion,373,16447 +splstinkyextendedpot,373,16447 +splstinkyexpot,373,16447 +splstinky2pot,373,16447 +splashmundaneextendedpotion,373,16448 +splashmundaneexpotion,373,16448 +splashmundane2potion,373,16448 +splashmundaneextendedpot,373,16448 +splashmundaneexpot,373,16448 +splashmundane2pot,373,16448 +splmundaneextendedpotion,373,16448 +splmundaneexpotion,373,16448 +splmundane2potion,373,16448 +splmundaneextendedpot,373,16448 +splmundaneexpot,373,16448 +splmundane2pot,373,16448 splashregenerationextendedpotion,373,16449 splashregenerateextendedpotion,373,16449 splashregenextendepotion,373,16449 From 1799165bd82f29ef9ec09e279f617560a7b151e6 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 28 Sep 2012 20:35:13 +0100 Subject: [PATCH 14/34] God mode cancel potion effects - Chris ward Revert heal changes. --- .../essentials/EssentialsEntityListener.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 8dbd02a38..aa23970bc 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -7,6 +7,7 @@ import java.util.logging.Logger; import org.bukkit.Material; import org.bukkit.entity.Ageable; import org.bukkit.entity.Entity; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -14,6 +15,8 @@ import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.entity.*; import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; public class EssentialsEntityListener implements Listener @@ -161,4 +164,15 @@ public class EssentialsEntityListener implements Listener event.setCancelled(true); } } + + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) + public void onPotionSplashEvent(final PotionSplashEvent event) + { + LivingEntity[] entities = event.getAffectedEntities().toArray(new LivingEntity[event.getAffectedEntities().size()]); + for(int i = 0; i < entities.length; i++) + { + if (entities[i] instanceof Player && ess.getUser(entities[i]).isGodModeEnabled()) + event.setIntensity(entities[i], 0); + } + } } From c369a6ee9635d1411b007a3744a0a3d540af5353 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 28 Sep 2012 20:45:56 +0100 Subject: [PATCH 15/34] Cleanup of god mode effects, suggested by gravypod. --- .../essentials/EssentialsEntityListener.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index aa23970bc..0dfff355c 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -49,7 +49,7 @@ public class EssentialsEntityListener implements Listener { event.setCancelled(true); } - + if (attacker.isGodModeEnabled() && !attacker.isAuthorized("essentials.god.pvp")) { event.setCancelled(true); @@ -168,11 +168,16 @@ public class EssentialsEntityListener implements Listener @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPotionSplashEvent(final PotionSplashEvent event) { - LivingEntity[] entities = event.getAffectedEntities().toArray(new LivingEntity[event.getAffectedEntities().size()]); - for(int i = 0; i < entities.length; i++) + for (LivingEntity entity : event.getAffectedEntities()) { - if (entities[i] instanceof Player && ess.getUser(entities[i]).isGodModeEnabled()) - event.setIntensity(entities[i], 0); + if (entity instanceof Player) + { + User user = ess.getUser(entity); + if (user.isGodModeEnabled()) + { + event.setIntensity(entity, 0d); + } + } } } -} +} From f88346e75b2ea758258a8570b34b5dc12ab1c7e3 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 28 Sep 2012 20:55:37 +0100 Subject: [PATCH 16/34] Add potion effect clearing on /heal - Chris Ward --- .../essentials/EssentialsEntityListener.java | 12 +++-------- .../essentials/commands/Commandheal.java | 21 +++++++++++++------ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 0dfff355c..0077d988c 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -15,8 +15,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.entity.*; import org.bukkit.inventory.ItemStack; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; public class EssentialsEntityListener implements Listener @@ -170,14 +168,10 @@ public class EssentialsEntityListener implements Listener { for (LivingEntity entity : event.getAffectedEntities()) { - if (entity instanceof Player) + if (entity instanceof Player && ess.getUser(entity).isGodModeEnabled()) { - User user = ess.getUser(entity); - if (user.isGodModeEnabled()) - { - event.setIntensity(entity, 0d); - } + event.setIntensity(entity, 0d); } } } -} +} diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java index 82678c96e..224e782de 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java @@ -6,6 +6,8 @@ import java.util.List; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; public class Commandheal extends EssentialsCommand @@ -33,9 +35,7 @@ public class Commandheal extends EssentialsCommand { user.healCooldown(); } - user.setHealth(20); - user.setFoodLevel(20); - user.sendMessage(_("heal")); + healPlayer(user); } @Override @@ -63,10 +63,19 @@ public class Commandheal extends EssentialsCommand { continue; } - p.setHealth(20); - p.setFoodLevel(20); - p.sendMessage(_("heal")); + healPlayer(p); sender.sendMessage(_("healOther", p.getDisplayName())); } } + + private void healPlayer(final Player p) + { + p.setHealth(20); + p.setFoodLevel(20); + p.sendMessage(_("heal")); + for (PotionEffect effect : p.getActivePotionEffects()) + { + p.removePotionEffect(effect.getType()); + } + } } From 83a712826c336f9c38ec932fe01aba2f4b06afd6 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 29 Sep 2012 03:59:31 +0100 Subject: [PATCH 17/34] Should fix tpaccept charge bug - needs testing --- .../src/com/earth2me/essentials/commands/Commandtpaccept.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 86f88f884..3f52e8e01 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -72,5 +72,6 @@ public class Commandtpaccept extends EssentialsCommand target.getTeleport().teleport(user, charge, TeleportCause.COMMAND); } user.requestTeleport(null, false); + throw new NoChargeException(); } } From c92b3b62172d531638a355c9bc4b2410aadb5edc Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Sat, 29 Sep 2012 15:55:47 +0300 Subject: [PATCH 18/34] update warp sign permission check --- Essentials/src/com/earth2me/essentials/signs/SignWarp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java index 8f470bc6b..eb81ea4e1 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java @@ -53,7 +53,7 @@ public class SignWarp extends EssentialsSign if ((!group.isEmpty() && ("§2Everyone".equals(group) || player.inGroup(group))) - || (group.isEmpty() && (!ess.getSettings().getPerWarpPermission() || player.isAuthorized("essentials.warp." + warpName)))) + || (group.isEmpty() && (!ess.getSettings().getPerWarpPermission() || player.isAuthorized("essentials.warps." + warpName)))) { final Trade charge = getTrade(sign, 3, ess); try From bc1c4b2ce5f223611245a72d7be22e128b3b41c8 Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Sat, 29 Sep 2012 15:57:31 +0300 Subject: [PATCH 19/34] update kit sign permission check --- Essentials/src/com/earth2me/essentials/signs/SignKit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignKit.java b/Essentials/src/com/earth2me/essentials/signs/SignKit.java index aee1d7dea..1c3528a18 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignKit.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignKit.java @@ -51,7 +51,7 @@ public class SignKit extends EssentialsSign final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH).trim(); final String group = sign.getLine(2); if ((!group.isEmpty() && ("§2Everyone".equals(group) || player.inGroup(group))) - || (group.isEmpty() && (player.isAuthorized("essentials.kit." + kitName)))) + || (group.isEmpty() && (player.isAuthorized("essentials.kits." + kitName)))) { final Trade charge = getTrade(sign, 3, ess); charge.isAffordableFor(player); From 4526a4fe52594695cb94aa739a2f434c8a5d0a36 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 29 Sep 2012 23:33:32 +0100 Subject: [PATCH 20/34] Tidy Teleport file --- .../src/com/earth2me/essentials/Teleport.java | 83 ++++++++++--------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index c6106ad24..9ecd2adb9 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -44,6 +44,7 @@ public class Teleport implements Runnable, ITeleport } } private IUser user; + private IUser teleportUser; private int teleTimer = -1; private long started; // time this task was initiated private long delay; // how long to delay the teleport @@ -127,22 +128,6 @@ public class Teleport implements Runnable, ITeleport this.ess = ess; } - public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception - { - final Player player = user.getBase(); - final Location bed = player.getBedSpawnLocation(); - final PlayerRespawnEvent pre = new PlayerRespawnEvent(player, bed == null ? player.getWorld().getSpawnLocation() : bed, bed != null); - ess.getServer().getPluginManager().callEvent(pre); - teleport(new Target(pre.getRespawnLocation()), chargeFor, cause); - } - - public void warp(String warp, Trade chargeFor, TeleportCause cause) throws Exception - { - Location loc = ess.getWarps().getWarp(warp); - teleport(new Target(loc), chargeFor, cause); - user.sendMessage(_("warpingTo", warp)); - } - public void cooldown(boolean check) throws Exception { final Calendar time = new GregorianCalendar(); @@ -181,6 +166,7 @@ public class Teleport implements Runnable, ITeleport } } + //If we need to cancel a pending teleport call this method public void cancel(boolean notifyUser) { if (teleTimer == -1) @@ -201,16 +187,7 @@ public class Teleport implements Runnable, ITeleport } } - public void cancel() - { - cancel(false); - } - - public void teleport(Location loc, Trade chargeFor) throws Exception - { - teleport(new Target(loc), chargeFor, TeleportCause.PLUGIN); - } - + //The teleport function is used when you want to normally teleport someone to a location or player. public void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception { teleport(new Target(loc), chargeFor, cause); @@ -241,7 +218,7 @@ public class Teleport implements Runnable, ITeleport return; } - cancel(); + cancel(false); Calendar c = new GregorianCalendar(); c.add(Calendar.SECOND, (int)delay); c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); @@ -251,13 +228,7 @@ public class Teleport implements Runnable, ITeleport teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10); } - private void now(Target target, TeleportCause cause) throws Exception - { - cancel(); - user.setLastLocation(); - user.getBase().teleport(Util.getSafeDestination(target.getLocation()), cause); - } - + //The now function is used when you want to skip tp delay when teleporting someone to a location or player. public void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception { if (cooldown) @@ -267,13 +238,6 @@ public class Teleport implements Runnable, ITeleport now(new Target(loc), cause); } - public void now(Location loc, Trade chargeFor, TeleportCause cause) throws Exception - { - cooldown(false); - chargeFor.charge(user); - now(new Target(loc), cause); - } - public void now(Player entity, boolean cooldown, TeleportCause cause) throws Exception { if (cooldown) @@ -283,16 +247,53 @@ public class Teleport implements Runnable, ITeleport now(new Target(entity), cause); } + private void now(Target target, TeleportCause cause) throws Exception + { + cancel(false); + user.setLastLocation(); + user.getBase().teleport(Util.getSafeDestination(target.getLocation()), cause); + } + + public void now(Player entity, boolean cooldown, TeleportCause cause) throws Exception + { + if (cooldown) + { + cooldown(false); + } + now(new Target(entity), cause); + } + + //The respawn function is a wrapper used to handle tp fallback, on /jail and /home + public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception + { + final Player player = user.getBase(); + final Location bed = player.getBedSpawnLocation(); + final PlayerRespawnEvent pre = new PlayerRespawnEvent(player, bed == null ? player.getWorld().getSpawnLocation() : bed, bed != null); + ess.getServer().getPluginManager().callEvent(pre); + teleport(new Target(pre.getRespawnLocation()), chargeFor, cause); + } + + //The warp function is a wrapper used to teleport a player to a /warp + public void warp(String warp, Trade chargeFor, TeleportCause cause) throws Exception + { + Location loc = ess.getWarps().getWarp(warp); + teleport(new Target(loc), chargeFor, cause); + user.sendMessage(_("warpingTo", warp)); + } + + //The back function is a wrapper used to teleport a player /back to their previous location. public void back(Trade chargeFor) throws Exception { teleport(new Target(user.getLastLocation()), chargeFor, TeleportCause.COMMAND); } + //This function is used to throw a user back after a jail sentence public void back() throws Exception { now(new Target(user.getLastLocation()), TeleportCause.COMMAND); } + //This function handles teleporting to /home public void home(Location loc, Trade chargeFor) throws Exception { teleport(new Target(loc), chargeFor, TeleportCause.COMMAND); From b8b4966e00752133cc32d9eed69cc3f50f33e256 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 29 Sep 2012 23:34:46 +0100 Subject: [PATCH 21/34] Properly handle tphere requests so the right user is in control/charged. --- .../src/com/earth2me/essentials/Teleport.java | 77 +++++++++++++++---- .../essentials/commands/Commandtpaccept.java | 2 +- .../essentials/commands/Commandtphere.java | 2 +- 3 files changed, 63 insertions(+), 18 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 9ecd2adb9..2f1028243 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -37,7 +37,7 @@ public class Teleport implements Runnable, ITeleport { if (this.name != null) { - + return ess.getServer().getPlayerExact(name).getLocation(); } return location; @@ -62,13 +62,19 @@ public class Teleport implements Runnable, ITeleport private TeleportCause cause; private void initTimer(long delay, Target target, Trade chargeFor, TeleportCause cause) + { + initTimer(delay, user, target, chargeFor, cause); + } + + private void initTimer(long delay, IUser teleportUser, Target target, Trade chargeFor, TeleportCause cause) { this.started = System.currentTimeMillis(); this.delay = delay; - this.health = user.getHealth(); - this.initX = Math.round(user.getLocation().getX() * MOVE_CONSTANT); - this.initY = Math.round(user.getLocation().getY() * MOVE_CONSTANT); - this.initZ = Math.round(user.getLocation().getZ() * MOVE_CONSTANT); + this.health = teleportUser.getHealth(); + this.initX = Math.round(teleportUser.getLocation().getX() * MOVE_CONSTANT); + this.initY = Math.round(teleportUser.getLocation().getY() * MOVE_CONSTANT); + this.initZ = Math.round(teleportUser.getLocation().getZ() * MOVE_CONSTANT); + this.teleportUser = teleportUser; this.teleportTarget = target; this.chargeFor = chargeFor; this.cause = cause; @@ -80,19 +86,25 @@ public class Teleport implements Runnable, ITeleport if (user == null || !user.isOnline() || user.getLocation() == null) { - cancel(); + cancel(false); return; } - if (Math.round(user.getLocation().getX() * MOVE_CONSTANT) != initX - || Math.round(user.getLocation().getY() * MOVE_CONSTANT) != initY - || Math.round(user.getLocation().getZ() * MOVE_CONSTANT) != initZ - || user.getHealth() < health) + if (teleportUser == null || !teleportUser.isOnline() || teleportUser.getLocation() == null) + { + cancel(false); + return; + } + + if (Math.round(teleportUser.getLocation().getX() * MOVE_CONSTANT) != initX + || Math.round(teleportUser.getLocation().getY() * MOVE_CONSTANT) != initY + || Math.round(teleportUser.getLocation().getZ() * MOVE_CONSTANT) != initZ + || teleportUser.getHealth() < health) { // user moved, cancel teleport cancel(true); return; } - health = user.getHealth(); // in case user healed, then later gets injured + health = teleportUser.getHealth(); // in case user healed, then later gets injured long now = System.currentTimeMillis(); if (now > started + delay) @@ -100,11 +112,12 @@ public class Teleport implements Runnable, ITeleport try { cooldown(false); - user.sendMessage(_("teleportationCommencing")); + teleportUser.sendMessage(_("teleportationCommencing")); try { - now(teleportTarget, cause); + teleportUser.getTeleport().now(teleportTarget, cause); + cancel(false); if (chargeFor != null) { chargeFor.charge(user); @@ -118,6 +131,10 @@ public class Teleport implements Runnable, ITeleport catch (Exception ex) { user.sendMessage(_("cooldownWithMessage", ex.getMessage())); + if (user != teleportUser) + { + teleportUser.sendMessage(_("cooldownWithMessage", ex.getMessage())); + } } } } @@ -179,6 +196,10 @@ public class Teleport implements Runnable, ITeleport if (notifyUser) { user.sendMessage(_("pendingTeleportCancelled")); + if (teleportUser != user) + { + teleportUser.sendMessage(_("pendingTeleportCancelled")); + } } } finally @@ -254,13 +275,37 @@ public class Teleport implements Runnable, ITeleport user.getBase().teleport(Util.getSafeDestination(target.getLocation()), cause); } - public void now(Player entity, boolean cooldown, TeleportCause cause) throws Exception + //The teleportToMe function is a wrapper used to handle teleporting players to them, like /tphere + public void teleportToMe(User otherUser, Trade chargeFor, TeleportCause cause) throws Exception { - if (cooldown) + Target target = new Target(user); + + double delay = ess.getSettings().getTeleportDelay(); + + if (chargeFor != null) + { + chargeFor.isAffordableFor(user); + } + cooldown(true); + if (delay <= 0 || user.isAuthorized("essentials.teleport.timer.bypass")) { cooldown(false); + otherUser.getTeleport().now(target, cause); + if (chargeFor != null) + { + chargeFor.charge(user); + } + return; } - now(new Target(entity), cause); + + cancel(false); + Calendar c = new GregorianCalendar(); + c.add(Calendar.SECOND, (int)delay); + c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); + otherUser.sendMessage(_("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis()))); + initTimer((long)(delay * 1000.0), otherUser, target, chargeFor, cause); + + teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10); } //The respawn function is a wrapper used to handle tp fallback, on /jail and /home diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 3f52e8e01..865492921 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -65,7 +65,7 @@ public class Commandtpaccept extends EssentialsCommand if (user.isTpRequestHere()) { - user.getTeleport().teleport(target, charge, TeleportCause.COMMAND); + target.getTeleport().teleportToMe(user, charge, TeleportCause.COMMAND); } else { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java index 641290575..76041ca6c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtphere.java @@ -27,7 +27,7 @@ public class Commandtphere extends EssentialsCommand { throw new Exception(_("noPerm", "essentials.worlds." + user.getWorld().getName())); } - player.getTeleport().teleport(user, new Trade(this.getName(), ess), TeleportCause.COMMAND); + user.getTeleport().teleportToMe(player, new Trade(this.getName(), ess), TeleportCause.COMMAND); user.sendMessage(_("teleporting")); player.sendMessage(_("teleporting")); throw new NoChargeException(); From 23d99dd9778c0ba8f228fb37b04693e06aa43403 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 29 Sep 2012 23:41:12 +0100 Subject: [PATCH 22/34] Little bit DRYer --- .../src/com/earth2me/essentials/Teleport.java | 69 ++++++++++--------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 2f1028243..17dbca0f2 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -207,6 +207,32 @@ public class Teleport implements Runnable, ITeleport teleTimer = -1; } } + + //The now function is used when you want to skip tp delay when teleporting someone to a location or player. + public void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception + { + if (cooldown) + { + cooldown(false); + } + now(new Target(loc), cause); + } + + public void now(Player entity, boolean cooldown, TeleportCause cause) throws Exception + { + if (cooldown) + { + cooldown(false); + } + now(new Target(entity), cause); + } + + private void now(Target target, TeleportCause cause) throws Exception + { + cancel(false); + user.setLastLocation(); + user.getBase().teleport(Util.getSafeDestination(target.getLocation()), cause); + } //The teleport function is used when you want to normally teleport someone to a location or player. public void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception @@ -240,41 +266,12 @@ public class Teleport implements Runnable, ITeleport } cancel(false); - Calendar c = new GregorianCalendar(); - c.add(Calendar.SECOND, (int)delay); - c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); - user.sendMessage(_("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis()))); + warnUser(user); initTimer((long)(delay * 1000.0), target, chargeFor, cause); teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10); } - //The now function is used when you want to skip tp delay when teleporting someone to a location or player. - public void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception - { - if (cooldown) - { - cooldown(false); - } - now(new Target(loc), cause); - } - - public void now(Player entity, boolean cooldown, TeleportCause cause) throws Exception - { - if (cooldown) - { - cooldown(false); - } - now(new Target(entity), cause); - } - - private void now(Target target, TeleportCause cause) throws Exception - { - cancel(false); - user.setLastLocation(); - user.getBase().teleport(Util.getSafeDestination(target.getLocation()), cause); - } - //The teleportToMe function is a wrapper used to handle teleporting players to them, like /tphere public void teleportToMe(User otherUser, Trade chargeFor, TeleportCause cause) throws Exception { @@ -299,14 +296,18 @@ public class Teleport implements Runnable, ITeleport } cancel(false); - Calendar c = new GregorianCalendar(); - c.add(Calendar.SECOND, (int)delay); - c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); - otherUser.sendMessage(_("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis()))); + warnUser(otherUser); initTimer((long)(delay * 1000.0), otherUser, target, chargeFor, cause); teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10); } + + private void warnUser(final IUser user) { + Calendar c = new GregorianCalendar(); + c.add(Calendar.SECOND, (int)delay); + c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); + user.sendMessage(_("dontMoveMessage", Util.formatDateDiff(c.getTimeInMillis()))); + } //The respawn function is a wrapper used to handle tp fallback, on /jail and /home public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception From eed0eddffc5ec140a7ff487e65f617a2346f7859 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 29 Sep 2012 23:48:59 +0100 Subject: [PATCH 23/34] New permission: essentials.teleport.timer.move - allow players to move during tp delay --- .../src/com/earth2me/essentials/Teleport.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 17dbca0f2..a03a4b74b 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -95,17 +95,17 @@ public class Teleport implements Runnable, ITeleport return; } - if (Math.round(teleportUser.getLocation().getX() * MOVE_CONSTANT) != initX - || Math.round(teleportUser.getLocation().getY() * MOVE_CONSTANT) != initY - || Math.round(teleportUser.getLocation().getZ() * MOVE_CONSTANT) != initZ - || teleportUser.getHealth() < health) - { // user moved, cancel teleport + if (!user.isAuthorized("essentials.teleport.timer.move") + && (Math.round(teleportUser.getLocation().getX() * MOVE_CONSTANT) != initX + || Math.round(teleportUser.getLocation().getY() * MOVE_CONSTANT) != initY + || Math.round(teleportUser.getLocation().getZ() * MOVE_CONSTANT) != initZ + || teleportUser.getHealth() < health)) + { + // user moved, cancel teleport cancel(true); return; } - health = teleportUser.getHealth(); // in case user healed, then later gets injured - long now = System.currentTimeMillis(); if (now > started + delay) { @@ -207,7 +207,7 @@ public class Teleport implements Runnable, ITeleport teleTimer = -1; } } - + //The now function is used when you want to skip tp delay when teleporting someone to a location or player. public void now(Location loc, boolean cooldown, TeleportCause cause) throws Exception { @@ -301,8 +301,9 @@ public class Teleport implements Runnable, ITeleport teleTimer = ess.scheduleSyncRepeatingTask(this, 10, 10); } - - private void warnUser(final IUser user) { + + private void warnUser(final IUser user) + { Calendar c = new GregorianCalendar(); c.add(Calendar.SECOND, (int)delay); c.add(Calendar.MILLISECOND, (int)((delay * 1000.0) % 1000.0)); From 480d3f36ad1f05428f193274f4069c5c790936e9 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 29 Sep 2012 03:59:31 +0100 Subject: [PATCH 24/34] Should fix tpaccept charge bug - needs testing --- .../src/com/earth2me/essentials/commands/Commandtpaccept.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 86f88f884..3f52e8e01 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -72,5 +72,6 @@ public class Commandtpaccept extends EssentialsCommand target.getTeleport().teleport(user, charge, TeleportCause.COMMAND); } user.requestTeleport(null, false); + throw new NoChargeException(); } } From e91bdf7bd5a8f356d5e4a7ca8cf81803ce9733d2 Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Sat, 29 Sep 2012 15:55:47 +0300 Subject: [PATCH 25/34] update warp sign permission check --- Essentials/src/com/earth2me/essentials/signs/SignWarp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java index 8f470bc6b..eb81ea4e1 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java @@ -53,7 +53,7 @@ public class SignWarp extends EssentialsSign if ((!group.isEmpty() && ("§2Everyone".equals(group) || player.inGroup(group))) - || (group.isEmpty() && (!ess.getSettings().getPerWarpPermission() || player.isAuthorized("essentials.warp." + warpName)))) + || (group.isEmpty() && (!ess.getSettings().getPerWarpPermission() || player.isAuthorized("essentials.warps." + warpName)))) { final Trade charge = getTrade(sign, 3, ess); try From b37b165e9db010ae81e84a7c62b54b290d012453 Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Sat, 29 Sep 2012 15:57:31 +0300 Subject: [PATCH 26/34] update kit sign permission check --- Essentials/src/com/earth2me/essentials/signs/SignKit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignKit.java b/Essentials/src/com/earth2me/essentials/signs/SignKit.java index aee1d7dea..1c3528a18 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignKit.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignKit.java @@ -51,7 +51,7 @@ public class SignKit extends EssentialsSign final String kitName = sign.getLine(1).toLowerCase(Locale.ENGLISH).trim(); final String group = sign.getLine(2); if ((!group.isEmpty() && ("§2Everyone".equals(group) || player.inGroup(group))) - || (group.isEmpty() && (player.isAuthorized("essentials.kit." + kitName)))) + || (group.isEmpty() && (player.isAuthorized("essentials.kits." + kitName)))) { final Trade charge = getTrade(sign, 3, ess); charge.isAffordableFor(player); From 3a95bb27ddf5a2a5460e0498e8bb2ee07114c1bf Mon Sep 17 00:00:00 2001 From: Necrodoom Date: Sun, 30 Sep 2012 19:22:14 +0300 Subject: [PATCH 27/34] small fixes to items.csv --- Essentials/src/items.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/items.csv b/Essentials/src/items.csv index d8c60cb36..b3d6d97a9 100644 --- a/Essentials/src/items.csv +++ b/Essentials/src/items.csv @@ -1329,7 +1329,6 @@ burningfurnace,62,0 bfurnace,62,0 signpost,63,0 spost,63,0 -door,64,0 woodendoorhalf,64,0 wooddoorhalf,64,0 wdoorhalf,64,0 @@ -1588,6 +1587,7 @@ tdoor,96,0 doort,96,0 trapd,96,0 dtrap,96,0 +monsteregg,97,0 silverfish,97,0 monstereggsmoothstone,97,0 monstereggsstone,97,0 @@ -3397,6 +3397,7 @@ sign,323,0 woodendoor,324,0 wooddoor,324,0 wdoor,324,0 +door,324,0 bucket,325,0 bukkit,325,0 waterbucket,326,0 From 128b48adeeb72be476844394c5e238f3946c93ba Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 30 Sep 2012 18:12:36 +0100 Subject: [PATCH 28/34] Restore removed tp method, it is used in other plugins. --- Essentials/src/com/earth2me/essentials/Teleport.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index a03a4b74b..6a666a199 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -235,6 +235,13 @@ public class Teleport implements Runnable, ITeleport } //The teleport function is used when you want to normally teleport someone to a location or player. + //This method is nolonger used internally and will be removed. + @Deprecated + public void teleport(Location loc, Trade chargeFor) throws Exception + { + teleport(loc, chargeFor, TeleportCause.PLUGIN); + } + public void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception { teleport(new Target(loc), chargeFor, cause); From 8855d2525a61d5ad286cac16fd0b1552f7b96acf Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 1 Oct 2012 20:12:13 +1000 Subject: [PATCH 29/34] Typo (Ticket 2933) --- Essentials/src/messages_de.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 7beb49169..205c6f134 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -230,7 +230,7 @@ nickChanged=Nickname ge\u00e4ndert. nickDisplayName=\u00a77Du musst \u00a7fchange-displayname\u00a7c in der Essentials-Config aktivieren. nickInUse=\u00a7cDieser Name wird bereits verwendet. nickNamesAlpha=\u00a7cNicknamen d\u00fcrfen nur alphanumerische Zeichen enthalten. -nickNoMore=\u00a7Du hast keinen Nicknamen mehr. +nickNoMore=\u00a7cDu hast keinen Nicknamen mehr. nickOthersPermission=\u00a7cDu hast keine Rechte um den Nicknamen von anderen zu \u00e4ndern. nickSet=\u00a77Dein Nickname ist nun \u00a7c{0} noAccessCommand=\u00a7cDu hast keinen Zugriff auf diesen Befehl. From f4b45f5ca06d877ce7a0ae7bc02f28f2da786354 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 1 Oct 2012 21:20:17 +1000 Subject: [PATCH 30/34] Fixing bad file names in Windows (Fixes #2924) --- Essentials/src/com/earth2me/essentials/Util.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index c1f7cd014..72c1accef 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -26,7 +26,9 @@ public class Util public static String sanitizeFileName(final String name) { - final String newName = INVALIDFILECHARS.matcher(name.toLowerCase(Locale.ENGLISH)).replaceAll("_"); + String newName = INVALIDFILECHARS.matcher(name.toLowerCase(Locale.ENGLISH)).replaceAll("_"); + if(Pattern.compile("^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(\\.(.+))?$", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE | Pattern.COMMENTS).matcher(newName).matches()) + newName = "_" + newName; return newName; } From a8575bddef2fbcada9303435594b6e510f6cdcd3 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Tue, 2 Oct 2012 01:57:29 +1000 Subject: [PATCH 31/34] Adding console overrides to exempts --- .../src/com/earth2me/essentials/commands/Commandban.java | 2 +- .../src/com/earth2me/essentials/commands/Commandsudo.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java index 5f70df273..cf6ea53df 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java @@ -44,7 +44,7 @@ public class Commandban extends EssentialsCommand } else { - if (user.isAuthorized("essentials.ban.exempt")) + if (user.isAuthorized("essentials.ban.exempt") && sender instanceof Player) { sender.sendMessage(_("banExempt")); return; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java index 1d974121b..89cfe2438 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java @@ -7,6 +7,7 @@ import java.util.logging.Logger; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.command.PluginCommand; +import org.bukkit.entity.Player; public class Commandsudo extends EssentialsCommand @@ -33,7 +34,7 @@ public class Commandsudo extends EssentialsCommand System.arraycopy(args, 2, arguments, 0, args.length - 2); } - if (user.isAuthorized("essentials.sudo.exempt")) + if (user.isAuthorized("essentials.sudo.exempt") && sender instanceof Player) { throw new Exception(_("sudoExempt")); } From 6aad42e35eb0a51975fd00d1e9c5f922f06dae20 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Tue, 2 Oct 2012 02:11:05 +1000 Subject: [PATCH 32/34] Fixing storage of compiled regex --- Essentials/src/com/earth2me/essentials/Util.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/Util.java b/Essentials/src/com/earth2me/essentials/Util.java index 72c1accef..34e5c6420 100644 --- a/Essentials/src/com/earth2me/essentials/Util.java +++ b/Essentials/src/com/earth2me/essentials/Util.java @@ -23,11 +23,12 @@ public class Util private final static Logger logger = Logger.getLogger("Minecraft"); private final static Pattern INVALIDFILECHARS = Pattern.compile("[^a-z0-9]"); private final static Pattern INVALIDCHARS = Pattern.compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]"); + private final static Pattern BADFILENAMES = Pattern.compile("^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(\\.(.+))?$", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE | Pattern.COMMENTS); public static String sanitizeFileName(final String name) { String newName = INVALIDFILECHARS.matcher(name.toLowerCase(Locale.ENGLISH)).replaceAll("_"); - if(Pattern.compile("^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(\\.(.+))?$", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE | Pattern.COMMENTS).matcher(newName).matches()) + if(BADFILENAMES.matcher(newName).matches()) newName = "_" + newName; return newName; } From eaa92b8c8327b1398be9b9b320fc27d755ace57d Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Tue, 2 Oct 2012 02:31:15 +1000 Subject: [PATCH 33/34] Adding -c switch to sudo to fake chat --- .../com/earth2me/essentials/commands/Commandsudo.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java index 1d974121b..da4981ee0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java @@ -26,6 +26,15 @@ public class Commandsudo extends EssentialsCommand } final User user = getPlayer(server, args, 0, false); + if(args[1].equalsIgnoreCase("say")) + { + if (user.isAuthorized("essentials.sudo.exempt")) + { + throw new Exception(_("sudoExempt")); + } + user.chat(getFinalArg(args, 2)); + return; + } final String command = args[1]; final String[] arguments = new String[args.length - 2]; if (arguments.length > 0) From 7fcc1da2833206375b7cd9e8975ef44acbf1a35a Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Tue, 2 Oct 2012 02:32:52 +1000 Subject: [PATCH 34/34] Blocking numeric home names, changing invalid home message --- .../com/earth2me/essentials/commands/Commandsethome.java | 7 +++++-- Essentials/src/messages.properties | 1 + Essentials/src/messages_cs.properties | 1 + Essentials/src/messages_da.properties | 1 + Essentials/src/messages_de.properties | 1 + Essentials/src/messages_en.properties | 1 + Essentials/src/messages_es.properties | 1 + Essentials/src/messages_fi.properties | 1 + Essentials/src/messages_fr.properties | 1 + Essentials/src/messages_it.properties | 1 + Essentials/src/messages_nl.properties | 1 + Essentials/src/messages_pl.properties | 1 + Essentials/src/messages_pt.properties | 1 + Essentials/src/messages_se.properties | 1 + 14 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java index 7ec1ba11d..c97761f8d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java @@ -2,7 +2,9 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.Util; import java.util.Locale; +import java.util.regex.Pattern; import org.bukkit.Location; import org.bukkit.Server; @@ -55,9 +57,10 @@ public class Commandsethome extends EssentialsCommand { name = "home"; } - if ("bed".equals(name)) + if ("bed".equals(name) || Util.isInt(name)) { - throw new NotEnoughArgumentsException(); + user.sendMessage(_("invalidHomeName")); + throw new NoChargeException(); } usersHome.setHome(name, location); user.sendMessage(_("homeSet", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ())); diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 37b8f0945..4852f2bef 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index c0bb5a3d0..26e039001 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -460,3 +460,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index e1245de43..9419ad45e 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 205c6f134..90e373b33 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 37b8f0945..4852f2bef 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 78738532d..b3b098d91 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index 97bf0ae36..8dd5343ad 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 242616fbb..7468952a6 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 042ee1412..91e2e8f27 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 0e8849f34..62be530f1 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index d6dccc753..1a1e73d65 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index 9ee14ed91..11a2c1df0 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties index 4701d34c2..c7685d6f4 100644 --- a/Essentials/src/messages_se.properties +++ b/Essentials/src/messages_se.properties @@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0} antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74. antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74. gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities +invalidHomeName=\u00a74Invalid home name