No Message

This commit is contained in:
Steven Lawson 2011-09-25 19:00:14 -04:00
parent c7427f492f
commit 18ddcc7560
4 changed files with 660 additions and 568 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +1,80 @@
package me.StevenLawson.TotalFreedomMod; package me.StevenLawson.TotalFreedomMod;
//import org.bukkit.ChatColor;
//import org.bukkit.Material;
//import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockBurnEvent; import org.bukkit.event.block.BlockBurnEvent;
import org.bukkit.event.block.BlockIgniteEvent; import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockListener; import org.bukkit.event.block.BlockListener;
//import org.bukkit.event.block.BlockPlaceEvent;
//import org.bukkit.inventory.ItemStack;
public class TotalFreedomModBlockListener extends BlockListener public class TotalFreedomModBlockListener extends BlockListener
{ {
public static TotalFreedomMod plugin; public static TotalFreedomMod plugin;
TotalFreedomModBlockListener(TotalFreedomMod instance)
{
plugin = instance;
}
@Override TotalFreedomModBlockListener(TotalFreedomMod instance)
public void onBlockBurn(BlockBurnEvent event) {
{ plugin = instance;
if (!plugin.allowFire) }
{
event.setCancelled(true);
return;
}
}
@Override @Override
public void onBlockIgnite(BlockIgniteEvent event) public void onBlockBurn(BlockBurnEvent event)
{ {
if (!plugin.allowFire) if (!plugin.allowFire)
{ {
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
} }
@Override
public void onBlockIgnite(BlockIgniteEvent event)
{
if (!plugin.allowFire)
{
event.setCancelled(true);
return;
}
}
// @Override
// public void onBlockPlace(BlockPlaceEvent event)
// {
// ItemStack is = new ItemStack(event.getBlockPlaced().getType(), 1, (short) 0, event.getBlockPlaced().getData());
// if (is.getType() == Material.LAVA || is.getType() == Material.STATIONARY_LAVA || is.getType() == Material.LAVA_BUCKET)
// {
// Player p = event.getPlayer();
//
// plugin.tfBroadcastMessage(String.format("%s placed lava @ %s",
// p.getName(),
// plugin.formatLocation(p.getLocation())
// ), ChatColor.GRAY);
// }
// else if (is.getType() == Material.WATER || is.getType() == Material.STATIONARY_WATER || is.getType() == Material.WATER_BUCKET)
// {
// Player p = event.getPlayer();
//
// plugin.tfBroadcastMessage(String.format("%s placed water @ %s",
// p.getName(),
// plugin.formatLocation(p.getLocation())
// ), ChatColor.GRAY);
// }
// else if (is.getType() == Material.TNT)
// {
// Player p = event.getPlayer();
//
// plugin.tfBroadcastMessage(String.format("%s placed TNT @ %s",
// p.getName(),
// plugin.formatLocation(p.getLocation())
// ), ChatColor.GRAY);
//
// if (!plugin.allowExplosions)
// {
// p.sendMessage(ChatColor.GRAY + "TNT is currently disabled.");
// event.setCancelled(true);
// return;
// }
// }
// }
} }

View File

@ -23,8 +23,10 @@ public class TotalFreedomModEntityListener extends EntityListener
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
//event.setYield((float)plugin.explosiveRadius);
} }
@Override @Override
public void onEntityCombust(EntityCombustEvent event) public void onEntityCombust(EntityCombustEvent event)
{ {

View File

@ -11,17 +11,17 @@ commands:
description: Superadmin command - Deop everyone on the server. description: Superadmin command - Deop everyone on the server.
usage: /<command> usage: /<command>
explosives: explosives:
description: Superadmin command - Enable/disable explosives. description: Superadmin command - Enable/disable explosives and set yield radius.
usage: /<command> [on|off] usage: /<command> <on|off> [radius]
fire: fire:
description: Superadmin command - Enable/disable fire. description: Superadmin command - Enable/disable fire.
usage: /<command> [on|off] usage: /<command> <on|off>
gtfo: gtfo:
description: Superadmin command - Makes someone GTFO (deop and ip ban by username). description: Superadmin command - Makes someone GTFO (deop and ip ban by username).
usage: /<command> [partialname] usage: /<command> [partialname]
lavadmg: lavadmg:
description: Superadmin command - Enable/disable lava damage. description: Superadmin command - Enable/disable lava damage.
usage: /<command> [on|off] usage: /<command> <on|off>
list: list:
description: Lists the real names of all online players. description: Lists the real names of all online players.
usage: /<command> usage: /<command>
@ -43,6 +43,9 @@ commands:
radar: radar:
description: Shows nearby people sorted by distance. description: Shows nearby people sorted by distance.
usage: /<command> usage: /<command>
rd:
description: Removes drops, arrows, etc.
usage: /<command>
say: say:
description: Broadcasts the given message as the console, includes sender. description: Broadcasts the given message as the console, includes sender.
usage: /<command> <message> usage: /<command> <message>