Giter VIP home page Giter VIP logo
MiniPlaceholders photo

miniplaceholders Goto Github PK

repos: 19.0 gists: 0.0

Name: MiniPlaceholders

Type: Organization

Bio: MiniMessage Component-based Placeholders for PaperMC, Folia, Fabric, Krypton and Velocity platforms

MiniPlaceholders

WorkFlow Latest Version Discord Modrinth Downloads GitHub Downloads

MiniMessage Component-based Placeholders for Paper, Fabric, Sponge, Folia and Velocity platforms

Compatibility

  • Paper 1.19.3, 1.19.4+
  • Folia 1.19.4+
  • Velocity 3.1.2+
  • Fabric 1.19.4+
  • Sponge API 8+

Commands

Velocity

  • /vminiplaceholders parse me "[message with placeholders]"
  • /vminiplaceholders parse player [some-player] "[message with placeholders]"

Paper | Folia | Fabric | Krypton

  • /miniplaceholders <parse|help> player [some-player] "[message with placeholders]
  • /miniplaceholders parse player [some-player] "[message with placeholders]"

Example:

  • /miniplaceholders parse me "<player_xp>"
  • /vminiplaceholders parse player 4drian3d "<player_name>"

User Usage

Check our user usage wiki here

API

Check the available Javadocs

Or check the Developer Wiki

Java

class Main {
    public static void registerExpansion() {
        final Expansion expansion = Expansion.builder("my-expansion")
                .filter(Player.class)
                .audiencePlaceholder("name", (audience, ctx, queue) -> {
                    final Player player = (player) audience;
                    return Tag.selfClosingInserting(player.getName());
                })
                .globalPlaceholder("tps", (ctx, queue) ->
                    Tag.selfClosingInserting(Component.text(Bukkit.getTps()[0]))
                ).build;
        
        expansion.register();
        
        Player player;
        final TagResolver playerResolver = MiniPlaceholders.getAudiencePlaceholders(player);
        player.sendMessage(miniMessage().deserialize("Player Name: <my-expansion_name>", playerResolver));
    }
}

Kotlin

fun register() {
      val expansion = expansion("my-expansion") {
          audiencePlaceholder("name") { aud, _, _ ->
              aud.getName().asClosingTag()
          }
          globalPlaceholder("tps") { _, _ ->
              Component.text(Bukkit.getTps()[0]).asInsertingTag()
          }
      }
    
    expansion.register()
    
    val player: Player
    val playerResolver = MiniPlaceholders.getAudiencePlaceholders(player)
    player.sendMessage(miniMessage().deserialize("Player Name: <my-expansion_name>", playerResolver))
}

MiniPlaceholders's Projects

emojis icon emojis

Bukkit plugin extending the default Minecraft look by adding custom glyphs

miniplaceholders icon miniplaceholders

MiniMessage Component-based Placeholders for Paper, Fabric, Sponge, Folia and Velocity platforms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.