Struct fast_protocol::datatypes::packets::AddResourcePack
source · pub struct AddResourcePack {
pub uuid: UUID,
pub url: String,
pub hash: String,
pub forced: bool,
pub has_prompt_message: Option<TextComponent>,
}Expand description
Packet to tell the client that it should add a resource pack
Fields§
§uuid: UUIDuuid of the resource pack
url: Stringurl, where the resource pack should be downloaded
hash: Stringhash of the resource pack to enshure that the right one was downloaded
forced: boolbool if the resource pack is forced
has_prompt_message: Option<TextComponent>optional message that should be displayed for the resource pack
Implementations§
source§impl AddResourcePack
impl AddResourcePack
sourcepub fn new(
uuid: u128,
url: String,
hash: String,
forced: bool,
prompt_message: Option<TextComponent>
) -> Self
pub fn new( uuid: u128, url: String, hash: String, forced: bool, prompt_message: Option<TextComponent> ) -> Self
function to initialize a new instance of AddResourcePack
§Arguments
uuid - uuid of the resource pack
url - url where the resource pack can be downloaded from
hash - SHA-1 hash of the resource pack
forced - if the resource pack is forced or not
prompt_message - Optional message to display for the resource pack
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AddResourcePack
impl RefUnwindSafe for AddResourcePack
impl Send for AddResourcePack
impl Sync for AddResourcePack
impl Unpin for AddResourcePack
impl UnwindSafe for AddResourcePack
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more