Skip to content

Commit

Permalink
Update 0.4.1 ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
EastWestFM committed Nov 14, 2014
1 parent e2a0d4e commit 8680710
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
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>net.karolek</groupId>
<artifactId>revoguild</artifactId>
<version>0.4.1-b317</version>
<version>0.4.1-b322</version>
<name>RevoGuild</name>
<description>Plugin na gildie.</description>
<properties>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/net/karolek/revoguild/GuildPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class GuildPlugin extends JavaPlugin {

private boolean enabled = false;


@Override
public void onEnable() {
plugin = this;
Expand Down Expand Up @@ -82,6 +83,7 @@ public void onEnable() {

@Override
public void onDisable() {
Bukkit.getScheduler().cancelTasks(this);
if (enabled)
if (store != null)
store.disconnect();
Expand Down Expand Up @@ -183,6 +185,7 @@ protected void registerTasks() {
new TabThread();
}


protected void registerOthers() {
Logger.info("Register others...");
if (Config.TNT_DURABILITY_ENABLED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ public static boolean isInFight(Player p) {
}

public static boolean wasInFight(Player p) {
return (System.currentTimeMillis() - combats.get(p.getName()) - 1000L < TimeUtil.SECOND.getTime(Config.ESCAPE_TIME));
Long time = combats.get(p.getName());

if(time == null) return false;

return (System.currentTimeMillis() - time - 1000L < TimeUtil.SECOND.getTime(Config.ESCAPE_TIME));
}

public static long getTimeToEnd(Player p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ public static boolean canCreateGuild(Location loc) {
return true;
}

public static int getPosition(Guild guild
) {
for (RankList.Data<Guild> userData : TabThread.getInstance().getRankList().getTopGuilds())
if (userData.getKey().equals(guild))
return TabThread.getInstance().getRankList().getTopPlayers().indexOf(userData)+1;
public static int getPosition(Guild guild) {
for (RankList.Data<Guild> guildData : TabThread.getInstance().getRankList().getTopGuilds())
if (guildData.getKey().equals(guild))
return TabThread.getInstance().getRankList().getTopGuilds().indexOf(guildData) + 1;
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.1-b316
0.4.1-b321

0 comments on commit 8680710

Please sign in to comment.