mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-22 22:24:56 +00:00
Fixed some of the command's response messages.
This commit is contained in:
parent
21fa1835ae
commit
f528d5be97
2 changed files with 22 additions and 2 deletions
|
@ -17,7 +17,11 @@ public class TotalFreedomMod extends JavaPlugin
|
|||
public void onEnable()
|
||||
{
|
||||
log.log(Level.INFO, "[Total Freedom Mod] - Enabled! - Version: " + this.getDescription().getVersion() + " by Madgeek1450");
|
||||
log.log(Level.WARNING, "[Total Freedom Mod]: In-game superadmin commands wont work if online-mode is set to false!");
|
||||
|
||||
if (!Bukkit.getOnlineMode())
|
||||
{
|
||||
log.log(Level.WARNING, "[Total Freedom Mod]: 'online-mode' is set to FALSE in server.properties. This must be set to TRUE in order for in-game superadmin commands to work.");
|
||||
}
|
||||
}
|
||||
|
||||
public void onDisable()
|
||||
|
@ -140,13 +144,21 @@ public class TotalFreedomMod extends JavaPlugin
|
|||
|
||||
if (sender.isOp() || player == null || isUserSuperadmin(sender.getName()))
|
||||
{
|
||||
boolean matched_player = false;
|
||||
for (Player p : Bukkit.matchPlayer(args[0]))
|
||||
{
|
||||
matched_player = true;
|
||||
|
||||
p.setOp(true);
|
||||
|
||||
Command.broadcastCommandMessage(sender, "Oping " + p.getName());
|
||||
p.sendMessage(ChatColor.YELLOW + "You are now op!");
|
||||
log.log(Level.INFO, "[Total Freedom Mod]: " + sender.getName() + " op'd " + p.getName() + ".");
|
||||
}
|
||||
if (!matched_player)
|
||||
{
|
||||
sender.sendMessage("No targets matched.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -164,13 +176,21 @@ public class TotalFreedomMod extends JavaPlugin
|
|||
|
||||
if (sender.isOp() || player == null || isUserSuperadmin(sender.getName()))
|
||||
{
|
||||
boolean matched_player = false;
|
||||
for (Player p : Bukkit.matchPlayer(args[0]))
|
||||
{
|
||||
matched_player = true;
|
||||
|
||||
p.setOp(false);
|
||||
|
||||
Command.broadcastCommandMessage(sender, "De-opping " + p.getName());
|
||||
p.sendMessage(ChatColor.YELLOW + "You are now op!");
|
||||
log.log(Level.INFO, "[Total Freedom Mod]: " + sender.getName() + " de-op'd " + p.getName() + ".");
|
||||
}
|
||||
if (!matched_player)
|
||||
{
|
||||
sender.sendMessage("No targets matched.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: TotalFreedomMod
|
||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||
version: 1.0.1
|
||||
version: 1.0.2
|
||||
description: Plugin for the Total Freedom server
|
||||
author: StevenLawson / Madgeek1450
|
||||
commands:
|
||||
|
|
Loading…
Reference in a new issue