Filled Custom Plugin

Discussion in 'Plugin Requests' started by iOnixS, Oct 16, 2015.

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

    iOnixS

    Okay, so i would like a plugin where, if you say something like "Hello, im from planet minecraft, please give me OP to review your server" A fake chat will pop up with the name of "Server" Or something saying something like "Oh, gr8, plz rate the server 69/420" Just something stupid like that. Config should maybe be something like:

    ChatInput:
    - (input text here)

    ChatOutput
    - (input text here)

    I dont know, something like that.
    Thanks, Adam.

    E: If there is a plugin for this, please link me!
     
  2. Offline

    DoggyCode™

    Yea, sure I'll make this for you.
     
  3. Offline

    Scimiguy

    @DoggyCode™

    Still doing this? Seems like a 20 min project for me
     
  4. Offline

    iOnixS

    I haven't recived a message, may you please do ths for me? Thanks so much man! <3
     
  5. Offline

    Scimiguy

    @iOnixS

    @DoggyCode™ hangs around the forums often, so I'll wait for a response from him first
     
    iOnixS likes this.
  6. Offline

    tkuiyeager1

  7. Offline

    iOnixS

    Yes please. Thanks
     
  8. Offline

    tkuiyeager1

    @iOnixS i also need to wait for DoggyCode response
     
    iOnixS likes this.
  9. Offline

    Scimiguy

    @tkuiyeager1

    Feel free, I only make them to the the threads solved quickly.
    I'd much rather other people make them and learn something from them instead if possible
     
    iOnixS likes this.
  10. Offline

    tkuiyeager1

    so your saying i should start making it now? i should not wait for DoggyCode?
     
  11. Offline

    iOnixS

    Yes, please make this asap. Thanks <3
     
  12. Offline

    tkuiyeager1

    done here is the link.
    have not tested.
     
  13. Offline

    ObviouslyDuck

    Can you post java code on GH?
     
  14. Offline

    tkuiyeager1

    @ObviouslyDuck here is the code:
    Code:
    package me.tkuiyeager1.customplugin;
    
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.AsyncPlayerChatEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Main extends JavaPlugin implements Listener {
    
        @Override
        public void onEnable() {
            Bukkit.getServer().getPluginManager().registerEvents(this, this);
        }
    
        @EventHandler
        public void onChat(AsyncPlayerChatEvent e) {
            if (e.getMessage().contains(getConfig().getString("ChatInput"))) {
                e.getPlayer().sendMessage(
                        ChatColor.translateAlternateColorCodes('&', getConfig()
                                .getString("ChatOutput")));
            } else {
                return;
            }
        }
    
    }
    
    and here is the config:
    Code:
    ChatInput: Hello, im from planet minecraft, please give me OP to review your server
    ChatOutput: "&2[Server] &rOh, gr8, plz rate the server 69/420"
    @iOnixS please go to the download link again, i updated it again
     
  15. Offline

    iOnixS

    Thank you! is there a way i can add more text to it? Like more inputs and outputs?
     
  16. Offline

    tkuiyeager1

    i dont think so becu lets say:
    Code:
    ChatInput:
    - test
    - test1
    - test2
    
    ChatOutput:
    - testoutput
    - test1output
    - test2output
    i dont know how to get the first and the second and the third and more like this, maybe someone else can do this
     
  17. Offline

    iOnixS

    Okay, just a question, do you use eclipse?
     
Thread Status:
Not open for further replies.

Share This Page