Integration with PermissionEx

PHP script for permissionEx plugin

With the help of CMS Donate Engine you will be able to organize a multi-server Automatic Sale playing privileges on your servers Minecraft. Donate implemented as a system of sale, renewal and upgrade privileges PermissionEx as the old versions without UUID, and the last build.


Web interface for permissionEx plugin

Initially, the standard functionality allowed to integrate with the plugin PermissionEx, only one database, and new updates are available for any optional integration server Minecraft. You will be able to connect to any server Minetsraft store for the sale of virtual privileges.


Integration with the plugin permissionsEx

Personal account can work with older versions of pEx plugin 1.7 and newer versions of pEx 1.24+. In the new version of the engine, improved interface shopping privileges, the players saw a more convenient payment system, which also includes an optional extension of the system of discounts on shopping privileges PermissionEx and LuckPerms.


Adding indexes (to extend privileges)

To use the buy and renew features, check the availability of indexes in the MySQL database. Indexes are used by the engine to insert new data, and if a record exists, the server is upgraded or extended.

SQL query for adding indexes:
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique` (`name`,`permission`,`world`,`type`),
  ADD KEY `user` (`name`,`type`),
  ADD KEY `world` (`world`,`name`,`type`);
ALTER TABLE `permissions_entity`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`,`type`),
  ADD KEY `default` (`default`);
ALTER TABLE `permissions_inheritance`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `child` (`child`,`parent`,`type`,`world`),
  ADD KEY `child_2` (`child`,`type`),
  ADD KEY `parent` (`parent`,`type`);

Full MySQL dump with table structure:

CREATE TABLE permissions (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(48) NOT NULL,
  `type` tinyint(1) NOT NULL,
  `permission` varchar(90) NOT NULL,
  `world` varchar(32) NOT NULL,
  `value` mediumtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique` (`name`,`permission`,`world`,`type`),
  KEY `user` (`name`,`type`),
  KEY `world` (`world`,`name`,`type`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE permissions_entity (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `type` tinyint(1) NOT NULL,
  `prefix` varchar(180) NOT NULL DEFAULT '',
  `suffix` varchar(180) NOT NULL DEFAULT '',
  `default` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `default` (`default`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE permissions_inheritance (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `child` varchar(50) NOT NULL,
  `parent` varchar(50) NOT NULL,
  `type` tinyint(1) NOT NULL,
  `world` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `child` (`child`,`parent`,`type`,`world`),
  KEY `child2` (`child`,`type`),
  KEY `parent` (`parent`,`type`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

Download PermissionEx: http://dev.bukkit.org/bukkit-plugins/permissionsex/
Wiki: https://github.com/PEXPlugins/PermissionsEx/wiki