mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
New permissions: essentials.powertool.append.
This commit is contained in:
parent
f99867dd0a
commit
c0e903c1f3
@ -175,7 +175,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
@Override
|
||||
public int compareTo(final User other)
|
||||
{
|
||||
return ChatColor.stripColor(this.getDisplayName()).compareToIgnoreCase(ChatColor.stripColor(other.getDisplayName()));
|
||||
return this.getName().compareToIgnoreCase(other.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -185,14 +185,14 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return ChatColor.stripColor(this.getDisplayName()).equalsIgnoreCase(ChatColor.stripColor(((User)object).getDisplayName()));
|
||||
return this.getName().equalsIgnoreCase(((User)object).getName());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return ChatColor.stripColor(this.getDisplayName()).hashCode();
|
||||
return this.getName().hashCode();
|
||||
}
|
||||
|
||||
public Boolean canSpawnItem(final int itemId)
|
||||
|
@ -58,7 +58,7 @@ public class Commandmail extends EssentialsCommand
|
||||
}
|
||||
if (!u.isIgnoredPlayer(user.getName()))
|
||||
{
|
||||
u.addMail(ChatColor.stripColor(user.getDisplayName()) + ": " + getFinalArg(args, 2));
|
||||
u.addMail(user.getName() + ": " + getFinalArg(args, 2));
|
||||
}
|
||||
user.sendMessage(_("mailSent"));
|
||||
return;
|
||||
@ -69,7 +69,7 @@ public class Commandmail extends EssentialsCommand
|
||||
{
|
||||
throw new Exception(_("noPerm","essentials.mail.sendall"));
|
||||
}
|
||||
ess.scheduleAsyncDelayedTask(new SendAll(ChatColor.stripColor(user.getDisplayName()) + ": " + getFinalArg(args, 1)));
|
||||
ess.scheduleAsyncDelayedTask(new SendAll(user.getName() + ": " + getFinalArg(args, 1)));
|
||||
user.sendMessage(_("mailSent"));
|
||||
return;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class Commandpowertool extends EssentialsCommand
|
||||
String command = getFinalArg(args, 0);
|
||||
|
||||
// check to see if this is a clear all command
|
||||
if (command != null && command.equalsIgnoreCase("c:"))
|
||||
if (command != null && command.equalsIgnoreCase("d:"))
|
||||
{
|
||||
user.clearAllPowertools();
|
||||
user.sendMessage(_("powerToolClearAll"));
|
||||
@ -76,11 +76,16 @@ public class Commandpowertool extends EssentialsCommand
|
||||
{
|
||||
if (command.startsWith("a:"))
|
||||
{
|
||||
if (!user.isAuthorized("essentials.powertool.append"))
|
||||
{
|
||||
throw new Exception(_("noPerm", "essentials.powertool.append"));
|
||||
}
|
||||
command = command.substring(2);
|
||||
if (powertools.contains(command))
|
||||
{
|
||||
throw new Exception(_("powerToolAlreadySet", command, itemName));
|
||||
}
|
||||
|
||||
}
|
||||
else if (powertools != null && !powertools.isEmpty())
|
||||
{
|
||||
|
@ -240,7 +240,7 @@ commands:
|
||||
aliases: [pong,eping,epong]
|
||||
powertool:
|
||||
description: Assigns a command to the item in hand, {player} will be replaced by the name of the player that you click.
|
||||
usage: /<command> [l:|a:|r:|c:][command] [arguments]
|
||||
usage: /<command> [l:|a:|r:|c:|d:][command] [arguments]
|
||||
aliases: [pt,epowertool,ept]
|
||||
powertooltoggle:
|
||||
description: Enables or disables all current powertools
|
||||
|
Loading…
Reference in New Issue
Block a user