weapons.restrictions module¶
Provides player weapon restriction functionality.
- class weapons.restrictions.WeaponRestrictionHandler(*args, **kwargs)[source]¶
Bases:
AutoUnload
Class used to handle player and team restrictions.
- static on_player_carrying_restricted_weapon(player, weapon)[source]¶
Force the player to drop the weapon.
- is_player_restricted(player, weapon)[source]¶
Return whether the player is restricted from the weapon.
- on_player_purchasing_weapon(player, weapon)[source]¶
Return whether the player can purchase the weapon.
- on_player_restriction_added(player, weapon)[source]¶
Notify the handler if the player is carrying the weapon.
- on_team_restriction_added(team, weapon)[source]¶
Notify the handler of each player on the restricted team.
- weapons.restrictions.weapon_restriction_handler¶
The base instance of the
WeaponRestrictionHandler
class that is used internally by theplayers.entity.Player
class.
- weapons.restrictions.weapon_restriction_manager¶
The singleton object of the
_WeaponRestrictionManager
class.