mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Blocked TNT Minecarts from being placed
This commit is contained in:
parent
f3684cc2ce
commit
4f6a0ca5d3
@ -1,5 +1,5 @@
|
||||
#Sat, 22 Jun 2013 19:56:29 +0200
|
||||
#Sun, 23 Jun 2013 15:16:34 +0200
|
||||
|
||||
program.VERSION=2.18
|
||||
program.BUILDNUM=218
|
||||
program.BUILDDATE=06/22/2013 07\:56 PM
|
||||
program.VERSION=2.19
|
||||
program.BUILDNUM=221
|
||||
program.BUILDDATE=06/23/2013 03\:16 PM
|
||||
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Sat Jun 22 19:56:29 CEST 2013
|
||||
build.number=219
|
||||
#Sun Jun 23 15:16:34 CEST 2013
|
||||
build.number=222
|
||||
|
@ -1,4 +1,4 @@
|
||||
# TotalFreedomMod v2.18 Configuration
|
||||
# TotalFreedomMod v2.19 Configuration
|
||||
# by Madgeek1450 and DarthSalamon
|
||||
|
||||
# Block placement prevention:
|
||||
@ -8,6 +8,7 @@ allow_lava_damage: false
|
||||
allow_lava_place: false
|
||||
allow_water_place: false
|
||||
allow_fluid_spread: false
|
||||
allow_tnt_minecarts: false
|
||||
|
||||
# Explosion management:
|
||||
allow_explosions: false
|
||||
|
@ -11,7 +11,6 @@ import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
@ -36,7 +36,7 @@ public class TFM_EntityListener implements Listener
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onEntityCombust(EntityCombustEvent event)
|
||||
{
|
||||
if (!TotalFreedomMod.allowFireSpread)
|
||||
if (!TotalFreedomMod.allowExplosions)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -44,22 +44,36 @@ public class TFM_PlayerListener implements Listener
|
||||
switch (event.getMaterial())
|
||||
{
|
||||
case WATER_BUCKET:
|
||||
{
|
||||
if (!TotalFreedomMod.allowWaterPlace)
|
||||
{
|
||||
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
|
||||
player.sendMessage(ChatColor.GRAY + "Water buckets are currently disabled.");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
case LAVA_BUCKET:
|
||||
{
|
||||
if (!TotalFreedomMod.allowLavaPlace)
|
||||
{
|
||||
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
|
||||
player.sendMessage(ChatColor.GRAY + "Lava buckets are currently disabled.");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
case POTION:
|
||||
}
|
||||
case EXPLOSIVE_MINECART:
|
||||
{
|
||||
if (!TotalFreedomMod.allowTntMinecarts)
|
||||
{
|
||||
player.getInventory().clear(player.getInventory().getHeldItemSlot());
|
||||
player.sendMessage(ChatColor.GRAY + "TNT minecarts are currently disabled.");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LEFT_CLICK_AIR:
|
||||
@ -98,7 +112,6 @@ public class TFM_PlayerListener implements Listener
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -201,6 +201,8 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
public static boolean allowLavaPlace = false;
|
||||
public static boolean allowWaterPlace = false;
|
||||
public static Boolean allowExplosions = false;
|
||||
public static boolean allowFliudSpread = false;
|
||||
public static boolean allowTntMinecarts = false;
|
||||
public static double explosiveRadius = 4.0D;
|
||||
public static boolean autoEntityWipe = true;
|
||||
public static boolean nukeMonitor = true;
|
||||
@ -222,7 +224,6 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
public static boolean tossmobEnabled = false;
|
||||
public static boolean generateFlatlands = true;
|
||||
public static String flatlandsGenerationParams = "16,stone,32,dirt,1,grass";
|
||||
public static boolean allowFliudSpread = false;
|
||||
public static boolean adminOnlyMode = false;
|
||||
public static boolean protectedAreasEnabled = true;
|
||||
public static boolean autoProtectSpawnpoints = true;
|
||||
@ -245,6 +246,7 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
allowLavaPlace = config.getBoolean("allow_lava_place", allowLavaPlace);
|
||||
allowWaterPlace = config.getBoolean("allow_water_place", allowWaterPlace);
|
||||
allowExplosions = config.getBoolean("allow_explosions", allowExplosions);
|
||||
allowTntMinecarts = config.getBoolean("allow_tnt_minecarts", allowTntMinecarts);
|
||||
explosiveRadius = config.getDouble("explosiveRadius", explosiveRadius);
|
||||
autoEntityWipe = config.getBoolean("auto_wipe", autoEntityWipe);
|
||||
nukeMonitor = config.getBoolean("nuke_monitor", nukeMonitor);
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: TotalFreedomMod
|
||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||
version: 2.18
|
||||
version: 2.19
|
||||
description: Plugin for the Total Freedom server.
|
||||
authors: [StevenLawson / Madgeek1450, JeromSar / DarthSalamon]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user