mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 22:16:00 +00:00
missing refactors
This commit is contained in:
1 parent
89fc6d1769
commit
60b425b056
3 files changed
+4
-5
No files matched your search
@@ -48,7 +48,6 @@ public class WarItemRegistry {
|
||||
}
|
||||
|
||||
public Map<String, ItemStack> getItemRegistry() {
|
||||
|
||||
return itemRegistry.entrySet()
|
||||
.stream()
|
||||
.filter(v -> v.getValue() != null)
|
||||
|
||||
@@ -34,7 +34,7 @@ public class RamItem implements IWarItem {
|
||||
|
||||
@Override
|
||||
public Set<Recipe> getRecipes() {
|
||||
ItemStack output = Main.itemRegistry.getOrNull("ram");
|
||||
ItemStack output = WarItemRegistry.getInstance().getOrNull("ram");
|
||||
NamespacedKey key = new NamespacedKey(Main.getInstance(), "ram");
|
||||
ShapedRecipe recipe = new ShapedRecipe(key, output);
|
||||
recipe.shape("$@$", "B##");
|
||||
|
||||
@@ -48,7 +48,7 @@ public class PlayerInteractListener implements Listener {
|
||||
if (clicked.getType().toString().contains("DOOR")) { // left click + any door types
|
||||
Door door = (Door) clicked.getBlockData();
|
||||
// lock door in the opposite position
|
||||
if (item.equals(Main.itemRegistry.getOrNull("ram"))) {
|
||||
if (item.equals(WarItemRegistry.getInstance().getOrNull("ram"))) {
|
||||
boolean inSiegeOrRaid = false;
|
||||
//siege check
|
||||
for (Siege s : SiegeData.getSieges()) {
|
||||
@@ -101,7 +101,7 @@ public class PlayerInteractListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onPlayerRClick(final PlayerItemDamageEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
if (item.equals(WarItemRegistry.getOrNull("ram"))) {
|
||||
if (item.equals(WarItemRegistry.getInstance().getOrNull("ram"))) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public class PlayerInteractListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (item.equals(WarItemRegistry.getOrNull("ram"))) {
|
||||
if (item.equals(WarItemRegistry.getInstance().getOrNull("ram"))) {
|
||||
if (clicked != null) {
|
||||
if (clicked.getType().name().equals("GRASS_BLOCK")
|
||||
|| clicked.getType().name().equals("DIRT")
|
||||
|
||||
Reference in new issue
Block a user