Compare commits

...
Author SHA1 Message Date
snowleo 5613975314 Merge branch 'master' into release 2011-07-23 03:11:14 +02:00
snowleo dc0ca35017 More german translations 2011-07-23 03:10:53 +02:00
snowleo 662d30ae45 Merge branch 'master' into release 2011-07-23 03:07:38 +02:00
snowleo 4099755b9b German translation for muted 2011-07-23 03:07:21 +02:00
snowleo 57bee443b1 Merge branch 'master' into release 2011-07-23 02:39:37 +02:00
snowleo 0f3c0e82f2 Readded some code, so that the user is not checked, if he is next to himself. 2011-07-23 02:07:25 +02:00
snowleo 0e21d3287e Fix Util.getSafeDestination() to use int instead of double. 2011-07-23 02:06:13 +02:00
snowleo 3cedfeef2c Separate config setting for prefix/suffix 2011-07-23 01:43:02 +02:00
snowleo a20f2b71da Added more default permissions for players to config.yml 2011-07-23 01:29:31 +02:00
snowleo b2e3290038 Removed quotes from translation files 2011-07-23 01:13:55 +02:00
snowleo 979592c8ba Missing space in Spawnmob message 2011-07-23 01:10:22 +02:00
snowleo 7001798874 Don't give out a full stack on /unlimited, instead either 2 or 1, if the max stack size is 1 2011-07-23 01:03:45 +02:00
snowleo 40a2bccf2d Now the cleanup 2011-07-23 00:53:55 +02:00
snowleo ee13d33b66 Revert "minor cleanup"
This reverts commit 5027198010.

Don't mess with the line endings!
2011-07-23 00:50:52 +02:00
snowleo fdb46f60fd Add white color after each name to prevent coloration of the next name. 2011-07-23 00:47:02 +02:00
ementalo 5027198010 minor cleanup 2011-07-22 23:33:33 +01:00
ementalo 90a5a4a470 Merge pull request #17 from Macel/master
Added translations to plugin help command failure log messages
2011-07-22 15:13:47 -07:00
Robert Meany 85cab9533e *First Commit - Please verify I did everything right* - Added translations
to plugin help command failure log messagets.
2011-07-22 13:53:06 -04:00
ementalo 304b13ca5e SignProtection code fix number 92324 2011-07-22 17:16:08 +01:00
ementalo 6a1c53dd01 SignProtection another fix 2011-07-22 17:03:55 +01:00
ementalo d7b2ac97aa fix of my fix 2011-07-22 16:56:41 +01:00
ementalo 7b7289db4c Test #725 fix for Protection signs created before 2.5 2011-07-22 14:07:04 +01:00
ementalo ba2b827d7c Test #723 essentials.ban.notify - only people with this permission get notified on ban 2011-07-22 12:36:49 +01:00
snowleo 621618e41f Merge branch 'master' into release 2011-07-21 02:58:39 +02:00
snowleo 54559172c6 /unlimited: Instead of 2, give the player a full stack 2011-07-21 02:58:20 +02:00
snowleo 6ccb60813a Merge branch 'master' into release 2011-07-21 02:52:25 +02:00
snowleo 2067bb8f0d EssentialsChat: The user should see his own message
Corrected radius
2011-07-21 02:42:54 +02:00
snowleo b34119901e Merge branch 'master' into release 2011-07-21 02:29:45 +02:00
snowleo 4f31d2779d Null pointer check for Perm 2.7.4 prefix/suffix 2011-07-21 02:09:54 +02:00
snowleo ed29f29622 Merge pull request #15 from khobbits/patch-3
Not sure how well this would work, but its probably worth giving the user at least two of the item to combat client lag, if you try and build something with unlimited, but you only have 1 item, client lag prevents you from doing so quickly, because you need to wait for the server to give you back the item.
2011-07-20 16:44:51 -07:00
snowleo b8e41df0f6 Merge pull request #16 from Brettflan/master
Fix for local chat, leftover Factions cleanup
2011-07-20 16:43:41 -07:00
Brettflan 602517473d Fix for local chat not working (instead acting just like global chat) 2011-07-20 18:08:02 -05:00
Brettflan cee0823db4 Removed leftovers from initial Factions integration 2011-07-20 18:06:58 -05:00
snowleo b317aef8c9 Merge branch 'master' into release 2011-07-21 00:31:39 +02:00
snowleo 8b41219fcc Updated VanishNoPickup:
vanish player if they are set as hidden on join
2011-07-20 23:58:41 +02:00
snowleo 61fa43a769 Updated VanishNoPickup
Correctly save hidden users
Allow /vanish hide playername from console
2011-07-20 23:48:21 +02:00
snowleo fdbc6fa94f Merge branch 'master' into release 2011-07-20 23:18:34 +02:00
snowleo 28dd14d38c Fix /time for players without essentials.time.world 2011-07-20 23:18:09 +02:00
snowleo 0ffe24903a Merge branch 'master' into release 2011-07-20 23:09:40 +02:00
snowleo f6e6e0042a Updated VanishNoPickup
Moved /noaggro command to /vanish aggro
2011-07-20 23:08:47 +02:00
snowleo e550a7cc44 Merge branch 'master' into release 2011-07-20 22:37:43 +02:00
snowleo 9efc0840e3 VanishNoPickup 1.9.12+essentials2 2011-07-20 22:35:59 +02:00
snowleo 82165a2af6 Merge branch 'master' into release 2011-07-20 22:22:02 +02:00
snowleo 815b700eac Don't return offline players with getPlayer() 2011-07-20 22:14:56 +02:00
snowleo fcda9f9d3b Prevent players to create correct signs with essentials.signs.color permission. 2011-07-20 22:04:02 +02:00
snowleo aa663c0c98 Don't teleport to offline users. 2011-07-20 22:03:15 +02:00
snowleo bda2f5e615 Show player not found message, if no unhidden player is found in /msg 2011-07-20 21:36:23 +02:00
snowleo 377f967dab Native support for PermissionsEx 2011-07-20 20:42:19 +02:00
KHobbits d5c8d0c1bf Not sure how well this would work, but its probably worth giving the user at least two of the item to combat client lag, if you try and build something with unlimited, but you only have 1 item, client lag prevents you from doing so quickly, because you need to wait for the server to give you back the item. 2011-07-20 08:15:40 -07:00
33 changed files with 287 additions and 125 deletions

No files matched your search

+3 -1
View File
@@ -32,6 +32,7 @@ file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.junit-4.5.jar=..\\lib\\junit_4\\junit-4.5.jar
file.reference.Permissions3.jar=../lib/Permissions3.jar
file.reference.PermissionsEx.jar=../lib/PermissionsEx.jar
includes=**
jar.compress=false
javac.classpath=\
@@ -39,7 +40,8 @@ javac.classpath=\
${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
${file.reference.iCo4.jar}:\
${file.reference.iCo5.jar}:\
${file.reference.BOSEconomy7.jar}
${file.reference.BOSEconomy7.jar}:\
${file.reference.PermissionsEx.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
@@ -143,32 +143,7 @@ public class Essentials extends JavaPlugin implements IEssentials
LOGGER.log(Level.INFO, Util.i18n("bukkitFormatChanged"));
}
final Plugin permissionsPlugin = pm.getPlugin("Permissions");
if (permissionsPlugin != null)
{
if (permissionsPlugin.getDescription().getVersion().charAt(0) == '3')
{
this.permissionsHandler = new Permissions3Handler(permissionsPlugin);
}
else
{
this.permissionsHandler = new Permissions2Handler(permissionsPlugin);
}
}
else
{
if (this.getSettings().useBukkitPermissions())
{
this.permissionsHandler = new BukkitPermissionsHandler();
}
else
{
this.permissionsHandler = new ConfigPermissionsHandler(this);
}
}
final ServerListener serverListener = new EssentialsPluginListener(paymentMethod);
final ServerListener serverListener = new EssentialsPluginListener(this);
pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Low, this);
pm.registerEvent(Type.PLUGIN_DISABLE, serverListener, Priority.Low, this);
@@ -663,6 +638,11 @@ public class Essentials extends JavaPlugin implements IEssentials
{
return permissionsHandler;
}
public void setPermissionsHandler(IPermissionsHandler handler)
{
this.permissionsHandler = handler;
}
public BanWorkaround getBans()
{
@@ -6,40 +6,76 @@ import java.util.logging.Logger;
import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.event.server.ServerListener;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
public class EssentialsPluginListener extends ServerListener
{
private final Methods methods;
private static final Logger logger = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
public EssentialsPluginListener(Methods methods)
public EssentialsPluginListener(final IEssentials ess)
{
this.methods = methods;
this.ess = ess;
}
@Override
public void onPluginEnable(PluginEnableEvent event)
public void onPluginEnable(final PluginEnableEvent event)
{
if (!methods.hasMethod())
checkPermissions();
if (!ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().setMethod(event.getPlugin()))
{
if (methods.setMethod(event.getPlugin()))
{
logger.log(Level.INFO, "[Essentials] Payment method found (" + methods.getMethod().getName() + " version: " + methods.getMethod().getVersion() + ")");
}
LOGGER.log(Level.INFO, "[Essentials] Payment method found (" + ess.getPaymentMethod().getMethod().getName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")");
}
}
@Override
public void onPluginDisable(PluginDisableEvent event)
{
checkPermissions();
// Check to see if the plugin thats being disabled is the one we are using
if (methods != null && methods.hasMethod())
if (ess.getPaymentMethod() != null && ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().checkDisabled(event.getPlugin()))
{
if (methods.checkDisabled(event.getPlugin()))
LOGGER.log(Level.INFO, "[Essentials] Payment method was disabled. No longer accepting payments.");
}
}
private void checkPermissions()
{
final PluginManager pm = ess.getServer().getPluginManager();
final Plugin permissionsExPlugin = pm.getPlugin("PermissionsEx");
if (permissionsExPlugin == null || !permissionsExPlugin.isEnabled())
{
final Plugin permissionsPlugin = pm.getPlugin("Permissions");
if (permissionsPlugin == null || !permissionsPlugin.isEnabled())
{
logger.log(Level.INFO, "[Essentials] Payment method was disabled. No longer accepting payments.");
if (ess.getSettings().useBukkitPermissions())
{
ess.setPermissionsHandler(new BukkitPermissionsHandler());
}
else
{
ess.setPermissionsHandler(new ConfigPermissionsHandler(ess));
}
}
else
{
if (permissionsPlugin.getDescription().getVersion().charAt(0) == '3')
{
ess.setPermissionsHandler(new Permissions3Handler(permissionsPlugin));
}
else
{
ess.setPermissionsHandler(new Permissions2Handler(permissionsPlugin));
}
}
}
else
{
ess.setPermissionsHandler(new PermissionsExHandler());
}
}
}
@@ -59,9 +59,11 @@ public interface IEssentials extends Plugin
IPermissionsHandler getPermissionsHandler();
void setPermissionsHandler(IPermissionsHandler handler);
void showError(final CommandSender sender, final Throwable exception, final String commandLabel);
Map<String, User> getAllUsers();
ItemDb getItemDb();
}
@@ -130,4 +130,6 @@ public interface ISettings extends IConf
boolean isPlayerCommand(String string);
public boolean useBukkitPermissions();
public boolean addPrefixSuffix();
}
@@ -9,7 +9,7 @@ import org.bukkit.plugin.Plugin;
public class Permissions2Handler implements IPermissionsHandler
{
private final transient PermissionHandler permissionHandler;
Permissions2Handler(final Plugin permissionsPlugin)
{
permissionHandler = ((Permissions)permissionsPlugin).getHandler();
@@ -37,12 +37,13 @@ public class Permissions2Handler implements IPermissionsHandler
public String getPrefix(final Player base)
{
return permissionHandler.getGroupPrefix(base.getWorld().getName(), getGroup(base));
final String prefix = permissionHandler.getGroupPrefix(base.getWorld().getName(), getGroup(base));
return prefix == null ? "" : prefix;
}
public String getSuffix(final Player base)
{
return permissionHandler.getGroupSuffix(base.getWorld().getName(), getGroup(base));
final String suffix = permissionHandler.getGroupSuffix(base.getWorld().getName(), getGroup(base));
return suffix == null ? "" : suffix;
}
}
@@ -0,0 +1,74 @@
package com.earth2me.essentials;
import org.bukkit.entity.Player;
import ru.tehkode.permissions.PermissionManager;
import ru.tehkode.permissions.PermissionUser;
import ru.tehkode.permissions.bukkit.PermissionsEx;
class PermissionsExHandler implements IPermissionsHandler
{
private final transient PermissionManager manager;
public PermissionsExHandler()
{
manager = PermissionsEx.getPermissionManager();
}
public String getGroup(Player base)
{
final PermissionUser user = manager.getUser(base.getName());
if (user == null)
{
return "default";
}
return user.getGroupsNames()[0];
}
public boolean canBuild(Player base, String group)
{
final PermissionUser user = manager.getUser(base.getName());
if (user == null)
{
return true;
}
return user.getOptionBoolean("build", base.getWorld().getName(), true);
}
public boolean inGroup(Player base, String group)
{
final PermissionUser user = manager.getUser(base.getName());
if (user == null)
{
return false;
}
return user.inGroup(group);
}
public boolean hasPermission(Player base, String node)
{
return manager.has(base.getName(), node, base.getWorld().getName());
}
public String getPrefix(Player base)
{
final PermissionUser user = manager.getUser(base.getName());
if (user == null)
{
return "";
}
return user.getPrefix();
}
public String getSuffix(Player base)
{
final PermissionUser user = manager.getUser(base.getName());
if (user == null)
{
return "";
}
return user.getSuffix();
}
}
@@ -468,4 +468,9 @@ public class Settings implements ISettings
{
return config.getBoolean("use-bukkit-permissions", false);
}
public boolean addPrefixSuffix()
{
return config.getBoolean("add-prefix-suffix", false);
}
}
@@ -246,14 +246,17 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
}
}
final String prefix = ess.getPermissionsHandler().getPrefix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
final String suffix = ess.getPermissionsHandler().getSuffix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
nickname.insert(0, prefix);
nickname.append(suffix);
if (suffix.length() < 2 || !suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§"))
if (ess.getSettings().addPrefixSuffix())
{
nickname.append("§f");
final String prefix = ess.getPermissionsHandler().getPrefix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
final String suffix = ess.getPermissionsHandler().getSuffix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
nickname.insert(0, prefix);
nickname.append(suffix);
if (suffix.length() < 2 || !suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§"))
{
nickname.append("§f");
}
}
return nickname.toString();
@@ -216,21 +216,21 @@ public class Util
return c.getTimeInMillis();
}
public static Location getSafeDestination(Location loc) throws Exception
public static Location getSafeDestination(final Location loc) throws Exception
{
if (loc == null)
if (loc == null || loc.getWorld() == null)
{
throw new Exception(Util.i18n("destinationNotSet"));
}
World world = loc.getWorld();
double x = Math.floor(loc.getX()) + 0.5;
double y = Math.floor(loc.getY());
double z = Math.floor(loc.getZ()) + 0.5;
final World world = loc.getWorld();
int x = loc.getBlockX();
int y = loc.getBlockY();
int z = loc.getBlockZ();
while (isBlockAboveAir(world, x, y, z))
{
y -= 1.0D;
if (y < 0.0D)
y -= 1;
if (y < 0)
{
throw new Exception(Util.i18n("holeInFloor"));
}
@@ -238,33 +238,33 @@ public class Util
while (isBlockUnsafe(world, x, y, z))
{
y += 1.0D;
if (y >= 110.0D)
y += 1;
if (y >= 127)
{
x += 1.0D;
x += 1;
break;
}
}
while (isBlockUnsafe(world, x, y, z))
{
y -= 1.0D;
if (y <= 1.0D)
y -= 1;
if (y <= 1)
{
y = 110.0D;
x += 1.0D;
y = 127;
x += 1;
}
}
return new Location(world, x, y, z, loc.getYaw(), loc.getPitch());
return new Location(world, x + 0.5D, y, z + 0.5D, loc.getYaw(), loc.getPitch());
}
private static boolean isBlockAboveAir(World world, double x, double y, double z)
private static boolean isBlockAboveAir(final World world, final int x, final int y, final int z)
{
return world.getBlockAt((int)Math.floor(x), (int)Math.floor(y - 1.0D), (int)Math.floor(z)).getType() == Material.AIR;
return world.getBlockAt(x, y - 1, z).getType() == Material.AIR;
}
public static boolean isBlockUnsafe(World world, double x, double y, double z)
public static boolean isBlockUnsafe(final World world, final int x, final int y, final int z)
{
Block below = world.getBlockAt((int)Math.floor(x), (int)Math.floor(y - 1.0D), (int)Math.floor(z));
final Block below = world.getBlockAt(x, y - 1, z);
if (below.getType() == Material.LAVA || below.getType() == Material.STATIONARY_LAVA)
{
return true;
@@ -275,8 +275,8 @@ public class Util
return true;
}
if ((world.getBlockAt((int)Math.floor(x), (int)Math.floor(y), (int)Math.floor(z)).getType() != Material.AIR)
|| (world.getBlockAt((int)Math.floor(x), (int)Math.floor(y + 1.0D), (int)Math.floor(z)).getType() != Material.AIR))
if ((world.getBlockAt(x, y, z).getType() != Material.AIR)
|| (world.getBlockAt(x, y + 1, z).getType() != Material.AIR))
{
return true;
}
@@ -294,7 +294,7 @@ public class Util
return str;
}
public static double roundDouble(double d)
public static double roundDouble(final double d)
{
return Math.round(d * 100.0) / 100.0;
}
@@ -53,6 +53,13 @@ public class Commandban extends EssentialsCommand
}
player.kickPlayer(banReason);
ess.getBans().banByName(player.getName());
server.broadcastMessage(Util.format("playerBanned", player.getName(), banReason));
for(Player p : server.getOnlinePlayers())
{
User u = ess.getUser(p);
if(u.isAuthorized("essentials.ban.notify"))
{
p.sendMessage(Util.format("playerBanned", player.getName(), banReason));
}
}
}
}
@@ -173,7 +173,7 @@ public class Commandhelp extends EssentialsCommand
{
if (!reported)
{
logger.log(Level.WARNING, "Error getting help for:" + pluginName, ex);
logger.log(Level.WARNING, Util.format("commandHelpFailedForPlugin", pluginName), ex);
}
reported = true;
continue;
@@ -102,6 +102,7 @@ public class Commandlist extends EssentialsCommand
groupString.append("§7[HIDDEN]§f");
}
groupString.append(user.getDisplayName());
groupString.append("§f");
}
sender.sendMessage(groupString.toString());
}
@@ -142,6 +143,7 @@ public class Commandlist extends EssentialsCommand
onlineUsers.append("§7[HIDDEN]§f");
}
onlineUsers.append(user.getDisplayName());
onlineUsers.append("§f");
}
sender.sendMessage(onlineUsers.toString());
}
@@ -48,10 +48,25 @@ public class Commandmsg extends EssentialsCommand
sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
int i = 0;
for (Player p : matches)
{
final User u = ess.getUser(p);
if (u.isHidden())
{
i++;
}
}
if (i == matches.size())
{
sender.sendMessage(Util.i18n("playerNotFound"));
return;
}
charge(sender);
for (Player p : matches)
{
{
sender.sendMessage(Util.format("msgFormat", translatedMe, p.getDisplayName(), message));
final User u = ess.getUser(p);
if (sender instanceof Player && (u.isIgnoredPlayer(((Player)sender).getName()) || u.isHidden()))
@@ -164,7 +164,7 @@ public class Commandspawnmob extends EssentialsCommand
changeMobData(mobMount.name, spawnedMount, mountData, user);
}
}
user.sendMessage(args[1] + " " + mob.name.toLowerCase() + mob.suffix + Util.i18n("spawned"));
user.sendMessage(args[1] + " " + mob.name.toLowerCase() + mob.suffix + " " + Util.i18n("spawned"));
}
catch (MobException e1)
{
@@ -33,7 +33,7 @@ public class Commandtime extends EssentialsCommand
else
{
charge(user);
setPlayerTime(user, commandLabel);
setPlayerTime(user, args[0]);
}
}
else
@@ -55,7 +55,8 @@ public class Commandunlimited extends EssentialsCommand
return;
}
ItemStack stack = ess.getItemDb().get(args[0], 1);
final ItemStack stack = ess.getItemDb().get(args[0], 1);
stack.setAmount(Math.min(stack.getType().getMaxStackSize(), 2));
String itemname = stack.getType().toString().toLowerCase().replace("_", "");
if (!user.isAuthorized("essentials.unlimited.item-all")
@@ -6,6 +6,7 @@ import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.entity.Player;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
@@ -44,7 +45,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
User user = ess.getAllUsers().get(args[pos].toLowerCase());
if (user != null)
{
if(!getOffline && user.isHidden())
if(!getOffline && (user.getBase() instanceof OfflinePlayer || user.isHidden()))
{
throw new NoSuchFieldException(Util.i18n("playerNotFound"));
}
@@ -88,6 +88,14 @@ public class SignBlockListener extends BlockListener
{
return;
}
User user = ess.getUser(event.getPlayer());
if (user.isAuthorized("essentials.signs.color"))
{
for (int i = 0; i < 4; i++)
{
event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1"));
}
}
for (Signs signs : Signs.values())
{
final EssentialsSign sign = signs.getSign();
@@ -103,14 +111,6 @@ public class SignBlockListener extends BlockListener
return;
}
}
User user = ess.getUser(event.getPlayer());
if (user.isAuthorized("essentials.signs.color"))
{
for (int i = 0; i < 4; i++)
{
event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1"));
}
}
}
@Override
@@ -9,6 +9,7 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
@@ -157,7 +158,7 @@ public class SignProtection extends EssentialsSign
return SignProtectionState.ALLOWED;
}
}
if (sign.getLine(3).substring(2).equalsIgnoreCase(username))
if (ChatColor.stripColor(sign.getLine(3)).equalsIgnoreCase(username))
{
return SignProtectionState.OWNER;
}
+27 -1
View File
@@ -37,6 +37,11 @@ nickname-prefix: '~'
# Disable this if you have any other plugin, that modifies the displayname of a user.
change-displayname: true
# Adds the prefix and suffix to the displayname of the player, so it will be displayed in messages and lists.
# The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx.
# The value of change-displayname (above) has to be true.
add-prefix-suffix: false
# The delay, in seconds, required between /home, /tp, etc.
teleport-cooldown: 0
@@ -117,7 +122,8 @@ disabled-commands:
# Restricted commands have been removed.
# Now we have a whitelist, all commands not on this list are only available to ops.
# These will have NO EFFECT if you have Permissions installed!
# These are here only if you want something simpler than Permissions.
# They are here only if you want something simpler than Permissions.
# These are the permissions without the "essentials." part.
player-commands:
- afk
- back
@@ -127,6 +133,7 @@ player-commands:
- compass
- depth
- getpos
- geoip.show
- help
- helpop
- home
@@ -143,13 +150,31 @@ player-commands:
- nick
- pay
- ping
- portal
- powertool
- protect
- r
- rules
- seen
- sell
- sethome
- setxmpp
- signs.create.protection
- signs.create.trade
- signs.break.protection
- signs.break.trade
- signs.use.balance
- signs.use.buy
- signs.use.disposal
- signs.use.free
- signs.use.heal
- signs.use.mail
- signs.use.protection
- signs.use.sell
- signs.use.time
- signs.use.trade
- signs.use.warp
- signs.use.weather
- spawn
- suicide
- tpa
@@ -157,6 +182,7 @@ player-commands:
- tpahere
- tpdeny
- warp
- warp.list
- world
- worth
- xmpp
+4 -3
View File
@@ -29,7 +29,8 @@ canTalkAgain = \u00a77You can talk again
cantFindGeoIpDB = Can''t find GeoIP database!
cantReadGeoIpDB = Failed to read GeoIP database!
cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
commandFailed = Command {0} failed:
commandFailed = Command {0} failed:
commandHelpFailedForPlugin = Error getting help for: {0}
commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
compassBearing = \u00a77Bearing: {0} ({1} degrees).
configFileMoveError = Failed to move config.yml to backup location.
@@ -190,7 +191,7 @@ noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that k
noKits = \u00a77There are no kits available yet
noMail = You do not have any mail
noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
noMotd = \u00a7cThere is no message of the day."
noMotd = \u00a7cThere is no message of the day.
noNewMail = \u00a77You have no new mail.
noPendingRequest = You do not have a pending request.
noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
@@ -219,7 +220,7 @@ playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
playerNotFound = \u00a7cPlayer not found.
playerUnmuted = "\u00a77You have been unmuted"
playerUnmuted = \u00a77You have been unmuted
pong = Pong!
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
powerToolAir = Command can''t be attached to air.
+4 -3
View File
@@ -31,7 +31,8 @@ canTalkAgain = \u00a77Du kan snakke igen
cantFindGeoIpDB = Kan ikke finde GeoIP database!
cantReadGeoIpDB = Fejl ved l\u00e6sning af GeoIP database!
cantSpawnItem = \u00a7cDu er ikke tilladt at spawne elementet {0}
commandFailed = Kommando {0} fejlede:
commandFailed = Kommando {0} fejlede:
commandHelpFailedForPlugin=Fejl ved at f\u00e5 hj\u00e6lp til: {0}
commandNotLoaded = \u00a7cCommand {0} er ikke indl\u00e6st korrekt.
compassBearing = \u00a77B\u00e6rer: {0} ({1} grader).
configFileMoveError = Kunne ikke flytte config.yml til backup placering.
@@ -192,7 +193,7 @@ noKitPermission = \u00a7cDu har brug for \u00a7c{0}\u00a7c tilladelsen for at br
noKits = \u00a77Der er ikke nogen pakker tilg\u00e6ngelig endnu
noMail = Du har ikke noget post
noMailSendPerm = \u00a7cDu har ikke \u00a7fessentials.mail.send\u00a7c tilladelsen.
noMotd = \u00a7cDer er ikke nogen besked for dagen."
noMotd = \u00a7cDer er ikke nogen besked for dagen.
noNewMail = \u00a77Du har ingen ny post.
noPendingRequest = Du har ikke en ventende anmodning.
noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
@@ -221,7 +222,7 @@ playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
playerNotFound = \u00a7cSpiller ikke fundet.
playerUnmuted = "\u00a77You have been unmuted"
playerUnmuted = \u00a77You have been unmuted
pong = Pong!
possibleWorlds = \u00a77Mulige verdener er numrene 0 igennem {0}.
powerToolAir = Kommando kan ikke blive tildelt luft.
+8 -7
View File
@@ -29,7 +29,8 @@ canTalkAgain = \u00a77Du kannst wieder sprechen.
cantFindGeoIpDB = Kann GeoIP-Datenbank nicht finden!
cantReadGeoIpDB = Fehler beim Einlesen der GeoIP-Datenbank!
cantSpawnItem = \u00a7cDu darfst {0} nicht erzeugen.
commandFailed = Befehl {0} scheiterte:
commandFailed = Befehl {0} scheiterte:
commandHelpFailedForPlugin=Fehler beim Abrufen der Hilfe f\u00fcr: {0}
commandNotLoaded = \u00a7cBefehl {0} ist nicht richtig geladen.
compassBearing = \u00a77Peilung: {0} ({1} Grad).
configFileMoveError = Verschieben von config.yml zu einer Sicherheitskopie gescheitert.
@@ -168,7 +169,7 @@ month = Monat
months = Monate
moreThanZero = Anzahl muss gr\u00f6sser als 0 sein.
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
muteExempt = \u00a7cYou may not mute that player.
muteExempt = \u00a7cDu darfst diesen Spieler nicht stumm machen.
mutedPlayer = Player {0} ist nun stumm.
mutedPlayerFor = Player {0} ist nun stumm f\u00fcr {1}.
mutedUserSpeaks = {0} versuchte zu sprechen, aber ist stumm geschalt.
@@ -190,7 +191,7 @@ noKitPermission = \u00a7cDu brauchst die Berechtigung \u00a7c{0}\u00a7c um diese
noKits = \u00a77Es sind keine Ausr\u00fcstungen verf\u00fcgbar.
noMail = Du hast keine Nachrichten
noMailSendPerm = \u00a7cDu hast die Rechte \u00a7fessentials.mail.send\u00a7c nicht.
noMotd = \u00a7cEs existiert keine Willkommensnachricht."
noMotd = \u00a7cEs existiert keine Willkommensnachricht.
noNewMail = \u00a77Du hast keine Nachrichten.
noPendingRequest = Du hast keine Teleportierungsanfragen.
noPlacePermission = \u00a7cDu hast keine Rechte, einen Block in der N\u00e4he des Schildes zu platzieren.
@@ -215,11 +216,11 @@ playerInJail = \u00a7cSpieler ist bereits in Gef\u00e4ngnis {0}.
playerJailed = \u00a77Spieler {0} eingesperrt.
playerJailedFor = \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
playerKicked = \u00a7cSpieler {0} rausgeworfen: {1}
playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerMuted = \u00a77Du bist jetzt stumm.
playerMutedFor = \u00a77Du bist jetzt stumm f\u00fcr {0}.
playerNeverOnServer = \u00a7cSpieler {0} war niemals auf diesem Server.
playerNotFound = \u00a7cSpieler nicht gefunden.
playerUnmuted = "\u00a77You have been unmuted"
playerUnmuted = \u00a77Du bist nicht mehr stumm.
pong = Pong!
possibleWorlds = \u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
powerToolAir = Befehl kann nicht mit Luft verbunden werden.
@@ -325,4 +326,4 @@ year = Jahr
years = Jahre
youAreHealed = \u00a77Du wurdest geheilt.
youHaveNewMail = \u00a7cDu hast {0} Nachrichten!\u00a7f Schreibe \u00a77/mail read\u00a7f um deine Nachrichten anzuzeigen.
invalidCharge = \u00a7cUng\u00fcltige Verf\u00fcgung.
invalidCharge = \u00a7cUng\u00fcltige Verf\u00fcgung.
+4 -3
View File
@@ -29,7 +29,8 @@ canTalkAgain = \u00a77You can talk again
cantFindGeoIpDB = Can''t find GeoIP database!
cantReadGeoIpDB = Failed to read GeoIP database!
cantSpawnItem = \u00a7cYou are not allowed to spawn the item {0}
commandFailed = Command {0} failed:
commandFailed = Command {0} failed:
commandHelpFailedForPlugin=Error getting help for: {0}
commandNotLoaded = \u00a7cCommand {0} is improperly loaded.
compassBearing = \u00a77Bearing: {0} ({1} degrees).
configFileMoveError = Failed to move config.yml to backup location.
@@ -190,7 +191,7 @@ noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that k
noKits = \u00a77There are no kits available yet
noMail = You do not have any mail
noMailSendPerm = \u00a7cYou do not have the \u00a7fessentials.mail.send\u00a7c permission.
noMotd = \u00a7cThere is no message of the day."
noMotd = \u00a7cThere is no message of the day.
noNewMail = \u00a77You have no new mail.
noPendingRequest = You do not have a pending request.
noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
@@ -219,7 +220,7 @@ playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
playerNotFound = \u00a7cPlayer not found.
playerUnmuted = "\u00a77You have been unmuted"
playerUnmuted = \u00a77You have been unmuted
pong = Pong!
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
powerToolAir = Command can''t be attached to air.
+3 -2
View File
@@ -29,7 +29,8 @@ canTalkAgain = \u00a77Vous pouvez de nouveau parler.
cantFindGeoIpDB = N''arrive pas \u00e0 trouver la base de donn\u00e9es GeoIP!
cantReadGeoIpDB = Echec de la lecture de la base de donn\u00e9s GeoIP!
cantSpawnItem = \u00a7cVous n''avez pas le droit de faire apparaitre {0}
commandFailed = \u00c9chec de la commande {0}:
commandFailed = \u00c9chec de la commande {0}:
commandHelpFailedForPlugin=Erreur d'obtention d'aider \u00e0: {0}
commandNotLoaded = \u00a7cLa commande {0} a \u00e9t\u00e9 mal charg\u00e9e.
compassBearing = \u00a77Orientation: {0} ({1} degr\u00e9s).
configFileMoveError = \u00c9chec du d\u00e9placement de config.yml vers l''emplacement de backup.
@@ -219,7 +220,7 @@ playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
playerNotFound = \u00a7cLe joueur est introuvable.
playerUnmuted = "\u00a77You have been unmuted"
playerUnmuted = \u00a77You have been unmuted
pong = Pong!
possibleWorlds = \u00a77Les mondes possibles sont les nombres 0 par {0}.
powerToolAir = La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
+4 -3
View File
@@ -30,7 +30,8 @@ canTalkAgain = \u00a77Je kan weer praten.
cantFindGeoIpDB = De GeoIP database kon niet gevonden worden!
cantReadGeoIpDB = Fout bij het lezen van de GeoIP database!
cantSpawnItem = \u00a7cJe bent niet bevoegd om {0} te spawnen.
commandFailed = Opdracht {0} mislukt:
commandFailed = Opdracht {0} mislukt:
commandHelpFailedForPlugin=Fout bij het \u200b\u200bkrijgen van hulp voor: {0}
commandNotLoaded = \u00a7cOpdracht {0} is fout geladen.
compassBearing = \u00a77Ligging: {0} ({1} graden).
configFileMoveError = Het verplaatsen van config.yml naar de backup locatie is mislukt.
@@ -191,7 +192,7 @@ noKitPermission = \u00a7cJe hebt de \u00a7c{0}\u00a7c toestemming nodig om die k
noKits = \u00a77Er zijn nog geen kits beschikbaar
noMail = Je hebt geen berichten
noMailSendPerm = \u00a7cJe hebt de \u00a7fessentials.mail.send\u00a7c toestemming niet.
noMotd = \u00a7cEr is geen bericht van de dag."
noMotd = \u00a7cEr is geen bericht van de dag.
noNewMail = \u00a77Je hebt geen nieuwe berichten.
noPendingRequest = Je hebt geen aanvragen.
noPlacePermission = \u00a7cYou do not have permission to place a block near that sign.
@@ -220,7 +221,7 @@ playerMuted = \u00a77You have been muted
playerMutedFor = \u00a77You have been muted for {0}
playerNeverOnServer = \u00a7cSpeler {0} is nooit op deze server geweest.
playerNotFound = \u00a7cSpeler niet gevonden.
playerUnmuted = "\u00a77You have been unmuted"
playerUnmuted = \u00a77You have been unmuted
pong = Pong!
possibleWorlds = \u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}.
powerToolAir = Command kan niet worden bevestigd aan de lucht.
+1 -3
View File
@@ -27,13 +27,11 @@ dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.bukkit-0.0.1-SNAPSHOT.jar=../lib/bukkit-0.0.1-SNAPSHOT.jar
file.reference.Factions.jar=../lib/Factions.jar
includes=**
jar.compress=false
javac.classpath=\
${reference.Essentials.jar}:\
${file.reference.bukkit-0.0.1-SNAPSHOT.jar}:\
${file.reference.Factions.jar}
${file.reference.bukkit-0.0.1-SNAPSHOT.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
@@ -22,8 +22,7 @@ public class EssentialsChat extends JavaPlugin
final PluginManager pluginManager = getServer().getPluginManager();
final IEssentials ess = (IEssentials)pluginManager.getPlugin("Essentials");
chatListener = new HashMap<String, IEssentialsChatListener>();
//EssentialsChatPlayerListener.checkFactions(pluginManager);
chatListener = new HashMap<String, IEssentialsChatListener>();
final EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer(), ess, chatListener);
pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Highest, this);
@@ -52,11 +52,12 @@ public class EssentialsChatPlayerListener extends PlayerListener
event.setFormat(ess.getSettings().getChatFormat(user.getGroup()).replace('&', '§').replace("§§", "&").replace("{DISPLAYNAME}", "%1$s").replace("{GROUP}", user.getGroup()).replace("{MESSAGE}", "%2$s").replace("{WORLDNAME}", user.getWorld().getName()).replace("{SHORTWORLDNAME}", user.getWorld().getName().substring(0, 1).toUpperCase()));
final int radius = ess.getSettings().getChatRadius();
long radius = ess.getSettings().getChatRadius();
if (radius < 1)
{
return;
}
radius *= radius;
if (event.getMessage().startsWith("!") && event.getMessage().length() > 1)
{
@@ -100,13 +101,13 @@ public class EssentialsChatPlayerListener extends PlayerListener
{
continue;
}
if (u.equals(user) && !u.isAuthorized("essentials.chat.spy"))
if (!u.equals(user) && !u.isAuthorized("essentials.chat.spy"))
{
final Location l = u.getLocation();
final int dx = Math.abs(x - l.getBlockX());
final int dy = Math.abs(y - l.getBlockY());
final int dz = Math.abs(z - l.getBlockZ());
final int delta = dx + dy + dz;
final int dx = x - l.getBlockX();
final int dy = y - l.getBlockY();
final int dz = z - l.getBlockZ();
final long delta = dx*dx + dy*dy + dz*dz;
if (delta > radius || world != l.getWorld())
{
continue;
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.