mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-09 18:08:27 +01:00
Prevent placing of glowstone in spawn anchors.
https://github.com/BentoBoxWorld/BentoBox/issues/1534
This commit is contained in:
parent
6990a5de48
commit
77d2535e39
@ -1,5 +1,7 @@
|
||||
package world.bentobox.bentobox.listeners.flags.protection;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@ -16,8 +18,6 @@ import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.flags.Flag;
|
||||
import world.bentobox.bentobox.api.flags.FlagListener;
|
||||
@ -34,8 +34,12 @@ public class BlockInteractionListener extends FlagListener {
|
||||
* These cover materials in another server version.
|
||||
* This avoids run time errors due to unknown enum values, at the expense of a string comparison
|
||||
*/
|
||||
private final Map<String, String> stringFlags = ImmutableMap.<String, String>builder()
|
||||
.build();
|
||||
private final static Map<String, String> stringFlags;
|
||||
static {
|
||||
Map<String, String> f = new HashMap<>();
|
||||
f.put("RESPAWN_ANCHOR", "PLACE_BLOCKS");
|
||||
stringFlags = Collections.unmodifiableMap(f);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle interaction with blocks
|
||||
|
Loading…
Reference in New Issue
Block a user