- Change click tracking to track the items' names

- Only add the features item, if the user has unlocked features
This commit is contained in:
kaenganxt
2014-10-29 13:30:39 +01:00
parent b08a7bfc02
commit 055f5d6746
4 changed files with 19 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
package de.anura.core;
import de.anura.core.API.Core;
import de.anura.core.API.Inventories;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -55,7 +56,12 @@ public class Features implements Listener {
resetPlayerFeatures(P);
playerFeatures.put(P, new ArrayList<Feature>());
featureEnabled.put(P, new HashMap<Feature, Boolean>());
boolean added = false;
while (rs.next()) {
if (!added) {
P.getInventory().setItem(2, Inventories.getItem("CHARGE", P));
added = true;
}
if (Feature.getById(rs.getInt("featureId")) != null) {
this.addFeature(P, Feature.getById(rs.getInt("featureId")));
featureEnabled.get(P).put(Feature.DOUBLE_JUMP, true);