This commit is contained in:
boy0001
2015-08-01 02:12:53 +10:00
parent 9f89928120
commit 96dd736a6d
7 changed files with 93 additions and 126 deletions

View File

@ -332,7 +332,7 @@ public class SQLManager implements AbstractDB {
stmt.setString((i * 6) + 4, DBFunc.everyone.toString());
}
stmt.setString((i * 6) + 5, plot.world);
stmt.setTimestamp((i * 6) + 6, new Timestamp(System.currentTimeMillis()));
stmt.setString((i * 6) + 6, System.currentTimeMillis() + "");
}
@Override

View File

@ -23,6 +23,7 @@ package com.intellectualcrafters.plot.object;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.UUID;
@ -146,6 +147,14 @@ public class Plot {
this.temp = false;
}
/**
* Get the players currently inside this plot
* @return
*/
public List<PlotPlayer> getPlayersInPlot() {
return MainUtil.getPlayersInPlot(this);
}
/**
* Check if the plot has a set owner
*

View File

@ -106,7 +106,7 @@ public class MainUtil {
public static List<PlotPlayer> getPlayersInPlot(Plot plot) {
ArrayList<PlotPlayer> players = new ArrayList<>();
for (PlotPlayer pp : UUIDHandler.getPlayers().values()) {
if (plot.equals(MainUtil.getPlot(pp.getLocation()))) {
if (plot.equals(pp.getCurrentPlot())) {
players.add(pp);
}
}