mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-16 12:26:12 +00:00
Minor changes, added /creative -a, formatting fixes, updated version number
This commit is contained in:
parent
c6ca262472
commit
a2a6e39db9
@ -1,5 +1,5 @@
|
|||||||
#Mon, 03 Jun 2013 23:06:55 +0200
|
#Mon, 03 Jun 2013 23:08:42 +0200
|
||||||
|
|
||||||
program.VERSION=2.17
|
program.VERSION=2.18
|
||||||
program.BUILDNUM=214
|
program.BUILDNUM=216
|
||||||
program.BUILDDATE=06/03/2013 11\:06 PM
|
program.BUILDDATE=06/03/2013 11\:08 PM
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Mon Jun 03 23:06:55 CEST 2013
|
#Mon Jun 03 23:08:42 CEST 2013
|
||||||
build.number=215
|
build.number=217
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# TotalFreedomMod v2.17 Configuration
|
# TotalFreedomMod v2.18 Configuration
|
||||||
# by Madgeek1450 and DarthSalamon
|
# by Madgeek1450 and DarthSalamon
|
||||||
|
|
||||||
# Block placement prevention:
|
# Block placement prevention:
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -29,8 +31,29 @@ public class Command_creative extends TFM_Command
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
if (args[0].equalsIgnoreCase("-a"))
|
||||||
{
|
{
|
||||||
|
if (!TFM_SuperadminList.isUserSuperadmin(sender))
|
||||||
|
{
|
||||||
|
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Player player : server.getOnlinePlayers())
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.CREATIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
TFM_Util.adminAction(sender.getName(), "Changing everyone's gamemode to creative", false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender)))
|
||||||
|
{
|
||||||
|
playerMsg("Only superadmins can change other user's gamemode.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
p = getPlayer(args[0]);
|
p = getPlayer(args[0]);
|
||||||
@ -40,12 +63,7 @@ public class Command_creative extends TFM_Command
|
|||||||
sender.sendMessage(ex.getMessage());
|
sender.sendMessage(ex.getMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
playerMsg("Only superadmins can change other user's gamemode.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
playerMsg("Setting " + p.getName() + " to game mode 'Creative'.");
|
playerMsg("Setting " + p.getName() + " to game mode 'Creative'.");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -10,7 +11,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.OP, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Quickly change your own gamemode to survival, or define someone's username to change theirs.", usage = "/<command> [partialname]")
|
@CommandParameters(description = "Quickly change your own gamemode to survival, or define someone's username to change theirs.", usage = "/<command> <[partialname] | -a>")
|
||||||
public class Command_survival extends TFM_Command
|
public class Command_survival extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -26,28 +27,6 @@ public class Command_survival extends TFM_Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player p;
|
Player p;
|
||||||
p = sender_p;
|
|
||||||
if (args.length != 0){
|
|
||||||
if (args[0].equalsIgnoreCase("-a"))
|
|
||||||
{
|
|
||||||
if (!TFM_SuperadminList.isUserSuperadmin(sender))
|
|
||||||
{
|
|
||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Player player : server.getOnlinePlayers())
|
|
||||||
{
|
|
||||||
if(!TFM_SuperadminList.isUserSuperadmin(p))
|
|
||||||
{
|
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Bukkit.broadcastMessage(ChatColor.AQUA + sender.getName() + " - Setting all non-admins gamemode to survival.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
@ -55,6 +34,23 @@ public class Command_survival extends TFM_Command
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (args[0].equalsIgnoreCase("-a"))
|
||||||
|
{
|
||||||
|
if (!TFM_SuperadminList.isUserSuperadmin(sender) || senderIsConsole)
|
||||||
|
{
|
||||||
|
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Player player : server.getOnlinePlayers())
|
||||||
|
{
|
||||||
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
TFM_Util.adminAction(sender.getName(), "Changing everyone's gamemode to survival", false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
if (senderIsConsole || TFM_SuperadminList.isUserSuperadmin(sender))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -7,3 +7,4 @@ badplayer1:
|
|||||||
- 321.321.321.321
|
- 321.321.321.321
|
||||||
badplayer2:
|
badplayer2:
|
||||||
- 111.111.111.111
|
- 111.111.111.111
|
||||||
|
badplayer3: []
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: TotalFreedomMod
|
name: TotalFreedomMod
|
||||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||||
version: 2.17
|
version: 2.18
|
||||||
description: Plugin for the Total Freedom server.
|
description: Plugin for the Total Freedom server.
|
||||||
authors: [StevenLawson / Madgeek1450, JeromSar / DarthSalamon]
|
authors: [StevenLawson / Madgeek1450, JeromSar / DarthSalamon]
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ superadmins:
|
|||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
last_login: Sun, 11 Nov 2012 01:09:14 -0500
|
last_login: Sun, 11 Nov 2012 01:09:14 -0500
|
||||||
custom_login_message: the &5Chief-Developer&b and &6Master-ass-kicker&b.
|
custom_login_message: the &4Co-Founder&b and &6Master-ass-kicker&b.
|
||||||
is_senior_admin: true
|
is_senior_admin: true
|
||||||
console_aliases:
|
console_aliases:
|
||||||
- madgeek
|
- madgeek
|
||||||
|
Loading…
Reference in New Issue
Block a user