Giter VIP home page Giter VIP logo

moneypouch's Introduction



MoneyPouch

About

This plugin allows you to create pouches, which contain a random amount of money.

Downloads/Building

The latest release version of MoneyPouch can be found on

Alternatively, you can build MoneyPouch via Gradle from source using gradlew.

You can include MoneyPouch in your project using JitPack:

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<!-- MoneyPouch -->
<dependency>
    <groupId>com.github.LMBishop</groupId>
    <artifactId>MoneyPouch</artifactId>
    <version>master-SNAPSHOT</version>
<dependency>

Gradle

repositories {
    maven { url = 'https://jitpack.io' }
}  
dependencies {
    // MoneyPouch
    compileOnly 'com.github.LMBishop:MoneyPouch:master-SNAPSHOT'
}

Contributors

See https://github.com/LMBishop/MoneyPouch/graphs/contributors

Support

For support please open a GitHub issue or join our Discord server. Please provide information of the issue, any errors that may come up and make sure you are using the latest version of the plugin.

Issue Tracker

This is the preferred method of bug reporting & feature requests. Please use one of the two templates which are provided. If it is neither a bug report or a feature request and is a question, Discord would be a better place to asked this instead. Follow the template in the issue tracker. There is nothing more frustrating than people not reporting a bug correctly by missing out vital steps to reproduce the bug or an incomplete description. If the issue is not correctly formatted, it will be closed and ignored.

Discord

This is the preferred method for general questions about MoneyPouch or the development of the project.

Language

Please speak English and do not use any vulgar or harmful language. We work on this project in our free time, getting mad at us if things do not work will not achieve anything.

License

The source code for MoneyPouch is licensed under the GNU General Public License v3.0, to view the license click here.

The artwork for MoneyPouch is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License , to learn more click here.

Configuration Assistance

The configuration documentation can be found at the wiki.

Contributing

We welcome all contributions, we will check out all pull requests and determine if it should be added to MoneyPouch.

Assistance of all forms is appreciated 🙂

Guidance

  • ensure Java 8 is installed on your machine (release versions are compiled against Java 8)
  • fork this repository and clone it
  • edit the source code as your please
  • run gradlew in the base directory to build MoneyPouch
  • push to your fork when ready & submit a pull request

Contribution Guidelines

If you plan on contributing upstream please note the following:

  • discuss large changes first
  • indent the file with 4 spaces
  • take a look at how the rest of the project is formatted and follow that
  • do not alter the version number in build.gradle, that will be done when the release version is ready
  • limit the first line of commit messages to ~50 chars and leave a space below that
  • test your changes on the latest Spigot version before making a pull request

By contributing to MoneyPouch you agree to license your code under the GNU General Public License v3.0.

moneypouch's People

Contributors

blackbeltpanda avatar lmbishop avatar thesummergrinch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

moneypouch's Issues

Custom Player Head instead of material

I want to use a custom player head (with a set texture) instead of something else, is this currently possible with MoneyPouch?

If possible, I would like to specify the head data in a base64-encoded string (allows the use of HD heads).

Useage permission for players

We would like to see the adding of useage permission for the pouches so we could deny useage of pouches in some worlds.

Reason: sometimes we give puches as rewards to players. We want to deny the useage for these players when they are in one of our creative or testing worlds.
Therefor we would need a permission that allows players to use the pouches. Then we could deny it in certain worlds.

Currently we solves it by letting annother Dev adding these needed permission into your plugin. But it would be nice if we could use also further versions of your original plugin from spigots site :)

Placeholderapi support for more "economytype"?

Hello can you add support to placeholderapi placeholders with command type example:

Token-1:
  name: "Tokens"
  item: "CHEST"
 command: tokens give player %amount%
  pricerange:
    from: 10
    to: 100
  options:
   economytype: "%placeholder_api_placeholder%"
  lore:
    - "&7Open this pouch to receive Tokens!"

Is tha possible to be done?

Error on opening pouch

When im trying to open some pouch of money it gives me this error:

[18:02:35 ERROR]: Could not pass event PlayerInteractEvent to MoneyPouch v3.1
java.lang.IllegalArgumentException: bound must be greater than origin
at java.util.concurrent.ThreadLocalRandom.nextLong(Unknown Source) ~[?:1.8.0_241]
at com.leonardobishop.moneypouch.events.UseEvent.usePouch(UseEvent.java:63) ~[?:?]
at com.leonardobishop.moneypouch.events.UseEvent.onPlayerUse(UseEvent.java:55) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor273.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.2.jar:git-Paper-334]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.15.2.jar:git-Paper-334]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-334]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.15.2.jar:git-Paper-334]
at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:471) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.PlayerInteractManager.a(PlayerInteractManager.java:456) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1413) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:5) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1097) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1090) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1051) ~[patched_1.15.2.jar:git-Paper-334]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:966) ~[patched_1.15.2.jar:git-Paper-334]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]

Using Paper 1.15.2 (Compilation 334)

Bug in translation (in chat when shop is disabled)

# Messages here
messages:
  no-perm: "&6Du kannst diesen Paket in dieser Welt nicht benutzen."
  full-inv: "&c%player%'s Inventar ist voll!"
  give-item: "&e%player% wurde eine %item%&6 gegeben."
  receive-item: "&6Du hast eine %item% &6erhalten."
  prize-message: "&6Du erhälst &c%prize%%prefix%%suffix%&6!"
  aready-opening: "&cBitte warten Sie, bis die aktuelle Kistenöffnung abgeschlossen ist!"
  inventory-full: "&cDein Inventar ist voll."
  purchase-success: "&6Du hast %item%&6 für &c%prefix%%price%%suffix%&6 erhalten."
  purchase-fail: "&cDu hast nicht &c%prefix%%price%%suffix%&6."
  shop-disabled: "&cDer Paketeladen ist deaktiviert."

Snag_2bcd40c

Ingame you still see the english line.
so its missing or taking the line from wrong place...

Custom Player Head Not Working

Running MoneyPouch v3.6.1 on Purpur v1.17.1

After specifying the "owner-base64" value in the config with an Item Type "PLAYER_HEAD", the plugin only gives an unskinned player head. This is what the config section looks like:

pouches:
  tier:
    # Define pouches here
    commonMoney:
      name: "&6&lCommon Money Pouch &r&7(Right Click)"
      item: "PLAYER_HEAD"
      owner-base64: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjM0MzQ4ZDMzOWE3YmRiYjRkYzNlYTM5YzM0NDQ3Y2E3NjM4NDZiMjllMDZmNTY4ZTBjOGM1MjE5MjAzZGY5ZiJ9fX0="
      pricerange:
        from: 1000
        to: 5000
      options:
        economytype: "VAULT"
      lore:
        - "&7Open this pouch to receive money!"

pouches wont work via crates

The pouches work normally if given via /mp command; however when given to p layers via vote crates the items are given but when placed it acts as an vanilla block; how do i fix this?

wrong economytype? what i do wrong?

Snag_181c12c

    karottenkiste-1:
      name: "&6&lEine echte Karottenkiste &r&7(Rechtsklick)"
      item: "CHEST"
      pricerange:
        from: 2
        to: 5
      options:
        economytype: "karottenkiste-1"
        permission-required: true      # requires permission "moneypouch.pouches.karottenkiste-1"
      lore:
        - "&7Öffne diese Kiste, um Karotten zu erhalten!"
# Economy prefixes and suffixes
economy:
  xp:
    prefix: ""
    suffix: " XP"
  vault:
    prefix: "$"
    suffix: ""
  lemonmobcoins:
    prefix: ""
    suffix: " Mobmünzen"
  karottenkiste-1:
    prefix: ""
    suffix: " Möhren"

Snag_18443ff

So what have i dont wrong here?

Add an "open-all" setting

a way to open all the money pouches at once as well as one by one with an option in the config would be convenient

1.21 support?

My players love this plugin, sadly it broke in 1.21.

The plugin loads, shows no console errors, and is green in /plugins. Players can receive the pouch, but it simply doesn't work to right-click, nothing happens. Is anybody here able to fork it to support 1.21?

prefix

cannot change the economy prefix

1.20.1 support

title, this plugin is great, will it get 1.20.1 support?

Duplicate money boxes endlessly

we have a big problem. We use MoneyPouch. if the users vote they get a vault box as a thank you. Now I have discovered when the votes are in the creative world and they also get the boxes and can multiply them as desired !!! can you create a permission that forbids using it in certain worlds?

new economyvariants buggy because of same item?

i designted a test item

    karottenkiste-1:
      name: "&6&lEine echte Karottenkiste &r&7(Rechtsklick)"
      item: "CHEST"
      pricerange:
        from: 2
        to: 5
      options:
        economytype: "karottenkiste.yml"
        permission-required: true      # requires permission "moneypouch.pouches.karottenkiste-1"
      lore:
        - "&7Öffne diese Kiste, um Karotten zu erhalten!"
economy:
  xp:
    prefix: ""
    suffix: " XP"
  vault:
    prefix: "$"
    suffix: ""
  lemonmobcoins:
    prefix: ""
    suffix: " Mobmünzen"
  karottenkiste.yml:
    prefix: ""
    suffix: " Möhren"

the custom file i called karottenkiste,yml and putted it into the new custom ecoomy folder..
Snag_a56237f

# This is an example of a custom economy
# The expected behaviour is for this to be a pouch containing diamonds, rather than money,
# however you can use this feature to make this plugin compatible with any economy plugin,
# as long as there is a command to give money.
#
# The name of this file is the id of the economy, and must be alphanumeric with no spaces and unique
# The command below will be executed when a player opens a pouch of this economy, replace %player% with the player
# and %amount% with the amount
transaction-prize-command: "cmi give %player% carrot %prize%"

# You can configure the prefixes/suffixes the normal way in the main config

little side issue:
(in the example yml it sais %amount% in the command %prize% ...
so one seems to be wrong here)


server was reststarted

now instead of getting some carrots i got money,, like the Moneybox - that has a normal chest as item too....

So i Asume this is a bug.. or the whole new feature does not work...?

Snag_a4de2a5

Snag_a4f9045

Snag_a4ff96f

Dupe bug

Easy dupe in moneypouch : just place pouches on your left hand and place it
(Tried on latest plugin version on paper 1.16.5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.