Merge pull request #247 from ZeroEpoch1969/development

literally had to do this shit the dumb ass way
This commit is contained in:
Seth 2020-07-28 14:59:34 -07:00 committed by GitHub
commit 3ee80e0f70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 11 deletions

View File

@ -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);

View File

@ -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);
}