mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-25 01:21:21 +01:00
Added ability to replace [name] by the island owner's name when pasting an entity from a blueprint
This commit is contained in:
parent
7ee706c982
commit
aa9a4d16f1
@ -348,6 +348,9 @@ public class BlueprintPaster {
|
||||
// Parse any placeholders in the entity's name, if the owner's connected (he should)
|
||||
Player owner = User.getInstance(island.getOwner()).getPlayer();
|
||||
if (owner != null) {
|
||||
// Parse for the player's name first (in case placeholders might need it)
|
||||
customName = customName.replace(TextVariables.NAME, owner.getName());
|
||||
// Now parse the placeholders
|
||||
customName = plugin.getPlaceholdersManager().replacePlaceholders(owner, customName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user