- Change click tracking to track the items' names
- Only add the features item, if the user has unlocked features
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user