mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-28 19:11:53 +01:00
Force 3 letters before matching players for /god /gamemode and /fly
This commit is contained in:
parent
8d6b864b5b
commit
a48f6c8c30
@ -30,7 +30,7 @@ public class Commandfly extends EssentialsCommand
|
|||||||
@Override
|
@Override
|
||||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.fly.others"))
|
if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.fly.others"))
|
||||||
{
|
{
|
||||||
flyOtherPlayers(server, user, args[0]);
|
flyOtherPlayers(server, user, args[0]);
|
||||||
return;
|
return;
|
||||||
|
@ -30,7 +30,7 @@ public class Commandgamemode extends EssentialsCommand
|
|||||||
@Override
|
@Override
|
||||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.gamemode.others"))
|
if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.gamemode.others"))
|
||||||
{
|
{
|
||||||
gamemodeOtherPlayers(server, user, args);
|
gamemodeOtherPlayers(server, user, args);
|
||||||
return;
|
return;
|
||||||
|
@ -28,7 +28,7 @@ public class Commandgod extends EssentialsCommand
|
|||||||
@Override
|
@Override
|
||||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.god.others"))
|
if (args.length > 0 && args[0].trim().length() > 2 && user.isAuthorized("essentials.god.others"))
|
||||||
{
|
{
|
||||||
godOtherPlayers(server, user, args[0]);
|
godOtherPlayers(server, user, args[0]);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user