mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-12-27 20:27:37 +00:00
Merge pull request #247 from ZeroEpoch1969/development
literally had to do this shit the dumb ass way
This commit is contained in:
commit
3ee80e0f70
@ -59,16 +59,7 @@ public class InteractBlocker extends FreedomService
|
||||
public void onBedEnter(PlayerBedEnterEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
if (event.getBed().getBiome().equals(Biome.NETHER_WASTES)
|
||||
|| event.getBed().getBiome().equals(Biome.CRIMSON_FOREST)
|
||||
|| event.getBed().getBiome().equals(Biome.SOUL_SAND_VALLEY)
|
||||
|| event.getBed().getBiome().equals(Biome.WARPED_FOREST)
|
||||
|| event.getBed().getBiome().equals(Biome.BASALT_DELTAS)
|
||||
|| event.getBed().getBiome().equals(Biome.END_BARRENS)
|
||||
|| event.getBed().getBiome().equals(Biome.END_HIGHLANDS)
|
||||
|| event.getBed().getBiome().equals(Biome.END_MIDLANDS)
|
||||
|| event.getBed().getBiome().equals(Biome.THE_END)
|
||||
|| event.getBed().getBiome().equals(Biome.SMALL_END_ISLANDS))
|
||||
if (Groups.EXPLOSIVE_BED_BIOMES.contains(event.getBed().getBiome()))
|
||||
{
|
||||
player.sendMessage(ChatColor.RED + "You may not sleep here.");
|
||||
event.setCancelled(true);
|
||||
|
@ -3,6 +3,7 @@ package me.totalfreedom.totalfreedommod.util;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class Groups
|
||||
@ -207,4 +208,16 @@ public class Groups
|
||||
Material.WHITE_WALL_BANNER,
|
||||
Material.YELLOW_BANNER,
|
||||
Material.YELLOW_WALL_BANNER);
|
||||
}
|
||||
|
||||
public static final List<Biome> EXPLOSIVE_BED_BIOMES = Arrays.asList(
|
||||
Biome.NETHER_WASTES,
|
||||
Biome.CRIMSON_FOREST,
|
||||
Biome.SOUL_SAND_VALLEY,
|
||||
Biome.WARPED_FOREST,
|
||||
Biome.BASALT_DELTAS,
|
||||
Biome.END_BARRENS,
|
||||
Biome.END_HIGHLANDS,
|
||||
Biome.END_MIDLANDS,
|
||||
Biome.THE_END,
|
||||
Biome.SMALL_END_ISLANDS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user