mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-12-29 04:57:37 +00:00
just stupid shit
This commit is contained in:
parent
1bc06f2c1d
commit
855c01a46b
@ -23,8 +23,11 @@ public class Command_entitywipe extends FreedomCommand
|
||||
{
|
||||
for (Entity entity : world.getEntities())
|
||||
{
|
||||
entity.remove();
|
||||
removed++;
|
||||
if (!(entity instanceof Player))
|
||||
{
|
||||
entity.remove();
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
msg(removed + " entities removed.");
|
||||
|
@ -1,8 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
@ -11,8 +9,10 @@ import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
|
||||
import net.pravian.aero.util.Ips;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
@ -148,10 +148,17 @@ public class Command_gtfo extends FreedomCommand
|
||||
playerMsg(sender, ChatColor.GRAY + username + " has been banned and IP is: " + StringUtils.join(ips, ", "));
|
||||
FUtil.bcastMsg(bcast.toString());
|
||||
|
||||
// Kick player
|
||||
// Kick player and handle others on IP
|
||||
if (player != null)
|
||||
{
|
||||
player.kickPlayer(ban.bakeKickMessage());
|
||||
for (Player p : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
if (Ips.getIp(p).equals(Ips.getIp(player)))
|
||||
{
|
||||
p.kickPlayer(ChatColor.RED + "You've been kicked because someone on your IP has been banned.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Log ban
|
||||
|
@ -26,7 +26,10 @@ public class Command_purgeall extends FreedomCommand
|
||||
{
|
||||
for (Entity entity : world.getEntities())
|
||||
{
|
||||
entity.remove();
|
||||
if (!(entity instanceof Player))
|
||||
{
|
||||
entity.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user