package net.knarcraft.minigames.container; import java.util.HashMap; import java.util.Map; /** * A container for keeping track of several placeholder to value mappings */ public class PlaceholderContainer { private final Map placeholders; /** * Instantiates a new placeholder container */ public PlaceholderContainer() { this.placeholders = new HashMap<>(); } /** * Gets all placeholders * * @return

All placeholders

*/ public Map getPlaceholders() { return new HashMap<>(this.placeholders); } /** * Adds a new placeholder * * @param placeholder

The placeholder to register

* @param value

The value of the placeholder

* @return

This object

*/ public PlaceholderContainer add(String placeholder, String value) { this.placeholders.put(placeholder, value); return this; } }