mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-09-28 23:57:28 +02:00
typo
This commit is contained in:
parent
a0f7256d72
commit
e4585a95d1
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "EpicHoppers"
|
||||
path: "/builds/Songoda/$name"
|
||||
version: "3.2.1"
|
||||
version: "3.2.2
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -147,8 +147,8 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
|
||||
* Register hoppers into HopperManger from configuration
|
||||
*/
|
||||
Bukkit.getScheduler().runTaskLater(this, () -> {
|
||||
if (storage.containsGroup("link")) {
|
||||
for (StorageRow row : storage.getRowsByGroup("link")) {
|
||||
if (storage.containsGroup("sync")) {
|
||||
for (StorageRow row : storage.getRowsByGroup("sync")) {
|
||||
Location location = Serialize.getInstance().unserializeLocation(row.getKey());
|
||||
if (location == null || location.getBlock() == null) return;
|
||||
|
||||
@ -307,7 +307,7 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
|
||||
continue;
|
||||
String locationStr = Arconix.pl().getApi().serialize().serializeLocation(hopper.getLocation());
|
||||
|
||||
storage.prepareSaveItem("link", new StorageItem("location", locationStr),
|
||||
storage.prepareSaveItem("sync", new StorageItem("location", locationStr),
|
||||
new StorageItem("level", hopper.getLevel().getLevel()),
|
||||
new StorageItem("block", true, hopper.getLinkedBlocks() == null || hopper.getLinkedBlocks().isEmpty() ? new ArrayList<>() : hopper.getLinkedBlocks()),
|
||||
new StorageItem("placedby", hopper.getPlacedBy() == null ? null : hopper.getPlacedBy().toString()),
|
||||
|
@ -41,12 +41,12 @@ public class HopHandler {
|
||||
private void hopperCleaner() {
|
||||
try {
|
||||
ConfigurationSection data = instance.getConfig().createSection("data");
|
||||
if (!data.contains("link")) return;
|
||||
for (String key : data.getConfigurationSection("link").getKeys(false)) {
|
||||
if (!data.contains("sync")) return;
|
||||
for (String key : data.getConfigurationSection("sync").getKeys(false)) {
|
||||
if (Arconix.pl().getApi().serialize().unserializeLocation(key).getWorld() == null) continue;
|
||||
Block block = Arconix.pl().getApi().serialize().unserializeLocation(key).getBlock();
|
||||
if (block != null && block.getState() instanceof Hopper) continue;
|
||||
data.getConfigurationSection("link").set(key, null);
|
||||
data.getConfigurationSection("sync").set(key, null);
|
||||
instance.getLogger().info("EpicHoppers Removing non-hopper entry: " + key);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user