Skip to content

Commit

Permalink
Merge pull request #93 from EpiCanard/develop
Browse files Browse the repository at this point in the history
Release 1.3.2
  • Loading branch information
EpiCanard authored Jul 22, 2019
2 parents 19837f0 + 20d5e02 commit 39d0db9
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 36 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.epicanard</groupId>
<artifactId>globalmarketchest</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
<name>GlobalMarketChest</name>
<description>Shop plugin to create economy between user</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<powermock.version>1.7.1</powermock.version>
<spigot.version>1.14.3-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
</properties>
<build>
<finalName>${project.name}-${project.version}</finalName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ public Boolean compareLocations(Location first, Location second) {
public Boolean isAllowedWorld(String worldName) throws WorldDoesntExist {
if (Bukkit.getWorld(worldName) == null)
throw new WorldDoesntExist(worldName);
return GlobalMarketChest.plugin.getConfigLoader().getConfig().getStringList("WorldAllowed").contains(worldName);
final Boolean containsWorld = GlobalMarketChest.plugin.getConfigLoader().getConfig().getStringList("ShopWorlds.Worlds").contains(worldName);
final Boolean whitelist = GlobalMarketChest.plugin.getConfigLoader().getConfig().getString("ShopWorlds.Type", "blacklist").equals("whitelist");

return (whitelist) ? containsWorld : !containsWorld;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import fr.epicanard.globalmarketchest.exceptions.MissingMethodException;
import fr.epicanard.globalmarketchest.utils.annotations.AnnotationCaller;
import fr.epicanard.globalmarketchest.utils.annotations.Version;
import net.minecraft.server.v1_14_R1.MinecraftKey;

public class VersionSupportUtils {

Expand Down Expand Up @@ -183,7 +184,12 @@ public String getMinecraftKey(ItemStack itemStack) {
minecraftKey = registry.getClass().getMethod("getKey", Object.class).invoke(registry, invokeMethod(nmsItemStack, "getItem"));
}

return invokeMethod(minecraftKey, "b").toString() + ":" + invokeMethod(minecraftKey, "getKey").toString();
Object namespace = invokeMethod(minecraftKey, "b");
if (namespace == null) {
namespace = invokeMethod(minecraftKey, "getNamespace");
}

return namespace.toString() + ":" + invokeMethod(minecraftKey, "getKey").toString();

} catch(ClassNotFoundException | InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
e.printStackTrace();
Expand Down Expand Up @@ -275,7 +281,7 @@ public void updateInventoryName_latest(String title, Player player) {

/**
* Define if the GMC NBT TAG is set on this item
*
*
* @param itemStack Item to analyze
* @return Return if the item as gmc nbt tag
*/
Expand All @@ -296,7 +302,7 @@ public boolean hasNbtTag(ItemStack itemStack) {

/**
* Set the custom GMC NBT TAG on item in parameter
*
*
* @param itemStack Item on which add NBT TAG
* @return ItemStack modified
*/
Expand Down
20 changes: 12 additions & 8 deletions src/main/resources/1.12/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ===================================================================

General:
# Possible values : lang-fr_FR.yml, lang-en_US.yml, lang-zh_CN.yml, lang-de_DE.yml
# Possible values : lang-fr_FR.yml, lang-en_US.yml, lang-zh_CN.yml, lang-de_DE.yml, lang-pl_PL.yml, lang-tr_TR.yml
Lang: "lang-en_US.yml"
Connection:
# The url/ip to access to your database server
Expand All @@ -33,7 +33,7 @@ Options:
EnableMaxInOne: true
# Define if the button MaxRepeat in CreateAuction view must be here
EnableMaxRepeat: true
# Define if a player can find similar auctions with drag and drop on category view
# Define if a player can find similar auctions with drag and drop on category view
EnableSimilarAuctions: true
# Default price for new auctions
DefaultPrice: 100
Expand Down Expand Up @@ -63,11 +63,15 @@ Logs:
HidePrefix: false
# Define the prefix displayed inside messages
Prefix: "&a[GlobalMarketChest]"
# Worlds on which you can create shop
WorldAllowed:
- world
- world_the_end
- world_nether
# Define on which worlds you can or can't create a shop
ShopWorlds:
# Define which type of filter is used
# Possible value : whitelist or blacklist (default blacklist if not specified)
Type: 'blacklist'
# List of world allowed (whitelist) or forbidden (blacklist)
Worlds:
# - world
# - world_the_end
# Block that you can link with shop's sign
AllowedLinkBlock:
- minecraft:ender_chest
Expand All @@ -83,7 +87,7 @@ Price:
- 1
- 0.1
- 0.01
# Items used for price ranges, if there is less items than price ranges the last item
# Items used for price ranges, if there is less items than price ranges the last item
Items:
- minecraft:emerald_block
- minecraft:emerald
Expand Down
20 changes: 12 additions & 8 deletions src/main/resources/1.13/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ===================================================================

General:
# Possible values : lang-fr_FR.yml, lang-en_US.yml, lang-zh_CN.yml, lang-de_DE.yml
# Possible values : lang-fr_FR.yml, lang-en_US.yml, lang-zh_CN.yml, lang-de_DE.yml, lang-pl_PL.yml, lang-tr_TR.yml
Lang: "lang-en_US.yml"
Connection:
# The url/ip to access to your database server
Expand All @@ -33,7 +33,7 @@ Options:
EnableMaxInOne: true
# Define if the button MaxRepeat in CreateAuction view must be here
EnableMaxRepeat: true
# Define if a player can find similar auctions with drag and drop on category view
# Define if a player can find similar auctions with drag and drop on category view
EnableSimilarAuctions: true
# Default price for new auctions
DefaultPrice: 100
Expand Down Expand Up @@ -63,11 +63,15 @@ Logs:
HidePrefix: false
# Define the prefix displayed inside messages
Prefix: "&a[GlobalMarketChest]"
# Worlds on which you can create shop
WorldAllowed:
- world
- world_the_end
- world_nether
# Define on which worlds you can or can't create a shop
ShopWorlds:
# Define which type of filter is used
# Possible value : whitelist or blacklist (default blacklist if not specified)
Type: 'blacklist'
# List of world allowed (whitelist) or forbidden (blacklist)
Worlds:
# - world
# - world_the_end
# Block that you can link with shop's sign
AllowedLinkBlock:
- minecraft:ender_chest
Expand All @@ -83,7 +87,7 @@ Price:
- 1
- 0.1
- 0.01
# Items used for price ranges, if there is less items than price ranges the last item
# Items used for price ranges, if there is less items than price ranges the last item
Items:
- minecraft:emerald_block
- minecraft:emerald
Expand Down
15 changes: 12 additions & 3 deletions src/main/resources/1.14/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ===================================================================

General:
# Possible values : lang-fr_FR.yml, lang-en_US.yml, lang-zh_CN.yml, lang-de_DE.yml
# Possible values : lang-fr_FR.yml, lang-en_US.yml, lang-zh_CN.yml, lang-de_DE.yml, lang-pl_PL.yml, lang-tr_TR.yml
Lang: "lang-en_US.yml"
Connection:
# The url/ip to access to your database server
Expand All @@ -33,7 +33,7 @@ Options:
EnableMaxInOne: true
# Define if the button MaxRepeat in CreateAuction view must be here
EnableMaxRepeat: true
# Define if a player can find similar auctions with drag and drop on category view
# Define if a player can find similar auctions with drag and drop on category view
EnableSimilarAuctions: true
# Default price for new auctions
DefaultPrice: 100
Expand Down Expand Up @@ -68,6 +68,15 @@ WorldAllowed:
- world
- world_the_end
- world_nether
# Define on which worlds you can or can't create a shop
ShopWorlds:
# Define which type of filter is used
# Possible value : whitelist or blacklist (default blacklist if not specified)
Type: 'blacklist'
# List of world allowed (whitelist) or forbidden (blacklist)
Worlds:
# - world
# - world_the_end
# Block that you can link with shop's sign
AllowedLinkBlock:
- minecraft:ender_chest
Expand All @@ -83,7 +92,7 @@ Price:
- 1
- 0.1
- 0.01
# Items used for price ranges, if there is less items than price ranges the last item
# Items used for price ranges, if there is less items than price ranges the last item
Items:
- minecraft:emerald_block
- minecraft:emerald
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/langs/lang-pl_PL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ InfoMessages:
WriteItemName: "Wpisz nazwę itemu, którego szukasz"
WritePlayerName: "Wpisz nazwę gracza, którego szukasz"
DeleteShopQuestion: "Jesteś pewien, że chcesz usunąć ten sklep?"
ConvertingShopAuctions: "Converting auctions of shop : &6%s&7"
ShopAuctionsConverted: "Shop &6%s&7 : &3%d&9/%d&7 auctions converted"
ShopTemporarilyLocked: "This shop is temporarily locked"
ConversionMode: "Conversion mode : &6%s&7"
ConvertingShopAuctions: "Przetwarzanie aukcji sklepu : &6%s&7"
ShopAuctionsConverted: "Sklep &6%s&7 : &3%d&9/%d&7 aukcje przetworzone"
ShopTemporarilyLocked: "Ten sklep jest czasowo niedostępny"
ConversionMode: "Tryb konwersji : &6%s&7"
Commands:
Buttons:
OpenText: "Otwórz"
Expand All @@ -220,4 +220,4 @@ Commands:
Open: "&c/globalmarketchest open <shop>&6 - Otwórz GlobalShop"
AdminOpen: "&c/globalmarketchest open <shop> [player]&6 - Otwórz GlobalShop"
Close: "&c/globalmarketchest close <player>&6 - Zamknij sklep gracza"
FixAuctions: "&c/globalmarketchest fix auctions [active | all]&6 - Convert old minecraft itemMeta to new minecraft version"
FixAuctions: "&c/globalmarketchest fix auctions [active | all]&6 - Przetwarza stare itemMeta do nowszej wersji"
10 changes: 5 additions & 5 deletions src/main/resources/langs/lang-tr_TR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ InfoMessages:
WriteItemName: "Aradığınız öğenin adını yazın"
WritePlayerName: "Aradığınız oyuncunun adını yazın"
DeleteShopQuestion: "Bu mağazayı silmek istediğinden emin misin?"
ConvertingShopAuctions: "Converting auctions of shop : &6%s&7"
ShopAuctionsConverted: "Shop &6%s&7 : &3%d&9/%d&7 auctions converted"
ShopTemporarilyLocked: "This shop is temporarily locked"
ConversionMode: "Conversion mode : &6%s&7"
ConvertingShopAuctions: "Market açık arttırmalarını dönüştürme : &6%s&7"
ShopAuctionsConverted: "Market &6%s&7 : &3%d&9/%d&7 açık arttırma dönüştürme yapıldı"
ShopTemporarilyLocked: "Bu mağaza geçici olarak kilitlendi"
ConversionMode: "Dönüşüm modu : &6%s&7"
Commands:
Buttons:
OpenText: "Open"
Expand All @@ -220,4 +220,4 @@ Commands:
Open: "&c/globalmarketchest open <shop>&6 - Open a globalshop"
AdminOpen: "&c/globalmarketchest open <shop> [player]&6 - Open a globalshop"
Close: "&c/globalmarketchest close <player>&6 - Close the shop of a player"
FixAuctions: "&c/globalmarketchest fix auctions [active | all]&6 - Convert old minecraft itemMeta to new minecraft version"
FixAuctions: "&c/globalmarketchest açık arttrıma düzelt [active | all]&6 - Eski minecraft itemMeta'yı yeni minecraft sürümüne dönüştür"

0 comments on commit 39d0db9

Please sign in to comment.