Coder Social home page Coder Social logo

Comments (8)

BlitzOffline avatar BlitzOffline commented on August 11, 2024 1

Hello. So this is a cool placeholder but could you please explain why this placeholder should be used over the PlayerList expansion? We try to only add placeholders that don't exist in other expansions and in my opinion the PlayerList does this job and a lot more.

P.S.: I am aware that some existing ones exist already but those were made and posted before the expansions were.

from javascript-expansion.

BlitzOffline avatar BlitzOffline commented on August 11, 2024 1

Well that's strange bcz for me it works:
image

U could try to just manually download it.

Download it from here: https://api.extendedclip.com/expansions/playerlist/
and put it in plugins/PlaceholderAPI/expansions and then do /papi reload

from javascript-expansion.

BlitzOffline avatar BlitzOffline commented on August 11, 2024 1

Well you can always use the javascript for that but yeah the reason we won't put this on the wiki is bcz there's already a better alternative I guess

from javascript-expansion.

joex92 avatar joex92 commented on August 11, 2024

oh, the only one I knew was ListPlayer and when I tried to install it, it wasn't being "supported":

[Sun, 6. Jun 2021 17:50:06 UTC WARN] listplayers is attempting to register placeholders via a PlaceholderHook class which is no longer supported!

So I thought that was the only one with what I wanted... I'm going to try PlayerList then, for some reason I didn't see it...

also, I want to use this placeholder as an Alert in DiscordSRV, but for some reason my script works in console, works in Minecraft chat, but it doesn't work sending it through an Alert... it's weird... hopefully PlayerList will work...

from javascript-expansion.

joex92 avatar joex92 commented on August 11, 2024

Now I remember why I didn't use PlayerList
image

from javascript-expansion.

joex92 avatar joex92 commented on August 11, 2024

thanks! it worked! the host I'm using is constantly sending /list to the console, so I wanted to take advantage of that to get the list of players and send it to the console chat in Discord, here's the alert if anyone looks for it:

  - Trigger: ServerCommandEvent
    Channel: console
    Conditions:
      - '#event.getCommand().equals("list")'
    Embed:
      Color: "#00ff00"
      Author:
        Name: 'Online players: ${#server.onlinePlayers.size()}'
      Description: "%playerlist_online,normal,yes,list%"

this is the output:
image

from javascript-expansion.

joex92 avatar joex92 commented on August 11, 2024

but I tested out, and the list of players is sent as 1 string separated by ", "... and I wanted to separate them by "\n" so it shows one above the other in discord...

from javascript-expansion.

joex92 avatar joex92 commented on August 11, 2024

🤔 hmm... you are right! I'm going to use javascript to replace ", " with "\n"...
anyways, thanks!

from javascript-expansion.

Related Issues (20)

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.