mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Fixed explosion radius.
Added /mp - mob purge.
This commit is contained in:
parent
c769f98c8a
commit
bb2e32519b
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,19 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod;
|
package me.StevenLawson.TotalFreedomMod;
|
||||||
|
|
||||||
//import org.bukkit.ChatColor;
|
import java.util.logging.Logger;
|
||||||
//import org.bukkit.Material;
|
import org.bukkit.ChatColor;
|
||||||
//import org.bukkit.entity.Player;
|
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.event.block.BlockPlaceEvent;
|
||||||
//import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class TotalFreedomModBlockListener extends BlockListener
|
public class TotalFreedomModBlockListener extends BlockListener
|
||||||
{
|
{
|
||||||
public static TotalFreedomMod plugin;
|
public static TotalFreedomMod plugin;
|
||||||
|
private static final Logger log = Logger.getLogger("Minecraft");
|
||||||
|
|
||||||
TotalFreedomModBlockListener(TotalFreedomMod instance)
|
TotalFreedomModBlockListener(TotalFreedomMod instance)
|
||||||
{
|
{
|
||||||
@ -38,43 +40,41 @@ public class TotalFreedomModBlockListener extends BlockListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public void onBlockPlace(BlockPlaceEvent event)
|
public void onBlockPlace(BlockPlaceEvent event)
|
||||||
// {
|
{
|
||||||
// ItemStack is = new ItemStack(event.getBlockPlaced().getType(), 1, (short) 0, event.getBlockPlaced().getData());
|
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)
|
if (is.getType() == Material.LAVA || is.getType() == Material.STATIONARY_LAVA)
|
||||||
// {
|
{
|
||||||
// Player p = event.getPlayer();
|
log.info(String.format("%s placed lava @ %s",
|
||||||
//
|
event.getPlayer().getName(),
|
||||||
// plugin.tfBroadcastMessage(String.format("%s placed lava @ %s",
|
plugin.formatLocation(event.getBlock().getLocation())
|
||||||
// p.getName(),
|
));
|
||||||
// plugin.formatLocation(p.getLocation())
|
}
|
||||||
// ), ChatColor.GRAY);
|
else if (is.getType() == Material.WATER || is.getType() == Material.STATIONARY_WATER)
|
||||||
// }
|
{
|
||||||
// else if (is.getType() == Material.WATER || is.getType() == Material.STATIONARY_WATER || is.getType() == Material.WATER_BUCKET)
|
log.info(String.format("%s placed water @ %s",
|
||||||
// {
|
event.getPlayer().getName(),
|
||||||
// Player p = event.getPlayer();
|
plugin.formatLocation(event.getBlock().getLocation())
|
||||||
//
|
));
|
||||||
// plugin.tfBroadcastMessage(String.format("%s placed water @ %s",
|
}
|
||||||
// p.getName(),
|
else if (is.getType() == Material.TNT)
|
||||||
// plugin.formatLocation(p.getLocation())
|
{
|
||||||
// ), ChatColor.GRAY);
|
Player p = event.getPlayer();
|
||||||
// }
|
|
||||||
// else if (is.getType() == Material.TNT)
|
if (!plugin.allowExplosions)
|
||||||
// {
|
{
|
||||||
// Player p = event.getPlayer();
|
p.sendMessage(ChatColor.GRAY + "TNT is currently disabled.");
|
||||||
//
|
event.setCancelled(true);
|
||||||
// plugin.tfBroadcastMessage(String.format("%s placed TNT @ %s",
|
return;
|
||||||
// p.getName(),
|
}
|
||||||
// plugin.formatLocation(p.getLocation())
|
else
|
||||||
// ), ChatColor.GRAY);
|
{
|
||||||
//
|
log.info(String.format("%s placed TNT @ %s",
|
||||||
// if (!plugin.allowExplosions)
|
p.getName(),
|
||||||
// {
|
plugin.formatLocation(event.getBlock().getLocation())
|
||||||
// p.sendMessage(ChatColor.GRAY + "TNT is currently disabled.");
|
));
|
||||||
// event.setCancelled(true);
|
}
|
||||||
// return;
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
|||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||||
import org.bukkit.event.entity.EntityListener;
|
import org.bukkit.event.entity.EntityListener;
|
||||||
|
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||||
|
|
||||||
public class TotalFreedomModEntityListener extends EntityListener
|
public class TotalFreedomModEntityListener extends EntityListener
|
||||||
{
|
{
|
||||||
@ -23,8 +24,18 @@ public class TotalFreedomModEntityListener extends EntityListener
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
event.setYield((float)plugin.explosiveRadius);
|
@Override
|
||||||
|
public void onExplosionPrime(ExplosionPrimeEvent event)
|
||||||
|
{
|
||||||
|
if (!plugin.allowExplosions)
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
event.setRadius((float)plugin.explosiveRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: TotalFreedomMod
|
name: TotalFreedomMod
|
||||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||||
version: 1.2.0
|
version: 1.3
|
||||||
description: Plugin for the Total Freedom server
|
description: Plugin for the Total Freedom server
|
||||||
author: StevenLawson / Madgeek1450
|
author: StevenLawson / Madgeek1450
|
||||||
commands:
|
commands:
|
||||||
@ -11,7 +11,7 @@ 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 and set yield radius.
|
description: Superadmin command - Enable/disable explosives and set effect radius.
|
||||||
usage: /<command> <on|off> [radius]
|
usage: /<command> <on|off> [radius]
|
||||||
fire:
|
fire:
|
||||||
description: Superadmin command - Enable/disable fire.
|
description: Superadmin command - Enable/disable fire.
|
||||||
@ -28,9 +28,12 @@ commands:
|
|||||||
listreal:
|
listreal:
|
||||||
description: Lists the real names of all online players.
|
description: Lists the real names of all online players.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
opall:
|
mp:
|
||||||
description: Superadmin command - Op everyone on the server.
|
description: Use moblimiter to purge all mobs.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
|
opall:
|
||||||
|
description: Superadmin command - Op everyone on the server, optionally change everyone's gamemode at the same time.
|
||||||
|
usage: /<command> [-c|-s]
|
||||||
opme:
|
opme:
|
||||||
description: Superadmin command - Automatically ops user.
|
description: Superadmin command - Automatically ops user.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
@ -44,7 +47,7 @@ commands:
|
|||||||
description: Shows nearby people sorted by distance.
|
description: Shows nearby people sorted by distance.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
rd:
|
rd:
|
||||||
description: Removes drops, arrows, etc.
|
description: Use WorldEdit to remove drops, arrows, and primed TNT.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
say:
|
say:
|
||||||
description: Broadcasts the given message as the console, includes sender.
|
description: Broadcasts the given message as the console, includes sender.
|
||||||
|
Loading…
Reference in New Issue
Block a user