mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
restrict clear features to admins etc etc
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
This commit is contained in:
parent
a71bfde4ee
commit
c3d35487e7
@ -25,9 +25,15 @@ public class Command_invis extends FreedomCommand
|
|||||||
{
|
{
|
||||||
if (args[0].equalsIgnoreCase("clear"))
|
if (args[0].equalsIgnoreCase("clear"))
|
||||||
{
|
{
|
||||||
|
if(!plugin.al.isAdmin(sender))
|
||||||
|
{
|
||||||
|
return noPerms();
|
||||||
|
}
|
||||||
|
else {
|
||||||
FUtil.adminAction(sender.getName(), "Clearing all invisibility potion effects from all players", true);
|
FUtil.adminAction(sender.getName(), "Clearing all invisibility potion effects from all players", true);
|
||||||
clear = true;
|
clear = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -36,6 +36,11 @@ public class Command_whohas extends FreedomCommand
|
|||||||
|
|
||||||
final List<String> players = new ArrayList<>();
|
final List<String> players = new ArrayList<>();
|
||||||
|
|
||||||
|
if (!plugin.al.isAdmin(playerSender))
|
||||||
|
{
|
||||||
|
return noPerms();
|
||||||
|
}
|
||||||
|
|
||||||
for (final Player player : server.getOnlinePlayers())
|
for (final Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
if (player.getInventory().contains(material))
|
if (player.getInventory().contains(material))
|
||||||
|
Loading…
Reference in New Issue
Block a user