0.6.2 update to 1.20.1
This commit is contained in:
parent
b9b0590417
commit
991ed226b8
5 changed files with 15 additions and 8 deletions
|
@ -30,7 +30,7 @@ import org.bukkit.util.Vector;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class Humanoid extends Entity {
|
public abstract class Humanoid extends Entity {
|
||||||
|
|
||||||
private String skin; // used to get the path to the skin
|
private String skin; // used to get the path to the skin
|
||||||
private UUID skinUuid; // used to get the player skin (if i do it this way...
|
private UUID skinUuid; // used to get the player skin (if i do it this way...
|
||||||
|
|
|
@ -33,7 +33,7 @@ import org.bukkit.util.Vector;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class Goblin extends Entity {
|
public abstract class Goblin extends Entity {
|
||||||
|
|
||||||
RaxenEntity goblin;
|
RaxenEntity goblin;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class ItemBuilder {
|
||||||
private Set<ItemFlag> itemFlags;
|
private Set<ItemFlag> itemFlags;
|
||||||
private boolean hasAttributeModifiers;
|
private boolean hasAttributeModifiers;
|
||||||
private Multimap<Attribute, AttributeModifier> attributeModifiers;
|
private Multimap<Attribute, AttributeModifier> attributeModifiers;
|
||||||
private List<String> lore;
|
private List<Component> lore;
|
||||||
private final Map<Enchantment, Integer> enchantments;
|
private final Map<Enchantment, Integer> enchantments;
|
||||||
|
|
||||||
public ItemBuilder(ItemStack it) {
|
public ItemBuilder(ItemStack it) {
|
||||||
|
@ -90,7 +90,7 @@ public class ItemBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itm.hasLore()) {
|
if (itm.hasLore()) {
|
||||||
lore = itm.getLore();
|
lore = itm.lore();
|
||||||
}
|
}
|
||||||
|
|
||||||
persistentDataContainer = itm.getPersistentDataContainer();
|
persistentDataContainer = itm.getPersistentDataContainer();
|
||||||
|
@ -107,7 +107,7 @@ public class ItemBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void lore(List<String> lore) {
|
public void lore(List<Component> lore) {
|
||||||
this.lore = lore;
|
this.lore = lore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package me.unurled.raxen.components.items;
|
package me.unurled.raxen.components.items;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.unurled.raxen.utils.Utils;
|
import me.unurled.raxen.utils.Utils;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
|
@ -36,7 +38,11 @@ public class ItemParser {
|
||||||
|
|
||||||
private ItemBuilder applyConfig(ItemBuilder item) {
|
private ItemBuilder applyConfig(ItemBuilder item) {
|
||||||
if (section.contains("lore")) {
|
if (section.contains("lore")) {
|
||||||
List<String> lore = section.getStringList("lore");
|
List<String> l = section.getStringList("lore");
|
||||||
|
List<Component> lore = new ArrayList<>();
|
||||||
|
for (int i = 0; i < l.size(); i++) {
|
||||||
|
lore.add(i, Utils.colorComp(l.get(i)));
|
||||||
|
}
|
||||||
item.lore(lore);
|
item.lore(lore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +51,8 @@ public class ItemParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (section.contains("Pack")) {
|
if (section.contains("Pack")) {
|
||||||
item.modelData(section.getString("Pack.model", null), section.getInt("Pack.custom_model_data", 0));
|
item.modelData(section.getString("Pack.model", null),
|
||||||
|
section.getInt("Pack.custom_model_data", 0));
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package me.unurled.raxen.utils;
|
package me.unurled.raxen.utils;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.CraftRegionAccessor;
|
import org.bukkit.craftbukkit.v1_20_R1.CraftRegionAccessor;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
Loading…
Reference in a new issue