TechnicJelle / BlueMapFilteredEntities

Minecraft Paper plugin and BlueMap addon that allows you to track entities on your map, with lots of filtering options
2 stars 0 forks source link

BlueMap Filtered Entities

GitHub Total Downloads Servers using this plugin

A Minecraft Paper BlueMap addon that allows you to track entities on your map, with lots of filtering options.

A screenshot of a BlueMap, with a bunch of entity heads visible on it

Compatible with Paper 1.13+, just like BlueMap itself.

To reload this plugin, just reload BlueMap itself with /bluemap reload.

Click here to download!

Configuration

The configuration for this plugin uses HOCON files.

In the plugins/BlueMapFilteredEntities folder you should make a .conf file for each BlueMap map you want to control, with the map-id as the name.\ When you install this plugin for the first time, it will generate a template config for each registered BlueMap map. You should delete the ones for the maps you don't want to show entities on.

The general format of this config is very similar to BlueMap's own built-in marker configuration, but instead of configuring specific markers, you have to configure filters.

The general idea is that you have one or more "filter-sets", which are kind of like categories.\ (These translate basically directly to BlueMap's own marker-sets.)\ You then define all your filter-sets inside a big list at the root of your configuration file(s).

Inside each filter-set, you define one or more filters, which are responsible for adding the specific markers for each entity.

Filter-Sets List

This is the base of the file. Every .conf file must have a single filter-sets section at the root.

Inside this section, you can define your actual filter-sets.

filter-sets: {
  # Filter sets go in here
}

Filter-Sets

A filter-set looks like this:

my-filter-set: {
  label: "My Filter Set"
  toggleable: true  # Optional, default: true
  default-hidden: true  # Optional, default: true
  filters: [
    # Filters go in here
  ]
}

You might recognise this format from BlueMap's own marker configuration.

Filters

A single filter contains one or multiple properties, between a pair of curly brackes: { }

The different filters inside a filter-set are combined with OR logic, meaning that if any of the filters match, the entity will be matched.\ Inside each filter, the different conditions are combined with AND logic, meaning that all conditions must be met for the filter to match.

Entity data you can filter on

All of these are optional, but you must have at least something in the filter.

Appearance (Extra filter options)

Per filter, there are some other options that don't affect the filtering, but do affect the way matched entities are displayed on the map:

You should put the more specific filters first, and the more general filters last, because entities will only get caught by the first filter that matches them.\ This is especially important if you're using custom icons and popup info templates.\ You could also get around this by creating multiple filter-sets.

Some tips and tricks

Support

To get support with this plugin, join the BlueMap Discord server and ask your questions in #3rd-party-support. You're welcome to ping me, @TechnicJelle.

Community Setups

If you have a setup that you think is useful for others, please upload it somewhere and create a PR to add it to this list.

Make sure you include any icons as well, and credit the original creator if you didn't make them yourself.\ Make sure to have permission to use and distribute them! You could also link to where to get them.

I recommend creating a new repository for this.