Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 792c0c5

Browse files
committed
optimize code
1 parent ab88e14 commit 792c0c5

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/main/java/xyz/hynse/foliaflow/FoliaFlow.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,8 @@ public void onEnable() {
7575
File dataFile = new File(getDataFolder(), "data.yml");
7676
YamlConfiguration config = YamlConfiguration.loadConfiguration(dataFile);
7777

78-
// Get the existing flag value, or default to false if it doesn't exist
7978
boolean entitySpawned = config.getBoolean("entity_spawned", false);
8079

81-
// If the entity has not already been spawned, spawn it and set the flag to true
8280
if (!entitySpawned) {
8381
RegionScheduler schedulerdisplay = getServer().getRegionScheduler();
8482
String tag = "FoliaFlow_Display";
@@ -102,7 +100,6 @@ public void onEnable() {
102100
display.addScoreboardTag(tag);
103101
getLogger().info("Setup BlockDisplay" + "(" + tag + ") " + display);
104102

105-
// Set the flag to indicate that the entity has been spawned
106103
config.set("entity_spawned", true);
107104
try {
108105
config.save(dataFile);

0 commit comments

Comments
 (0)