mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 03:24:31 +02:00
Add some default values to protect config.
Figure out a better way to do this for HashMaps....
This commit is contained in:
@@ -17,7 +17,7 @@ public class Prevent implements StorageObject
|
||||
{
|
||||
@Comment("Which blocks should a piston not be able to push?")
|
||||
@ListType(Material.class)
|
||||
private Set<Material> pistonPush = new HashSet<Material>();
|
||||
private Set<Material> pistonPush = new HashSet<Material>();
|
||||
private boolean lavaFlow = false;
|
||||
private boolean waterFlow = false;
|
||||
// private boolean waterbucketFlow = false; TODO: Test if this still works
|
||||
@@ -42,4 +42,10 @@ public class Prevent implements StorageObject
|
||||
@MapKeyType(EntityType.class)
|
||||
@MapValueType(Boolean.class)
|
||||
private Map<EntityType, Boolean> spawn = new HashMap<EntityType, Boolean>();
|
||||
|
||||
public Prevent()
|
||||
{
|
||||
spawn.put(EntityType.PIG, false);
|
||||
pistonPush.add(Material.GLASS);
|
||||
}
|
||||
}
|
@@ -3,6 +3,7 @@ package com.earth2me.essentials.settings.protect;
|
||||
import com.earth2me.essentials.storage.Comment;
|
||||
import com.earth2me.essentials.storage.ListType;
|
||||
import com.earth2me.essentials.storage.StorageObject;
|
||||
import com.sun.org.apache.xml.internal.security.Init;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import lombok.Data;
|
||||
@@ -42,4 +43,11 @@ public class Protect implements StorageObject
|
||||
private boolean disableThunder = false;
|
||||
private boolean disableLighting = false;
|
||||
private SignsAndRails signsAndRails = new SignsAndRails();
|
||||
|
||||
public Protect()
|
||||
{
|
||||
alertOnPlacement.add(Material.LAVA);
|
||||
alertOnUse.add(Material.LAVA_BUCKET);
|
||||
alertOnBreak.add(Material.GLASS);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user