geforkt von Mirrors/HeadDB
Fix some issues with head texture
Dieser Commit ist enthalten in:
Ursprung
f941d2f367
Commit
ddf0e10c19
27
pom.xml
27
pom.xml
@ -6,19 +6,7 @@
|
||||
|
||||
<groupId>tsp.headdb</groupId>
|
||||
<artifactId>HeadDB</artifactId>
|
||||
<version>1.0</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<version>1.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HeadDB</name>
|
||||
@ -56,4 +44,17 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -3,12 +3,12 @@ package tsp.headdb.api;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import tsp.headdb.database.Category;
|
||||
import tsp.headdb.util.Log;
|
||||
import tsp.headdb.util.Utils;
|
||||
import tsp.headdb.util.XMaterial;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Collections;
|
||||
@ -28,7 +28,7 @@ public class Head {
|
||||
Validate.notNull(value, "value must not be null!");
|
||||
Validate.notNull(category, "category must not be null!");
|
||||
|
||||
ItemStack item = XMaterial.PLAYER_HEAD.parseItem();
|
||||
ItemStack item = new ItemStack(Material.PLAYER_HEAD);
|
||||
if (item != null) {
|
||||
SkullMeta meta = (SkullMeta) item.getItemMeta();
|
||||
meta.setDisplayName(Utils.colorize(category.getColor() + name));
|
||||
|
@ -100,6 +100,7 @@ public class HeadDatabase {
|
||||
Map<Category, List<Head>> result = new HashMap<>();
|
||||
List<Category> categories = Category.getCategories();
|
||||
|
||||
int id = 1;
|
||||
for (Category category : categories) {
|
||||
Log.debug("Caching heads from: " + category.getName());
|
||||
List<Head> heads = new ArrayList<>();
|
||||
@ -119,7 +120,6 @@ public class HeadDatabase {
|
||||
}
|
||||
JSONParser parser = new JSONParser();
|
||||
JSONArray array = (JSONArray) parser.parse(response.toString());
|
||||
int id = 1;
|
||||
for (Object o : array) {
|
||||
JSONObject obj = (JSONObject) o;
|
||||
Head head = new Head.Builder()
|
||||
|
@ -2,7 +2,8 @@ name: HeadDB
|
||||
description: Head Database
|
||||
|
||||
main: tsp.headdb.HeadDB
|
||||
version: 1.0
|
||||
version: 1.1
|
||||
api-version: 1.16
|
||||
author: Silent
|
||||
|
||||
commands:
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren