Skip to content

Commit 6e93022

Browse files
committed
Make sure custom items can be sold (default level to 1)
1 parent 1252576 commit 6e93022

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<description>Custom items, combat, and more!</description>
1717

1818
<properties>
19-
<codex.version>1.1.1-R0.4-SNAPSHOT</codex.version>
19+
<codex.version>1.1.1-R0.9-SNAPSHOT</codex.version>
2020
<fabled.version>1.0.4-R0.56-SNAPSHOT</fabled.version>
2121
</properties>
2222

src/main/java/studio/magemonkey/divinity/manager/worth/WorthManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ private double getItemModulePrice(@NotNull ItemStack item) {
334334
if (lvlMap == null) return 0D;
335335

336336
int itemLvl = ItemStats.getLevel(item);
337+
if (itemLvl == 0) itemLvl = 1;
337338

338339
Map.Entry<Integer, Double> ePrice = lvlMap.floorEntry(itemLvl);
339340
if (ePrice == null) return 0D;

src/test/java/studio/magemonkey/divinity/utils/DivinityProviderTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class DivinityProviderTest {
3737
void setUp() {
3838
divinity = mock(Divinity.class);
3939
when(divinity.getName()).thenReturn("Divinity");
40+
when(divinity.namespace()).thenReturn("divinity");
4041

4142
divinityStatic = mockStatic(Divinity.class);
4243
divinityStatic.when(Divinity::getInstance).thenReturn(divinity);

0 commit comments

Comments
 (0)