forked from CryptoMorin/KingdomsX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
322205d
commit f118cb9
Showing
80 changed files
with
1,173 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+127 KB
addons/Kingdoms-Addon-EngineHub-1.0.0.1.jar → addons/Kingdoms-Addon-EngineHub-1.0.0.2.jar
Binary file not shown.
Binary file renamed
BIN
+178 KB
...ns/Kingdoms-Addon-Map-Viewers-2.1.0.3.jar → ...ns/Kingdoms-Addon-Map-Viewers-2.1.0.4.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
outposts: | ||
version: '<outposts-version>' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Outposts-<outposts-version>.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
supported-core-version: 1.17.2-ALHPA | ||
|
||
map-viewers: | ||
version: '<map-viewers-version>' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Map-Viewers-<map-viewers-version>.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
supported-core-version: 1.17.2-ALHPA | ||
|
||
peace-treaties: | ||
version: '<peace-treaties-version>' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Peace-Treaties-<peace-treaties-version>.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
supported-core-version: 1.17.2-ALHPA | ||
|
||
enginehub: | ||
version: '<enginehub-version>' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-EngineHub-<enginehub-version>.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
supported-core-version: 1.17.2-ALHPA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
outposts: | ||
version: '3.0.1.6.4' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Outposts-3.0.1.6.4.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
version: '3.0.1.6.5' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Outposts-3.0.1.6.5.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA | ||
map-viewers: | ||
version: '2.1.0.3' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Map-Viewers-2.1.0.3.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
version: '2.1.0.4' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Map-Viewers-2.1.0.4.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA | ||
peace-treaties: | ||
version: '1.2.6.0.4' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Peace-Treaties-1.2.6.0.4.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
version: '1.2.6.0.5' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Peace-Treaties-1.2.6.0.5.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA | ||
enginehub: | ||
version: '1.0.0.1' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-EngineHub-1.0.0.1.jar?raw=true' | ||
supported-core-version: 1.17.1-ALHPA | ||
version: '1.0.0.2' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-EngineHub-1.0.0.2.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
core/service/vault/src/main/java/org/kingdoms/services/VaultEconomy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.kingdoms.services | ||
|
||
import org.bukkit.OfflinePlayer | ||
import org.kingdoms.constants.economy.AbstractEconomy | ||
import org.kingdoms.constants.economy.Balance | ||
import org.kingdoms.constants.namespace.Namespace | ||
|
||
object VaultEconomy : AbstractEconomy(Namespace("VAULT", "MAIN")) { | ||
override fun isAvailable() = ServiceVault.isAvailable(ServiceVault.Component.ECO) | ||
} | ||
|
||
class VaultBalance(private val account: OfflinePlayer) : Balance { | ||
override fun get(): Double = ServiceVault.getMoney(account) | ||
override fun set(value: Number): Double { | ||
val bal = get() | ||
val dbVal = value.toDouble() | ||
if (bal > dbVal) { | ||
ServiceVault.withdraw(account, bal - dbVal) | ||
} else if (bal < dbVal) { | ||
ServiceVault.deposit(account, dbVal - bal) | ||
} | ||
return dbVal | ||
} | ||
|
||
override fun getEconomy() = VaultEconomy | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ | |
<build-duration-factor>: str | ||
<durability-factor>: int | ||
<material>: str | ||
|
||
hide-holograms: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.