From e5fc579071c53e36b2e54c952eae30f7505687ab Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Thu, 27 Dec 2012 01:10:57 +1100 Subject: [PATCH 1/2] Add tpdeny message to /tpahere --- .../src/com/earth2me/essentials/commands/Commandtpahere.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java index b6ea96b26..e130949ad 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpahere.java @@ -33,6 +33,7 @@ public class Commandtpahere extends EssentialsCommand player.requestTeleport(user, true); player.sendMessage(_("teleportHereRequest", user.getDisplayName())); player.sendMessage(_("typeTpaccept")); + player.sendMessage(_("typeTpdeny")); if (ess.getSettings().getTpaAcceptCancellation() != 0) { player.sendMessage(_("teleportRequestTimeoutInfo", ess.getSettings().getTpaAcceptCancellation())); From 4bb275e1b7ed878e608bd558d7d482299a6ebea8 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Thu, 27 Dec 2012 01:41:32 +1100 Subject: [PATCH 2/2] Revert 6b18259af6 - Adding permission node to speak, with config option to enable the node --- .../com/earth2me/essentials/EssentialsPlayerListener.java | 6 ------ Essentials/src/com/earth2me/essentials/ISettings.java | 2 -- Essentials/src/com/earth2me/essentials/Settings.java | 6 ------ Essentials/src/config.yml | 3 --- 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 - 17 files changed, 30 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index f617ff85b..8887955a4 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -60,12 +60,6 @@ public class EssentialsPlayerListener implements Listener user.sendMessage(_("playerMuted")); LOGGER.info(_("mutedUserSpeaks", user.getName())); } - if(ess.getSettings().isChatPermEnabled() && !user.isAuthorized("essentials.chat.allowed")) - { - event.setCancelled(true); - user.sendMessage(_("playerChatDenied")); - LOGGER.info(_("mutedUserSpeaks", user.getName())); - } final Iterator it = event.getRecipients().iterator(); while (it.hasNext()) { diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index eb2af8554..a261c80bb 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -187,6 +187,4 @@ public interface ISettings extends IConf public void setEssentialsChatActive(boolean b); long getMaxTempban(); - - boolean isChatPermEnabled(); } diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 4138ae835..d3c6b49d5 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -1014,10 +1014,4 @@ public class Settings implements ISettings { return config.getLong("max-tempban-time", -1); } - - @Override - public boolean isChatPermEnabled() - { - return config.getBoolean("enable-chat-perm", false); - } } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 12e932b1c..3b03a9560 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -351,9 +351,6 @@ mails-per-minute: 1000 # Set to -1 to disable, and essentials.tempban.unlimited can be used to override. max-tempban-time: -1 -# Require users have essentials.chat before they can speak? Any users without this node will not be able to speak -enable-chat-perm: false - ############################################################ # +------------------------------------------------------+ # # | EssentialsHome | # diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index acec050ff..cec54fb85 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index 4cbf3e91e..486c085cb 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -481,4 +481,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 8d66386d5..f69dc4ebb 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index f5d666727..2d2284542 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index acec050ff..cec54fb85 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 34dacad69..7915968fb 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index cf01efa93..05da0a0d6 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 869599d02..82566c31e 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index fe001b319..c8bcdd711 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index a4d39da29..07c85443e 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index 45123abbe..4c666c1cc 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index 4a6ab2eee..8db1a6bc4 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak. diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties index 4ad4a5267..fde632b89 100644 --- a/Essentials/src/messages_se.properties +++ b/Essentials/src/messages_se.properties @@ -478,4 +478,3 @@ recipeGridItem=\ \u00a7{0}X \u00a76is \u00a7c{1} recipeMore=\u00a76Type /{0} \u00a7c{1}\u00a76 to see other recipes for \u00a7c{2} recipeWhere=\u00a76Where: {0} recipeShapeless=\u00a76Combine \u00a7c{0} -playerChatDenied=\u00a76You do not have permission to speak.