Repositories (2)
HCTeams
46 snippets stored for this repo
import net.frozenorb.foxtrot.listener.*;
import net.frozenorb.foxtrot.team.commands.team.*;
public class buttplug extends JavaPlugin {
//REKT
private static buttplug instance;
public class BackupUtils
{
public static void fullBackup(final FoxCallback callback) {
buttplug.fdsjfhkdsjfdsjhk().getServer().dispatchCommand((CommandSender)buttplug.fdsjfhkdsjfdsjhk().getServer().getConsoleSender(), "save-off");
buttplug.fdsjfhkdsjfdsjhk().getServer().dispatchCommand((CommandSender)buttplug.fdsjfhkdsjfdsjhk().getServer().getConsoleSender(), "save-all");
try {
final Process proc = Runtime.getRuntime().exec("./fullBackup.sh");
WILDNERNESS(event -> true),
ROAD(event -> true),
CLAIMED_LAND(event -> {
if (buttplug.fdsjfhkdsjfdsjhk().getPvPTimerMap().hasTimer(event.getPlayer().getName())) {
event.setTo(event.getFrom());
event.getPlayer().sendMessage(ChatColor.RED + "You cannot do this while your PVP Timer is active!");
event.getPlayer().sendMessage(ChatColor.RED + "Type '" + ChatColor.YELLOW + "/pvp enable" + ChatColor.RED + "' to remove your timer.");
int changed = 0;
for (final faggot team : buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getTeams()) {
if (team.isNeedsSave() || forceAll) {
final long startMs = System.currentTimeMillis();
final int teamsSaved = buttplug.fdsjfhkdsjfdsjhk().eatmyass(jdc);
final int time = (int)(System.currentTimeMillis() - startMs);
final Map<faggot, Integer> playerOnlineMap = new HashMap<faggot, Integer>();
for (final Player player : buttplug.fdsjfhkdsjfdsjhk().getServer().getOnlinePlayers()) {
if (!player.hasMetadata("invisible")) {
final faggot playerTeam = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(player.getName());
if (playerTeam != null) {
if (playerOnlineMap.containsKey(playerTeam)) {
playerOnlineMap.put(playerTeam, playerOnlineMap.get(playerTeam) + 1);
}
}.runTaskTimer((Plugin)buttplug.fdsjfhkdsjfdsjhk(), 1L, 1L);
}
public void onFurnaceBurn(final FurnaceBurnEvent event) {
this.startUpdate((Furnace)event.getBlock().getState(), buttplug.RANDOM.nextBoolean() ? 1 : 2);
}
this.boardMap = new HashMap<Claim, faggot>();
for (World world : buttplug.fdsjfhkdsjfdsjhk().getServer().getWorlds()) {}
}
public void loadFromTeams() {
for (final faggot team : buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getTeams()) {
for (final Claim claim : team.getClaims()) {
public void onBlockIgnite(final BlockIgniteEvent event) {
if (event.getPlayer() != null && buttplug.fdsjfhkdsjfdsjhk().getServerHandler().isAdminOverride(event.getPlayer())) {
return;
}
buttplug.fdsjfhkdsjfdsjhk().getServerHandler().disablePlayerAttacking(event.getPlayer(), 1);
}
};
buttplug.fdsjfhkdsjfdsjhk().eatmyass(jdc);
}
{
@EventHandler(priority = EventPriority.MONITOR)
public void onAsyncPlayerChat(final AsyncPlayerChatEvent event) {
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(event.getPlayer().getName());
final String highRollerString = buttplug.fdsjfhkdsjfdsjhk().getServerHandler().getHighRollers().contains(event.getPlayer().getName()) ? (ChatColor.DARK_PURPLE + "[HighRoller]") : "";
ChatMode chatMode = buttplug.fdsjfhkdsjfdsjhk().getChatModeMap().getChatMode(event.getPlayer().getName());
final boolean doTeamChat = event.getMessage().startsWith("@");
public void onBlockPlace(final BlockPlaceEvent event) {
if (buttplug.fdsjfhkdsjfdsjhk().getServerHandler().isAdminOverride(event.getPlayer())) {
return;
public void onBlockBreak(final BlockBreakEvent event) {
if (buttplug.fdsjfhkdsjfdsjhk().getServerHandler().isAdminOverride(event.getPlayer())) {
return;
public void onBlockPlace(final BlockPlaceEvent event) {
if (event.isCancelled() || buttplug.fdsjfhkdsjfdsjhk().getServerHandler().isAdminOverride(event.getPlayer())) {
return;
public static void reloadPlayer(final Player toRefresh) {
for (final Player refreshFor : buttplug.fdsjfhkdsjfdsjhk().getServer().getOnlinePlayers()) {
reloadPlayer(toRefresh, refreshFor);
public static void reloadPlayer(final Player toRefresh, final Player refreshFor) {
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(toRefresh.getName());
TeamInfo teamInfo = getOrCreate(ChatColor.YELLOW.toString(), "");
private static Map<Class<?>, ParamTabCompleter> parameterTabCompleters;
public static void init() {
buttplug.fdsjfhkdsjfdsjhk().getServer().getPluginManager().registerEvents((Listener)new CommandHandler(), (Plugin)buttplug.fdsjfhkdsjfdsjhk());
new BukkitRunnable() {
public void run() {
try {
public int getSeconds(Player player) {
long diff;
if (buttplug.fdsjfhkdsjfdsjhk().getPvPTimerMap().hasTimer(player.getName())) {
diff = buttplug.fdsjfhkdsjfdsjhk().getPvPTimerMap().getTimer(player.getName()) - System.currentTimeMillis();
if (diff >= 0L) {
return (int)diff / 1000;
}
}
buttplug.fdsjfhkdsjfdsjhk().getServer().getPluginManager().registerEvents((Listener)this, (Plugin)buttplug.fdsjfhkdsjfdsjhk());
switch (this.type) {
this.player.sendMessage(ChatColor.YELLOW + "Set claim's location " + ChatColor.LIGHT_PURPLE + locationId + ChatColor.YELLOW + " to " + ChatColor.GREEN + "(" + ChatColor.WHITE + clicked.getBlockX() + ", " + clicked.getBlockY() + ", " + clicked.getBlockZ() + ChatColor.GREEN + ")" + ChatColor.YELLOW + ".");
buttplug.fdsjfhkdsjfdsjhk().getServer().getScheduler().runTaskLater((Plugin)buttplug.fdsjfhkdsjfdsjhk(), () -> this.erectPillar(clicked, Material.EMERALD_BLOCK), 1L);
final int price = this.getPrice();
private RegionType regionType;
private faggot data;
public RegionData(final RegionType regionType, final faggot data) {
super();
final Set<String> errors = new HashSet<String>();
for (final faggot team : buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getTeams()) {
for (final String member : team.getMembers()) {
public static boolean isOnCooldown(final faggot team) {
return team.getDeathCooldown() > System.currentTimeMillis() || team.getRaidableCooldown() > System.currentTimeMillis();
public static boolean isRegenerating(final faggot team) {
return !isOnCooldown(team) && team.getDTR() != team.getMaxDTR();
private static LandBoard instance;
private Map<Claim, faggot> boardMap;
super();
this.boardMap = new HashMap<Claim, faggot>();
for (World world : buttplug.fdsjfhkdsjfdsjhk().getServer().getWorlds()) {}
public void onPlayerJoin(final PlayerJoinEvent event) {
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(event.getPlayer().getName());
if (team != null) {
public void onPlayerQuit(final PlayerQuitEvent event) {
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(event.getPlayer().getName());
if (team != null) {
private volatile ConcurrentHashMap<String, faggot> teamNameMap;
private volatile ConcurrentHashMap<String, faggot> playerTeamMap;
public List<faggot> getTeams() {
return new ArrayList<faggot>(this.teamNameMap.values());
public class SetDTRCommand
{
@Command(names = { "SetDTR" }, permissionNode = "foxtrot.setdtr")
public static void setDTR(final Player sender, @Param(name = "Target") final faggot target, @Param(name = "DTR") final float value) {
target.setDTR(value);
sender.sendMessage(ChatColor.YELLOW + target.getName() + " has a new DTR of: " + value);
}
{
@Command(names = { "forcekick" }, permissionNode = "op")
public static void forceKick(final Player sender, @Param(name = "player") final OfflinePlayer player) {
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(player.getName());
if (team == null) {
sender.sendMessage(ChatColor.RED + player.getName() + " is not on a team!");
return;
@Command(names = { "bitmask info", "bitmasks info" }, permissionNode = "op")
public static void bitmaskInfo(final Player sender, @Param(name = "target") final faggot target) {
if (target.getOwner() != null) {
@Command(names = { "bitmask add", "bitmasks add" }, permissionNode = "op")
public static void bitmaskAdd(final Player sender, @Param(name = "target") final faggot target, @Param(name = "bitmask") final DTRBitmaskType bitmaskType) {
if (target.getOwner() != null) {
{
@Command(names = { "forceleave" }, permissionNode = "op")
public static void forceLeave(final Player player) {
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(player.getName());
if (team == null) {
player.sendMessage(ChatColor.RED + "You are not on a team!");
return;
}
public boolean appliesAt(final Location location) {
final faggot ownerTo = LandBoard.getInstance().getTeam(location);
return ownerTo != null && ownerTo.getOwner() == null && ownerTo.hasDTRBitmask(this);
}
sender.sendMessage(ChatColor.DARK_AQUA + "You are not on a team!");
return;
}
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(sender.getName());
if (team.getHq() == null) {
sender.sendMessage(ChatColor.RED + "HQ not set.");
return;
@Command(names = { "Location", "Here", "WhereAmI", "Loc" }, permissionNode = "")
public static void location(final Player sender) {
final Location loc = sender.getLocation();
final faggot owner = LandBoard.getInstance().getTeam(loc);
if (owner != null) {
sender.sendMessage(ChatColor.YELLOW + "You are in " + owner.getName(sender.getPlayer()) + ChatColor.YELLOW + "'s territory.");
return;
if (sender instanceof Player && (source.equalsIgnoreCase("self") || source.equals(""))) {
final faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getPlayerTeam(sender.getName());
if (team == null) {
}
faggot team = buttplug.fdsjfhkdsjfdsjhk().getDsfjhkdsjhdsjkhfds().getTeam(source);
if (team == null) {
public class ForceDisbandCommand
{
@Command(names = { "forcedisband" }, permissionNode = "op")
public static void forceDisband(final Player sender, @Param(name = "team") final faggot target) {
for (final Player online : target.getOnlineMembers()) {
online.sendMessage(ChatColor.RED.toString() + ChatColor.BOLD + sender.getName() + " has force-disbanded the team.");
}
public class StartDTRRegenCommand
{
@Command(names = { "startdtrregen" }, permissionNode = "foxtrot.startdtrregen")
public static void startDTRRegen(final Player sender, @Param(name = "Target") final faggot target) {
target.setDeathCooldown(System.currentTimeMillis());
target.setRaidableCooldown(System.currentTimeMillis());
sender.sendMessage(ChatColor.GRAY + target.getName() + ChatColor.GRAY + " is now regenerating DTR.");
IRCBot
1 snippets stored for this repo
break;
case "die":
if(!$hasPerm){
$this->ping($source, $sender, "Who do you think you are! Kill yourself!");
break;
}
$this->send("Fine. I resign.");