Skip to content

Commit

Permalink
Merge pull request #61 from EpiCanard/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
EpiCanard authored Feb 16, 2019
2 parents 0f0fed7 + bdbe5fd commit 8225584
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 77 deletions.
127 changes: 60 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,90 @@
# GlobalMarketChest
GUI Plugin of shop for spigot
![banner](https://user-images.githubusercontent.com/29657498/52167675-07369d80-271f-11e9-86ff-362db527f854.png)

## Dependecy
To work you will need the plugin **Vault** to handle the economy.

## Commands

**Help**

Show help

`/globalmarketchest [help]`


**List**

List all globalshop
GlobalMarketChest is a spigot plugin that allows to easily create global shops to sell and buy auctions. You interact with shops through graphical interfaces. It can be easily configured and customized.

`/globalmarketchest list`
![dependencies](https://user-images.githubusercontent.com/29657498/52743417-45af4080-2fda-11e9-8be7-4b645e77e898.png)

To work you will need the plugin **Vault** to handle the economy.

**Detail**

List all physical globalshop à distance

`/globalmarketchest list detail <group_name>`


**Open**

Allow to open a globalshop

`/globalmarketchest open <group_name>`
While there is no other storage system you will also need **MySQL**.

![features](https://user-images.githubusercontent.com/29657498/52743424-4ba52180-2fda-11e9-8fe1-dded69d0dd85.png)

**TP**
- User friendly shop graphical interfaces
- Fluid graphical interfaces
- Simple and instinctive shop creation process
- A unique place to sell/buy items and improve interaction between players
- Smart sorting system to see first cheapest auctions and than oldest
- Paginator to see auctions 27 by 27
- Easy process to create / buy auction
- Easy price selector
- Advanced feature to repeat the auction that you are creating as many as possible
- Advanced feature to put all similar items of your inventory in the auction that you are creating (you can go higher than 64 items)
- Advanced categories system by default inspired by creative tabs but can be totally customized
- Detailed permissions system
- Complete commands to list, teleport to and open shops (with autocompletion)
- High configurability
- All items composing interfaces can be changed (item used, title and lore)
- Language can easily be configured
- Categories totally configurable (display item, title, position, items contains, GroupLevels)
- Many features can be configured/disabled

Allow to teleport the player a specific shop position
**Technical features :**

`/globalmarketchest list tp <group_name> <coordinates>`
- Highly configurable interfaces through config file
- Interface loader that auto adapt to available interfaces

**In coming features**

#TODO
- Multi database support (yml, postgresql, SQLite, mongodb)
- AuctionShop (maybe another name) - Here roles are reversed, the player ask for an item and a quantity he need and players come to sell to him the wanted item
- AdminShop - Here players can find all item they want infinitely.
- LocalShop - With this shop only the owner can sell auctions in it.
- Maybe the split of this plugin in multiple little plugins (core, globalshop,adminshop,...) to improve scalability of this plugin

**Reload the plugin**
![installation](https://user-images.githubusercontent.com/29657498/52743428-4ea01200-2fda-11e9-94eb-3f9bba72e926.png)

`/globalmarketchest reload`
1. Download the file **GlobalMarketChest.jar**
2. Add the file in the folder **plugins** of your server.
3. Launch your server, it will generate all necessary configuration files in **plugins/GlobalMarketChest**. The plugin will disable from itself because your database is not configured.
4. In file **plugins/GlobalMarketChest/config.yml** change the database informations in variable **Database**. See [wiki](https://github.com/EpiCanard/GlobalMarketChest/wiki/resources-:-config.yml#database).
5. Reload the plugin or server
6. If your database informations are correct, the plugin should now work :) If it's not the case don't hesitate to come on Discord ([https://discord.gg/UuGAcCa](https://discord.gg/UuGAcCa)) to ask for help.

## Permissions
![documentation](https://user-images.githubusercontent.com/29657498/52743420-48119a80-2fda-11e9-8076-582a7617be7c.png)

```YAML
# Can use all commands and shops
globalmarketchest.*
You can find all information that you need to use and configure this plugin in the [wiki](https://github.com/EpiCanard/GlobalMarketChest/wiki).

# ==== Global Shop ====
![support](https://user-images.githubusercontent.com/29657498/52744544-439ab100-2fdd-11e9-8ec8-b18edd602689.png)

# Can create or use a globalshop
globalmarketchest.globalshop.*
If you find a bug or want to make a suggestion to improve the plugin please open an [issue](https://github.com/EpiCanard/GlobalMarketChest/issues) on GitHub.

# Can create a globalshop
globalmarketchest.globalshop.createshop
If you want to participate to development of this plugin, fork the GitHub, make your modifications and open a Pull Request.

# Can open shop
globalmarketchest.globalshop.openshop
If you have questions, you can contact me on discord.
Discord: [https://discord.gg/UuGAcCa](https://discord.gg/UuGAcCa)

# Can create an auction
globalmarketchest.globalshop.createauction
Source GitHub: [https://github.com/EpiCanard/GlobalMarketChest](https://github.com/EpiCanard/GlobalMarketChest)

# Can create buy an auction
globalmarketchest.globalshop.buyauction
![screenshots](https://user-images.githubusercontent.com/29657498/52745804-4ea31080-2fe0-11e9-8604-8e5081c75605.png)

# ==== COMMANDS ===
![buy_auction](https://user-images.githubusercontent.com/29657498/52537867-c1578600-2d6b-11e9-8657-7f4efb43ac27.gif)

# Can use all commands and shops
globalmarketchest.commands.*
![create_auction](https://user-images.githubusercontent.com/29657498/52538701-fcf74d80-2d75-11e9-972b-de74812f337b.gif)

# Can reload the plugin
globalmarketchest.commands.reload
![edit_auction_overview](https://user-images.githubusercontent.com/29657498/52537956-e993b480-2d6c-11e9-9c5c-1316c9908de7.gif)

# Can open a shop with command
globalmarketchest.commands.open
![using](https://user-images.githubusercontent.com/29657498/52744655-970cff00-2fdd-11e9-9dbe-697f46eafd12.png)

# Can list all shops with command
globalmarketchest.commands.list.*
- Freebuild.fr - play.freebuild.fr [website](https://freebuild.fr)

# Can see all shop position for a group of shop
globalmarketchest.commands.detail.*
![thanks](https://user-images.githubusercontent.com/29657498/52743433-5069d580-2fda-11e9-8d34-ae14557c1311.png)

# Can be teleport to a specific shop
globalmarketchest.commands.detail.tp
I would like to thanks the server Freebuild.fr that helps me during development of this plugin.

```
I would like to thanks the player Icodak that make the logo of this plugin.

## Discord
### Donation
If you want to donate for work done, it will be a pleasure. Thank you.

GlobalMarketChest discord : https://discord.gg/UuGAcCa
[![paypal](https://www.paypalobjects.com/en_US/FR/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ALYLAVBZCPC7C&source=url)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.epicanard</groupId>
<artifactId>globalmarketchest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>1.0.0</version>
<name>GlobalMarketChest</name>
<description>GUI Plugin of shop for spigot</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected String buildUrl() {
return this.host + ":" + this.port + "/" + this.database;
}

protected abstract Connection connect();
protected abstract Connection connect() throws ConfigException;

protected abstract void disconnect(Connection connection);

Expand All @@ -44,7 +44,7 @@ protected String buildUrl() {

public abstract void getBackConnection(Connection connection);

public abstract void fillPool();
public abstract void fillPool() throws ConfigException;

public abstract void cleanPool();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ public void configFromConfigFile() throws ConfigException {
* @return Connection
*/
@Override
protected Connection connect() {
protected Connection connect() throws ConfigException {
try {
Class.forName("com.mysql.jdbc.Driver");
return DriverManager.getConnection("jdbc:mysql://" + this.buildUrl(),
this.user, this.password);
} catch (SQLException | ClassNotFoundException e) {
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
throw new ConfigException("Can't connect to your database, please check your configuration file or the access to your database");
}
return null;
}
Expand Down Expand Up @@ -127,9 +129,10 @@ public Connection getConnection() {
if (co == null || !co.isValid(0) || co.isClosed())
return this.connect();
return co;
} catch (SQLException | InterruptedException e) {
return this.connect();
} catch (SQLException | ConfigException | InterruptedException e) {
e.printStackTrace();
}
return null;
}

/**
Expand All @@ -151,7 +154,7 @@ public void getBackConnection(Connection connection) {
* Fill pool with connection from the size specified in config file
*/
@Override
public void fillPool() {
public void fillPool() throws ConfigException {
for (int i = 0; i < this.simultaneousConnections; i++) {
Connection co = this.connect();
this.getBackConnection(co);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ public class ConfigException extends Exception {
static final long serialVersionUID = -7914157672976633808L;

public ConfigException(String message) {
super("[Configuration]" + message);
super("[Configuration] " + message);
}
}
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: GlobalMarketChest
version: 0.0.1
version: 1.0.0
author: EpiCanard
api-version: 1.13
depend: [Vault]
Expand Down

0 comments on commit 8225584

Please sign in to comment.