Download the PHP package hebbinkpro/magiccrates without Composer

On this page you can find all versions of the php package hebbinkpro/magiccrates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magiccrates

MagicCrates

Add customizable crates to your server.

Downloads

How to use

Commands and permissions

Command aliases: /magiccrates, /mc

Command Description Permission Default
/magiccrates MagicCrates Command magiccrates.cmd True
/magiccrates receive Receive all your unreceived rewards magiccrates.cmd.receive True
/magiccrates receive show Show all rewards you have not yet received magiccrates.cmd.receive.show True
/magiccrates create Toggle crate Create mode magiccrates.cmd.create OP
/magiccrates remove Toggle crate Remove mode magiccrates.cmd.remove OP
/magiccrates key <crate_type> [amount] [player] Give a crate key to a player magiccrates.cmd.key OP
/magiccrates key all <crate_type> [amount] Give a crate key to all the online players magiccrates.cmd.key.all OP
/magiccrates reward set <crate_type> <player> <reward> <amount> Set the amount of times a reward is received magiccrates.cmd.reward.set OP
/magiccrates reward reset crate <crate_type> Reset the amount of times all rewards from the crate are received magiccrates.cmd.reward.reset OP
/magiccrates reward reset reward <crate_type> <reward> Reset the amount of times a reward is received from a crate type magiccrates.cmd.reward.reset OP
/magiccrates reward reset player <player> [crate_type] [reward] Reset the amount of times a player has received rewards from crates magiccrates.cmd.reward.reset OP

Create a new crate

  1. Use the command /mc create
  2. Click on the chest where you want your crate. (double chests do not work)
  3. Select the crate type in the dropdown menu and click Submit.
  4. Click save crate

Remove an existing crate

You can remove crates with a command:

  1. Use the command /mc remove
  2. Click on the crate you want to delete
  3. Click Delete crate

You can also remove crates by breaking the crate:

  1. Destroy a crate
  2. Click Delete crate

Create a crate key

You can only open crates by using a crate key. Each crate type has its own key.
You can create keys using the command /mc key <crate_type> [amount] [player]
When you have a crate key, you can open the matching crate by clicking on the crate.

Crates

All crates from the same Crate Type have the exact same content, and when opening a crate of a certain type, a random reward will be given to the player.

Crate Types

You can customize or add your own crates in crate_types.json.

Crate Rewards

In a crate type, you can specify multiple rewards. However, not every reward will behave the same.
Normal rewards have a static amount of them in the crate which results in a fixed probability of getting the item.
However, you can also create Dynamic rewards. The probability and amount of getting these rewards depends on the amount of times the reward has been received by the player or all players.
Crate rewards have to be added in crate_types.json, and there you can find more information about creating the rewards.

Config

Key

The key follows the same structure as the crate reward items.
The only difference is that the name of the item supports some parameters to distinguish keys for different crate types

Default values

Changelogs

List of the most important changes in v3.x

v3.1.0

v3.0.0

Todo

Credits

Documentation

Permissions

Permission Description Default
magiccrates.cmd Access to the /magiccrates command OP
magiccrates.cmd.create Access to the /magiccrates create command OP
magiccrates.cmd.remove Access to the /magiccrates remove command OP
magiccrates.cmd.key Access to the /magiccrates key command OP
magiccrates.cmd.key.all Access to the /magiccrates keyall command OP
magiccrates.break.remove Permission to remove a crate by breaking it OP

Crate Types

The crate_types.json file contains all crate types, including the rewards. You can find all the specifications about how to create your own custom crate types below.

If there is something wrong with the file (e.g. invalid json, a type is missing required values, or invalid data values are given) the plugin will notify you in the server console on startup indicating what went wrong, so that you can fix the error.

Crate Types

The basic structure in crate_types.json is defined like the following:

You can add as many crate types (<type_id>: CrateType) to this file as you need, but every CrateType needs an ID!

Crate Type

The replacement defined in the CrateType is used as a global replacer for all DynamicCrateReward's (unless there is a replacement specified in the DynamicCrateReward).

Registration of Crate Rewards

Since v3.0.0, it is possible to register crate rewards with unique ID's. It is recommended to use unique ID's as those will prevent issues which can occur when renaming dynamic rewards without ID.
But because all versions before 3.0.0 do not make use of this system, I decided to make it backwards compatible until v4.0.0 releases.

Recommended:

Deprecated: (will be removed in v4.0.0)

Command

A command is a string representing the command you want the CONSOLE to execute, but it is possible to include some parameters in the command.

Command Parameters

to use the parameter, include {<parameter>} in the string.

parameter description
prefix The prefix defined in the config.yml
player The name of the player that opened the crate
crate The name of the crate type that was opened
crate_id The ID of the crate type that was opened
reward The name of the reward the player received
reward_id The id of the reward the player received

A Command will look something like this: "say {player} received {reward} from a {crate}".
Executing this command will result in say Hebbinkpro received Unique Diamond from a Rare Crate when Hebbinkpro opened a Rare Crate and won a Unique Diamond.

Crate Reward

This is the data structure of a CrateReward

At least one item or command should be given

This is the data structure of a DynamicCrateReward

The dynamic reward is a more complex version of the default reward.

WARNING You can only use a normal CrateReward as a replacement reward.

Icon

Icons are used for the UI when you interact with a crate without a key. In this UI, all items available in the chest are displayed with their icon.
By default, the icon of the rewarded item will be displayed, but you can customize this by providing an url.
You can use minecraft textures, in this case you only have to provide the path that points to a texture inside the texture pack (e.g. textures/items/diamond or textures/blocks/dirt)

Item

This is the data structure of an Item inside a CrateReward.
Items registered using Customies are also supported, but make sure you identify them correctly.

Enchantment

This is the data structure of an Enchantment inside an Item

Note: The enchantment name should be registered in PMMP, otherwise the crate type will not be loaded

Example Crate Types

Common Crate

If a player opens this crate:

Rare Crate

If a player opens this crate:

Magic Crate

If a player opens this crate:


All versions of magiccrates with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
pocketmine/pocketmine-mp Version ^5.0.0
muqsit/simple-packet-handler Version dev-pm5
vecnavium/formsui Version dev-master
sof3/libasynql Version 4.2.2
ifera-mc/config-updater Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hebbinkpro/magiccrates contains the following files

Loading the files please wait ....