Drinks

Drinks!

DrinksCMD - Get drunk with your friends!

Drinks

Have you ever wanted to get drunk with friends in minecraft?

Now you can! My plugin adds a lot of configurable drinks!

DrinksCmd version:

Features:

  • Get drunk with your friends!
  • Enjoy drinking a lot of drinks!
  • Pay for drinks!
  • Setup sign shops with drinks!
  • Permissions
  • Fully configurable effects & costs

Commands & Permissions:

CommandInfoPermission
/beerDrink beer!drinks.beer / drinks.admin / drinks.client
/milkRemove all potion effects!drinks.milk / drinks.admin / drinks.client
/vodkaDrink vodka!drinks.vodka / drinks.admin / drinks.client
/wineDrink wine!drinks.wine / drinks.admin / drinks.client
/cocacolaDrink cocacola!drinks.cocacola / drinks.admin / drinks.client
/monsterdrinkDrink monsterdrink!drinks.monsterdrink / drinks.admin / drinks.client
/tequilaDrink tequila!drinks.tequila / drinks.admin / drinks.client
/brandyDrink brandy!drinks.brandy / drinks.admin / drinks.client
/coffeeDrink coffee!drinks.coffee / drinks.admin / drinks.client
/champagneDrink champagne!drinks.champagne / drinks.admin / drinks.client
/rdrinksReload configuration file!drinks.admin
/drinksList of available drinks!drinks.admin / drinks.client / drinks.createshop
Create sign shop!drinks.admin / drinks.createshop

Creating a shop:

If you want to create a shop, simply follow these steps:

  • Give yourself drinks.createshop or drinks.admin permission
  • Place a sign
  • In first line write (it's case sensetive!): [Drinks]
  • In second line write drink name (you can check list of them with /drinks command) for example: beer
  • In third line write cost of the drink (it's custom, no matter what you typed in configuration file) for example: 5
  • In the last line type whatever you want (you can leave it blank) for example: The best beer!
  • Click done, you should see a message on your chat saying that you setted up a shop
  • Right click the sign to buy a drink! (you need drinks.client or drinks.admin or drinks.[drink name] permission to use the shop)

Example of a sign shop: Drink Shops


Configuration:


Requirements:

  • Vault
  • Any economy plugin compatible with vault
  • Any permissions plugin compatibbale with vault

Installation:

  • Stop your server
  • Install all required plugins (Vault, Economy plugin and Permissions plugin)
  • Drop Drinks.jar to your plugins folder
  • Start your server
  • Add permissions (drinks.client, drinks.createshop, etc.) for groups or/and players
  • Enjoy Drinks!

To do:

  • Update for:
    • CB 1.3.2 - ready :)
    • CB 1.5.2 - ready
  • Add more drinks!
    • vodka - work in progress... ready to test!
    • wine & 6 more ready to test!
  • Add config! ready to test!
  • Cmd version ready to test!
  • some secret stuff

Changelog:

v1.0

  • Initial release.

v1.1

  • Added McStats tracker.

v2.0

  • Players now drop glass bottle after drinking.
  • Added vodka.

v3.0

  • Added configuration:
    • cost
    • customizable potion effects (power and time too)
  • Added 7 drinks:
    • wine
    • cocacola
    • monsterdrink
    • tequila
    • brandy
    • coffee
    • champagne

v3.1

  • Added tutorial to configuration file.
    • (Delete Drinks FOLDER from your plugins folder if you want to see changes in configuration)

CMD v1.0

  • Added "dropbottle" option in config

CMD v1.0.1

  • Updated for CB 1.5.2-R1.0
  • Added new effects (Invisibility and Night Vision)
    • (Delete Drinks FOLDER from your plugins folder and restart/reload the server if you want to see changes)

CMD v1.2

  • Redesigned permissions to make them user-friendly
    • new permissions:
    • drinks.client
    • drinks.createshop
  • /rdrinks command - reload configuration
  • /drinks command - list of available drinks
  • Added sign shops

Tutorial in Portuguese made by AbsintoJ:


MCstats


Thanks for using my plugin!

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of iamm99 iamm99 Aug 12, 2014 at 01:19 UTC - 0 likes

    dose it still work?

  • Avatar of LaoTheLizard LaoTheLizard Nov 03, 2013 at 09:16 UTC - 0 likes

    Also, I'd be grateful for your original sources. Decompiling is not ideal decision - some errors are present yet.

    Update: I fixed error, finally. It was an error-report in console each time, when player right-clicked any sign. Here is decision:

    if(action == Action.RIGHT_CLICK_BLOCK)
            {
                if((mat == Material.SIGN_POST) | (mat == Material.WALL_SIGN))
                {
                    org.bukkit.block.BlockState state = event.getClickedBlock().getState();
                    Sign sign = (Sign)state;
                    Player player = event.getPlayer();
    //                int cost = Integer.parseInt(sign.getLine(2)); //old place
    //                int cb = cost - 1;
                    if(event.getPlayer() instanceof Player)
                    {
                        if(sign.getLine(0).equals("[Drinks]"))
                        {
                            int cost = Integer.parseInt(sign.getLine(2)); // new place
                            int cb = cost - 1; // new place
    
    Last edited Nov 04, 2013 by LaoTheLizard
  • Avatar of LaoTheLizard LaoTheLizard Nov 03, 2013 at 03:26 UTC - 0 likes

    Important bug found. Each time I tried to edit config.yml, it gone to reset and my settings was not apply. I decompile all classes, explored the code and found wrong block. Here is:

    public DrinksCMD()
        {
            config = new File("plugins/DrinksItem");
            debugging = false;
            logger = Logger.getLogger("Minecraft");
        }
    

    As you know, the config folder is DrinksCMD. But here is folder named DrinksItem. This is cause plugin decided that config.yml is absent and rewrote it time-to-time. And I couldn't edit prices, effects and all other settings. I fixed it in my file. So fix it in your.

    P.S. Sorry for my poor english.

  • Avatar of ToxicShad0w ToxicShad0w Aug 30, 2013 at 19:17 UTC - 0 likes

    @MM1990d: Go

    Are you open to the idea of having custom drinks being defined in the config? Like, using a template to define our own drinks in the config?

  • Avatar of MM1990d MM1990d Aug 25, 2013 at 22:28 UTC - 0 likes

    Sorry that I left the plugin again, I was really pissed off because I screwed up my linux system & lost all my data. I'll try to continue soon.

    @CroOne123: Go

    I'll add a feature for this in next version.

    @DeadlyElite: Go

    I'm not planning to add recipes, at least not before finishing other stuff that I want to do.

  • Avatar of DeadlyElite DeadlyElite Aug 20, 2013 at 15:18 UTC - 1 like

    Could you add crafting recipes?

  • Avatar of CroOne123 CroOne123 Aug 04, 2013 at 09:34 UTC - 0 likes

    how to make so players can buy only with signs drinks not with /commands?so i mean that players can not use /commands for this plugin,only signs?

  • Avatar of AznChrisX AznChrisX Jul 16, 2013 at 20:37 UTC - 1 like

    Oooo. Ok thanks a lot! Not that much a problem, but thanks! :D

  • Avatar of MM1990d MM1990d Jul 16, 2013 at 11:40 UTC - 0 likes

    @AznChrisX: Go

    It's because you typed in 5.00. Type in just 5 and it will work okay, I'll try to fix this bug once I'll have some time, thanks for report.

  • Avatar of AznChrisX AznChrisX Jul 15, 2013 at 15:23 UTC - 1 like

    When I use sign shops (permissions added and set already) I get this error in console (even if I just used OP and no permissions) while using craftbukkit 1.6.2. When I click the sign nothing happens in game but the message on the bottom appears in console. What it says exactly on the sign is: [Drinks] wine 5.00

    2013-07-15 08:16:33 [SEVERE] Could not pass event PlayerInteractEvent to DrinksC MD v1.2 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:462) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callPlayerInte ractEvent(CraftEventFactory.java:192) at net.minecraft.server.v1_6_R2.PlayerInteractManager.interact(PlayerInt eractManager.java:373) at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java :630) at net.minecraft.server.v1_6_R2.Packet15Place.handle(SourceFile:58) at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296 ) at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java :118) at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:3 0) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:5 90) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:2 26) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:4 86) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java :419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:5 82) Caused by: java.lang.NumberFormatException: For input string: "5.00" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at me.mm1990d.DrinksCMD.DrinksListener.onPlayerInteract(DrinksListener.j ava:144) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:425) ... 16 more

Facts

Date created
Sep 09, 2012
Categories
Last update
Jul 06, 2013
Development stage
Release
Language
  • enUS
License
GNU General Public License version 3 (GPLv3)
Curse link
Drinks
Downloads
13,693
Recent files

Authors