Refactored policy system, fixed config file parsing inconsistencies.

- LocationPolicy is now an extension of Policy
- Policy.parse() is now PolicyParser mapped in PolicyParsers.
- NodeValueParser was merged with DataShifter
- More code small changes to enable the project to work with this new configuration.
This commit is contained in:
天クマ 2025-12-08 17:19:06 -03:00
commit e64b563190
23 changed files with 358 additions and 258 deletions

View file

@ -1,4 +1,34 @@
# Eye of Nemesis
Eye of Nemesis is a Minecraft Paper plugin that allows server admins to write *policies* that will deny or allow (black/whitelist) players to do specific things.
Eye of Nemesis is a plugin that allows server admins to write [policies](#Policies) that will deny or allow (black/whitelist) players to do specific things based on the value of [nodes](#Nodes).
You can create policies based on player location, ~but other types of policies are available, like permission and player-name policy.~ (WIP)
## Warnings
- Even though running `/eye` will tell you to run `/eye help` to list all available commands, this is not implemented yet, however all commands are available as tab-complete of `/eye`.
- This plugin is in a very early stage.
## Policies
Policy is a structure that holds nodes and tell them _where_ to act. For example, a Location policy will tell its child nodes that they work from coordinates `x1 y1 z1` to `x2 y2 z2`.
Currently, the only policy type is Location.
## Nodes
Nodes are specific rules that rely on it's value to know _when_ to act. For example, a useItem policy with value `cookie` will prevent users from doing anything with a cookie.
### `useItem`
**Triggered:** breaking/placing/interacting with anything using this item.
**Expects:** list of strings.
### `useEnchantment`
**Triggered:** breaking/placing/interacting with anything using an item with the specified enchantment, **will allow items without enchantment even on allowlist mode**.
**Expects:** map of _string: string_.
### `attackWith`
**Triggered:** attacking with this item in hand.
**Expects:** list of strings.
## Performance
This plugin is not scalable as it is and will run unoptimized checks when your players do certain things in the server if you have policies enabled, I made it for a server with a few friends.
For every policy there's a check, for every matching policy there are its child nodes, each one introducing new checks. Keep that in mind.

View file

@ -4,7 +4,7 @@ plugins {
}
group = 'io.github.adrianvic'
version = '1.0.1-SNAPSHOT'
version = '1.0.2-SNAPSHOT'
repositories {
mavenCentral()

View file

@ -1 +1 @@
rootProject.name = 'regions'
rootProject.name = 'eyeofnemesis'

View file

@ -1,19 +1,21 @@
package io.github.adrianvic.nemesiseye;
import io.github.adrianvic.nemesiseye.policy.LocationPolicy;
import io.github.adrianvic.nemesiseye.policy.Policy;
import io.github.adrianvic.nemesiseye.policy.PolicyParser;
import io.github.adrianvic.nemesiseye.policy.PolicyParsers;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class Config {
private final static Config instance = new Config();
private File file;
private YamlConfiguration config;
private List<LocationPolicy> locationPolicies;
// private List<PermissionPolicy> permissionPolicies;
// private List<PlayerNamePolicy> playerNamePolicies;
private List<Policy> policies = new ArrayList<>();
private Config() {
}
@ -33,7 +35,15 @@ public class Config {
e.printStackTrace();
}
locationPolicies = LocationPolicy.parseLocationPolicy(config.getMapList("Policies.Location"));
List<Map<?, ?>> rawPolicies = config.getMapList("Policies");
for (Map<?, ?> map : rawPolicies) {
for (Map.Entry<?, ?> entry : map.entrySet()) {
if (entry.getKey() instanceof String k && entry.getValue() instanceof List<?> v) {
List<Policy> parsed = PolicyParsers.get(k).parse(v);
policies.addAll(parsed);
}
}
}
}
public void save() {
@ -49,8 +59,8 @@ public class Config {
save();
}
public List<LocationPolicy> getLocationPolicies() {
return locationPolicies;
public List<Policy> getPolicies() {
return policies;
}
public static Config getInstance() {

View file

@ -1,5 +1,9 @@
package io.github.adrianvic.nemesiseye;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
public class DataShifter {
@ -8,4 +12,38 @@ public class DataShifter {
Pattern pattern = Pattern.compile(cleanPattern, Pattern.CASE_INSENSITIVE);
return pattern.matcher(against).matches();
}
public static List<String> parseValueToStringList(List<Object> values) {
List<String> result = new ArrayList<>();
for (Object o : values) {
if (o instanceof String) result.add((String) o);
}
return result;
}
public static Map<String, String> parseValueToStringMap(List<Object> values) {
Map<String, String> result = new HashMap<>();
for (Object o : values) {
if (o instanceof Map<?, ?> raw) {
for (Map.Entry<?, ?> e : raw.entrySet()) {
if (e.getKey() instanceof String k && e.getValue() instanceof String v) {
result.put(k, v);
}
}
}
}
return result;
}
public static List<Map<?, ?>> parseValueToListOfMaps(List<?> values) {
List<Map<?, ?>> result = new ArrayList<>();
for (Object o : values) {
if (o instanceof Map<?, ?> raw) {
result.add(raw);
}
}
return result;
}
}

View file

@ -1,7 +1,8 @@
package io.github.adrianvic.nemesiseye;
import io.github.adrianvic.nemesiseye.policy.Action;
import io.github.adrianvic.nemesiseye.policy.LocationPolicy;
import io.github.adrianvic.nemesiseye.policy.policies.LocationPolicy;
import io.github.adrianvic.nemesiseye.policy.Policy;
import io.github.adrianvic.nemesiseye.policy.PolicyNode;
import org.bukkit.entity.HumanEntity;
import org.bukkit.util.BoundingBox;
@ -38,22 +39,24 @@ public class Validator {
return node.isWhitelist() != allowed;
}
public static List<PolicyNode> getNodesForPolicies(List<LocationPolicy> policies) {
public static List<PolicyNode> getNodesForPolicies(List<Policy> policies) {
List<PolicyNode> nodes = new ArrayList<>();
for (LocationPolicy p : policies) {
for (Policy p : policies) {
nodes.addAll(p.nodes());
}
return nodes;
}
public static List<LocationPolicy> getPoliciesForEntity(HumanEntity entity) {
List<LocationPolicy> lps = Config.getInstance().getLocationPolicies();
List<LocationPolicy> applyingLPS = new ArrayList<>();
for (LocationPolicy lp : lps) {
for (ArrayList<BoundingBox> boxes : lp.locations()) {
for (BoundingBox box : boxes) {
if (box.contains(entity.getLocation().toVector())) {
applyingLPS.add(lp);
public static List<Policy> getPoliciesForEntity(HumanEntity entity) {
List<Policy> ps = Config.getInstance().getPolicies();
List<Policy> applyingLPS = new ArrayList<>();
for (Policy p : ps) {
if (p instanceof LocationPolicy lp) {
for (ArrayList<BoundingBox> boxes : lp.locations()) {
for (BoundingBox box : boxes) {
if (box.contains(entity.getLocation().toVector())) {
applyingLPS.add(lp);
}
}
}
}

View file

@ -1,7 +1,7 @@
package io.github.adrianvic.nemesiseye.commands.sub;
import io.github.adrianvic.nemesiseye.Validator;
import io.github.adrianvic.nemesiseye.policy.LocationPolicy;
import io.github.adrianvic.nemesiseye.policy.Policy;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.HumanEntity;
@ -16,9 +16,9 @@ public class CurrentPolicies implements Subcommand {
@Override
public boolean execute(CommandSender commandSender, String[] args) {
List<LocationPolicy> policies = Validator.getPoliciesForEntity((HumanEntity) commandSender);
List<Policy> policies = Validator.getPoliciesForEntity((HumanEntity) commandSender);
List<String> pstrings = new ArrayList<>();
for (LocationPolicy p : policies) {
for (Policy p : policies) {
pstrings.add(" %s (%s nodes)".formatted(p.name(), p.nodes().size()));
}
if (pstrings.isEmpty()) {

View file

@ -1,7 +1,7 @@
package io.github.adrianvic.nemesiseye.commands.sub;
import io.github.adrianvic.nemesiseye.Config;
import io.github.adrianvic.nemesiseye.policy.LocationPolicy;
import io.github.adrianvic.nemesiseye.policy.Policy;
import org.bukkit.command.CommandSender;
import java.util.ArrayList;
@ -17,7 +17,7 @@ public class ListPolicies implements Subcommand {
@Override
public boolean execute(CommandSender commandSender, String[] args) {
List<String> rstr = new ArrayList<>();
for (LocationPolicy p : Config.getInstance().getLocationPolicies()) {
for (Policy p : Config.getInstance().getPolicies()) {
rstr.add(p.name());
}
commandSender.sendMessage(String.join(", ", rstr) + ".");

View file

@ -1,7 +1,7 @@
package io.github.adrianvic.nemesiseye.commands.sub;
import io.github.adrianvic.nemesiseye.Config;
import io.github.adrianvic.nemesiseye.policy.LocationPolicy;
import io.github.adrianvic.nemesiseye.policy.Policy;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -16,18 +16,15 @@ public class PolicyInfo implements Subcommand {
@Override
public boolean execute(CommandSender commandSender, String[] strings) {
List<LocationPolicy> policies = Config.getInstance().getLocationPolicies();
for (LocationPolicy lp : policies) {
if (lp.name().equals(strings[0])) {
String locations = lp.locations().toString();
List<Policy> policies = Config.getInstance().getPolicies();
for (Policy policy : policies) {
if (policy.name().equals(strings[0])) {
commandSender.sendMessage(String.format("""
Showing info for policy "%s%s%s":
Type: %s
Locations: %s
Nodes: %s
%s
""", ChatColor.UNDERLINE, lp.name(), ChatColor.RESET, "location", locations, lp.nodes().size(), lp.allowlist() ? "Is allowlist" : "Is blacklist"));
""", ChatColor.UNDERLINE, policy.name(), ChatColor.RESET, "location", policy.nodes().size(), policy.allowlist() ? "Is allowlist" : "Is blacklist"));
}
}
return true;
@ -36,7 +33,7 @@ public class PolicyInfo implements Subcommand {
@Override
public List<String> onTabComplete(CommandSender sender, String[] args) {
List<String> rstr = new ArrayList<>();
for (LocationPolicy p : Config.getInstance().getLocationPolicies()) {
for (Policy p : Config.getInstance().getPolicies()) {
rstr.add(p.name());
}
return rstr;

View file

@ -1,65 +0,0 @@
package io.github.adrianvic.nemesiseye.policy;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.util.BoundingBox;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public record LocationPolicy(String name, List<ArrayList<BoundingBox>> locations, List<PolicyNode> nodes, boolean allowlist) {
public static List<LocationPolicy> parseLocationPolicy(List<Map<?,?>> raw) {
List<LocationPolicy> out = new ArrayList<>(raw.size());
for (Map<?,?> m : raw) {
String name = (String) m.get("name");
boolean allowlist = Boolean.TRUE.equals(m.get("allowList"));
// Nodes
Object rawNodes = m.get("nodes");
List<Map<String, Object>> nodeList = new ArrayList<>();
if (rawNodes instanceof List<?> list) {
for (Object o : list) {
if (o instanceof Map<?, ?> map)
nodeList.add((Map<String, Object>) map);
}
}
List<PolicyNode> nodes = PolicyNode.parseNodes(nodeList, allowlist);
// Parsing locations
List<ArrayList<BoundingBox>> locations = new ArrayList<>();
Object rawGroups = m.get("locations");
List<?> groups = rawGroups instanceof List ? (List<?>) rawGroups : List.of();
// Getting groups
for (Object gObj : groups) {
List<?> group = (List<?>) gObj;
ArrayList<BoundingBox> boxes = new ArrayList<>(group.size());
// Now iterate over regions inside the group
for (Object rObj : group) {
Map<?,?> region = (Map<?, ?>) rObj;
Map<?,?> c1 = (Map<?, ?>) region.get("corner1");
Map<?,?> c2 = (Map<?, ?>) region.get("corner2");
double x1 = ((Number) c1.get("x")).doubleValue();
double y1 = ((Number) c1.get("y")).doubleValue();
double z1 = ((Number) c1.get("z")).doubleValue();
double x2 = ((Number) c2.get("x")).doubleValue();
double y2 = ((Number) c2.get("y")).doubleValue();
double z2 = ((Number) c2.get("z")).doubleValue();
Location loc1 = new Location(Bukkit.getWorlds().getFirst(), x1, y1, z1);
Location loc2 = new Location(Bukkit.getWorlds().getFirst(), x2, y2, z2);
boxes.add(BoundingBox.of(loc1, loc2));
}
locations.add(boxes);
}
out.add(new LocationPolicy(name, locations, nodes, allowlist));
}
return out;
}
}

View file

@ -1,28 +0,0 @@
package io.github.adrianvic.nemesiseye.policy;
import java.util.*;
public class NodeValueParser {
public static List<String> parseValueToStringList(List<Object> values) {
List<String> result = new ArrayList<>();
for (Object o : values) {
if (o instanceof String) result.add((String) o);
}
return result;
}
public static Map<String, String> parseValueToStringMap(List<Object> values) {
Map<String, String> result = new HashMap<>();
for (Object o : values) {
if (o instanceof Map<?, ?> raw) {
for (Map.Entry<?, ?> e : raw.entrySet()) {
if (e.getKey() instanceof String k && e.getValue() instanceof String v) {
result.put(k, v);
}
}
}
}
return result;
}
}

View file

@ -0,0 +1,13 @@
package io.github.adrianvic.nemesiseye.policy;
import java.util.List;
public interface Policy {
String name();
List<PolicyNode> nodes();
boolean allowlist();
default PolicyParser getParser() {
return PolicyParsers.get("");
}
}

View file

@ -0,0 +1,7 @@
package io.github.adrianvic.nemesiseye.policy;
import java.util.List;
public interface PolicyParser {
List<Policy> parse(List<?> raw);
}

View file

@ -0,0 +1,18 @@
package io.github.adrianvic.nemesiseye.policy;
import io.github.adrianvic.nemesiseye.policy.parser.LocationPolicyParser;
import java.util.HashMap;
import java.util.Map;
public class PolicyParsers {
private static final Map<String, PolicyParser> handlers = new HashMap<>();
static {
handlers.put("Location", new LocationPolicyParser());
}
public static PolicyParser get(String type) {
return handlers.get(type);
}
}

View file

@ -3,7 +3,6 @@ package io.github.adrianvic.nemesiseye.policy.handlers;
import io.github.adrianvic.nemesiseye.DataShifter;
import io.github.adrianvic.nemesiseye.policy.Action;
import io.github.adrianvic.nemesiseye.policy.NodeHandler;
import io.github.adrianvic.nemesiseye.policy.NodeValueParser;
import io.github.adrianvic.nemesiseye.policy.PolicyNode;
import org.bukkit.entity.HumanEntity;
@ -12,7 +11,7 @@ public class attackWith implements NodeHandler {
@Override
public boolean allows(HumanEntity entity, PolicyNode node, Action action) {
if (action == Action.HIT) {
for (String s : NodeValueParser.parseValueToStringList(node.values())) {
for (String s : DataShifter.parseValueToStringList(node.values())) {
if (DataShifter.safeMatches(s, entity.getInventory().getItemInMainHand().getType().toString())) return false;
}
}

View file

@ -3,7 +3,6 @@ package io.github.adrianvic.nemesiseye.policy.handlers;
import io.github.adrianvic.nemesiseye.DataShifter;
import io.github.adrianvic.nemesiseye.policy.Action;
import io.github.adrianvic.nemesiseye.policy.NodeHandler;
import io.github.adrianvic.nemesiseye.policy.NodeValueParser;
import io.github.adrianvic.nemesiseye.policy.PolicyNode;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.HumanEntity;
@ -25,7 +24,7 @@ public class useEnchantment implements NodeHandler {
return !node.isWhitelist();
}
Map<String, String> valuesmap = NodeValueParser.parseValueToStringMap(node.values());
Map<String, String> valuesmap = DataShifter.parseValueToStringMap(node.values());
for (Map.Entry<Enchantment, Integer> e : enchants.entrySet()) {
String enchantment = e.getKey().getKey().getKey();

View file

@ -3,7 +3,6 @@ package io.github.adrianvic.nemesiseye.policy.handlers;
import io.github.adrianvic.nemesiseye.DataShifter;
import io.github.adrianvic.nemesiseye.policy.Action;
import io.github.adrianvic.nemesiseye.policy.NodeHandler;
import io.github.adrianvic.nemesiseye.policy.NodeValueParser;
import io.github.adrianvic.nemesiseye.policy.PolicyNode;
import org.bukkit.entity.HumanEntity;
@ -13,7 +12,7 @@ public class useItem implements NodeHandler {
public boolean allows(HumanEntity entity, PolicyNode node, Action action) {
String type = entity.getInventory().getItemInMainHand().getType().toString();
for (String s : NodeValueParser.parseValueToStringList(node.values())) {
for (String s : DataShifter.parseValueToStringList(node.values())) {
if (DataShifter.safeMatches(s, type)) {
return false;
}

View file

@ -0,0 +1,68 @@
package io.github.adrianvic.nemesiseye.policy.parser;
import io.github.adrianvic.nemesiseye.DataShifter;
import io.github.adrianvic.nemesiseye.policy.*;
import io.github.adrianvic.nemesiseye.policy.policies.LocationPolicy;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.util.BoundingBox;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class LocationPolicyParser implements PolicyParser {
public List<Policy> parse(List<?> raw) {
List<Policy> out = new ArrayList<>(raw.size());
List<Map<?, ?>> parsedRawMap = DataShifter.parseValueToListOfMaps(raw);
for (Map<?, ?> m : parsedRawMap) {
String name = (String) m.get("name");
boolean allowlist = Boolean.TRUE.equals(m.get("allowList"));
// Nodes
Object rawNodes = m.get("nodes");
List<Map<String, Object>> nodeList = new ArrayList<>();
if (rawNodes instanceof List<?> list) {
for (Object o : list) {
if (o instanceof Map<?, ?> map)
nodeList.add((Map<String, Object>) map);
}
}
List<PolicyNode> nodes = PolicyNode.parseNodes(nodeList, allowlist);
// Parsing locations
List<ArrayList<BoundingBox>> locations = new ArrayList<>();
Object rawLocations = m.get("locations");
List<?> groups = rawLocations instanceof List ? (List<?>) rawLocations : List.of();
ArrayList<BoundingBox> boxes = new ArrayList<>(groups.size());
// Now iterate over regions
for (Object rObj : groups) {
Map<?, ?> region = (Map<?, ?>) rObj;
Map<?, ?> c1 = (Map<?, ?>) region.get("corner1");
Map<?, ?> c2 = (Map<?, ?>) region.get("corner2");
double x1 = ((Number) c1.get("x")).doubleValue();
double y1 = ((Number) c1.get("y")).doubleValue();
double z1 = ((Number) c1.get("z")).doubleValue();
double x2 = ((Number) c2.get("x")).doubleValue();
double y2 = ((Number) c2.get("y")).doubleValue();
double z2 = ((Number) c2.get("z")).doubleValue();
Location loc1 = new Location(Bukkit.getWorlds().getFirst(), x1, y1, z1);
Location loc2 = new Location(Bukkit.getWorlds().getFirst(), x2, y2, z2);
boxes.add(BoundingBox.of(loc1, loc2));
}
locations.add(boxes);
out.add(new LocationPolicy(name, locations, nodes, allowlist));
}
return out;
}
}

View file

@ -0,0 +1,10 @@
package io.github.adrianvic.nemesiseye.policy.policies;
import io.github.adrianvic.nemesiseye.policy.Policy;
import io.github.adrianvic.nemesiseye.policy.PolicyNode;
import org.bukkit.util.BoundingBox;
import java.util.ArrayList;
import java.util.List;
public record LocationPolicy(String name, List<ArrayList<BoundingBox>> locations, List<PolicyNode> nodes, boolean allowlist) implements Policy {}

View file

@ -1,5 +1,6 @@
package io.github.adrianvic.nemesiseye.policy;
package io.github.adrianvic.nemesiseye.policy.policies;
import io.github.adrianvic.nemesiseye.policy.PolicyNode;
import org.bukkit.permissions.Permission;
import java.util.ArrayList;

View file

@ -1,4 +1,6 @@
package io.github.adrianvic.nemesiseye.policy;
package io.github.adrianvic.nemesiseye.policy.policies;
import io.github.adrianvic.nemesiseye.policy.PolicyNode;
import java.util.ArrayList;

View file

@ -1,5 +1,5 @@
name: "Eye-of-Nemesis"
version: '1.0.1-SNAPSHOT'
version: '1.0.2-SNAPSHOT'
main: io.github.adrianvic.nemesiseye.Nemesis
api-version: '1.21'
author: 'Adrian Victor'

View file

@ -1,122 +1,121 @@
Policies:
Location:
# NO SPACES
- name: "Beta-1.7.3-items-only"
# Will deny anything that's not allowed by the nodes if set to true
allowList: true
nodes:
- useItem:
- AIR
- STONE
- COBBLESTONE
- "^(OAK|SPRUCE|BIRCH)_(LOG|SAPLING|PLANKS|LEAVES)$"
- "^(DIAMOND|GOLD|IRON|COAL|LAPIS|REDSTONE)_ORE$"
- "^(DIAMOND|GOLD|IRON|LAPIS)_BLOCK$"
- GRAVEL
- BEDROCK
- SAND
- SPONGE
- WET_SPONGE
- GLASS
- LAPIS_LAZULI
- COBWEB
- PISTON
- STICKY_PISTON
- GRASS
- DISPENSER
- NOTE_BLOCK
- SANDSTONE
- RED_BED
- "^(POWERED|DETECTOR)_RAIL$"
- RAIL
- SHORT_GRASS
- "^(WHITE|BLACK|GREEN|YELLOW|PINK|PURPLE|CYAN|BLUE|RED|LIME|BROWN|LIGHT_GRAY|GRAY)_(WOOL|DYE)$"
- POPPY
- DANDELION
- "^(RED|BROWN)_MUSHROOM$"
- "^(OAK|COBBLESTONE)_SLAB$"
- BRICK_BLOCK
- TNT
- BOOKSHELF
- OBSIDIAN
- MOSSY_COBBLESTONE
- TORCH
- SPAWNER
- REDSTONE
- CHEST
- CRAFTING_TABLE
- FARMLAND
- FURNACE
- SIGN
- LADDER
- "^(COBBLESTONE|OAK)_STAIRS$"
- LEVER
- "^(OAK|STONE)_PRESSURE_PLATE$"
- "^(OAK|IRON)_DOOR$"
- BLUE_ICE
- REDSTONE_TORCH
- STONE_BUTTON
- SNOW
- SNOW_BLOCK
- CLAY
- SUGAR_CANE
- JUKEBOX
- OAK_FENCE
- PUMPKIN
- NETHERRACK
- SOUL_SAND
- GLOWSTONE
- JACK_O_LANTERN
- CAKE
- REPEATER
- OAK_TRAPDOOR
- "^(IRON|STONE|DIAMOND|WOODEN|GOLDEN)_(SHOVEL|AXE|PICKAXE|SWORD|HOE)$"
- "^(IRON|LEATHER|DIAMOND|GOLDEN)_(HELMET|CHESTPLATE|LEGGINGS|BOOTS)$"
- STICK
- BOWL
- MUSHROOM_STEW
- FEATHER
- STRING
- GUNPOWDER
- WHEAT_SEEDS
- WHEAT
- FLINT
- FLINT_AND_STEEL
- PORKCHOP
- "^(COOKED|RAW)_(PORKCHOP|FISH)$"
- PAINTING
- GOLDEN_APPLE
- BUCKET
- "^(LAVA|MILK|WATER)_BUCKET$"
- MINECART
- SADDLE
- SNOWBALL
- OAK_BOAT
- LEATHER
- "^(FURNACE|CHEST)_MINECART$"
- EGG
- BOOK
- PAPER
- BRICK
- SLIME_BALL
- COMPASS
- FISHING_ROD
- CLOCK
- GLOWSTONE_DUST
- INK_SAC
- BONE_MEAL
- SUGAR
- COOKIE
- MAP
- FILLED_MAP
- SHEARS
- MUSIC_DISK_CAT
- MUSIC_DISK_13
- DIRT
- BREAD
- useEnchantment:
"gibberish": 999999
locations:
-
- Location:
# NO SPACES
- name: "Beta-1.7.3-items-only"
# Will deny anything that's not allowed by the nodes if set to true
allowList: true
nodes:
- useItem:
- AIR
- STONE
- COBBLESTONE
- "^(OAK|SPRUCE|BIRCH)_(LOG|SAPLING|PLANKS|LEAVES)$"
- "^(DIAMOND|GOLD|IRON|COAL|LAPIS|REDSTONE)_ORE$"
- "^(DIAMOND|GOLD|IRON|LAPIS)_BLOCK$"
- GRAVEL
- BEDROCK
- SAND
- SPONGE
- WET_SPONGE
- GLASS
- LAPIS_LAZULI
- COBWEB
- PISTON
- STICKY_PISTON
- GRASS
- DISPENSER
- NOTE_BLOCK
- SANDSTONE
- RED_BED
- "^(POWERED|DETECTOR)_RAIL$"
- RAIL
- SHORT_GRASS
- "^(WHITE|BLACK|GREEN|YELLOW|PINK|PURPLE|CYAN|BLUE|RED|LIME|BROWN|LIGHT_GRAY|GRAY)_(WOOL|DYE)$"
- POPPY
- DANDELION
- "^(RED|BROWN)_MUSHROOM$"
- "^(OAK|COBBLESTONE)_SLAB$"
- BRICK_BLOCK
- TNT
- BOOKSHELF
- OBSIDIAN
- MOSSY_COBBLESTONE
- TORCH
- SPAWNER
- REDSTONE
- CHEST
- CRAFTING_TABLE
- FARMLAND
- FURNACE
- SIGN
- LADDER
- "^(COBBLESTONE|OAK)_STAIRS$"
- LEVER
- "^(OAK|STONE)_PRESSURE_PLATE$"
- "^(OAK|IRON)_DOOR$"
- BLUE_ICE
- REDSTONE_TORCH
- STONE_BUTTON
- SNOW
- SNOW_BLOCK
- CLAY
- SUGAR_CANE
- JUKEBOX
- OAK_FENCE
- PUMPKIN
- NETHERRACK
- SOUL_SAND
- GLOWSTONE
- JACK_O_LANTERN
- CAKE
- REPEATER
- OAK_TRAPDOOR
- "^(IRON|STONE|DIAMOND|WOODEN|GOLDEN)_(SHOVEL|AXE|PICKAXE|SWORD|HOE)$"
- "^(IRON|LEATHER|DIAMOND|GOLDEN)_(HELMET|CHESTPLATE|LEGGINGS|BOOTS)$"
- STICK
- BOWL
- MUSHROOM_STEW
- FEATHER
- STRING
- GUNPOWDER
- WHEAT_SEEDS
- WHEAT
- FLINT
- FLINT_AND_STEEL
- PORKCHOP
- "^(COOKED|RAW)_(PORKCHOP|FISH)$"
- PAINTING
- GOLDEN_APPLE
- BUCKET
- "^(LAVA|MILK|WATER)_BUCKET$"
- MINECART
- SADDLE
- SNOWBALL
- OAK_BOAT
- LEATHER
- "^(FURNACE|CHEST)_MINECART$"
- EGG
- BOOK
- PAPER
- BRICK
- SLIME_BALL
- COMPASS
- FISHING_ROD
- CLOCK
- GLOWSTONE_DUST
- INK_SAC
- BONE_MEAL
- SUGAR
- COOKIE
- MAP
- FILLED_MAP
- SHEARS
- MUSIC_DISK_CAT
- MUSIC_DISK_13
- DIRT
- BREAD
- useEnchantment:
"gibberish": 999999
locations:
- corner1: { x: 2100, y: 256, z: 1400 }
corner2: { x: 1000, y: -64, z: 2200 }
corner2: { x: 1000, y: -64, z: 2200 }