mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Replace bukkit Consumers with java consumers (#9836)
This commit is contained in:
parent
2b426027aa
commit
e7c0e0e246
2 changed files with 3 additions and 3 deletions
|
@ -30,6 +30,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @return the launched projectile
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public <T extends Projectile> T launchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity, @Nullable org.bukkit.util.Consumer<T> function);
|
||||
+ public <T extends Projectile> T launchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity, @Nullable java.util.function.Consumer<T> function);
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ @Override
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity, org.bukkit.util.Consumer<T> function) {
|
||||
+ public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity, java.util.function.Consumer<T> function) {
|
||||
+ // Paper end - launchProjectile consumer
|
||||
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
|
||||
|
||||
|
@ -50,7 +50,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity, org.bukkit.util.Consumer<T> function) {
|
||||
+ public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity, java.util.function.Consumer<T> function) {
|
||||
+ // Paper end - launchProjectile consumer
|
||||
Preconditions.checkArgument(this.getBlock().getType() == Material.DISPENSER, "Block is no longer dispenser");
|
||||
// Copied from BlockDispenser.dispense()
|
||||
|
|
Loading…
Reference in a new issue