-
Notifications
You must be signed in to change notification settings - Fork 1
ItemHandler
-
isAmmo(int itemID)
Explanation: Checks if an item with the given item id is ItemBullet
- itemID : ID of the item
-
isGun(int itemID)
Explanation: Checks if an item with the given item id is ItemGun
- itemID : ID of the item
-
getAllAmmoForGun(int itemID)
Explanation: Returns a list of all ammo items (as IDs) that a gun can load
- itemID : ID of the gun
-
getMaxAmmoItems(int itemID)
Explanation: Returns how many individual ammo items a gun can hold
- itemID : ID of the gun
-
getMaxRounds(int itemID)
Explanation: Returns how many rounds a given ammo can hold
- itemID : ID of the bullet
-
getMaxPaintJobs(int gunID)
Explanation: Returns the maximum amount of paintjobs a gun has
- gunID : ID of the gun
-
changePaintjob(String playerName, int slotOfGun, int paintJobID)
Explanation: Changes the current paintjob of a gun
- playerName : name of the player who holds the gun
- slotOfGun : slot in which the player holds the gun
- paintJobID : ID of the paintjob / position in paintjob list
-
setAmmoAmount(String playerName, int slotOfGun, int rounds, int maxSeperateMagazines, int ammoID)
Explanation: Sets the ammo of a given gun to set value
- playerName : name of the player that has the gun
- slotOfGun : slot in the player's inventory where the gun is located
- rounds : number of rounds to which the ammo will be reduced (if set to -1, ammo will be full)
- maxSeperateMagazines : (for guns that can hold multiple magazines: e.g. grenade launchers or shotguns) maximum amount of individual magazines inside the gun (if set to -1, the gun will be full)
- ammoID : ID of the ammo item (set to a negative number if there is no specific ammo you want in your gun)