Merge pull request #14 from aBo0oDyy/master

fixes kit time until available placeholder
This commit is contained in:
aBooDyy authored and GitHub committed 2019-06-24 23:12:53 +03:00
commit 306385b981
3 files changed
+8 -18

No files matched your search

+4 -4
View File
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.extendedclip.papi.expansion.essentials</groupId>
<artifactId>essentials-expansion</artifactId>
<version>1.2.2</version>
<version>1.2.3</version>
<name>PAPI-Expansion-Essentials</name>
<description>PlaceholderAPI expansion for Essentials placeholders</description>
@@ -16,8 +16,8 @@
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>clips-public-repo</id>
<url>http://repo.extendedclip.com/content/repositories/public/</url>
<id>ess-repo</id>
<url>https://ci.ender.zone/plugin/repository/everything/</url>
</repository>
</repositories>
@@ -37,7 +37,7 @@
<dependency>
<groupId>net.ess3</groupId>
<artifactId>EssentialsX</artifactId>
<version>2.16.0</version>
<version>2.16.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
@@ -1,7 +1,7 @@
/*
*
* Essentials-Expansion
* Copyright (C) 2018 Ryan McCarthy
* Copyright (C) 2019 Ryan McCarthy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ public class EssentialsExpansion extends PlaceholderExpansion {
@Override
public boolean register() {
essentials = (Essentials) Bukkit.getPluginManager().getPlugin(getPlugin());
essentials = (Essentials) Bukkit.getPluginManager().getPlugin("Essentials");
if (essentials != null) {
return super.register();
}
@@ -67,11 +67,6 @@ public class EssentialsExpansion extends PlaceholderExpansion {
return "essentials";
}
@Override
public String getPlugin() {
return "Essentials";
}
@Override
public String getVersion() {
return VERSION;
@@ -116,7 +111,7 @@ public class EssentialsExpansion extends PlaceholderExpansion {
return PlaceholderAPIPlugin.booleanFalse();
}
long time = -1 ;
long time = -1;
try {
time = k.getNextUse(u);
@@ -149,7 +144,7 @@ public class EssentialsExpansion extends PlaceholderExpansion {
}
int seconds = (int)(time - System.currentTimeMillis())/1000;
if (seconds <= 0) {
if (seconds <= 0 || time == 0) {
return "0";
}
return TimeUtil.getTime(seconds);
-5
View File
@@ -1,5 +0,0 @@
#Generated by Maven
#Wed Jan 23 15:44:54 CST 2019
version=1.2.0
groupId=com.extendedclip.papi.expansion.essentials
artifactId=essentials-expansion