@@ -63,20 +63,20 @@ public void store(Location location, CustomItem customItem) {
6363 @ Deprecated
6464 public void remove (Location location ) {
6565 if (location == null || location .getWorld () == null ) return ;
66- (( WolfyCoreBukkit ) WolfyCoreBukkit .getInstance () ).getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).removeBlock (location );
66+ WolfyCoreBukkit .getInstance ().getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).removeBlock (location );
6767 }
6868
6969 @ Deprecated
7070 public boolean isStored (Location location ) {
7171 if (location == null || location .getWorld () == null ) return false ;
72- return (( WolfyCoreBukkit ) WolfyCoreBukkit .getInstance () ).getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).getBlock (location ).isPresent ();
72+ return WolfyCoreBukkit .getInstance ().getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).getBlock (location ).isPresent ();
7373 }
7474
7575 @ Deprecated
7676 @ Nullable
7777 public BlockCustomItemStore get (Location location ) {
7878 if (location == null || location .getWorld () == null ) return null ;
79- return (( WolfyCoreBukkit ) WolfyCoreBukkit .getInstance () ).getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).getBlock (location )
79+ return WolfyCoreBukkit .getInstance ().getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).getBlock (location )
8080 .flatMap (storage -> storage .getData (CustomItemBlockData .ID , CustomItemBlockData .class )).map (data -> new BlockCustomItemStore (data .getItem (), null )).orElse (null );
8181 }
8282
@@ -107,7 +107,7 @@ public boolean hasStoredEffect(Location location) {
107107 @ Deprecated
108108 void setStore (Location location , BlockCustomItemStore blockStore ) {
109109 if (location == null || location .getWorld () == null ) return ;
110- ChunkStorage chunkStorage = (( WolfyCoreBukkit ) WolfyCoreBukkit .getInstance () ).getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).getOrCreateChunkStorage (location );
110+ ChunkStorage chunkStorage = WolfyCoreBukkit .getInstance ().getPersistentStorage ().getOrCreateWorldStorage (location .getWorld ()).getOrCreateChunkStorage (location );
111111 BlockStorage blockStorage = chunkStorage .getOrCreateBlockStorage (location );
112112 blockStorage .addOrSetData (new CustomItemBlockData (WolfyCoreBukkit .getInstance (), chunkStorage , blockStorage .getPos (), blockStore .getCustomItemKey ()));
113113 chunkStorage .setBlockStorageIfAbsent (blockStorage );
0 commit comments