Add AutostartListener Bedrock autostarter
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
009a1f3fa4
Commit
d1196c6e4e
@ -30,6 +30,7 @@ import de.steamwar.bausystem.utils.ItemUtils;
|
|||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.type.Chest;
|
import org.bukkit.block.data.type.Chest;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
@ -77,6 +78,12 @@ public class AutostartListener implements Listener {
|
|||||||
if (event.getClickedBlock().getBlockData() instanceof Chest) {
|
if (event.getClickedBlock().getBlockData() instanceof Chest) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (event.getClickedBlock().getType() == Material.BEDROCK) {
|
||||||
|
event.getClickedBlock().setType(Material.SLIME_BLOCK);
|
||||||
|
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
|
event.getClickedBlock().setType(Material.BEDROCK, false);
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
activate(event.getPlayer());
|
activate(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren