Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5c61077
Add UUID support to Vault.
LlmDl Apr 4, 2021
747940c
Improve UUID methods' names, dropping the word Player.
LlmDl Sep 28, 2021
e0743da
Remove the now un-needed AbstractEconomy class.
LlmDl Oct 12, 2021
b1e408b
Update pom with tentative version numbering.
LlmDl Jun 28, 2022
6570692
Deprecate vault package.
LlmDl Jun 28, 2022
5348352
Add vault2 package.
LlmDl Jun 28, 2022
1a73308
Economy v2.
LlmDl Jun 28, 2022
918bda2
Update README to include new version, example code.
LlmDl Jun 28, 2022
7129ffb
Add account name to the createAccount method.
LlmDl Jun 28, 2022
698c623
Fix typo in JavaDoc
LlmDl Aug 3, 2022
1af24b2
Fix typo in JavaDoc
LlmDl Aug 3, 2022
7c7d0ab
Implement requested changes.
LlmDl Aug 3, 2022
3ed3ad7
Merge branch 'master' into feature/uuid_support
LlmDl Dec 10, 2023
d739d52
Replace double usage with BigDecimal, to bring Vault2 further into the
LlmDl Dec 11, 2023
79bb998
Remove unneeded space in the readme, while we're already altering the
LlmDl Dec 11, 2023
b52495b
Alter readme to use BigDecimal in example.
LlmDl Dec 11, 2023
c491a54
Rebranded to VaultUnlocked because accepting PRs and adding actual im…
creatorfromhell Jun 12, 2024
5776aaf
Update Maven compiler plugin
creatorfromhell Jun 12, 2024
7d94726
Update README.md.
creatorfromhell Jun 12, 2024
3fb336e
Remove abstracteconomy, it wasn't even that abstract
creatorfromhell Jun 12, 2024
6e69e20
Update gitignore
creatorfromhell Jun 12, 2024
ab14d7f
Update gitignore
creatorfromhell Jun 12, 2024
d7441f2
Merge branch 'pr/138'
creatorfromhell Jun 12, 2024
6a88d39
Cleanup code from vault2.
creatorfromhell Jun 12, 2024
eb5b5c6
Multicurrency support, and plugin name for transactions to attach sou…
creatorfromhell Jun 12, 2024
b4ff409
List -> collection.
creatorfromhell Jun 12, 2024
9f70379
Optional for last known name since it could not exist depending on ca…
creatorfromhell Jun 12, 2024
41028be
Add alt format method.
creatorfromhell Jun 12, 2024
b4267e3
Update pom.
creatorfromhell Jun 12, 2024
a36fcb4
Update pom.
creatorfromhell Jun 12, 2024
4f68b49
Add NotNull to specific methods for clarity.
creatorfromhell Jun 13, 2024
f60ac4f
Update README.md
creatorfromhell Jun 13, 2024
f158f98
Update version.
creatorfromhell Aug 11, 2024
92bc7ae
Update Version; Readd AbstractEconomy to old source branch.
creatorfromhell Aug 25, 2024
741f317
Replace banks with accounts that have members and permissions.
creatorfromhell Aug 30, 2024
ff79045
Added "String pluginName" parameter to display function
Fedjoyd Oct 6, 2024
c6c69d6
Update maven.yml
creatorfromhell Oct 6, 2024
f781fc9
Update maven.yml
creatorfromhell Oct 6, 2024
b5e6492
Update maven.yml
creatorfromhell Oct 6, 2024
85f8288
Update maven.yml
creatorfromhell Oct 6, 2024
f098820
Merge pull request #10 from Fedjoyd/patch-1
creatorfromhell Oct 6, 2024
69b46bf
Update Version, Add Component for format methods, add deprecation.
creatorfromhell Oct 6, 2024
a6107cb
Add parameters config to the compiler configs.
creatorfromhell Oct 11, 2024
ebdabeb
Bump to 2.7, remove Component requirement.
creatorfromhell Oct 23, 2024
fc0f108
Update license header to LGPL for AccountPermission.
creatorfromhell Oct 23, 2024
6579ca3
Add deleteAccount method, and update parameters to be final for consi…
creatorfromhell Oct 23, 2024
5725fb0
Add new createAccount methods with parameter to indicate if player ac…
creatorfromhell Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: '8'
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build Release
run: mvn -B package --file pom.xml
- name: Build javadoc
run: mvn -B javadoc:jar --file pom.xml
#- name: Build javadoc
# run: mvn -B javadoc:jar --file pom.xml
- name: Stage the artifact
run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: VaultAPI
name: VaultUnlockedAPI
path: staging
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish VaultAPI to GitHub Packages
name: Publish VaultUnlockedAPI to GitHub Packages
on:
release:
types: [created]
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
/.project
/.settings
/bin/
/.idea/
/VaultAPI.iml
/VaultUnlockedAPI.iml
36 changes: 0 additions & 36 deletions .mvn/settings.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .utility/do-publish.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .utility/settings.xml

This file was deleted.

77 changes: 46 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# VaultAPI - Abstraction Library API for Bukkit Plugins - [![](https://travis-ci.org/MilkBowl/VaultAPI.svg?branch=master)](https://travis-ci.org/MilkBowl/VaultAPI)
# VaultUnlockedAPI - Abstraction Library API for Bukkit Plugins - [![Build Status](https://ci.codemc.io/job/creatorfromhell/job/VaultUnlockedAPI/badge/icon)](https://ci.codemc.io/job/creatorfromhell/job/VaultUnlockedAPI/)

How to include the API with Maven:
```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
<id>codemc-repo</id>
<url>https://repo.codemc.org/repository/maven-public</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultUnlockedAPI</artifactId>
<version>2.4</version><!-- Validate this is the most recent version from the CI -->
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -21,36 +21,49 @@ How to include the API with Maven:
How to include the API with Gradle:
```groovy
repositories {
maven { url 'https://jitpack.io' }
maven { url 'https://repo.codemc.org/repository/maven-public' }
}
dependencies {
compileOnly "com.github.MilkBowl:VaultAPI:1.7"
compileOnly "net.milkbowl.vault:VaultUnlockedAPI:2.4"
}
```

**Note**: The VaultAPI version has 2 numbers (major.minor), unlike Vault, which has 3. The 2 numbers in the VaultAPI will always correspond to the 2 beginning numbers in a Vault version to make it clear what versions your plugin will for sure work with.
**Note**: The VaultUnlockedAPI version has 2 numbers (major.minor), unlike Vault, which has 3. The 2
numbers in the VaultUnlockedAPI will always correspond to the 2 beginning numbers in a VaultUnlocked
version to make it clear what versions your plugin will for sure work with.

## Why Vault?
I have no preference which library suits your plugin and development efforts
best. Really, I thought a central suite (rather...Vault) of solutions was the
the proper avenue than focusing on a single category of plugin. That's where
the idea for Vault came into play.
## Why VaultUnlocked?
I have no preference regarding which library is best suited for
your plugin development efforts. I believe a central suite (or "Vault")
of solutions is a more effective approach than focusing on a single
category of plugins. This is the concept behind VaultUnlocked.

So, what features do I _think_ you'll like the most?
### Key Features You'll Appreciate

* No need to include my source code in your plugin
* Broad range of supported plugins
* Choice!
* **No Source Code Integration Needed**
VaultUnlocked operates as a standalone plugin, so you only need to obtain an instance of it. This prevents conflicts with multiple plugins using the same namespaces. Simply include VaultUnlocked.jar in your download zip file for seamless integration!
* **Extensive Plugin Support**
VaultUnlocked provides an abstraction layer not just for Economic plugins but for Permission plugins as well, ensuring broad compatibility.
* **Freedom of Choice**
One of the best aspects of Bukkit is the freedom to choose what to use. More options benefit developers, so here’s to embracing choice!

### Enhanced Features of VaultUnlocked

* **Multi-Currency Support**
* **More Friendly PR Acceptance**
* **Folia Support**

Let me know if you need any further modifications!

## License
Copyright (C) 2011-2018 Morgan Humes <[email protected]>
Copyright (C) 2024 Daniel "creatorfromhell" Vidmar

Vault is free software: you can redistribute it and/or modify
VaultUnlocked is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Vault is distributed in the hope that it will be useful,
VaultUnlocked is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
Expand All @@ -59,18 +72,20 @@ You should have received a copy of the GNU Lesser General Public License
along with Vault. If not, see <http://www.gnu.org/licenses/>.

## Building
VaultAPI comes with all libraries needed to build from the current branch.
VaultUnlockedAPI comes with all libraries needed to build from the current branch.

## Implementing Vault
Implementing Vault is quite simple. It requires getting the Economy, Permission, or Chat service from the Bukkit ServiceManager. See the example below:
## Implementing VaultUnlocked
Implementing VaultUnlocked is quite simple. It requires getting the Economy, Permission, or Chat service from the Bukkit ServiceManager. See the example below:

```java
package com.example.plugin;

import net.milkbowl.vault.chat.Chat;
import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.permission.Permission;
import java.util.logging.Logger;

import net.milkbowl.vault2.chat.Chat;
import net.milkbowl.vault2.economy.Economy;
import net.milkbowl.vault2.economy.EconomyResponse;
import net.milkbowl.vault2.permission.Permission;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
Expand All @@ -91,7 +106,7 @@ public class ExamplePlugin extends JavaPlugin {

@Override
public void onEnable() {
if (!setupEconomy() ) {
if (!setupEconomy()) {
getLogger().severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
getServer().getPluginManager().disablePlugin(this);
return;
Expand Down Expand Up @@ -134,8 +149,8 @@ public class ExamplePlugin extends JavaPlugin {

if(command.getLabel().equals("test-economy")) {
// Lets give the player 1.05 currency (note that SOME economic plugins require rounding!)
sender.sendMessage(String.format("You have %s", econ.format(econ.getBalance(player.getName()))));
EconomyResponse r = econ.depositPlayer(player, 1.05);
sender.sendMessage(String.format("You have %s", econ.format(econ.getBalance(player.getUniqueId()))));
EconomyResponse r = econ.depositPlayer(player.getUniqueId(), new BigDecimal("1.05"));
if(r.transactionSuccess()) {
sender.sendMessage(String.format("You were given %s and now have %s", econ.format(r.amount), econ.format(r.balance)));
} else {
Expand Down
72 changes: 47 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<artifactId>VaultUnlockedAPI</artifactId>
<version>2.7</version>

<name>VaultAPI</name>
<description>Vault is a Permissions &amp; Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves.

Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms, bPerms2, SimplyPerms, DroxPerms, zPermissions, rscPermissions, KPerms, Starburst, iConomy (4/5/6) BOSEconomy *6/7), EssentialsEcon, 3Co, MultiConomy, MineConomy, EconXP, eWallet, CurrencyCore, XPBank, CraftConomy, AEco, SDFEconomy, TAEcon
</description>
<name>VaultUnlockedAPI</name>
<description>VaultUnlocked is a Permissions &amp; Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves. VaultUnlocked supports all plugins that support Vault
</description>
<url>http://dev.bukkit.org/server-mods/vault/</url>

<properties>
Expand All @@ -18,25 +17,36 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
</properties>

<!-- Organization -->

<organization>
<name>MilkBowl</name>
<url>https://github.com/MilkBowl</url>
<name>The New Economy</name>
<url>https://tnemc.net</url>
</organization>

<developers>
<developer>
<id>creatorfromhell</id>
<name>Daniel "creatorfromhell" Vidmar</name>
<email>[email protected]</email>
<url>https://cfh.dev</url>
<organization>The New Economy</organization>
<organizationUrl>https://tnemc.net</organizationUrl>
<roles>
<role>developer</role>
</roles>
<timezone>America/New_York</timezone>
</developer>
</developers>

<scm>
<url>https://github.com/MilkBowl/VaultAPI</url>
<connection>scm:git:git://github.com:MilkBowl/VaultAPI.git</connection>
<url>https://github.com/TheNewEconomy/VaultUnlockedAPI</url>
<connection>scm:git:git://github.com/TheNewEconomy/VaultUnlockedAPI.git</connection>
<developerConnection>scm:git:[email protected]:MilkBowl/VaultAPI.git</developerConnection>
</scm>

<ciManagement>
<system>Travis-CI</system>
<url>https://travis-ci.org/MilkBowl/VaultAPI</url>
</ciManagement>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/MilkBowl/VaultAPI/issues</url>
<url>https://github.com/TheNewEconomy/VaultUnlockedAPI/issues</url>
</issueManagement>

<repositories>
Expand All @@ -47,11 +57,14 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
</repositories>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/milkbowl/github-releases</url>
</repository>
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

<dependencies>
Expand All @@ -70,6 +83,12 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -78,10 +97,13 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>8</source>
<target>8</target>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -110,7 +132,7 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<version>true</version>
<linksource>true</linksource>
<notimestamp>true</notimestamp>
<bottom><![CDATA[<b>Milkbowl, 2020</b>]]></bottom>
<bottom><![CDATA[<b>TheNewEconomy, 2024</b>]]></bottom>
<reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
<destDir>javadoc-latest</destDir>
</configuration>
Expand Down
Loading
Loading