mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Change command descriptions, as well as simplify some commands
This commit is contained in:
parent
925fe4a4b2
commit
372ba97bef
@ -74,6 +74,20 @@ public class ChatManager extends FreedomService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message.contains("nigger") || message.contains("nigga"))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
player.sendMessage(ChatColor.RED + "This is racist and therefore is prohibited.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (message.contains("dyke") || message.contains("fag") || message.contains("kike"))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
player.sendMessage(ChatColor.RED + "This is homophobic and therefore is prohibited.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Truncate messages that are too long - 256 characters is vanilla client max
|
// Truncate messages that are too long - 256 characters is vanilla client max
|
||||||
if (message.length() > 256)
|
if (message.length() > 256)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
public class CommandSpy extends FreedomService
|
public class CommandSpy extends FreedomService
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(
|
@CommandParameters(
|
||||||
description = "AdminChat - Talk privately with other admins. Using <command> itself will toggle AdminChat on and off for all messages.",
|
description = "Talk privately with other administrators on the server.",
|
||||||
usage = "/<command> [message...]",
|
usage = "/<command> [message...]",
|
||||||
aliases = "o,ac")
|
aliases = "o,ac")
|
||||||
public class Command_adminchat extends FreedomCommand
|
public class Command_adminchat extends FreedomCommand
|
||||||
@ -22,13 +22,13 @@ public class Command_adminchat extends FreedomCommand
|
|||||||
{
|
{
|
||||||
if (senderIsConsole)
|
if (senderIsConsole)
|
||||||
{
|
{
|
||||||
msg("Only in-game players can toggle AdminChat.");
|
msg("You must be in-game to toggle admin chat, it cannot be toggled via CONSOLE or Telnet.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
FPlayer userinfo = plugin.pl.getPlayer(playerSender);
|
FPlayer userinfo = plugin.pl.getPlayer(playerSender);
|
||||||
userinfo.setAdminChat(!userinfo.inAdminChat());
|
userinfo.setAdminChat(!userinfo.inAdminChat());
|
||||||
msg("Toggled Admin Chat " + (userinfo.inAdminChat() ? "on" : "off") + ".");
|
msg("Toggled your admin chat " + (userinfo.inAdminChat() ? "on" : "off") + ".");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ public class Command_admininfo extends FreedomCommand
|
|||||||
|
|
||||||
if (adminInfo.isEmpty())
|
if (adminInfo.isEmpty())
|
||||||
{
|
{
|
||||||
msg("There is no admin information set in the config.", ChatColor.RED);
|
msg("The admin information section of the config.yml file has not been configured.", ChatColor.RED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Close server to non-admins.", usage = "/<command> [on | off]")
|
@CommandParameters(description = "Denies joining of operators and only allows admins to join.", usage = "/<command> [on | off]")
|
||||||
public class Command_adminmode extends FreedomCommand
|
public class Command_adminmode extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Go to the AdminWorld.",
|
@CommandParameters(description = "Allows for admins to configure guests, time, and weather of the AdminWorld, and allows for admins and guests to go to the AdminWorld.",
|
||||||
usage = "/<command> [guest < list | purge | add <player> | remove <player> > | time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
usage = "/<command> [guest < list | purge | add <player> | remove <player> > | time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
||||||
aliases = "aw")
|
aliases = "aw")
|
||||||
public class Command_adminworld extends FreedomCommand
|
public class Command_adminworld extends FreedomCommand
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Quickly change your own gamemode to adventure, or define someone's username to change theirs.", usage = "/<command> <[partialname] | -a>", aliases = "gma")
|
@CommandParameters(description = "Quickly change your own gamemode to adventure, define someone's username to change theirs, or change everyone's gamemode on the server.", usage = "/<command> <[partialname] | -a>", aliases = "gma")
|
||||||
public class Command_adventure extends FreedomCommand
|
public class Command_adventure extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ public class Command_adventure extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
playerSender.setGameMode(GameMode.ADVENTURE);
|
playerSender.setGameMode(GameMode.ADVENTURE);
|
||||||
msg("Gamemode set to adventure.");
|
msg("Your gamemode has been set to adventure.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ public class Command_adventure extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
FUtil.adminAction(sender.getName(), "Changing everyone's gamemode to adventure", false);
|
FUtil.adminAction(sender.getName(), "Changing everyone's gamemode to adventure", false);
|
||||||
|
msg("Your gamemode has been set to adventure.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Make an announcement", usage = "/<command> <message>")
|
@CommandParameters(description = "Make an announcement anonymously to operators.", usage = "/<command> <message>")
|
||||||
public class Command_announce extends FreedomCommand
|
public class Command_announce extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -30,7 +29,7 @@ public class Command_autoclear extends FreedomCommand
|
|||||||
plugin.lp.CLEAR_ON_JOIN.add(args[0]);
|
plugin.lp.CLEAR_ON_JOIN.add(args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
msg(args[0] + " will " + (enabled ? "no longer" : "now") + " have their inventory cleared when they join", ChatColor.GREEN);
|
msg(args[0] + " will " + (enabled ? "no longer" : "now") + " have their inventory cleared when they join.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -30,7 +29,7 @@ public class Command_autotp extends FreedomCommand
|
|||||||
plugin.lp.TELEPORT_ON_JOIN.add(args[0]);
|
plugin.lp.TELEPORT_ON_JOIN.add(args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
msg(args[0] + " will " + (enabled ? "no longer" : "now") + " be automatically teleported when they join", ChatColor.GREEN);
|
msg(args[0] + " will " + (enabled ? "no longer" : "now") + " be automatically teleported when they join.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2,13 +2,12 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Shows all banned player names. Superadmins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]")
|
@CommandParameters(description = "Shows all banned player names. Senior Admins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]")
|
||||||
public class Command_banlist extends FreedomCommand
|
public class Command_banlist extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -23,7 +22,7 @@ public class Command_banlist extends FreedomCommand
|
|||||||
|
|
||||||
FUtil.adminAction(sender.getName(), "Purging the ban list", true);
|
FUtil.adminAction(sender.getName(), "Purging the ban list", true);
|
||||||
int amount = plugin.bm.purge();
|
int amount = plugin.bm.purge();
|
||||||
sender.sendMessage(ChatColor.GRAY + "Purged " + amount + " player bans.");
|
msg("Purged " + amount + " player bans.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = ":goodbird:", usage = "/<command>")
|
@CommandParameters(description = "Spawns a random type of fish at your location.", usage = "/<command>")
|
||||||
public class Command_bird extends FreedomCommand
|
public class Command_bird extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Block all commands for a specific player.", usage = "/<command> <-a | purge | <player>>", aliases = "blockcommands,blockcommand,bc,bcmd")
|
@CommandParameters(description = "Block all commands for everyone on the server, or a specific player.", usage = "/<command> <-a | purge | <player>>", aliases = "blockcommands,blockcommand,bc,bcmd")
|
||||||
public class Command_blockcmd extends FreedomCommand
|
public class Command_blockcmd extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Restricts/unrestricts block modification abilities", usage = "/<command> [[-s] <player> [reason] | list | purge | all]")
|
@CommandParameters(description = "Restricts/unrestricts block modification abilities for everyone on the server or a certain player.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]")
|
||||||
public class Command_blockedit extends FreedomCommand
|
public class Command_blockedit extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggle PVP mode for players.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]", aliases = "pvpblock,pvpmode")
|
@CommandParameters(description = "Toggle PVP mode for everyone or a certain player.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]", aliases = "pvpblock,pvpmode")
|
||||||
public class Command_blockpvp extends FreedomCommand
|
public class Command_blockpvp extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Place a cage around someone.", usage = "/<command> <purge | off | <partialname> [skull | block] [playername | blockname]")
|
@CommandParameters(description = "Place a cage around someone with certain blocks, or someone's player head.", usage = "/<command> <purge | off | <partialname> [head | block] [playername | blockname]")
|
||||||
public class Command_cage extends FreedomCommand
|
public class Command_cage extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public class Command_cage extends FreedomCommand
|
|||||||
fPlayer.getCageData().setCaged(false);
|
fPlayer.getCageData().setCaged(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "skull":
|
case "head":
|
||||||
{
|
{
|
||||||
outerMaterial = Material.PLAYER_HEAD;
|
outerMaterial = Material.PLAYER_HEAD;
|
||||||
if (args.length >= 3)
|
if (args.length >= 3)
|
||||||
@ -130,7 +130,7 @@ public class Command_cage extends FreedomCommand
|
|||||||
{
|
{
|
||||||
if (!args[0].equals("purge"))
|
if (!args[0].equals("purge"))
|
||||||
{
|
{
|
||||||
return Arrays.asList("off", "skull", "block");
|
return Arrays.asList("off", "head", "block");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.length == 3)
|
else if (args.length == 3)
|
||||||
@ -139,7 +139,7 @@ public class Command_cage extends FreedomCommand
|
|||||||
{
|
{
|
||||||
return FUtil.getAllMaterialNames();
|
return FUtil.getAllMaterialNames();
|
||||||
}
|
}
|
||||||
else if (args[1].equals("skull"))
|
else if (args[1].equals("head"))
|
||||||
{
|
{
|
||||||
return FUtil.getPlayerList();
|
return FUtil.getPlayerList();
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "For the people that are still alive.", usage = "/<command>")
|
@CommandParameters(description = "For the people that are still alive - gives a cake to everyone on the server.", usage = "/<command>")
|
||||||
public class Command_cake extends FreedomCommand
|
public class Command_cake extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "You know the words.", usage = "/<command>")
|
@CommandParameters(description = "You know the words - gives a campfire to everyone on the server.", usage = "/<command>")
|
||||||
public class Command_campfire extends FreedomCommand
|
public class Command_campfire extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Clear chat", usage = "/<command>", aliases = "cc")
|
@CommandParameters(description = "Clears the chat for players who are not opt-out.", usage = "/<command>", aliases = "cc")
|
||||||
public class Command_clearchat extends FreedomCommand
|
public class Command_clearchat extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Clear the discord message queue", usage = "/<command>")
|
@CommandParameters(description = "Clear the discord message queue.", usage = "/<command>")
|
||||||
public class Command_cleardiscordqueue extends FreedomCommand
|
public class Command_cleardiscordqueue extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Clear your inventory", usage = "/<command> [player]", aliases = "ci,clear")
|
@CommandParameters(description = "Clear your inventory.", usage = "/<command> [player]", aliases = "ci,clear")
|
||||||
public class Command_clearinventory extends FreedomCommand
|
public class Command_clearinventory extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ public class Command_clearinventory extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
playerSender.getInventory().clear();
|
playerSender.getInventory().clear();
|
||||||
msg("Cleared your inventory");
|
msg("Your inventory has been cleared.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -38,7 +38,7 @@ public class Command_clearinventory extends FreedomCommand
|
|||||||
{
|
{
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
}
|
}
|
||||||
msg("Cleared everyone's inventory");
|
msg("Sucessfully cleared everyone's inventory.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -51,8 +51,8 @@ public class Command_clearinventory extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
msg("Cleared " + player.getName() + "'s inventory");
|
msg("Cleared " + player.getName() + "'s inventory.");
|
||||||
player.sendMessage(sender.getName() + " has cleared your inventory");
|
player.sendMessage(sender.getName() + " has cleared your inventory.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Essentials Interface Command - Color your current nickname.", usage = "/<command> <color>")
|
@CommandParameters(description = "Essentials Interface Command - Set your nickname to a certain color.", usage = "/<command> <color>")
|
||||||
public class Command_colorme extends FreedomCommand
|
public class Command_colorme extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_CONSOLE)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Telnet command - Send a chat message with chat formatting over telnet.", usage = "/<command> <message>", aliases = "csay")
|
@CommandParameters(description = "Telnet/Console ommand - Send a chat message with chat formatting over telnet.", usage = "/<command> <message>", aliases = "csay")
|
||||||
public class Command_consolesay extends FreedomCommand
|
public class Command_consolesay extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ public class Command_consolesay extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
String message = StringUtils.join(args, " ");
|
String message = StringUtils.join(args, " ");
|
||||||
FUtil.bcastMsg(String.format("§7[CONSOLE] §f<§c%s§f> %s", sender.getName(), StringUtils.join(args, " ")));
|
FUtil.bcastMsg(String.format("§7[CONSOLE] §c%s §8» §f%s", sender.getName(), StringUtils.join(args, " ")));
|
||||||
|
|
||||||
// Send the message to Discord
|
// Send the message to Discord
|
||||||
if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist())
|
if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist())
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "For those who have no friends", usage = "/<command>")
|
@CommandParameters(description = "For those who have no friends - gives a cookie to everyone on the server.", usage = "/<command>")
|
||||||
public class Command_cookie extends FreedomCommand
|
public class Command_cookie extends FreedomCommand
|
||||||
{
|
{
|
||||||
public static final String COOKIE_LYRICS = "Imagine that you have zero cookies and you split them evenly among zero friends. How many cookies does each person get? See? It doesn't make sense. And Cookie Monster is sad that there are no cookies, and you are sad that you have no friends.";
|
public static final String COOKIE_LYRICS = "Imagine that you have zero cookies and you split them evenly among zero friends. How many cookies does each person get? See? It doesn't make sense. And Cookie Monster is sad that there are no cookies, and you are sad that you have no friends.";
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Quickly change your own gamemode to creative, or define someone's username to change theirs.", usage = "/<command> <-a | [partialname]>", aliases = "gmc")
|
@CommandParameters(description = "Quickly change your own gamemode to creative, define someone's username to change theirs, or change everyone's gamemode on the server.", usage = "/<command> <-a | [partialname]>", aliases = "gmc")
|
||||||
public class Command_creative extends FreedomCommand
|
public class Command_creative extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ public class Command_creative extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
playerSender.setGameMode(GameMode.CREATIVE);
|
playerSender.setGameMode(GameMode.CREATIVE);
|
||||||
msg("Gamemode set to creative.");
|
msg("Your gamemode has been set to creative.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ public class Command_creative extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
FUtil.adminAction(sender.getName(), "Changing everyone's gamemode to creative", false);
|
FUtil.adminAction(sender.getName(), "Changing everyone's gamemode to creative", false);
|
||||||
|
msg("Your gamemode has been set to creative.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Cuck someone", usage = "/<command> <player>")
|
@CommandParameters(description = "Cuck someone - sends an unclearable title to the specified player.", usage = "/<command> <player>")
|
||||||
public class Command_cuck extends FreedomCommand
|
public class Command_cuck extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Curse someone", usage = "/<command> <player>")
|
@CommandParameters(description = "Curse someone - sends a cursed texture pack to the specified player.", usage = "/<command> <player>")
|
||||||
public class Command_curse extends FreedomCommand
|
public class Command_curse extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Make some noise.", usage = "/<command>")
|
@CommandParameters(description = "Makes random sounds to everyone online.", usage = "/<command>")
|
||||||
public class Command_deafen extends FreedomCommand
|
public class Command_deafen extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Toggle the disguise plugin", usage = "/<command>", aliases = "dtoggle")
|
@CommandParameters(description = "Toggle LibsDisguises for everyone online.", usage = "/<command>", aliases = "dtoggle")
|
||||||
public class Command_disguisetoggle extends FreedomCommand
|
public class Command_disguisetoggle extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
|
||||||
@CommandParameters(description = "For the bad admins", usage = "/<command> <playername>")
|
@CommandParameters(description = "Sends the specified player to their doom.", usage = "/<command> <playername>")
|
||||||
public class Command_doom extends FreedomCommand
|
public class Command_doom extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ public class Command_doom extends FreedomCommand
|
|||||||
{
|
{
|
||||||
// message
|
// message
|
||||||
FUtil.adminAction(sender.getName(), "Banning " + player.getName(), true);
|
FUtil.adminAction(sender.getName(), "Banning " + player.getName(), true);
|
||||||
playerMsg(sender, ChatColor.GRAY + player.getName() + " has been banned and IP is: " + ip);
|
msg(sender, player.getName() + " has been banned and IP is: " + ip);
|
||||||
|
|
||||||
// generate explosion
|
// generate explosion
|
||||||
player.getWorld().createExplosion(player.getLocation(), 0F, false);
|
player.getWorld().createExplosion(player.getLocation(), 0F, false);
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Entity;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Eject everything off of you.", usage = "/<command>")
|
@CommandParameters(description = "Eject players that are riding you.", usage = "/<command>")
|
||||||
public class Command_eject extends FreedomCommand
|
public class Command_eject extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Go to \"The End\".", usage = "/<command>")
|
@CommandParameters(description = "Go to \"The End\".", usage = "/<command>", aliases = "end")
|
||||||
public class Command_ender extends FreedomCommand
|
public class Command_ender extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Executive things...", usage = "/<command> [hell: <username>]", aliases = "exec")
|
@CommandParameters(description = "Executive only commands - more items will be added shortly!", usage = "/<command> [hell: <username>]", aliases = "exec")
|
||||||
public class Command_executive extends FreedomCommand
|
public class Command_executive extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -131,7 +131,8 @@ public class Command_executive extends FreedomCommand
|
|||||||
username = playerName;
|
username = playerName;
|
||||||
if (!silent)
|
if (!silent)
|
||||||
{
|
{
|
||||||
FUtil.adminAction(sender.getName(), "Banning " + username + " and IPs: " + StringUtils.join(ips, ", "), true);
|
FUtil.adminAction(sender.getName(), "Banning " + username, true);
|
||||||
|
msg(sender, player.getName() + " has been banned and IP is: " + ips);
|
||||||
}
|
}
|
||||||
Ban ban = Ban.forPlayerName(username, sender, null, reason);
|
Ban ban = Ban.forPlayerName(username, sender, null, reason);
|
||||||
for (String ip : ips)
|
for (String ip : ips)
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Particle;
|
||||||
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
||||||
|
@CommandParameters(description = "Surprise someone.", usage = "/<command> <player>")
|
||||||
|
public class Command_explode extends FreedomCommand
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (args.length == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Player player = getPlayer(args[0]);
|
||||||
|
|
||||||
|
if (player == null)
|
||||||
|
{
|
||||||
|
msg(FreedomCommand.PLAYER_NOT_FOUND);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
msg("Exploded " + player.getName());
|
||||||
|
player.setHealth(0.0);
|
||||||
|
player.getWorld().createExplosion(player.getLocation(), 0F, false);
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
|
||||||
|
{
|
||||||
|
if (args.length == 1 && plugin.al.isAdmin(sender))
|
||||||
|
{
|
||||||
|
return FUtil.getPlayerList();
|
||||||
|
}
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Shows all IPs registered to a player", usage = "/<command> <player>")
|
@CommandParameters(description = "Shows all IPs registered to a player", usage = "/<command> <player>", aliases = "showip,listip")
|
||||||
public class Command_findip extends FreedomCommand
|
public class Command_findip extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class Command_flatlands extends FreedomCommand
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg("Flatlands is currently disabled.");
|
msg("Flatlands is currently disabled in the TotalFreedomMod configuration.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kill someone with force, for those who REALLY need to die.", usage = "/<command> <playername>")
|
@CommandParameters(description = "Forcefully kill someone - for those who REALLY need to die.", usage = "/<command> <playername>")
|
||||||
public class Command_forcekill extends FreedomCommand
|
public class Command_forcekill extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Freeze players (toggles on and off).", usage = "/<command> [target | purge]", aliases = "fr")
|
@CommandParameters(description = "Freeze/Unfreeze a specified player, or all non-admins on the server.", usage = "/<command> [target | purge]", aliases = "fr")
|
||||||
public class Command_freeze extends FreedomCommand
|
public class Command_freeze extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "You'll never even see it coming.", usage = "/<command> <on [radius (default=25)] | off>")
|
@CommandParameters(description = "You'll never even see it coming - repeatedly push players away from you until command is untoggled.", usage = "/<command> <on [radius (default=25)] | off>")
|
||||||
public class Command_fuckoff extends FreedomCommand
|
public class Command_fuckoff extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Send a chat message as someone else.", usage = "/<command> <fromname> <outmessage>")
|
@CommandParameters(description = "Send a chat message as the specified player.", usage = "/<command> <fromname> <outmessage>")
|
||||||
public class Command_gchat extends FreedomCommand
|
public class Command_gchat extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Send a command as someone else.", usage = "/<command> <fromname> <outcommand>")
|
@CommandParameters(description = "Send a command as the specified player.", usage = "/<command> <fromname> <outcommand>")
|
||||||
public class Command_gcmd extends FreedomCommand
|
public class Command_gcmd extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
|
|||||||
|
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans or unbans any player, even those who are not logged in anymore.", usage = "/<command> <ban <username> [reason] | unban <username> | banip <ip> <reason> | unbanip <ip> | nameban <name> | unbanname <name>>")
|
@CommandParameters(description = "Bans or unbans any player, including those offline.", usage = "/<command> <ban <username> [reason] | unban <username> | banip <ip> <reason> | unbanip <ip> | nameban <name> | unbanname <name>>")
|
||||||
public class Command_glist extends FreedomCommand
|
public class Command_glist extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Make other people your bitch.", usage = "/<command>")
|
@CommandParameters(description = "Toggles player gravity on/off.", usage = "/<command>")
|
||||||
public class Command_gravity extends FreedomCommand
|
public class Command_gravity extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans a player", usage = "/<command> <username> [reason] [-nrb]", aliases = "ban")
|
@CommandParameters(description = "Bans the specified player.", usage = "/<command> <username> [reason] [-nrb]", aliases = "ban")
|
||||||
public class Command_gtfo extends FreedomCommand
|
public class Command_gtfo extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ public class Command_gtfo extends FreedomCommand
|
|||||||
{
|
{
|
||||||
bcast.append(" - Reason: ").append(ChatColor.YELLOW).append(reason);
|
bcast.append(" - Reason: ").append(ChatColor.YELLOW).append(reason);
|
||||||
}
|
}
|
||||||
playerMsg(sender, ChatColor.GRAY + username + " has been banned and IP is: " + StringUtils.join(ips, ", "));
|
msg(sender, ChatColor.GRAY + username + " has been banned and IP is: " + StringUtils.join(ips, ", "));
|
||||||
FUtil.adminAction(sender.getName(), String.format(bcast.toString()), true);
|
FUtil.adminAction(sender.getName(), String.format(bcast.toString()), true);
|
||||||
|
|
||||||
// Kick player and handle others on IP
|
// Kick player and handle others on IP
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "View ticks-per-second", usage = "/<command>")
|
@CommandParameters(description = "View server health, such as ticks-per-second, memory, etc.", usage = "/<command>")
|
||||||
public class Command_health extends FreedomCommand
|
public class Command_health extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,207 +0,0 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
|
||||||
import me.totalfreedom.totalfreedommod.world.WorldTime;
|
|
||||||
import me.totalfreedom.totalfreedommod.world.WorldWeather;
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
|
||||||
@CommandParameters(description = "Go to the HubWorld.",
|
|
||||||
usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
|
||||||
aliases = "hw,hworld")
|
|
||||||
public class Command_hubworld extends FreedomCommand
|
|
||||||
{
|
|
||||||
|
|
||||||
private enum CommandMode
|
|
||||||
{
|
|
||||||
TELEPORT, TIME, WEATHER
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
||||||
{
|
|
||||||
msg(UNKNOWN_COMMAND);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
/*CommandMode commandMode = null;
|
|
||||||
|
|
||||||
if (args.length == 0)
|
|
||||||
{
|
|
||||||
commandMode = CommandMode.TELEPORT;
|
|
||||||
}
|
|
||||||
else if (args.length >= 2)
|
|
||||||
{
|
|
||||||
if ("time".equalsIgnoreCase(args[0]))
|
|
||||||
{
|
|
||||||
commandMode = CommandMode.TIME;
|
|
||||||
}
|
|
||||||
else if ("weather".equalsIgnoreCase(args[0]))
|
|
||||||
{
|
|
||||||
commandMode = CommandMode.WEATHER;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (commandMode == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
switch (commandMode)
|
|
||||||
{
|
|
||||||
case TELEPORT:
|
|
||||||
{
|
|
||||||
if (!(sender instanceof Player) || playerSender == null)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
World masterBuilderWorld = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
masterBuilderWorld = plugin.wm.hubworld.getWorld();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
if (masterBuilderWorld == null || playerSender.getWorld() == masterBuilderWorld)
|
|
||||||
{
|
|
||||||
msg("Going to the main world.");
|
|
||||||
playerSender.teleport(server.getWorlds().get(0).getSpawnLocation());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
msg("Going to the Hub");
|
|
||||||
plugin.wm.hubworld.sendToWorld(playerSender);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case TIME:
|
|
||||||
{
|
|
||||||
assertCommandPerms(sender, playerSender);
|
|
||||||
|
|
||||||
if (args.length == 2)
|
|
||||||
{
|
|
||||||
WorldTime timeOfDay = WorldTime.getByAlias(args[1]);
|
|
||||||
if (timeOfDay != null)
|
|
||||||
{
|
|
||||||
plugin.wm.hubworld.setTimeOfDay(timeOfDay);
|
|
||||||
msg("Hub time set to: " + timeOfDay.name());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
msg("Invalid time of day. Can be: sunrise, noon, sunset, midnight");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case WEATHER:
|
|
||||||
{
|
|
||||||
assertCommandPerms(sender, playerSender);
|
|
||||||
|
|
||||||
if (args.length == 2)
|
|
||||||
{
|
|
||||||
WorldWeather weatherMode = WorldWeather.getByAlias(args[1]);
|
|
||||||
if (weatherMode != null)
|
|
||||||
{
|
|
||||||
plugin.wm.hubworld.setWeatherMode(weatherMode);
|
|
||||||
msg("Hub weather set to: " + weatherMode.name());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
msg("Invalid weather mode. Can be: off, rain, storm");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (PermissionDeniedException ex)
|
|
||||||
{
|
|
||||||
if (ex.getMessage().isEmpty())
|
|
||||||
{
|
|
||||||
return noPerms();
|
|
||||||
}
|
|
||||||
sender.sendMessage(ex.getMessage());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
|
|
||||||
{
|
|
||||||
if (!plugin.al.isAdmin(sender))
|
|
||||||
{
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
if (args.length == 1)
|
|
||||||
{
|
|
||||||
return Arrays.asList("time", "weather");
|
|
||||||
}
|
|
||||||
else if (args.length == 2)
|
|
||||||
{
|
|
||||||
if (args[0].equals("time"))
|
|
||||||
{
|
|
||||||
return Arrays.asList("morning", "noon", "evening", "night");
|
|
||||||
}
|
|
||||||
else if (args[0].equals("weather"))
|
|
||||||
{
|
|
||||||
return Arrays.asList("off", "rain", "storm");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Redo this properly
|
|
||||||
private void assertCommandPerms(CommandSender sender, Player playerSender) throws PermissionDeniedException
|
|
||||||
{
|
|
||||||
if (!(sender instanceof Player) || playerSender == null || !plugin.al.isSeniorAdmin(playerSender))
|
|
||||||
{
|
|
||||||
throw new PermissionDeniedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class PermissionDeniedException extends Exception
|
|
||||||
{
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private PermissionDeniedException()
|
|
||||||
{
|
|
||||||
super("");
|
|
||||||
}
|
|
||||||
|
|
||||||
private PermissionDeniedException(String string)
|
|
||||||
{
|
|
||||||
super(string);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -9,7 +9,7 @@ import org.bukkit.inventory.Inventory;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Look into another player's inventory, optionally take items out.", usage = "/<command> <player> [offhand | armor]", aliases = "inv,insee")
|
@CommandParameters(description = "Look into another player's inventory, or optionally take items out.", usage = "/<command> <player> [offhand | armor]", aliases = "inv,insee")
|
||||||
public class Command_invsee extends FreedomCommand
|
public class Command_invsee extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,7 +17,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage jumppads", usage = "/<command> <on | off | info | sideways <on | off>>", aliases = "launchpads,jp")
|
@CommandParameters(description = "Toggles jumppads on/off, view the status of jumppads, or make them sideways.", usage = "/<command> <on | off | info | sideways <on | off>>", aliases = "launchpads,jp")
|
||||||
public class Command_jumppads extends FreedomCommand
|
public class Command_jumppads extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kick a player.", usage = "/<command> <player> [reason]", aliases = "k")
|
@CommandParameters(description = "Kick the specified player.", usage = "/<command> <player> [reason]", aliases = "k")
|
||||||
public class Command_kick extends FreedomCommand
|
public class Command_kick extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kick all non-admins on server.", usage = "/<command>")
|
@CommandParameters(description = "Kick all non-admins on server.", usage = "/<command>", aliases = "kickall")
|
||||||
public class Command_kicknoob extends FreedomCommand
|
public class Command_kicknoob extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Show the last command that someone used.", usage = "/<command> <player>")
|
@CommandParameters(description = "Show the last command the specified player used.", usage = "/<command> <player>")
|
||||||
public class Command_lastcmd extends FreedomCommand
|
public class Command_lastcmd extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Get social media links.", usage = "/<command>", aliases = "link")
|
@CommandParameters(description = "See TotalFreedom's social media links.", usage = "/<command>", aliases = "link")
|
||||||
public class Command_links extends FreedomCommand
|
public class Command_links extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Teleport to the spawn point for the current world.", usage = "/<command>", aliases = "worldspawn,gotospawn")
|
@CommandParameters(description = "Teleport to the spawn point for the current world, instead of the Essentials spawn point.", usage = "/<command>", aliases = "worldspawn,gotospawn")
|
||||||
public class Command_localspawn extends FreedomCommand
|
public class Command_localspawn extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Block a player's Minecraft input. This is evil, and I never should have wrote it.", usage = "/<command> <all | purge | <<partialname> on | off>>")
|
@CommandParameters(description = "This is evil, and I never should have wrote it - blocks specified player's input.", usage = "/<command> <all | purge | <<partialname> on | off>>")
|
||||||
public class Command_lockup extends FreedomCommand
|
public class Command_lockup extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Make a region for an OP.", usage = "/<command> <playername> <name>", aliases = "mor")
|
@CommandParameters(description = "Make a WorldGuard region for an OP.", usage = "/<command> <playername> <name>", aliases = "mor")
|
||||||
public class Command_makeopregion extends FreedomCommand
|
public class Command_makeopregion extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -11,23 +11,13 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Manage the shop", usage = "/<command> <coins: <add | set | remove> <amount> <player | all> | items: <give | remove> <player> <item>>", aliases = "ms")
|
@CommandParameters(description = "Manage the shop", usage = "/<command> <coins: <add | set | remove> <amount> <player | all> | items: <give | remove> <player> <item>>", aliases = "ms")
|
||||||
public class Command_manageshop extends FreedomCommand
|
public class Command_manageshop extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(final CommandSender sender, final Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(final CommandSender sender, final Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (!ConfigEntry.SHOP_ENABLED.getBoolean())
|
|
||||||
{
|
|
||||||
msg("The shop is currently disabled!", ChatColor.RED);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!FUtil.isExecutive(sender.getName()) && !FUtil.isDeveloper(sender.getName()))
|
|
||||||
{
|
|
||||||
msg("Only executives and developers can use this command!", ChatColor.RED);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
final String prefix = FUtil.colorize(ConfigEntry.SHOP_PREFIX.getString() + " ");
|
final String prefix = FUtil.colorize(ConfigEntry.SHOP_PREFIX.getString() + " ");
|
||||||
if (args.length > 3)
|
if (args.length > 3)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ public class Command_masterbuilderinfo extends FreedomCommand
|
|||||||
|
|
||||||
if (masterBuilderInfo.isEmpty())
|
if (masterBuilderInfo.isEmpty())
|
||||||
{
|
{
|
||||||
msg("There is no Master Builder information set in the config.", ChatColor.RED);
|
msg("The master builder information section of the config.yml file has not been configured.", ChatColor.RED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Go to the MasterBuilderWorld.",
|
@CommandParameters(description = "Allows for master builders to configure the time, the weather of the MasterBuilder, and allows for players to go to the MasterBuilderWorld.",
|
||||||
usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
|
||||||
aliases = "mbw,mbworld")
|
aliases = "mbw,mbworld")
|
||||||
public class Command_masterbuilderworld extends FreedomCommand
|
public class Command_masterbuilderworld extends FreedomCommand
|
||||||
|
@ -17,7 +17,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Manage master builders.", usage = "/<command> <list | reload | | <add | remove | info> <username>>")
|
@CommandParameters(description = "List, add, or remove master builders, reload the master builder list, or view the info of master builders.", usage = "/<command> <list | reload | | <add | remove | info> <username>>")
|
||||||
public class Command_mbconfig extends FreedomCommand
|
public class Command_mbconfig extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Control mob rezzing parameters.", usage = "/<command> <on|off|setmax <count>|dragon|giant|ghast|slime>")
|
@CommandParameters(description = "Control mob limiting parameters.", usage = "/<command> <on|off|setmax <count>|dragon|giant|ghast|slime>")
|
||||||
public class Command_moblimiter extends FreedomCommand
|
public class Command_moblimiter extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import org.bukkit.inventory.meta.PotionMeta;
|
|||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Modify the current item in your hand", usage = "/<command> <name <message> | lore <message> | enchant <enchantment> <level> | potion <effect> <duration> <amplifier> | attribute <name> <amount> | clear>", aliases = "mi")
|
@CommandParameters(description = "Modify the current item you are holding.", usage = "/<command> <name <message> | lore <message> | enchant <enchantment> <level> | potion <effect> <duration> <amplifier> | attribute <name> <amount> | clear>", aliases = "mi")
|
||||||
public class Command_modifyitem extends FreedomCommand
|
public class Command_modifyitem extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Manage my admin entry", usage = "/<command> [-o <admin>] <clearips | clearip <ip> | setlogin <message> | clearlogin | setacformat <format> | clearacformat> | oldtags | logstick | syncroles | genbackupcodes>")
|
@CommandParameters(description = "Manage your admin entry.", usage = "/<command> [-o <admin>] <clearips | clearip <ip> | setlogin <message> | clearlogin | setacformat <format> | clearacformat> | oldtags | logstick | syncroles | genbackupcodes>")
|
||||||
public class Command_myadmin extends FreedomCommand
|
public class Command_myadmin extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Manage my Master Builder entry", usage = "/<command> [-o <masterbuilder>] <clearips | clearip <ip> | genbackupcodes>", aliases = "mymb")
|
@CommandParameters(description = "Manage your Master Builder entry", usage = "/<command> [-o <masterbuilder>] <clearips | clearip <ip> | genbackupcodes>", aliases = "mymb")
|
||||||
public class Command_mymasterbuilder extends FreedomCommand
|
public class Command_mymasterbuilder extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Check the name history of a username.", usage = "/<command> <username>", aliases = "nh")
|
@CommandParameters(description = "Check the name history of a specified player.", usage = "/<command> <username>", aliases = "nh")
|
||||||
public class Command_namehistory extends FreedomCommand
|
public class Command_namehistory extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -6,7 +6,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Go to the Nether.", usage = "/<command>")
|
@CommandParameters(description = "Go to the Nether.", usage = "/<command>", aliases = "hell")
|
||||||
public class Command_nether extends FreedomCommand
|
public class Command_nether extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Essentials Interface Command - Remove distracting things from nicknames of all players on server.", usage = "/<command>", aliases = "nc")
|
@CommandParameters(description = "Essentials Interface Command - Remove illegal chatcodes from nicknames of all players on server.", usage = "/<command>", aliases = "nc")
|
||||||
public class Command_nickclean extends FreedomCommand
|
public class Command_nickclean extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Essentials Interface Command - Nyanify your nickname.", usage = "/<command> <<nick> | off>")
|
@CommandParameters(description = "Essentials Interface Command - Randomize the colors of your nickname.", usage = "/<command> <<nick> | off>")
|
||||||
public class Command_nicknyan extends FreedomCommand
|
public class Command_nicknyan extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Switch server online-mode on and off.", usage = "/<command> <on | off>")
|
@CommandParameters(description = "Switch server to premium or cracked.", usage = "/<command> <on | off>")
|
||||||
public class Command_onlinemode extends FreedomCommand
|
public class Command_onlinemode extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 5)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 5)
|
||||||
@CommandParameters(description = "Makes a player operator", usage = "/<command> <playername>")
|
@CommandParameters(description = "OPs the specified player.", usage = "/<command> <playername>")
|
||||||
public class Command_op extends FreedomCommand
|
public class Command_op extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ public class Command_op extends FreedomCommand
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg("That player is not online.");
|
msg("That player is not online.");
|
||||||
msg("You don't have permissions to OP offline players.", ChatColor.YELLOW);
|
msg("You don't have permissions to OP offline players.", ChatColor.RED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 30)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 30)
|
||||||
@CommandParameters(description = "Op everyone on the server, optionally change everyone's gamemode at the same time.", usage = "/<command>")
|
@CommandParameters(description = "OP everyone on the server.", usage = "/<command>")
|
||||||
public class Command_opall extends FreedomCommand
|
public class Command_opall extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Automatically ops user.", usage = "/<command>")
|
@CommandParameters(description = "OPs the command sender.", usage = "/<command>")
|
||||||
public class Command_opme extends FreedomCommand
|
public class Command_opme extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "POW!!! Right in the kisser! One of these days Alice, straight to the Moon!",
|
@CommandParameters(description = "POW!!! Right in the kisser! One of these days Alice, straight to the Moon - Sends the specified player into orbit.",
|
||||||
usage = "/<command> <target> [<<power> | stop>]")
|
usage = "/<command> <target> [<<power> | stop>]")
|
||||||
public class Command_orbit extends FreedomCommand
|
public class Command_orbit extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
|
||||||
@CommandParameters(description = "Manage permanently banned players and IPs.", usage = "/<command> reload")
|
@CommandParameters(description = "Reload the permban list.", usage = "/<command> reload", aliases = "pb")
|
||||||
public class Command_permban extends FreedomCommand
|
public class Command_permban extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.plugin.Plugin;
|
|||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage plugins", usage = "/<command> <<enable | disable | reload> <pluginname>> | list>", aliases = "plc")
|
@CommandParameters(description = "Enable, disable, or reload a specified plugin, as well as list all plugins on the server.", usage = "/<command> <<enable | disable | reload> <pluginname>> | list>", aliases = "plc")
|
||||||
public class Command_plugincontrol extends FreedomCommand
|
public class Command_plugincontrol extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.potion.PotionEffectType;
|
|||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(
|
@CommandParameters(
|
||||||
description = "Manipulate potion effects. Duration is measured in server ticks (~20 ticks per second).",
|
description = "Manipulate your potion effects. Duration is measured in server ticks (~20 ticks per second).",
|
||||||
usage = "/<command> <list | clear [target name] | add <type> <duration> <amplifier> [target name]>")
|
usage = "/<command> <list | clear [target name] | add <type> <duration> <amplifier> [target name]>")
|
||||||
public class Command_potion extends FreedomCommand
|
public class Command_potion extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Toggles PotionSpy.", usage = "/<command>", aliases = "potspy")
|
@CommandParameters(description = "Allows admins to see every time a potion is splashed.", usage = "/<command>", aliases = "potspy")
|
||||||
public class Command_potionspy extends FreedomCommand
|
public class Command_potionspy extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Validates if a given account is premium.", usage = "/<command> <player>", aliases = "prem")
|
@CommandParameters(description = "Validates if a given account is premium, or cracked.", usage = "/<command> <player>", aliases = "prem")
|
||||||
public class Command_premium extends FreedomCommand
|
public class Command_premium extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(
|
@CommandParameters(
|
||||||
description = "Protect areas so that only superadmins can directly modify blocks in those areas. WorldEdit and other such plugins might bypass this.",
|
description = "Protect areas so that only admins can directly modify blocks in those areas. WorldEdit and other such plugins might bypass this.",
|
||||||
usage = "/<command> <list | clear | remove <label> | add <label> <radius>>")
|
usage = "/<command> <list | clear | remove <label> | add <label> <radius>>", aliases = "pa")
|
||||||
public class Command_protectarea extends FreedomCommand
|
public class Command_protectarea extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Purge everything! (except for bans).", usage = "/<command>")
|
@CommandParameters(description = "Purge current mutes, command blocks, orbits, freezes, potion effects, cages, and entities.", usage = "/<command>")
|
||||||
public class Command_purgeall extends FreedomCommand
|
public class Command_purgeall extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Quick De-Op - deop someone based on a partial name.", usage = "/<command> <partialname>")
|
@CommandParameters(description = "Quickly deop someone based on only their partial name.", usage = "/<command> <partialname>")
|
||||||
public class Command_qdeop extends FreedomCommand
|
public class Command_qdeop extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 5)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, cooldown = 5)
|
||||||
@CommandParameters(description = "Quick Op - op someone based on a partial name.", usage = "/<command> <partialname>")
|
@CommandParameters(description = "Quickly OP someone based on only their partial name.", usage = "/<command> <partialname>")
|
||||||
public class Command_qop extends FreedomCommand
|
public class Command_qop extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Shows ranks", usage = "/<command> [player]")
|
@CommandParameters(description = "Show the rank of the sender or a specified user.", usage = "/<command> [player]")
|
||||||
public class Command_rank extends FreedomCommand
|
public class Command_rank extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Sync your time up with the real world time.", usage = "/<command> <on <utc_offset> | off>", aliases = "rt")
|
@CommandParameters(description = "Sync your time with the real world time.", usage = "/<command> <on <utc_offset> | off>", aliases = "rt")
|
||||||
public class Command_realtime extends FreedomCommand
|
public class Command_realtime extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME, blockHostConsole = true)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Report a player for admins to see.", usage = "/<command> <player> <reason>")
|
@CommandParameters(description = "Report a player for all admins to see.", usage = "/<command> <player> <reason>")
|
||||||
public class Command_report extends FreedomCommand
|
public class Command_report extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class Command_restart extends FreedomCommand
|
|||||||
|
|
||||||
for (Player player : server.getOnlinePlayers())
|
for (Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
player.kickPlayer("Server is going offline, come back in about 20 seconds.");
|
player.kickPlayer(ChatColor.LIGHT_PURPLE + "Server is going offline, come back in about 20 seconds.");
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.amp.restartServer();
|
plugin.amp.restartServer();
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Make other people your bitch.", usage = "/<command> <playername | mode <normal | off | ask>>")
|
@CommandParameters(description = "Ride on the top of the specified player.", usage = "/<command> <playername | mode <normal | off | ask>>")
|
||||||
public class Command_ride extends FreedomCommand
|
public class Command_ride extends FreedomCommand
|
||||||
{
|
{
|
||||||
private final Map<Player, Player> RIDE_REQUESTS = new HashMap<>(); // requested, requester
|
private final Map<Player, Player> RIDE_REQUESTS = new HashMap<>(); // requested, requester
|
||||||
|
@ -20,7 +20,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage admins.", usage = "/<command> <list | clean | reload | | setrank <username> <rank> | <add | remove | info> <username>>")
|
@CommandParameters(description = "List, add, remove, or set the rank of admins, clean or reload the admin list, or view the info of admins.", usage = "/<command> <list | clean | reload | | setrank <username> <rank> | <add | remove | info> <username>>")
|
||||||
public class Command_saconfig extends FreedomCommand
|
public class Command_saconfig extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Broadcasts the given message as the console, includes sender name.", usage = "/<command> <message>")
|
@CommandParameters(description = "Broadcasts the given message as the server, includes sender name.", usage = "/<command> <message>")
|
||||||
public class Command_say extends FreedomCommand
|
public class Command_say extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ public class Command_say extends FreedomCommand
|
|||||||
|
|
||||||
for (Player player : server.getOnlinePlayers())
|
for (Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
player.kickPlayer("Server is going offline, come back in about 20 seconds.");
|
player.kickPlayer(ChatColor.LIGHT_PURPLE + "Server is going offline, come back in about 20 seconds.");
|
||||||
}
|
}
|
||||||
|
|
||||||
server.shutdown();
|
server.shutdown();
|
||||||
|
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Surprise someone.", usage = "/<command> <player>")
|
@CommandParameters(description = "Sends a guardian particle effect with an enderman scream to the specified player.", usage = "/<command> <player>")
|
||||||
public class Command_scare extends FreedomCommand
|
public class Command_scare extends FreedomCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Check the stats of the server", usage = "/<command>", aliases = "ss")
|
@CommandParameters(description = "Check the status of the server, including opped players, staff, etc.", usage = "/<command>", aliases = "ss")
|
||||||
public class Command_serverstats extends FreedomCommand
|
public class Command_serverstats extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Set your compass to a position.", usage = "/<command> <x> <y> <z>")
|
@CommandParameters(description = "Set your compass to the specified position.", usage = "/<command> <x> <y> <z>")
|
||||||
public class Command_setcompass extends FreedomCommand
|
public class Command_setcompass extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Sets your experience level.", usage = "/<command> [level]")
|
@CommandParameters(description = "Sets your experience level (XP).", usage = "/<command> [level]")
|
||||||
public class Command_setlevel extends FreedomCommand
|
public class Command_setlevel extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ public class Command_setlevel extends FreedomCommand
|
|||||||
|
|
||||||
playerSender.setLevel(new_level);
|
playerSender.setLevel(new_level);
|
||||||
|
|
||||||
msg("You have been set to level " + Integer.toString(new_level), ChatColor.AQUA);
|
msg("Your XP level is now set to " + ChatColor.GOLD + Integer.toString(new_level));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Set world spawnpoint.", usage = "/<command>")
|
@CommandParameters(description = "Set the spawn point of the world you are in.", usage = "/<command>")
|
||||||
public class Command_setspawnworld extends FreedomCommand
|
public class Command_setspawnworld extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Access the shop", usage = "/<command> <buy <item> | action | list>")
|
@CommandParameters(description = "Access the shop - this will be much simplified in the future.", usage = "/<command> <buy <item> | action | list>")
|
||||||
public class Command_shop extends FreedomCommand
|
public class Command_shop extends FreedomCommand
|
||||||
{
|
{
|
||||||
private final List<String> locations = Arrays.asList("Sofa", "Car", "Bed", "Kitchen", "Garage", "Basement", "Home Study");
|
private final List<String> locations = Arrays.asList("Sofa", "Car", "Bed", "Kitchen", "Garage", "Basement", "Home Study");
|
||||||
|
@ -15,7 +15,7 @@ import org.bukkit.entity.EntityType;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Spawn an entity.", usage = "/<command> <entitytype> [amount]", aliases = "spawnentity")
|
@CommandParameters(description = "Spawns the specified entity.", usage = "/<command> <entitytype> [amount]", aliases = "spawnentity")
|
||||||
public class Command_spawnmob extends FreedomCommand
|
public class Command_spawnmob extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ public class Command_spectator extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
playerSender.setGameMode(GameMode.SPECTATOR);
|
playerSender.setGameMode(GameMode.SPECTATOR);
|
||||||
msg("Gamemode set to spectator.");
|
msg("Your gamemode has been set to spectator.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Show misc. server info.", usage = "/<command>")
|
@CommandParameters(description = "Shows Minecraft server info, such as authentication status.", usage = "/<command>")
|
||||||
public class Command_status extends FreedomCommand
|
public class Command_status extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ public class Command_stop extends FreedomCommand
|
|||||||
|
|
||||||
for (Player player : server.getOnlinePlayers())
|
for (Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
player.kickPlayer(reason);
|
player.kickPlayer(ChatColor.LIGHT_PURPLE + reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
server.shutdown();
|
server.shutdown();
|
||||||
|
@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Stop playing sounds", usage = "/<command> [sound]")
|
@CommandParameters(description = "Stops all sounds or a specified sound.", usage = "/<command> [sound]")
|
||||||
public class Command_stopsound extends FreedomCommand
|
public class Command_stopsound extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ public class Command_survival extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
playerSender.setGameMode(GameMode.SURVIVAL);
|
playerSender.setGameMode(GameMode.SURVIVAL);
|
||||||
msg("Gamemode set to survival.");
|
msg("Your gamemode has been set to survival.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ public class Command_survival extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
FUtil.adminAction(sender.getName(), "Changing everyone's gamemode to survival", false);
|
FUtil.adminAction(sender.getName(), "Changing everyone's gamemode to survival", false);
|
||||||
|
msg("Your gamemode has been set to survival.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user