a plugin that can write texst in a .txt file when i run a console command

Discussion in 'Archived: Plugin Requests' started by sverre26, Jan 24, 2013.

  1. Offline

    sverre26

    i need to use this to see who have agreed the rules ( they pres a button and a signal going to command blocks messaging online staff)
     
  2. Offline

    donner1122

    can i have some more detail? do you mean if the press a button or type a command it will tell all the admins online that "(Player's Name) has agreed to the rules"? or will the name be stored in a .txt file?
     
  3. Offline

    sverre26

    the name should be stored in a .txt file

    can anyone do it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  4. Offline

    donner1122

    i dont know about a button but what if the player says "I agree to all of the rules"?
     
  5. Offline

    sverre26

    The button sends a signal to command blocks then they do different commands
    One of them broadcasts that the player that press the button agree to the rules
     
  6. Offline

    sverre26

    can someone make it?
     
  7. Offline

    Mike724

    Of course it can be made, really simply actually.
    You just want something like this:
    /pluginname add playernamehere
    /pluginname remove playernamehere
    and it will add or remove that player's name from a .txt file, and that's it?
     
  8. Offline

    sverre26

    yes
    but it have to be done from the console (or it wil ned permisions)

    can someone code it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  9. Offline

    vorksholk

    This sounds very simple. Would it just be a .txt file in the plugins folder?
     
  10. Offline

    stuntguy3000

    God just do it in the config.yml

    15 lines of code AT MOST
     
  11. Offline

    Woobie

    I'd like to see you do this with 15 lines max. Yes, I know it's really simple, still a bit more than 15 lines, depending on your coding style.
     
    -_Husky_- likes this.
  12. Offline

    stuntguy3000

    By 15 lines i meant of actual code not the other constructor crap mk?
     
  13. Offline

    Mike724

    I'll see what I can get done tonight

    OP, is it alright if it saves into a .yml file instead? Or does it have to be .txt?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  14. Offline

    -_Husky_-

    Yml is pretty much text anyway lol
     
  15. Offline

    Mike724

    I know, but I was wondering if he had a specific reason for it to be .txt. Not hard to do it either way though.
     
  16. Offline

    sverre26

    it can be a .yml
     
  17. Offline

    Mike724

    OK, it's done. You can download it here: <Edit by Moderator: Redacted mediafire url>

    Disclaimer: This plugin has not been verified by Bukkit staff, use it at your own risk.

    Commands:
    /roster add some text you want to add
    /roster remove some text you want to remove

    Spaces in the text are supported. Capitalization IS important, it will not ignore caps for now.

    Permissions:
    Roster.add
    Roster.remove

    The roster is saved at /plugins/Roster/roster.txt

    Example usage in a command block:
    /roster add @p
    /roster remove @p

    To have it broadcast that a player has been added, use a 2nd command block.

    It's still very alpha, message me if anything goes wrong/a feature needs to be added.
     
    Last edited by a moderator: Nov 8, 2016
    sverre26 likes this.
  18. Offline

    sverre26

    [quote uid=90573785 name="Mike724" post=1523376]OK, it's done. You can download it here: <Edit by Moderator: Redacted mediafire url>

    Disclaimer: This plugin has not been verified by Bukkit staff, use it at your own risk.

    Commands:
    /roster add some text you want to add
    /roster remove some text you want to remove

    Spaces in the text are supported. Capitalization IS important, it will not ignore caps for now.

    Permissions:
    Roster.add
    Roster.remove

    The roster is saved at /plugins/Roster/roster.txt

    Example usage in a command block:
    /roster add @p
    /roster remove @p

    To have it broadcast that a player has been added, use a 2nd command block.

    It's still very alpha, message me if anything goes wrong/a feature needs to be added.[/quote]
    can you also add so you can search for a name that is in the roster.txt file?
     
    Last edited by a moderator: Nov 8, 2016
  19. Offline

    sverre26

    Attached Files:

  20. Offline

    Mike724

    Is it possible that you can send me the roster.txt so I can test it on my own server and see if it crashes there? I haven't noticed any problems like that. That log isn't detailed enough, the plugin doesn't actually touch the roster.txt file until the /roster add or /roster remove command is invoked. So can you tell me what command is being run that causes the error?

    Do you mean a command like
    /roster contains some text here
    Which will tell you if the roster.txt contains that text
     
  21. Offline

    sverre26

    in the roster.txt file it only stands my ingame name (sverre26)
    can you also add the /roster contains command
     
  22. Offline

    Mike724

    Is there any reliable way for you to make the error happen? Like using one of the commands, etc. If not, it is likely another plugin causing the issue. This plugin doesn't really do anything until a command is called.

    Yeah, I will work on doing a /roster contains command. I'll try to get it done ASAP.

    For now, let's move this to a PM/conversation so we can stop bumping this topic.
     

Share This Page