mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Added /invis, incremented version number to reflect latest changes
This commit is contained in:
parent
36747cb986
commit
e82e88f48f
@ -1,5 +1,5 @@
|
||||
#Wed, 15 May 2013 14:55:52 +0200
|
||||
#Wed, 15 May 2013 15:22:48 +0200
|
||||
|
||||
program.VERSION=2.14
|
||||
program.BUILDNUM=186
|
||||
program.BUILDDATE=05/15/2013 02\:55 PM
|
||||
program.VERSION=2.15
|
||||
program.BUILDNUM=190
|
||||
program.BUILDDATE=05/15/2013 03\:22 PM
|
||||
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Wed May 15 14:55:52 CEST 2013
|
||||
build.number=187
|
||||
#Wed May 15 15:22:48 CEST 2013
|
||||
build.number=191
|
||||
|
@ -1,4 +1,4 @@
|
||||
# TotalFreedomMod v2.14 Configuration
|
||||
# TotalFreedomMod v2.15 Configuration
|
||||
# by Madgeek1450 and DarthSalamon
|
||||
|
||||
# Block placement prevention:
|
||||
|
@ -0,0 +1,65 @@
|
||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
|
||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Shows (optionally smites) invisisible players", usage = "/<command> (smite)")
|
||||
public class Command_invis extends TFM_Command {
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
boolean smite = false;
|
||||
if (args.length >= 1)
|
||||
{
|
||||
if (args[0].equalsIgnoreCase("smite"))
|
||||
{
|
||||
smite = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
List<String> players = new ArrayList<String>();
|
||||
int smites = 0;
|
||||
|
||||
for (Player p : server.getOnlinePlayers())
|
||||
{
|
||||
if (p.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
|
||||
players.add(p.getName());
|
||||
if (smite && !TFM_SuperadminList.isUserSuperadmin(p))
|
||||
{
|
||||
server.dispatchCommand(sender, "smite " + p.getName());
|
||||
smites++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (players.isEmpty()) {
|
||||
TFM_Util.playerMsg(sender, "There are no invisible players");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (smite)
|
||||
{
|
||||
TFM_Util.playerMsg(sender, "Smitten " + smites + " players");
|
||||
}
|
||||
else
|
||||
{
|
||||
TFM_Util.playerMsg(sender, "Invisble players (" + players.size() + "): " + StringUtils.join(players, ","));
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
name: TotalFreedomMod
|
||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||
version: 2.14
|
||||
version: 2.15
|
||||
description: Plugin for the Total Freedom server.
|
||||
authors: [StevenLawson / Madgeek1450, JeromSar / DarthSalamon]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user