forked from Slimefun/Slimefun4
-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rework on tickertask storage
- Loading branch information
1 parent
2624b45
commit dcf7f03
Showing
5 changed files
with
94 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/io/github/thebusybiscuit/slimefun4/core/ticker/TickLocation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.github.thebusybiscuit.slimefun4.core.ticker; | ||
|
||
import io.github.bakedlibs.dough.blocks.BlockPosition; | ||
|
||
import java.util.UUID; | ||
|
||
import lombok.Getter; | ||
import org.bukkit.Location; | ||
|
||
@Getter | ||
public class TickLocation { | ||
private final BlockPosition position; | ||
private final UUID uuid; | ||
|
||
public TickLocation(BlockPosition position) { | ||
this.position = position; | ||
uuid = null; | ||
} | ||
|
||
public TickLocation(BlockPosition position, UUID uuid) { | ||
this.position = position; | ||
this.uuid = uuid; | ||
} | ||
|
||
public boolean isUniversal() { | ||
return uuid != null; | ||
} | ||
|
||
public Location getLocation() { | ||
return position.toLocation(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters