Filled PlaceholderAPI

Discussion in 'Plugin Requests' started by Lightcaster5, Jul 9, 2019.

  1. Offline

    Lightcaster5

    Minecraft version: 1.12.2
    Name: AntiPAPIMessage
    Description: An add on (but separate) plugin to PlaceholderAPI https://www.spigotmc.org/resources/placeholderapi.6245/ that prevents players who don't have the permission apapi.msg from seeing all the "/papi" stuff with settable message. So if a player does "/papi help" or "/papi" it will, instead of showing them the default message from PlaceholderAPI
    message (open)
    Capture.PNG
    , shows the set message. Also when a player does a command already not allowed like "/papi reload" it will also give the set message instead of the one provided by PlaceholderAPI

    Commands: No commands

    Permissions: apapi.msg

    When I'd like it by: 0-5 days from now
     
  2. Offline

    KarimAKL

  3. Offline

    Lightcaster5

    Sadly, no it didn't work. Thanks for trying. I decompiled your code to see what the plugin was made of and I don't think setting the eventCanceled to true would stop messages from PlaceholderAPI. I thought about a way to do it and that is to turn off that players chat or disable the player from getting those messages for 1 second and then re-enabling it.

    Edit:
    Try setting the priority to the event your plugin created higher than something like PlaceholderAPI might have. Try this:
    Code:
    @EventHandler(priority = EventPriority.HIGH)


    Edit:
    After completely rebuilding your code and changing it so many different times I just stopped and looked for a plugin and found MessageFilter and it is working just fine. Thanks for your help anyways though. Have a wonderful day!
    MessageFilter - https://dev.bukkit.org/projects/message-filter
     
    Last edited: Jul 10, 2019
  4. Offline

    KarimAKL

    @Lightcaster5 I see, i thought it might work because the event is fired before the command is executed. Anyway, glad you got it working.
     

Share This Page