Filled Simple no sleep message plugin

Discussion in 'Plugin Requests' started by Nebuler, Aug 12, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Nebuler

    Plugin category: Server Administration

    Suggested name: NoSleepMessage

    What I want: I'd like a plugin that simply disables the 'You can only sleep at night.' message, no more, no less.

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: No permissions needed.

    When I'd like it by: As soon as possible
     
  2. Offline

    MaxGenre

    I'd like to take it
     
  3. Offline

    Nebuler

    @bwfcwalshy message filter does not work. Can someone please make this simple plugin?
     
  4. Offline

    timtower Administrator Administrator Moderator

    @Nebuler Define "does not work"
    Did you install protocolLib?
     
  5. Offline

    Nebuler

    @timtower didn't see the dependency as it was in a weird place. Thanks.

    The message is not filtered out. Can someone just please make the plugin as I'm certain it's no more than 30 lines of code. Thanks.

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Aug 12, 2015
  6. Offline

    timtower Administrator Administrator Moderator

    @Nebuler Did you configure it correctly? Because what you ask requires packets, packets require more than 30 lines.
     
  7. Offline

    Nebuler

    @timtower here's my config
    Code:
    test:
      type: EQUAL
      message-mask: testmessage
      replace-to: test-replacement
      cooldown-time: 10s
      use-formating: false
    youcanonlysleepatnight:
      type: EQUAL
      message-mask: You can only sleep at night
      replace-to: test
      cooldown-time: 0s
      use-formating: false
    
     
  8. Offline

    timtower Administrator Administrator Moderator

    fromgate likes this.
  9. @Nebuler Does test work? Is testmessage being replaced?
     
  10. Offline

    Nebuler

    @bwfcwalshy I will check this in a minute, how do you test it?
     
    Last edited: Aug 12, 2015
  11. Offline

    fromgate

    Hmm... I'm not sure that MessageFilter can "catch" this message. I think it is client-side.

    Oh! This message is not client side. But this message is displaying in client according to it's language settings.
    Packet contains this text: "{"translate":"tile.bed.noSleep"}", but client shows to player "You can only sleep at night".

    So you can try this config:
    Code:
    sleep:
      type: EQUAL
      message-mask: '{"translate":"tile.bed.noSleep"}'
      replace-to: ''
      cooldown-time: ''
      use-formating: false
    P.S. You can use command /mfilter save <FileName> <Time | NumberOfMessage> to save all messages into file <FileName>.yml.



    EDIT by Timtower: merged posts
     
    Last edited: Aug 13, 2015
    bwfcwalshy and timtower like this.
  12. Offline

    Nebuler

    fromgate likes this.
Thread Status:
Not open for further replies.

Share This Page