Skip to content

Commit eb88444

Browse files
committed
2.0.0
1 parent 672c5ce commit eb88444

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.0.0
4+
- PlayerData will now be stored without any files. Old playerdata will be converted when a player joins.
5+
- Fixed console error when setting "favorite-slot" to -1
6+
37
## 1.17.0
48
- BestTools will now only use a golden pickaxe for diamond ore or deepslate diamond ore when you do not have an iron, diamond or netherite pickaxe
59

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
<relocations>
4545
<relocation>
4646
<pattern>de.jeff_media.updatechecker</pattern>
47-
<shadedPattern>de.jeff_media.BestTools</shadedPattern>
47+
<shadedPattern>de.jeff_media.BestTools.updatechecker</shadedPattern>
4848
</relocation>
4949
<relocation>
5050
<pattern>org.bstats</pattern>
51-
<shadedPattern>de.jeff_media.BestTools</shadedPattern>
51+
<shadedPattern>de.jeff_media.BestTools.bstats</shadedPattern>
5252
</relocation>
5353
<relocation>
5454
<pattern>com.jeff_media.morepersistentdatatypes</pattern>
55-
<shadedPattern>de.jeff_media.BestTools.pdc</shadedPattern>
55+
<shadedPattern>de.jeff_media.BestTools.morepersistentdatatypes</shadedPattern>
5656
</relocation>
5757
</relocations>
5858
<artifactSet>

src/main/java/de/jeff_media/BestTools/PlayerSetting.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class PlayerSetting {
2626

2727
@Getter private boolean hotbarOnly;
2828

29-
@Getter private int favoriteSlot = 0;
29+
private int favoriteSlot = 0;
3030

3131
@Getter private boolean swordOnMobs;
3232

@@ -40,6 +40,11 @@ public class PlayerSetting {
4040

4141
private final Player player;
4242

43+
public int getFavoriteSlot() {
44+
if(favoriteSlot >= 0 && favoriteSlot <= 8) return favoriteSlot;
45+
return player.getInventory().getHeldItemSlot();
46+
}
47+
4348
PlayerSetting(Player player, File file) {
4449
this.player = player;
4550
YamlConfiguration yaml = YamlConfiguration.loadConfiguration(file);
@@ -66,8 +71,8 @@ private void save() {
6671
conf.set("hasSeenRefillMessage",hasSeenRefillMessage);
6772
conf.set("refillEnabled",refillEnabled);
6873
conf.set("hotbarOnly",hotbarOnly);
69-
conf.set("swordOnMobs",swordOnMobs);
70-
conf.set("favoriteSlot",main.getConfig().getInt("favorite-slot"));
74+
//conf.set("swordOnMobs",swordOnMobs);
75+
//conf.set("favoriteSlot",main.getConfig().getInt("favorite-slot"));
7176
player.getPersistentDataContainer().set(DATA,DataType.FILE_CONFIGURATION,conf);
7277
}
7378

0 commit comments

Comments
 (0)