Plugins for Server

Discussion in 'Plugin Development' started by MrGamingLion66, Sep 17, 2016.

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

    MrGamingLion66

    Hello everyone. I am making plugins for my friends server. However I'm really bad at finding resources on the internet for plugins and such and would like some tips. Below is a list of plugins I wish to make with specific details on each plugin. I was wondering if anyone can give me tips and resources for these?

    Plugins (open)

    1. Chat Filer
    - Stops people from cussing
    - Stops people from spamming
    - Stops people from advertising other server and other things like that

    2 Scoreboards
    - Has one of those sidebar scoreboards like a lot of servers do (also updates when players get more in game currency, see 3)
    - Has a one of those scoreboard/title above the screen
    - When a user hovers over the player on the server, instead of listing a few player has more info on the server

    3 Currency Counter
    - Counts the currency a player has a updates the sidebar scoreboard from number 2

    4. GUI's
    - A GUI that displays the games available and allow you to join the respective lobbies
    - A GUI for survival words that activates when a player either clicks on the survival icon in the previous GUI or click on the in game sign for that game.

    5. Players Statues (note: i'm not sure if this need to be accomplished by a plugin or some other route)
    - Something that make an actual player with custom skin at a certain place, like how a lot of server do it.

    6. Shop
    Something that allows you buy kit, arrow effect, pets, etc. with the in-game currency (number 3)

    7. Register command
    - A command that allows you register the world you are in as a certain minigame and runs that minigame.
    - It will send chat messages and allow the player to click on certain settings and then give them a sign that when clicked will take them to that world game.
    - Games that they can register a map as: Sky Wars, Hunger Games, Capture the Flag, The Walls, Spleef, Zombie Apocalypse, One in the Chamber.
    - Also can register the map as team or solo (15 v 15 or 10 v 10, in the case of CTF)
    - Can register map as normal or crazy mode.
    - Allows them to select spawn point for each player. Makes sure the player can't leave spawn until game starts.
    - Makes sure the game doesn't start until minimum amount of players join.
    - Changes the sidebar scoreboard to details on the game they are in (map name, player still alive, etc.).
    - Auto refills any chests in the map when need, randomizes chest contents at the beginning and during the game.
    - Resets the maps when the game is over.


    If anyone can give me resources on how to do these/tips it would be greatly appreciated.
     
  2. Offline

    Zombie_Striker

    @MrGamingLion66
    I think you should focus one plugin at a time. Since we are here to help solve problems/issue, not necessarily do figure out how to make these things, I recommend you first attempt to make each plugin on your own (however you can), and make a separate thread if you run into any problems.
     
  3. Offline

    MrGamingLion66

    @Zombie_Striker
    Thanks for the tips I was mostly looking for tutoriols and or resources to help me get started. Can anyone help with that?
     
  4. Offline

    JanTuck

    Search "Pogostick bukkit tutorials" on youtube

    Sent from Tapatalk
     
  5. Offline

    Zombie_Striker

    @JanTuck
    I think he means resources for each specific plugin.
     
  6. Offline

    JanTuck

    Ohh

    Sent from Tapatalk
     
  7. Offline

    mythbusterma

    @MrGamingLion66

    Most of these plugins have already been done 100's of times before. Almost all of that is available for free, without putting in any effort on dev.bukkit.org. Why spend the time to reimplement them?

    Also, chat filters never work, and are entirely pointless. I wish people would stop trying to make them. There is no substitute for a moderator.
     
  8. Offline

    frostalf

    @MrGamingLion66 Most of the plugins you are attempting to create have already been created before and most of them also happen to be open source, meaning you are free to modify them/tailor to your specific needs. But @Zombie_Striker is right and you should focus on making 1 plugin at a time.

    @mythbusterma While you are correct to an extent, chat filters do help to an extent as well. Also depends how the chat filter is created as well. I have seen some pretty darn good chat filters. Again just depends how well its coded. But you are right that you still need a moderator because there are ways around filters. But if chat filters were pointless, then explain why other major games still implement them lol.
     
  9. Offline

    MrGamingLion66

    Thanks everyone for the tips. The idea was that most of the plugins are custom made. I would still like any other tips though.
     
  10. Offline

    mythbusterma

    @frostalf

    Legal reasons, also to maintain some semblance of "cleanliness," but there will always be ways around chat filters, especially ones you slap together yourself.

    They are very much pointless, and I've never seen one on an MC server do anything but incense players.

    @MrGamingLion66

    Another thing I don't understand, why people have a desire to have "custom made" plugins. I understand if there's a bit of branding you want to do with your server, but that can be accomplished by a small plugin that is very limited in scope. Or perhaps for things that haven't been done already. But for well, well trodden territory like a chat filter, you should just use someone else's. You'll save your time, and it will likely work better.

    Wouldn't you rather spend the time making unique mini games for your server, as you talked about above, rather than making the 10,000,000th chat filter plugin? Or is this some awful bastardisation of not invented here.
     
  11. Offline

    MrGamingLion66

    @mythbusterma
    Thanks for the tips of the chat filter. I know there will be ways to bypass the filter but it is also supposed to stop spamming and advertising as well which I think might work better. Also i'm not sure if I know what you mean be moderator. Also we do have a custom mini-game that I need to make a plugin so coding the custom plugins will help me get practice and is good for the server.

    @frostalf
    @Zombie_Striker
    Also everyone is saying I should focus on one plugin at a time. I decided to start by making an ingame currency. I'm not entirely sure how to do this and make sure that the currency saves when the server is shut down and stuff can anyone help me do this?
     
  12. Offline

    mythbusterma

    @MrGamingLion66

    I'd recommend limiting the rate at which people can type, along with not allowing URLS. But the point I'm trying to make is you need server moderators, and no chat filter is going to help with that, and since the moderator is there, you mightaswell not have one.

    I suppose if you want practise, but you could make something actually useful, like your scoreboard stuff.

    Why not just use Essentials's money? That has Vault integration, and doesn't require any work (and I promise you will regret not being able to use Vault).

    If you have questions about that, you should make a new thread, but the information you're looking for is here: http://wiki.bukkit.org/Configuration_API_Reference
     
  13. Offline

    Zombie_Striker

    @MrGamingLion66
    As @mythbusterma said, you should use vault for your currency. It's already pre-built and is easy to use. After you set up the econ instance, you can withdraw/deposit money using "economy.withdraw(player, amount);" To download vault/ learn how to use it, look at THIS page.
     
  14. Offline

    MrGamingLion66

    Thank you everyone for the responses. I just check with the server owner and he said that he wants a custom plugin for the currency. How would I do that?
     
  15. Offline

    mythbusterma

    @MrGamingLion66

    Well tell him he's wrong. He will regret not having Vault, as no plugin will be able to integrate with your economy without a compatibility layer, which takes time to write and has to be done for every plugin you add.

    Unfortunately, Vault is the standard, and it only provides abstraction in one direction (i.e. many plugins can use it, but it exposes no public API for adding your own economy).

    If you absolutely insist on having your own money (for some odd reason), just keep track of a number associated with each player, likely in a configuration file. Keep in mind it's possible to change all of Essentials's messages and the currency marker (i.e. not using '$'), and if you want an item based economy, Gringotts is compatible with Vault and allows you to configure any item as the currency.
     
    bwfcwalshy likes this.
  16. Offline

    Zombie_Striker

    @MrGamingLion66
    Download vault. There really is no reason to re-invent the wheel. Vault will do just fine.
     
    bwfcwalshy likes this.
  17. Offline

    MrGamingLion66

    Do I integrate it into the code, or just use it on the server?
     
  18. Offline

    mythbusterma

    @MrGamingLion66

    Again, keep in mind that the economy plugin must be one of the ones listed on Vault's page, although any plugin can use it to add and subtract money.

    I suppose, in theory, it would be possible to use essential's money, but override the /pay, /eco, etc. commands with your own, but still maintain compatibility with other plugins (not that that's a good idea, but it is possible).
     
  19. Offline

    MrGamingLion66

    Hello everyone, I recently checked with the servers owner once again and doen't want to use the vault thing.
    I made a scoreboard and an example yml for the this but I need some help on it.

    Code:
    public void setupScoreboard(Player p) {
            ScoreboardManager sm = Bukkit.getScoreboardManager();
            Scoreboard onJoin = sm.getNewScoreboard();
            Objective o = onJoin.registerNewObjective("dash", "dummy");
          
            o.setDisplaySlot(DisplaySlot.SIDEBAR);
            o.setDisplayName(ChatColor.AQUA + "================");
          
            Score title = null;
          
            Score spacer = null;
          
            Score nameTitle = null;
            Score name = null;
          
            Score spacer2 = null;
          
            Score ipTitle = null;
            Score ip = null;
          
            Score spacer3 = null;
          
            Score coinsTitle = null;
            Score coins = null;
          
            Score spacer4 = null;
          
            Score rankTitle = null;
            Score rank = null;
          
            Score cutOff = null;
          
            try {
              
                title = o.getScore(ChatColor.RED + "" + ChatColor.BOLD + "CRIMSON " + ChatColor.GOLD + "" + ChatColor.BOLD + "CENTRAL");
                title.setScore(14);
              
                spacer = o.getScore((ChatColor.AQUA + ""));
                spacer.setScore(13);
              
                nameTitle = o.getScore(ChatColor.DARK_RED + "Name:");
                nameTitle.setScore(12);
              
                name = o.getScore(ChatColor.GREEN + p.getName());
                name.setScore(11);
              
                spacer2 = o.getScore(ChatColor.RED + "");
                spacer2.setScore(10);
              
                ipTitle = o.getScore(ChatColor.BLUE + "IP: ");
                ipTitle.setScore(9);
              
                ip = o.getScore(ChatColor.RED + "crimson-central.com");
                ip.setScore(8);
              
                spacer3 = o.getScore(ChatColor.GRAY + "");
                spacer3.setScore(7);
              
                coinsTitle = o.getScore(ChatColor.GOLD + "Gold Coins: ");
                coinsTitle.setScore(6);
              
                coins = o.getScore(ChatColor.GREEN + "0");
                coins.setScore(5);
              
                spacer4 = o.getScore(ChatColor.AQUA + "");
                spacer4.setScore(4);
              
                rankTitle = o.getScore(ChatColor.RED + "Rank: ");
                rankTitle.setScore(3);
              
                rank = o.getScore(ChatColor.YELLOW + "No Rank");
                rank.setScore(2);
              
                cutOff = o.getScore(ChatColor.AQUA + "   ================");
                cutOff.setScore(1);
              
              
                p.setScoreboard(onJoin);
              
            } catch (Exception ex)
            {
                System.out.println("ex");
            }
        }
    Here is the example yml:
    Code:
    PlayerInfo:
        playername:
            GoldCoins:
                900
            Rank:
                Titan
        playername1:
            GoldCoins:
                1000
            Rank:
                 No Rank
    I want to make so that when a new player joins the game they get a currency counter like the one above. Also the scoreboard auto-matically updates the scoreboard when the currency counter changes. Finally I want to make it so that I can add money to this counter at any point in the code.
    With the ranks I want to save it as a default, no rank when a player joins the game for the first time. But I want it to display whatever rank it says on the scoreboard.
    Can anyone help?
     
  20. Offline

    Zombie_Striker

    @MrGamingLion66
    What is your issue? You have not posted any code that does anything like what you stated and you are not telling us what is wrong. We need to know what lines are broken in order to help you.
     
  21. Offline

    JanTuck

    If they dont want Vault they are seriosly off, Vault is one of the most useful apis out there.

    Sent from Tapatalk
     
    Last edited: Sep 21, 2016
    Zombie_Striker likes this.
Thread Status:
Not open for further replies.

Share This Page