File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
java/com/Lino/globalBoosters/economy Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ economy:
5959` ` `
6060
6161## Dependencies
62- - Required: Paper 1.21.8
62+ - Required: Paper 1.21.10
6363
6464- Optional:
6565 1. Vault for traditional economy
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ plugins {
33}
44
55group = ' com.Lino.globalBoosters.GlobalBoosters'
6- version = ' v3.3.4 '
6+ version = ' v3.3.5 '
77
88java {
99 toolchain {
@@ -25,8 +25,8 @@ repositories {
2525}
2626
2727dependencies {
28- compileOnly ' io.papermc.paper:paper-api:1.21.8 -R0.1-SNAPSHOT'
29- compileOnly ' su.nightexpress.coinsengine:CoinsEngine:2.5 .0'
28+ compileOnly ' io.papermc.paper:paper-api:1.21.10 -R0.1-SNAPSHOT'
29+ compileOnly ' su.nightexpress.coinsengine:CoinsEngine:2.6 .0'
3030 compileOnly ' com.github.MilkBowl:VaultAPI:1.7.1'
3131}
3232
Original file line number Diff line number Diff line change 33import com .Lino .globalBoosters .GlobalBoosters ;
44import org .bukkit .Material ;
55import org .bukkit .entity .Player ;
6+ import org .bukkit .inventory .ItemStack ;
67import org .jetbrains .annotations .NotNull ;
78import su .nightexpress .coinsengine .api .CoinsEngineAPI ;
89import su .nightexpress .coinsengine .api .currency .Currency ;
@@ -28,7 +29,15 @@ private void setupCoinsEngine() {
2829 currency = CoinsEngineAPI .getCurrency (currencyId );
2930 assert currency != null ;
3031 currencyName = currency .getName ();
31- icon = currency .icon ().getMaterial ();
32+ // icon = currency.icon().getMaterial();
33+ Object nightItem = currency .getClass ().getMethod ("icon" ).invoke (currency );
34+ Object materialObj = nightItem .getClass ().getMethod ("getMaterial" ).invoke (nightItem );
35+
36+ if (materialObj instanceof Material mat ) {
37+ icon = mat ;
38+ } else {
39+ icon = Material .DIAMOND ;
40+ }
3241 } catch (Exception e ) {
3342 currency = null ;
3443 }
Original file line number Diff line number Diff line change 11name : GlobalBoosters-Fork
2- version : ' 3.3.4 '
2+ version : ' 3.3.5 '
33main : com.Lino.globalBoosters.GlobalBoosters
44api-version : ' 1.21'
55softdepend : [Vault, CoinsEngine]
You can’t perform that action at this time.
0 commit comments