forked from zhdev/griefus
Fixed backwards compatibility with older server software/versions
This commit is contained in:
parent
659fe649ed
commit
f5d13f8818
8 changed files with 96 additions and 10 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package net.coreprotect.paper;
|
||||
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
|
||||
|
|
@ -46,4 +47,9 @@ public class PaperAdapter implements PaperInterface {
|
|||
return holder.getHolder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStopping(Server server) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
package net.coreprotect.paper;
|
||||
|
||||
import org.bukkit.Server;
|
||||
|
||||
public class PaperHandler extends PaperAdapter implements PaperInterface {
|
||||
|
||||
@Override
|
||||
public boolean isStopping(Server server) {
|
||||
return server.isStopping();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package net.coreprotect.paper;
|
||||
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
|
||||
|
|
@ -7,4 +8,6 @@ public interface PaperInterface {
|
|||
|
||||
public InventoryHolder getHolder(Inventory holder, boolean useSnapshot);
|
||||
|
||||
public boolean isStopping(Server server);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue