Compare commits
2 Commits
f3c631bbf5
...
6023c21ba9
Author | SHA1 | Date |
---|---|---|
Intelli | 6023c21ba9 | |
Intelli | 3e3496ad12 |
|
@ -25,8 +25,8 @@ logRemoval(String user, BlockState blockState)
|
|||
|
||||
## Getting Started
|
||||
|
||||
Ensure you're using CoreProtect 21.0 or higher. Add it as an external jar to your plugin in your IDE.
|
||||
Alternatively, if using Maven, you can add it via the repository [https://maven.playpro.com](https://maven.playpro.com) (net.coreprotect, 21.0).
|
||||
Ensure you're using CoreProtect 23.0 or higher. Add it as an external jar to your plugin in your IDE.
|
||||
Alternatively, if using Maven, you can add it via the repository [https://maven.playpro.com](https://maven.playpro.com) (net.coreprotect, 23.0).
|
||||
|
||||
The first thing you need to do is get access to CoreProtect. You can do this by using code similar to the following:
|
||||
|
||||
|
@ -49,7 +49,7 @@ private CoreProtectAPI getCoreProtect() {
|
|||
}
|
||||
|
||||
// Check that a compatible version of the API is loaded
|
||||
if (CoreProtect.APIVersion() < 9) {
|
||||
if (CoreProtect.APIVersion() < 10) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class HopperPullListener {
|
|||
}
|
||||
}
|
||||
|
||||
ItemStack[] sourceContainer = Util.getContainerState(sourceHolder.getInventory().getContents());
|
||||
ItemStack[] destinationContainer = Util.getContainerState(destinationHolder.getInventory().getContents());
|
||||
ItemStack movedItem = item.clone();
|
||||
|
||||
final long taskStarted = InventoryChangeListener.tasksStarted.incrementAndGet();
|
||||
|
@ -39,7 +39,7 @@ public final class HopperPullListener {
|
|||
}
|
||||
|
||||
boolean abort = false;
|
||||
boolean addedInventory = Util.canAddContainer(sourceContainer, movedItem, sourceHolder.getInventory().getMaxStackSize());
|
||||
boolean addedInventory = Util.canAddContainer(destinationContainer, movedItem, destinationHolder.getInventory().getMaxStackSize());
|
||||
if (!addedInventory) {
|
||||
abort = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue