Enable BackStringEnumSets to be edited from within the editor.

This commit is contained in:
ulumulu1510 2017-02-27 19:35:09 +01:00
parent eeaf2d9346
commit c4bb41333a

View File

@ -7,11 +7,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import com.massivecraft.massivecore.command.editor.annotation.EditorName;
import com.massivecraft.massivecore.command.editor.annotation.EditorType;
import com.massivecraft.massivecore.command.editor.annotation.EditorTypeInner;
import com.massivecraft.massivecore.command.editor.annotation.EditorVisible;
import com.massivecraft.massivecore.command.type.TypeMillisDiff;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
@ -23,6 +18,10 @@ import com.massivecraft.factions.engine.EngineChat;
import com.massivecraft.factions.event.EventFactionsChunkChangeType; import com.massivecraft.factions.event.EventFactionsChunkChangeType;
import com.massivecraft.massivecore.collections.BackstringEnumSet; import com.massivecraft.massivecore.collections.BackstringEnumSet;
import com.massivecraft.massivecore.collections.WorldExceptionSet; import com.massivecraft.massivecore.collections.WorldExceptionSet;
import com.massivecraft.massivecore.command.editor.annotation.EditorName;
import com.massivecraft.massivecore.command.editor.annotation.EditorType;
import com.massivecraft.massivecore.command.editor.annotation.EditorTypeInner;
import com.massivecraft.massivecore.command.type.TypeMillisDiff;
import com.massivecraft.massivecore.store.Entity; import com.massivecraft.massivecore.store.Entity;
import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.TimeUnit;
@ -539,7 +538,6 @@ public class MConf extends Entity<MConf>
// This way they can be protected in Faction territory. // This way they can be protected in Faction territory.
// Interacting with these materials when they are already placed in the terrain results in an edit. // Interacting with these materials when they are already placed in the terrain results in an edit.
@EditorVisible(false)
public BackstringEnumSet<Material> materialsEditOnInteract = new BackstringEnumSet<Material>(Material.class, public BackstringEnumSet<Material> materialsEditOnInteract = new BackstringEnumSet<Material>(Material.class,
"DIODE_BLOCK_OFF", // Minecraft 1.? "DIODE_BLOCK_OFF", // Minecraft 1.?
"DIODE_BLOCK_ON", // Minecraft 1.? "DIODE_BLOCK_ON", // Minecraft 1.?
@ -554,7 +552,6 @@ public class MConf extends Entity<MConf>
// Interacting with the the terrain holding this item in hand results in an edit. // Interacting with the the terrain holding this item in hand results in an edit.
// There's no need to add all block materials here. Only special items other than blocks. // There's no need to add all block materials here. Only special items other than blocks.
@EditorVisible(false)
public BackstringEnumSet<Material> materialsEditTools = new BackstringEnumSet<Material>(Material.class, public BackstringEnumSet<Material> materialsEditTools = new BackstringEnumSet<Material>(Material.class,
"FIREBALL", // Minecraft 1.? "FIREBALL", // Minecraft 1.?
"FLINT_AND_STEEL", // Minecraft 1.? "FLINT_AND_STEEL", // Minecraft 1.?
@ -567,7 +564,6 @@ public class MConf extends Entity<MConf>
// The duplication bug found in Spigot 1.8 protocol patch // The duplication bug found in Spigot 1.8 protocol patch
// https://github.com/MassiveCraft/Factions/issues/693 // https://github.com/MassiveCraft/Factions/issues/693
@EditorVisible(false)
public BackstringEnumSet<Material> materialsEditToolsDupeBug = new BackstringEnumSet<Material>(Material.class, public BackstringEnumSet<Material> materialsEditToolsDupeBug = new BackstringEnumSet<Material>(Material.class,
"CHEST", // Minecraft 1.? "CHEST", // Minecraft 1.?
"SIGN_POST", // Minecraft 1.? "SIGN_POST", // Minecraft 1.?
@ -578,7 +574,6 @@ public class MConf extends Entity<MConf>
); );
// Interacting with these materials placed in the terrain results in door toggling. // Interacting with these materials placed in the terrain results in door toggling.
@EditorVisible(false)
public BackstringEnumSet<Material> materialsDoor = new BackstringEnumSet<Material>(Material.class, public BackstringEnumSet<Material> materialsDoor = new BackstringEnumSet<Material>(Material.class,
"WOODEN_DOOR", // Minecraft 1.? "WOODEN_DOOR", // Minecraft 1.?
"ACACIA_DOOR", // Minecraft 1.8 "ACACIA_DOOR", // Minecraft 1.8
@ -596,7 +591,6 @@ public class MConf extends Entity<MConf>
); );
// Interacting with these materials placed in the terrain results in opening a container. // Interacting with these materials placed in the terrain results in opening a container.
@EditorVisible(false)
public BackstringEnumSet<Material> materialsContainer = new BackstringEnumSet<Material>(Material.class, public BackstringEnumSet<Material> materialsContainer = new BackstringEnumSet<Material>(Material.class,
"DISPENSER", // Minecraft 1.? "DISPENSER", // Minecraft 1.?
"CHEST", // Minecraft 1.? "CHEST", // Minecraft 1.?
@ -631,14 +625,12 @@ public class MConf extends Entity<MConf>
); );
// Interacting with these entities results in an edit. // Interacting with these entities results in an edit.
@EditorVisible(false)
public BackstringEnumSet<EntityType> entityTypesEditOnInteract = new BackstringEnumSet<EntityType>(EntityType.class, public BackstringEnumSet<EntityType> entityTypesEditOnInteract = new BackstringEnumSet<EntityType>(EntityType.class,
"ITEM_FRAME", // Minecraft 1.? "ITEM_FRAME", // Minecraft 1.?
"ARMOR_STAND" // Minecraft 1.8 "ARMOR_STAND" // Minecraft 1.8
); );
// Damaging these entities results in an edit. // Damaging these entities results in an edit.
@EditorVisible(false)
public BackstringEnumSet<EntityType> entityTypesEditOnDamage = new BackstringEnumSet<EntityType>(EntityType.class, public BackstringEnumSet<EntityType> entityTypesEditOnDamage = new BackstringEnumSet<EntityType>(EntityType.class,
"ITEM_FRAME", // Minecraft 1.? "ITEM_FRAME", // Minecraft 1.?
"ARMOR_STAND", // Minecraft 1.8 "ARMOR_STAND", // Minecraft 1.8
@ -646,14 +638,12 @@ public class MConf extends Entity<MConf>
); );
// Interacting with these entities results in opening a container. // Interacting with these entities results in opening a container.
@EditorVisible(false)
public BackstringEnumSet<EntityType> entityTypesContainer = new BackstringEnumSet<EntityType>(EntityType.class, public BackstringEnumSet<EntityType> entityTypesContainer = new BackstringEnumSet<EntityType>(EntityType.class,
"MINECART_CHEST", // Minecraft 1.? "MINECART_CHEST", // Minecraft 1.?
"MINECART_HOPPER" // Minecraft 1.? "MINECART_HOPPER" // Minecraft 1.?
); );
// The complete list of entities considered to be monsters. // The complete list of entities considered to be monsters.
@EditorVisible(false)
public BackstringEnumSet<EntityType> entityTypesMonsters = new BackstringEnumSet<EntityType>(EntityType.class, public BackstringEnumSet<EntityType> entityTypesMonsters = new BackstringEnumSet<EntityType>(EntityType.class,
"BLAZE", // Minecraft 1.? "BLAZE", // Minecraft 1.?
"CAVE_SPIDER", // Minecraft 1.? "CAVE_SPIDER", // Minecraft 1.?
@ -686,7 +676,6 @@ public class MConf extends Entity<MConf>
); );
// List of entities considered to be animals. // List of entities considered to be animals.
@EditorVisible(false)
public BackstringEnumSet<EntityType> entityTypesAnimals = new BackstringEnumSet<EntityType>(EntityType.class, public BackstringEnumSet<EntityType> entityTypesAnimals = new BackstringEnumSet<EntityType>(EntityType.class,
"BAT", // Minecraft 1.? "BAT", // Minecraft 1.?
"CHICKEN", // Minecraft 1.? "CHICKEN", // Minecraft 1.?