Skip to content

Commit

Permalink
resourcepack & oraxen configs
Browse files Browse the repository at this point in the history
  • Loading branch information
NeumimTo committed Apr 16, 2022
1 parent d0d3605 commit 5392d57
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,29 +112,6 @@ public class PluginConfig {
@Conversion(ItemDamageProcessorConverter.class)
public ItemDamageProcessor ITEM_DAMAGE_PROCESSOR = new Sum();

//spigot only and once sponge moves its ass to 15.x
@Path("SKILLTREE_GUI")
public List<String> SKILLTREE_GUI = new ArrayList<String>() {{

add("-,minecraft:cobblestone,1"); //horizontal
add("I,minecraft:cobblestone,2"); //vertical
add("<,minecraft:cobblestone,3");
add(">,minecraft:cobblestone,4");
add("^,minecraft:cobblestone,5");
add("V,minecraft:cobblestone,6");
add("+,minecraft:cobblestone,7"); //cross
add("┐,minecraft:cobblestone,11");
add("┘,minecraft:cobblestone,12"); //duh
add("┌,minecraft:cobblestone,13");
add("└,minecraft:cobblestone,14");
add("┴,minecraft:cobblestone,15");
add("┬,minecraft:cobblestone,16");
add("┤,minecraft:cobblestone,17");
add("├,minecraft:cobblestone,18");

// add("0,minecraft:gray_stained_glass_pane,19");//empty
}};

@Path("CREATE_FIRST_CHAR_AFTER_LOGIN")
public boolean CREATE_FIRST_CHAR_AFTER_LOGIN = true;

Expand Down Expand Up @@ -188,6 +165,38 @@ public class PluginConfig {
@Path("DISABLED_HOOKS")
public List<String> DISABLED_HOOKS = new ArrayList<>();

@Path("TEXT_MANABAR_PREFIX")
public String TEXT_MANABAR_PREFIX = "oraxen:ntrpg_split3";

@Path("TEXT_MANABAR_PREFIX_REPEAT")
public int TEXT_MANABAR_PREFIX_REPEAT = 15;

@Path("TEXT_MANABAR_ROWS")
public List<String> TEXT_MANABAR_ROWS = new ArrayList<>() {{
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana0%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
add("%oraxen_ntrpg_split3% %oraxen_ntrpg_mana1%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%%oraxen_ntrpg_mana2%%oraxen_ntrpg_split3%");
}};



private static class ItemDamageProcessorConverter implements Converter<ItemDamageProcessor, String> {

@Override
Expand Down Expand Up @@ -257,4 +266,8 @@ public List<String> convertFromField(Map<String, ItemString> value) {
return list;
}
}




}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
import cz.neumimto.rpg.common.AbstractRpg;
import cz.neumimto.rpg.common.assets.AssetService;
import cz.neumimto.rpg.common.utils.Console;
import cz.neumimto.rpg.spigot.bridges.DatapackManager;
import cz.neumimto.rpg.spigot.effects.common.def.ManaBarText;
import cz.neumimto.rpg.spigot.gui.SpigotGuiHelper;
import cz.neumimto.rpg.spigot.gui.inventoryviews.ConfigurableInventoryGui;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
Expand Down Expand Up @@ -113,12 +116,6 @@ public Set<UUID> getOnlinePlayers() {
return Bukkit.getServer().getOnlinePlayers().stream().map(Entity::getUniqueId).collect(Collectors.toSet());
}

@Override
public void reloadMainPluginConfig() {
super.reloadMainPluginConfig();
}


@Override
public void doImplSpecificreload() {
SpigotGuiHelper.initInventories();
Expand All @@ -132,8 +129,26 @@ public void doImplSpecificreload() {
a.reloadGuiConfig();
} catch (Exception e) {
e.printStackTrace();
}
}
});
List<String> textManabar = getPluginConfig().TEXT_MANABAR_ROWS;
if (textManabar != null) {
DatapackManager dm = DatapackManager.instance;

StringBuilder sb = new StringBuilder();
for (int i = 0; i < getPluginConfig().TEXT_MANABAR_PREFIX_REPEAT; i++) {
sb.append(getPluginConfig().TEXT_MANABAR_PREFIX);
}

ManaBarText.ROWS = getPluginConfig().TEXT_MANABAR_ROWS.stream()
.map(a -> {
Component prefixc = dm.resolveGlyphs(null, sb.toString());
return prefixc.append(dm.resolveGlyphs(null, a));
})
.toList()
.toArray(Component[]::new);

}
}

public boolean isDisabledInWorld(Entity entity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,30 @@
import cz.neumimto.rpg.common.effects.*;
import cz.neumimto.rpg.common.entity.players.IActiveCharacter;
import cz.neumimto.rpg.common.utils.MathUtils;
import cz.neumimto.rpg.spigot.SpigotRpgPlugin;
import cz.neumimto.rpg.spigot.entities.players.ISpigotCharacter;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
import net.kyori.adventure.text.Component;
import org.bukkit.entity.Player;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.IntStream;

public class ManaBarText extends EffectBase<Object> implements IEffectContainer<Object, ManaBarText>, ManaBar {

public static BaseComponent[][] ROWS = {
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE003"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE003\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE003\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE002\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE003\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE002\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE003\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE002\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE003\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE002\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE003\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE002\uE004\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE003\uE004\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE002\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE003\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE002\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE003\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004"),
TextComponent.fromLegacyText("\uE000 \uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004\uE004")
};
public static Component[] ROWS;

static {
ROWS = IntStream.range(0, 21)
.mapToObj(a -> "")
.map(Component::text)
.toList()
.toArray(Component[]::new);
}
/*
/title @a actionbar [{"text":"ꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦ"},{"text":"ꐡꐩꐡꐩꐢꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩ"}]
*/
protected IActiveCharacter character;
protected Player player;

Expand All @@ -56,8 +44,8 @@ public void onTick(IEffect self) {
double percentage = MathUtils.getPercentage(character.getMana().getValue(), character.getMana().getMaxValue());
percentage = percentage > 100 ? 100 : percentage;
percentage = percentage < 0 ? 0 : percentage;
BaseComponent[] stringg = ROWS[(int) Math.round(percentage / 5)];
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, stringg);
Component stringg = ROWS[(int) Math.round(percentage / 5)];
SpigotRpgPlugin.getBukkitAudiences().player(player).sendActionBar(stringg);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
subp_version=2.2.0-SNAPSHOT
p_spigot_version=2.1.0-SNAPSHOT-13
# API
nightconfig=3.6.3
nightconfig=3.6.5
parsii=4.0
guice=5.0.1
# Common
Expand Down
37 changes: 36 additions & 1 deletion resourcepack/oraxen/glyphs/ntrpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,39 @@ ntrpg_shift_menubg_post:
ntrpg_menu_background:
texture: ntrpg/gui_layout_basic.png
ascent: 20
height: 228
height: 228

ntrpg_mana0:
texture: ntrpg/mana0
ascent: 2
height: 27

ntrpg_mana1:
texture: ntrpg/mana1
ascent: 2
height: 27

ntrpg_mana2:
texture: ntrpg/mana2
ascent: 2
height: 27

ntrpg_split1:
texture: ntrpg/space_split
ascent: -32768
height: 4

ntrpg_split2:
texture: ntrpg/space_split
ascent: -32768
height: 5

ntrpg_split3:
texture: required/null
ascent: -32768
height: -4

ntrpg_bar_space:
texture: ntrpg/space_split
ascent: -32768
height: -4
1 change: 1 addition & 0 deletions resourcepack/oraxen/items/ntrpgui.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#/title @a actionbar [{"text":"ꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦꐦ"},{"text":"ꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩꐣꐩ"}]
ntrpg_back:
material: PAPER
excludeFromInventory: true
Expand Down
Binary file added resourcepack/oraxen/pack/textures/ntrpg/mana0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resourcepack/oraxen/pack/textures/ntrpg/mana1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resourcepack/oraxen/pack/textures/ntrpg/mana2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5392d57

Please sign in to comment.