mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Cleaned up Command_setl. Don't use server.dispatchCommand for things that can be done with the existing API!
Fixed depreciation warnings on compile.
This commit is contained in:
parent
8751e0454c
commit
d40d5b461d
@ -1,5 +1,5 @@
|
|||||||
#Tue, 02 Jul 2013 22:29:05 +0200
|
#Tue, 02 Jul 2013 19:01:31 -0400
|
||||||
|
|
||||||
program.VERSION=2.20
|
program.VERSION=2.20
|
||||||
program.BUILDNUM=239
|
program.BUILDNUM=242
|
||||||
program.BUILDDATE=07/02/2013 10\:29 PM
|
program.BUILDDATE=07/02/2013 07\:01 PM
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Tue Jul 02 22:29:05 CEST 2013
|
#Tue Jul 02 19:01:31 EDT 2013
|
||||||
build.number=240
|
build.number=243
|
||||||
|
@ -78,7 +78,7 @@ public class Command_doom extends TFM_Command
|
|||||||
p.getWorld().strikeLightning(p.getLocation());
|
p.getWorld().strikeLightning(p.getLocation());
|
||||||
|
|
||||||
// kill (if not done already)
|
// kill (if not done already)
|
||||||
p.setHealth(0);
|
p.setHealth(0.0);
|
||||||
}
|
}
|
||||||
}, 40L); // 2 seconds
|
}, 40L); // 2 seconds
|
||||||
|
|
||||||
|
@ -6,14 +6,39 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Sets everyone World Edit Limit to 500.", usage = "/<command>")
|
@CommandParameters(description = "Sets everyone's Worldedit block modification limit to 500.", usage = "/<command>")
|
||||||
public class Command_setl extends TFM_Command
|
public class Command_setl extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
server.dispatchCommand(sender, "wildcard gcmd ? /limit 500");
|
//server.dispatchCommand(sender, "wildcard gcmd ? /limit 500"); - Madgeek: No, no, hell no.
|
||||||
TFM_Util.adminAction(sender.getName(), "Setting all online players block limit to 500.", true);
|
|
||||||
|
TFM_Util.adminAction(sender.getName(), "Setting everyone's Worldedit block modification limit to 500.", true);
|
||||||
|
|
||||||
|
for (final Player p : server.getOnlinePlayers())
|
||||||
|
{
|
||||||
|
final boolean isOp = p.isOp();
|
||||||
|
|
||||||
|
if (!isOp)
|
||||||
|
{
|
||||||
|
p.setOp(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
server.dispatchCommand(p, "/limit 500");
|
||||||
|
|
||||||
|
if (!isOp)
|
||||||
|
{
|
||||||
|
server.getScheduler().runTaskLater(plugin, new Runnable()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
p.setOp(false);
|
||||||
|
}
|
||||||
|
}, 20L);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class Command_smite extends TFM_Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Kill:
|
//Kill:
|
||||||
p.setHealth(0);
|
p.setHealth(0.0);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ public class TFM_PlayerData
|
|||||||
LivingEntity oldmob = mob_thrower_queue.remove(0);
|
LivingEntity oldmob = mob_thrower_queue.remove(0);
|
||||||
if (oldmob != null)
|
if (oldmob != null)
|
||||||
{
|
{
|
||||||
oldmob.damage(500);
|
oldmob.damage(500.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user