mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 04:32:11 -07:00
Allow Disabling Player Data Saving
By: Sander Knauff <sanderknauff@hotmail.com>
This commit is contained in:
@@ -11,7 +11,15 @@
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class PlayerDataStorage {
|
||||
@@ -49,34 +51,55 @@
|
||||
@@ -33,6 +35,7 @@
|
||||
}
|
||||
|
||||
public void save(Player player) {
|
||||
+ if (org.spigotmc.SpigotConfig.disablePlayerDataSaving) return; // Spigot
|
||||
try {
|
||||
CompoundTag nbttagcompound = player.saveWithoutId(new CompoundTag());
|
||||
Path path = this.playerDir.toPath();
|
||||
@@ -49,34 +52,55 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -78,7 +86,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,20 +107,44 @@
|
||||
@@ -84,20 +108,44 @@
|
||||
}
|
||||
|
||||
public Optional<CompoundTag> load(Player player) {
|
||||
|
Reference in New Issue
Block a user