fix CI
This commit is contained in:
parent
dfd4f9bc76
commit
01163d155d
@ -40,7 +40,7 @@ use crate::{
|
||||
world::World,
|
||||
};
|
||||
|
||||
use super::{living::LivingEntity, Entity};
|
||||
use super::living::LivingEntity;
|
||||
|
||||
/// Represents a Minecraft player entity.
|
||||
///
|
||||
@ -382,6 +382,7 @@ impl Player {
|
||||
}
|
||||
SClickContainer::PACKET_ID => {
|
||||
self.handle_click_container(server, SClickContainer::read(bytebuf)?)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
SCloseContainer::PACKET_ID => {
|
||||
|
||||
@ -22,25 +22,22 @@ impl<ErrorType: PumpkinError + 'static> From<ErrorType> for Box<dyn PumpkinError
|
||||
}
|
||||
impl PumpkinError for InventoryError {
|
||||
fn is_kick(&self) -> bool {
|
||||
use InventoryError::*;
|
||||
match self {
|
||||
InventoryError::InvalidSlot
|
||||
| InventoryError::ClosedContainerInteract(..)
|
||||
| InventoryError::InvalidPacket
|
||||
| InventoryError::PermissionError => true,
|
||||
InventoryError::LockError
|
||||
| InventoryError::OutOfOrderDragging
|
||||
| InventoryError::MultiplePlayersDragging => false,
|
||||
InvalidSlot | ClosedContainerInteract(..) | InvalidPacket | PermissionError => true,
|
||||
LockError | OutOfOrderDragging | MultiplePlayersDragging => false,
|
||||
}
|
||||
}
|
||||
fn severity(&self) -> log::Level {
|
||||
use InventoryError::*;
|
||||
match self {
|
||||
InventoryError::LockError
|
||||
| InventoryError::InvalidSlot
|
||||
| InventoryError::ClosedContainerInteract(..)
|
||||
| InventoryError::InvalidPacket
|
||||
| InventoryError::PermissionError => log::Level::Error,
|
||||
InventoryError::OutOfOrderDragging => log::Level::Info,
|
||||
InventoryError::MultiplePlayersDragging => log::Level::Warn,
|
||||
LockError
|
||||
| InvalidSlot
|
||||
| ClosedContainerInteract(..)
|
||||
| InvalidPacket
|
||||
| PermissionError => log::Level::Error,
|
||||
OutOfOrderDragging => log::Level::Info,
|
||||
MultiplePlayersDragging => log::Level::Warn,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user