#help-development

1 messages · Page 1260 of 1

vague swallow
#

without placing any blocks

young knoll
#

Scoreboard teams are the proper way

lavish vine
vague swallow
young knoll
#

I think entities work if you add them to the team?

#

Maybe

vague swallow
#

Yes but I want the player to not be pushed away by the block he's standing in

#

not an entity

vague swallow
robust helm
valid basin
#

Is sweep attack radius increased with higher enchant levels?

#

If someone knows

#

Can't seem to find the exact values on Minecraft wiki

#

And if someone knows exact degrees I'd appreciate it

vague swallow
robust helm
#

ig u could use packets

#

for block place

vague swallow
nova notch
#

Or rather, it increases the percentage of your attack damage that the sweep does

dawn flower
#

how do i change millions of blocks without causing lag

#

it'll happen once every 30 minutes to reset the map

blazing ocean
#

FAWE

#

it's the most straightforward and painless way

#

(minus the pains of the WE API)

dawn flower
#

i tried fawe api but it gave me a headache

#

there isn't any sources or documentations

blazing ocean
#

I mean, what do you need to change

#

if it's just basic block replacement, that's easy

dawn flower
#

basically from point a to point b will be light
from point c to point d will be sandstone
from point e to point f will be ores

#

i'm not trying to recreate superflat, it just seems like i'm trying to

#

all forums say you use FaweAPI.getSessionBuilder(), which doesn't exist

shadow night
#

lol

#

I hate it when that happens
you google how to do something, get like 100 posts telling you to use one specific method and for some reason it just doesn't exist

paper viper
#

Nah I use WorldEdit because FAWE is buggy

#

You just need to schedule paste chunks

dawn flower
paper viper
#

What ☠️

dawn flower
#

that's an overestimation but u get the point

paper viper
#

It’s not old at all

dawn flower
#

it's really old iirc

paper viper
#

It’s modern

#

Idk what you’re talking abt

#

Search it up

shadow night
#

worldedit is ancient lol

#

also, iirc fawe is basically just a worldedit reimpl, no?

paper viper
#

WorldEdit is not ancient at all

#

They released 1.21.5 builds like weeks ago

#

FAWE doesn’t even have 1.21.5 yet

shadow night
dawn flower
#

the whole reason i'll use fawe is because i dont want lag when replacing millions of blocks

shadow night
#

although worldedit is still maintained, it is ancient

paper viper
#

And also if you want to go through the nightmare of debugging uninplemented methods, entities not pasting (isn’t even working)

dawn flower
#

and i assume worldedit is laggy, but i could be bsing tho

#

i never tried it

paper viper
#

And paste certain chunks per tick

#

I mean unless you guys have used both…

#

Have you?

dawn flower
#

i just said i didnt

paper viper
#

I’ve used it and always went to WE because it’s just unstable

#

Like entities not pasting at all, even though it works in WE

dawn flower
#

does anyone know how to get an instance of EditSessionBuilder in fawe

dawn flower
#

or copy/paste at all

blazing ocean
dawn flower
#

i love you.

blazing ocean
#

And then EditSession#replace etc

#

If you want a fast edit session you can use this ```kt
return WorldEdit.getInstance()
.newEditSessionBuilder()
.world(BukkitAdapter.adapt(world))
.checkMemory(false)
.allowedRegionsEverywhere()
.fastMode(true)
.relightMode(RelightMode.OPTIMAL)
.limitUnlimited()
.build()

dawn flower
#

what's fast mode

blazing ocean
#

doesn't add it to the undo tree

#

making it non revertable

dawn flower
blazing ocean
#

sure

manic delta
#

guys do you know how to use the new tebex api?

#

i dont understand the docs

#

lol

#

im too dumb for that

blazing ocean
#

oh god it's terrible, we moved brawls' tebex stuff over recently

#

I'll take a look at the code in a sec

manic delta
#

i want to create a basket i think

#

give me a second

dawn flower
#

how do i do percentages with fawe api

blazing ocean
#

I think we had to hook it up to our DB directly

blazing ocean
manic delta
dawn flower
#

there's a command so im guessing there's an api as well?

blazing ocean
#

you either have to do it in smaller chunks or just cry

blazing ocean
manic delta
mental frigate
#

guys how do i hide the "When in Main Hand:" etc. text?
this doesnt seem to work

meta.addItemFlags(ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_ATTRIBUTES);
paper viper
#

Are you setting back the itemmeta?

mental frigate
#

yeah, it hides the enchantments

paper viper
#

Try adding just all the flags

mental frigate
#

fair enough

blazing ocean
slender elbow
#

bro is using paper

blazing ocean
#

wtf is a paper

jagged thicket
#

paper sex

chrome beacon
#

Need to add an attribute

small egret
#

Does anybody know how to code? I need a coder for my new minecraft smp

mental frigate
mental frigate
mental frigate
#

how should i check for specific item in custom gui? by slot, by custom model data, or something else?

blazing ocean
mental frigate
blazing ocean
#

but you're running paper

mental frigate
#

yeah, what bout it

remote swallow
#

do you know where you are

#

should we call a doctor

mental frigate
#

like i dont understand what is your problem guys honestly

#

why does it matter whether im running my server on spigot or paper

#

or even on hopes and dreams

dawn flower
#

how do i get entities in a bounding box

#

or players

wet breach
#

so if you are having issues with paper, even if its a spigot plugin its an issue where you will need to go to them to help resolve

#

that is why it matters

#

for example, paper allows chunk loading using multiple threads, spigot does not and entity ticking happens on multiple threads in paper but in spigot it is not

#

and it just goes on that the differences are many that you can't call them the same

willow tide
#

can somone help me

wet breach
wet breach
dawn flower
#

?

mental frigate
wet breach
dawn flower
#

oh lol

eternal night
#

Pdc

#

Or server side slot index

mental frigate
mental frigate
mental frigate
eternal night
young knoll
#

Look at you with your fancy fastutils maps

willow tide
#

k can somone help me with towny

willow tide
#

oh mb but no one is helping

robust helm
#

?dontasktoask

#

would speed things up either way

willow tide
#

?

wet breach
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

willow tide
#

oh can somone help me figure out how and why towny isnt working on my server

mental frigate
thorn isle
#

ask in the towny discord

willow tide
#

what'

blazing ocean
#

what is hard to comprehend about that

mental frigate
#

wat fastutils maps

blazing ocean
#

a map from fastutil

chrome beacon
#

As for your question any attribute will work

rancid hare
#

Hey I have made a rank plugin that adds scoreboard teams to change the player prefix etc.

I want the player name over the head to be white
BUT I want the player to GLOW in red how to achieve that?

dawn flower
#

either use an api or get into packets

#

idk what u mean by "I want the player name over the head to be white" because it's already white

thorn isle
#

isn't that determined by the team color?

#

like the glow color

#

so if he uses teams to change the glow color to red, that'd change his name to red as well? not sure, i've never really used glow and hardly ever teams

paper viper
#

Yes that's true

#

The only way is to use packets to send team packet

rancid hare
quasi gulch
#

When i check getTicksLived() in the CreatureSpawnEvent. Is it safe to assume that a newly generated mob always has 0 ticks lived? Because bees spawn "again" with different uuid and same metadata. I want to differ between these two scenarios where a bee spawns for the first time and where it just leaves the beehive again.

thorn shuttle
#

Hey, I'm trying to set up a material palette for Minecraft, and to do that** I need to be able to have a unique ID for each material. **

Up until now I've just been using hard coded string values for the ID. Values like "WOOL_01". This REEEEALLY does not scale well though as I am losing my marbles already trying to keep track of which materials I've added already and which ones are still missing. So I'm trying to figure out a new way to uniquely identify each block material automatically.

  • Each entry in my palette will have data for both side and top views.
  • Each entry will specify the texture file to use for both top and side views.
  • Each entry will have the block ID + NBT tags to use to create the block with its correct orientation in place.
  • Each entry will have a human friendly label like "Lapis Lazuli".

So far I've had a couple of ideas:

  1. Identify it by texture file name. This works fairly well, unless mojang arbitrarily decides to change the texture file names at some point.
  2. Identify it by block ID, and some other info to distinguish its unique variant. If this approach is used, do you identify the entry by its side viewing angle variant, or its top viewing angle variant?
  3. Some other option I haven't considered yet?
lavish wing
#

Guys, tell me please how can I implement Spigot improvments into my code
I ve already found sources for 1.6.4 mc, but when it compiles it has only craftbukkit, without spigot improvments (netty package, api and etc)

thorn isle
#

1.6.4
not even the 1.8 guys are going to touch this one

lavish wing
sly topaz
#

before 1.8 it was just bukkit and spout

#

oh it did exist, you just can't find the source anywhere

#

I would honestly go with something like LegacyFabric instead of an old spigot version tbh

#

there doesn't seem to be a single soul who has done work to support anything lower than 1.8

echo basalt
#

Every combination of block data has an id in a global palette

#

This id is used for the protocol and has some metadata (namedly a namespaced id which links to the assets and lang)

#

The problem with the global palette is that it's not great at cross-version stuff - Each version has its own global palette

#

As long as the client and the server share the same global palette everything's great

lavish wing
lavish wing
sly topaz
#

if you start adding blocks or things like that, they will

lavish wing
#

Oh, got it

But I also need sources of spigot because I want to fix NBTm, chunk overload and other exploits

  • make it faster
sly topaz
#

well, as far I am aware there aren't any places where you can find the spigot source for 1.6.4, just craftbukkit's one

#

if you manage to find them, then that's a start. You're most likely just going to have to decompile it though

lavish wing
thorn shuttle
paper viper
#

I got an issue about players being on teams. I have a gadget, when activated, puts a player onto a team with a custom ChatColor. This is so I can make the player glow a specific color for some amount of time. But another gadget hides nametags. And if I put the player that's already on a glow team to a new team with no nametag, it just breaks because players can't be on several teams at once. You can see my code here. Is there anyway I should change my design to fix this?

#

I was thinking that I would check the glow teams, and then if it's there then I would create a new team with those special attributes

thorn shuttle
#

So would you store just one of those? Or maybe both? (It gets pretty long tho)

sullen marlin
lavish wing
# sullen marlin did you run ./applyPatches.sh

I tried it after fixing the pom.xml file (updated repos/libs), but it says that 0001 POM patch failed
So, I just copied Bukkit/CraftBukkit manually

Can I just delete 0001 POM file? Or what I need to do to fix/skip this error?

sullen marlin
#

no you need to fix it

#

make sure your bukkit/craftbukkit repos are at the relevant commit

#

but tbh I dont think anyone here is terribly interested in 1.6.4, me included

lavish wing
sly topaz
#

it's all the more questionable given plugins were much more limited back then, as the protocol didn't allow for nowhere near as much as it does now

young knoll
#

Display entities? Never heard of them

#

Actually when going that far back

#

Armor stands? Never heard of them

sly topaz
#

there wasn't even stained glass back then lol

ivory sleet
young knoll
#

I did make a model api

#

Did I ever finish it? Of course not

ivory sleet
#

🥲

sly topaz
#

1.7.2 was so lame now looking back at the changelog, it only added acacia and dark oak wood & biomes

#

1.7.4 added the most important mob though, the chicken jockey

young knoll
#

Begins to violently trash theatre

#

What’s with that anyway

#

Is there something special about the chicken jockey scene or are kids just dumb

blazing ocean
#

latter

sly topaz
blazing ocean
#

so, the latter, as I said

young knoll
#

Isn’t everything Jack black says awkwardly pointed out

blazing ocean
#

yes

young knoll
#

I

#

Am sbeve

blazing ocean
#

hello sbeve

#

I need to frame this on my wall

thorn isle
#

what're your thoughts on this

#

re: model api basically

#

it looks to be basically model engine but it uses textured skulls that are transformed into various shapes for all the pieces, so it doesn't require a resource pack

blazing ocean
#

unusable on mobile smh

young knoll
#

It’s going to be laggier since it requires more display entities

thorn isle
#

it seems to support decorative assets, mobs, and animations for both; there's an online catalogue, some sort of an editor plugin, a web editor, and a whole lot of other stuff, but I don't remember ever having heard of it

young knoll
#

Also Mojang might break your kneecaps

thorn isle
#

i was planning to do this myself actually except for simple humanoid models only

#

construct a "player model" from some 12ish skulls arranged so that the knees/elbows can bend around, and pull the textures from a skin file

#

mostly because i'm too lazy to actually put together proper models, finding skins on minecraftheads is much easier 🤡

sly topaz
#

You could just use inventivetalent’s thing to upload your own skins

young knoll
#

That’s what the site does

#

Iirc

slender elbow
#

CHICKEN JOCKRY

#

kablamo

#

yowzas

#

shimble

young knoll
#

Shimble

slender elbow
#

wowzers

#

kaboom

#

I'm only watching that movie if I'm drunk, jfc

young knoll
#

?services

undone axleBOT
thorn isle
#

clown

drowsy helm
#

why are you randomly pinging people

sonic goblet
#

I believe because vc2 reacted to the message with a clown emoji

lavish wing
sullen marlin
#

Nice

buoyant viper
#

game didnt get interesting again until 1.11-1.13 id say

#

1.9 and 1.10 basically dont exist

#

same with 1.14 1.15

#

and 1.18

#

significantly insignificant updates

rough ibex
#

i remember 1.7.10 1.8 1.9 1.13 1.14

#

outside of that it just blends together

nova notch
#

cant wait for caves and cliffs part 5

short pilot
#

What is a good implementation to prevent a custom mob from being shot by arrow, if player is more than 10 blocks away?

#

Should I just use an event listener and grab the player

#

location ?

#

and run a distance check

quaint mantle
#

I suppsoe you could use EntityDamageByEntityEvent and do a distance check

#

Sounds fairly simple 🤔

vernal oasis
#

How would/could I go about changing the nametag above a player's head? I want to make it essentially invisible, but still present because simplevoicechat icons don't appear on nametags from UlimitedNameTags. etc.

valid burrow
#

i did that once a while back

#

u gotta use nms if i remember correctly

#

and interfere & modify the OnlinePlayer object

#

id check but im not home

short pilot
#

trying to do it in the most optimal way

vernal oasis
#

If you have the thingy that'd help lol

mighty wind
#

does anybody know why, when i have a player ride an item and they dismount they take the peak fall damage from the journey

#

i.e they ride a pearl and if it goes 20 blocks high they will take fall damage from that height (when landing on the same Y as where they threw the pearl)

short pilot
#

Fellow intellectuals !! I'm trying to do this simple function to deny custom mob hits with arrow, but for some reason it still hits and damages them. Any help?

@EventHandler
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
    Entity damagedEntity = event.getEntity();

    if (!(damagedEntity instanceof LivingEntity)) {
        return;
    }

    PersistentDataContainer persistentDataContainer = damagedEntity.getPersistentDataContainer();

    if (!persistentDataContainer.has(EntityTags.MOB_TYPE_KEY, PersistentDataType.INTEGER)) {
        return;
    }

    if (!persistentDataContainer.has(EntityTags.KINGDOM_ID_KEY, PersistentDataType.STRING)) {
        return;
    }

    if (event.getDamager() instanceof Arrow arrow) {
        if (!(arrow.getShooter() instanceof Player player)) {
            return;
        }

        // oh... we don't even have to calculate it ;-;
        double distance = player.getLocation().distance(damagedEntity.getLocation());

        if (distance > 10) {
            event.setCancelled(true);
            arrow.remove();
        }
    }
}
#

wait i wasnt registering the event

sly topaz
sly topaz
vernal oasis
#

I need the name to show up so the voicechat icon can appear.

drowsy helm
sly topaz
#

or are you talking about modifying their names

vernal oasis
#

I want to either.
A) make the top line replace the person's nametag.
or
B) Make iCats essentially invisible but still there so the voicechat icons will appear

smoky anchor
#

teams + nametagVisibility ?

sly topaz
#

I do wonder whether hiding the nametag through nametag visibility will still render the simple voice chat icons

#

does SVC not send a packet with the information anyway? You could just replicate the icons on the text display

smoky anchor
#

I think the server just tells the client "don't render the nametag"

short pilot
sly topaz
mortal vortex
#

What event is fired when an item loses durrability, and is removed from your inventory (breaks)?

#

and is it one that can be cancelled, and left on 0.

sly topaz
#

unsure about leaving it at 0, you'll have to test

mortal vortex
#

if it were cancelled, then what would happen?

ivory sleet
#

There’s the item break event also (prob not cancelable)

sly topaz
#

then it'd return to whatever durability was before the event of course

sly topaz
#

I don't know any instance I'd prefer the break event to the damage one tbh

#

I guess the item damage event is newer or something

mortal vortex
#

How do you guys deduce if it's cancelable or not? do the javadocs explicitly mention?

ivory sleet
#

implements Cancellable usually

sly topaz
ivory sleet
#

or if there’s a setResult method of some sort

mortal vortex
sly topaz
#

I always forget durability doesn't count up

mortal vortex
#

ohhhh okay

#

tank u

graceful depot
#

hi

#

can someone help me?

drowsy helm
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

graceful depot
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

drowsy helm
#

can you format it

#

or paste it here in a code block

#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
graceful depot
#

okay

#

From the visual studio

# Prefixo geral que você pode usar em outras mensagens
prefix: '&6[BaconMC]&r' # Este é o prefixo global que aparece nas mensagens

# Mensagens personalizadas para eventos
mensagens:
  join: '&eBem-vindo, {player}!'   # Mensagem ao jogador entrar no servidor
  quit: '&e{player} saiu do servidor!' # Mensagem ao jogador sair do servidor

# Configurações do chat
chat:
  enabled: true # Define se o chat está ativado globalmente
  worlds:         # Especificar os mundos onde o chat será habilitado ou desabilitado
    - "world"      # Exemplo de mundo onde o chat está ativado
    - "world_nether" # Exemplo de mundo onde o chat está desativado
    - "world_the_end" # Outro mundo com chat ativo

  # AVISO PARA QUEM ESTIVER USANDO ESTE PLUGIN A PARTE DE BAIXO ATE ADMIN-WHITELIST É APENAS PARA QUE O PLUGIN N DER ERRO NÃO REMOVER!
  # Controle do formato de mensagens do chat
  format:
    global-prefix: '[G]'     # Prefixo do chat global
    local-prefix: '[L]'      # Prefixo do chat local
    mention-sound: ENTITY_EXPERIENCE_ORB_PICKUP  # Som ao ser mencionado

  # Outros detalhes relacionados ao chat
  default: global # Modo de chat padrão se quiser usar isso depois por jogador
  local-range: 100 # Distância máxima em blocos para o chat local funcionar
  # ATE AQUI

# Controle de whitelist para administradores
admin-whitelist: false
#

From the server

prefix: '&6[BaconMC]&r' # Prefixo geral que você pode usar em outras mensagens

mensagens:
  join: '&eBem-vindo, {player}!'
  quit: '&e{player} saiu do servidor!'

admin-whitelist: false

chat:
  default: global # Modo de chat padrão se quiser usar isso depois por jogador
  local-range: 100 # Distância máxima em blocos para o chat local funcionar
  format:
    global-prefix: '[G]' # Prefixo do chat global
    local-prefix: '[L]' # Prefixo do chat local
    mention-sound: ENTITY_EXPERIENCE_ORB_PICKUP # Som ao ser mencionado
#

@drowsy helm

drowsy helm
#

so you're saying it's not copying over the default config properly?

graceful depot
#

yes!

sly topaz
#

show your code

graceful depot
#

the fileof all my code~?

eternal oxide
#

SnakeYAML supports some comments but I'm not sure Spigot will save random comment lines

sly topaz
#

if they're just copying over the default config, that shouldn't be a concern though

eternal oxide
#

they are not though

sly topaz
eternal oxide
#

thats from a config.save()

graceful depot
#
package com.baconmc;

import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
import org.bukkit.plugin.java.JavaPlugin;
import com.baconmc.commands.*;
import com.baconmc.listeners.*;
import com.baconmc.managers.ChatToggleManager;

public class BaconMC extends JavaPlugin {

    private LuckPerms luckPerms;
    private ChatToggleManager chatToggleManager;
    private boolean adminWhitelistEnabled = false;

    @Override
    public void onEnable() {
        getLogger().info("BaconMC ativado!");

        // Salva o config.yml padrão caso ele ainda não exista
        saveDefaultConfig();

        // Carrega o valor de admin-whitelist
        this.adminWhitelistEnabled = getConfig().getBoolean("admin-whitelist", false);

        // Inicializa o LuckPerms
        this.luckPerms = LuckPermsProvider.get();

        // Inicializa o ChatToggleManager
        this.chatToggleManager = new ChatToggleManager();

        // Registra comandos
        getCommand("exemplo").setExecutor(new ExemploCommand());
        getCommand("heal").setExecutor(new HealCommand());
        getCommand("feed").setExecutor(new FeedCommand());
        getCommand("day").setExecutor(new DayCommand());
        getCommand("tpa").setExecutor(new TPAcommand());
        getCommand("tpaaceitar").setExecutor(new TPAaceitarcommand());
        getCommand("tpadeny").setExecutor(new TPAdenyCommand());
        getCommand("adminwhitelist").setExecutor(new AdminWhitelistCommand(this));

        // Usa o prefixo do config.yml
        String prefixo = getConfig().getString("prefix", "&6[BaconMC]&r");
        getCommand("adminchattoogle").setExecutor(new AdminChatToggleCommand(prefixo, chatToggleManager));

        // Registra os listeners
        getServer().getPluginManager().registerEvents(new PlayerListeners(), this);
        getServer().getPluginManager().registerEvents(new ChatListener(), this);
        getServer().getPluginManager().registerEvents(new ChatSystemListener(luckPerms, chatToggleManager), this);
        getServer().getPluginManager().registerEvents(new AdminWhitelistListener(this), this);
    }

    @Override
    public void onDisable() {
        // Salva o estado da whitelist para o config.yml
        getConfig().set("admin-whitelist", adminWhitelistEnabled);
        saveConfig();
        getLogger().info("BaconMC desativado!");
    }

    // Getter e setter para adminWhitelistEnabled
    public boolean isAdminWhitelistEnabled() {
        return adminWhitelistEnabled;
    }

    public void setAdminWhitelistEnabled(boolean enabled) {
        this.adminWhitelistEnabled = enabled;
    }

    public LuckPerms getLuckPerms() {
        return luckPerms;
    }

    public ChatToggleManager getChatToggleManager() {
        return chatToggleManager;
    }
}
``` the main.java
sly topaz
eternal oxide
#

also, delete the config.yml on the server and retry/.

eternal oxide
#

as saveDefaultConfig() will not overwrite an existing config

#

so if you lost the comments in a previous attempt, it will not replace them

young knoll
#

Non-inline comments should work fine?

graceful depot
#

it continues @eternal oxide

#

it continues other config

eternal oxide
#

I believe section comments shoudl save, just not random ones

graceful depot
sly topaz
#

I also feel like that code was written by AI, given the amount of comments (ironically)

sly topaz
eternal oxide
#

yeah

#

odd. I can;t swear to it but I'm sure section comments are preserved, just not empty lines or random comments

graceful depot
#

i delete this saveConfig(); ? in the ondisable?

young knoll
#

There’s a setComments and setInlineComments api method

#

So

eternal oxide
#

yep section shoudl also save

#

I'd check but waiting for a delivery so don;t have time

graceful depot
#

so what i make?

eternal oxide
#

Shut down your server, delete teh server config, restart server

graceful depot
#

i already make that

eternal oxide
#

you didn;t have time to do a shutdown/start

graceful depot
#

server config?

#

im paper

obsidian lily
#

?whereami

obsidian lily
#

here's spigot

slender elbow
young knoll
#

We finally found him!

shadow night
#

Is that the legend

obsidian lily
#

bro literally asked everything

#

and said he's using paper

dawn flower
#

how do i make it so you can use a specific item, say throwable tnt in either your right or left hand BUT if you have a throwable tnt in your left and right hand then it will only use the one in your left hand

#

if that makes sense

worthy yarrow
#

You would only modify the stack in the left hand if I’m understanding that question correctly

ivory sleet
#

yea legit check if the item exists in both hands and then handle it exclusively for ur left hand

dawn flower
#

i'll try ok

worthy yarrow
#

I don’t remember if #isSimilar takes into consideration stack amounts or not, could get away with an easy comparison if not tho

ivory sleet
#

it doesnt

worthy yarrow
#

Makes that a bit easier then

dawn flower
#

how do i instantly explode an end crystal when placing it down

#

wait wtf i cant place an end crystal

#

how do i light up the area without light blocks

#

light blocks creates alot of problems like no water flow, no lava flow, no end crystals, it gets removed when placing blocks and so on

young void
#

is there a stable hybrid spigot fork that allows me to have the normal plugins alongside just one mod?(timeless and classic)

blazing ocean
#

"stable" and "hybrid" don't mix well

young void
quaint mantle
#

Make your own 🗿

young void
#

its like a penguin trying to fly

blazing ocean
#

just don't use hybrids

young void
#

then you dont have to have a hybrid server

limber nova
#

Is this just for spigot stuff or can i ask about datapacks?

#

cus im in dire needs

jagged thicket
#

but yeah its meant for spigot

#

maybe ask in #general

upbeat silo
#

When a player dies, I spawn a custom mob as a cosmetic effect — the location can be very far from other players, anywhere in the world. I want to automatically remove that mob after a certain amount of time. I've tried every possible method, but I couldn't manage it.
The problem is: if the chunk is loaded (for example, if another player is nearby), the mob gets removed as expected. But if the player dies in a very remote area where no one is around, the chunk eventually unloads — and that mob stays there forever, like trash. Since the mob doesn't move, it's stuck in that location permanently.

manic delta
#

Entity with setFreezeTicks(int ticks) works with 20L * duration? or does it have his custom math

#

because it doesnt support long

worthy yarrow
upbeat silo
willow tide
#

can somone help me

worthy yarrow
upbeat silo
#

Huge thanks man, it’s working great now!

umbral ridge
#

anyone here uses HikariCP?

manic delta
blazing ocean
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

rough drift
blazing ocean
#

if something doesn't accept a long doesn't mean it doesn't accept ticks lol

willow tide
#

can somone help me

smoky anchor
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

willow tide
#

with towny

#

plugin

smoky anchor
willow tide
#

talks there its so slow

smoky anchor
#

well it's the relevant channel so go there, nobody's gonna help you here

willow tide
dawn flower
#

why does RespawnAnchor#setCharges do nothing

#

nvm i'm dumb

dawn flower
#

how do i make a totem bag that activates totems inside it without you having to hold the totems

umbral ridge
blazing ocean
#

lmao what

umbral ridge
# rough drift I do why

yeah I was wondering if it's really that much difference between hikari and a default jdbc..

eternal oxide
#

he was correct. he didn;t ask any questions

rough drift
hidden spade
#

What is the correct usage of the transfer packet?

slender elbow
#

the correct usage is to use the api

hidden spade
#

🙄

#

well idk if it supposed to be send in the config state or if i can be sent in the play state because when i try send it in play state the client doesnt respond even though it receives it

young knoll
#

You can definitely send it during the play state

hidden spade
#

i wonder why the client isnt responding to it then

#

the client does receive it just doesnt do anything with it

slender elbow
#

is the target server reachable? does it accept transfers?

hidden spade
#

yes both

slender elbow
#

client version?

hidden spade
#

1.21

#

target, client and start server are all 1.21

slender elbow
#

is the server behind a proxy?

hidden spade
#

nope

#

the target isnt even showing a client even attempted to connect

slender elbow
#

got any client mods?

hidden spade
#

only 1 for packet inspection

#

but i dont see how that would make a difference

slender elbow
#

any warnings or errors in the client logs?

hidden spade
#

nothing

#

is there a jvm flag for debug mc logging?

slender elbow
#

you can change the log level with a custom log4j2.xml and pointing to it with the log4j system property

#

works plenty fine for me although on a vanilla client

hidden spade
slender elbow
#

just calling the transfer method in a command

hidden spade
#

my client is fabric but i dont think that would create an issue

#

do i need to handle cookies?

slender elbow
#

handle in what way?

#

the client doesn't care about cookies when transferring

hidden spade
hidden spade
slender elbow
#

i mean, you can if you want to or if they are of any use to you, but the client doesn't do anything with cookies other than store them to send back to the server when requested

azure vault
#

how can i run a task while a player is holding down right click?

young knoll
#

The player will send an interaction every ~50 milliseconds

azure vault
#

thanks

#

thats what i needed to know

hidden spade
young knoll
#

So I guess you could just keep running the task until you stop receiving interactions

azure vault
#

ye

hidden spade
#
KeepAliveS2CPacket [00:00:01.075]
 p id = 0
ServerTransferS2CPacket [00:00:01.300]
 p host = "(redaced)"
 p port = 25500
#

this is the correct usage right

#

(logged from what client receives)

slender elbow
young knoll
#

OMGZ u leaked ur ip

slender elbow
#

dw, i use protection like my mum always told me to

hidden spade
hidden spade
slender elbow
#

that's the vanilla transfer command, but it's literally no different than calling Player#transfer(host, port)

young knoll
#

It’s a shame servers have to explicitly enable transfers

#

I can’t just send players I don’t like to hypixel

hidden spade
#

😭 🙏🏼

slender elbow
#

you should actually try with a vanilla client

hidden spade
#

how am i failing so badly then

hidden spade
slender elbow
#

¯_(ツ)_/¯

hidden spade
#

what server version are you using

slender elbow
#

1.21.4 servers + client

hidden spade
#

my client doesnt even resolve /transfer

slender elbow
#

the command is behind op level 2

#

no, 3

#

goofy ahh level

hidden spade
#

ong

#

im try on 1.21.4

left jay
#

can anyone help me with this?

hidden spade
azure vault
#

how can i change a player's yaw without teleporting them?

left jay
hidden spade
vague swallow
#

//paste

#

/paste

#

.paste

#

?paste

undone axleBOT
vague swallow
#

Could someone help me with this UnsupportedOrperationException please? https://paste.md-5.net/falusiveni.cs

So basically there is a list getCandidates(election) with a bunch of OfflinePlayers which are all have a certain number of votes. This can be found out with getVotes(election, candidate). They're being sorted by their amount of votes and put in that order into a new list sortedCandidates()

#

Then for each day passed since the election I remove the player at the top of the list, so the player with the most votes. The days that passed can be found out with daysAgo(election)

smoky anchor
#

Easy: don't use immutable collection

vague swallow
smoky anchor
#

A mutable collection, ArrayList would suffice

#

You can probably do new ArrayList<>(getCandidates(election).stream().sorted((a, b) -> Integer.compare(getVotes(election, b), getVotes(election, a))).toList());

#

there may be better way, im lazy

vague swallow
#

O: Thanks so much

next plume
#

Is calling Player#setPlayerListName() incompatible with the vanilla command /team?
I have a plugin which does that and someone is saying my plugin breaks his team prefixes.

short pilot
#

hey guys how can I make custom entity that's a stationary archer

#

which goals allow for shooting bow and arrow 😭

sonic goblet
# short pilot hey guys how can I make custom entity that's a stationary archer

Dere it’s been months and you still ask for help with every goal you create, at this rate you better list every spigot member as an author in your plugin.yml

For arrow goal: https://mappings.dev/1.21.5/net/minecraft/world/entity/ai/goal/RangedAttackGoal.html

As for stationary you can either set their default speed attribute to 0 or remove their pathfinding goals when you spawn them

short pilot
#

no I already did that ye

#

I just like asking questions for funsies idt there's anything that warrants such a reply right? @sonic goblet

#

but damn that took me out of my day 😭 no need to call me out like that

sonic goblet
#

I just want to see you spread your wings and fly on your own, but everyday I look in here and you’re still in the nest looking for your next meal of NMS goals 😭

short pilot
#

uh huh

short pilot
#

if you haven't noticed from my code snippets I've been sending, yes I've actually figured shit out

#

something which if you're gonna call me out for my past questions, no matter how stupid, you should have caught on

#

and honestly I don't think there's a harm in my questions because if some future guy wants to come here and do a Ctrl f for whatever targeting functionality I asked about, they can find answers

#

so that's my train of thought

short pilot
cinder abyss
#

Hello, how can I hide players names ? I want the players names to be hidden/censored (but I prefer if it can be hidden) in TAB and above their head

blazing ocean
#

for tab, #setPlayerListName

sly topaz
blazing ocean
#

for name tags, you'll need to use text displays

cinder abyss
sly topaz
short pilot
cinder abyss
sly topaz
short pilot
#

make your team a uuid 😭

sly topaz
#

you're also using the main scoreboard which you shouldn't

cinder abyss
cinder abyss
sly topaz
sly topaz
# cinder abyss why ?

because that scoreboard persists its data, meaning its effects would persist even after you remove the plugin

worthy yarrow
#

Just make your own teams system

short pilot
#

😭😭

short pilot
#

but

#

it could work(?)

cinder abyss
#

but actually it's a good reason ig

short pilot
#

I'm not sure how optimal it'd be but you could just store that and the chance of it conflicting is low

cinder abyss
short pilot
#

that'd prob be easier

#

just back it up to a database or a file ig

worthy yarrow
#

I don’t like vanilla teams or the api that comes with just my opinion

#

That’s not to say you can’t emulate the same things vanilla teams can do, ie: scoreboard display to a specific team

paper viper
#

I hate the teams system

short pilot
#

yeah I guess you could just map player UUID to their teams using your custom system @cinder abyss

paper viper
#

I also hate how a player can't be on several teams at once

#

it just.. makes things more complicated

cinder abyss
worthy yarrow
#

Vanilla teams work… but you can just as easily support what the api provides as well as additional features because it’s your own object

sly topaz
#

this is how you ultimately want ot do it if you want to make sure to not mess up whatever other plugins might be doing with it

public void addPlayer(Player player) {
  var scoreboard = player.getScoreboard();
  if (scoreboard == Bukkit.getScoreboardManager().getMainScoreboard()) {
    scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
    player.setScoreboard(scoreboard); 
  }

  var team = scoreboard.getPlayerTeam(player);

  if (team == null) {
    team = scoreobard.registerNewTeam(player.getUniqueId());
    team.addEntry(player.getName());
  }
  team.setNametagVisibility(NametagVisibility.NEVER);
}
paper viper
#

my main concern is i don't understand why things like glow color and name tag visibility are not independent of teams

#

it doesnt make sense for them to be linked together and the only way

#

you should at least be able to do them on their own

#

rather than having to create a fake team and get into a mess with figuring out compatability...

sly topaz
#

I mean, people overcomplicate teams too much, only thing you have to do is use an existing team if it exists and change the properties you need

#

in most cases it won't conflict

worthy yarrow
#

I try my absolute hardest to not depend on the api where possible so I usually just make my own internal system that can do what the api provides + whatever I want extra

sly topaz
#

using packets for what is essentially the same behavior ends up being messy

sly topaz
#

that's like programming in Java while only using JNI

#

completely unmaintainable

worthy yarrow
#

Go fuck around with the conversation api honestly that’s what made me start

sly topaz
#

Conversation API has been broken for ages now, I didn't think nobody wanted to use it at this point

#

even more so considering chat messages are a mess to use as a conversation system nowadays, it used to be easier before messages were signed and all that

worthy yarrow
#

Obviously you make a spigot plugin and you’re using the spigot api, some bits are awful to work with tho so I just make my own impl

short pilot
#

I think it's nice to go by a case by case basis

#

can't generalize one paradigm to every library

sly topaz
#

to be fair, the conversation API should just be deprecated at this point, nobody cares about maintaining it properly

#

mostly because it's a remant of the bukkit days

worthy yarrow
#

Conversations, teams, scoreboards, name tags, etc I have done my own impls for

umbral ridge
#

its always the best if you do everything yourself..

sly topaz
#

doing your own impl for teams/scoreboards is silly, the API isn't missing anything in regards to that

worthy yarrow
#

I mean scoreboards not really, I still use the api for them

worthy yarrow
#

Maybe I like to make things harder but for the purpose of my teams in the current project it’s just easier to manage internally

young knoll
#

Wellllll, the api is missing options to set the number formatting

sly topaz
#

too bad Choco gave up on their PR

young knoll
#

Yeah choco is bad

#

Smh

sly topaz
#

it looked very promising, don't even know what was stopping it at that point besides some comments around plugin compatibility with the old vs the new methods

worthy yarrow
#

I guess it just depends what you need from the api vs what you could do yourself

blazing ocean
cinder abyss
#

also, I truncated player uuid because the limit of chars for team is 16

short pilot
warm mica
sly topaz
#

well, all players which you don't want the nametag to be seen

cinder abyss
young knoll
#

Don’t they all need to be using the same scoreboard

sly topaz
#

yes

young knoll
#

Well you are creating a new scoreboard for each player with that code

sly topaz
#

yes I am rewriting what I initially wrote lol

paper viper
#

Is it possible to make one player glow red and another glow blue for a specific player?

#

Like would modifying the the red player and blue player scoreboard and adding the current watcher to their scoreboard work?

earnest girder
#

if I want to have multiple worlds on my server should i just go straight to the Multiverse Core plugin or can I do it feasibly by coding it?

would it not work if I just put multiple worlds into the server folder and then used Bukkit#getWorld("name") to move players between them (when activated via custom end portal)

I need 2 overworlds and 1 End on my server (nether disabled)

#

I'm honestly not too sure about how world files/folders even work

sullen marlin
#

new WorldCreator("worldname").createWorld()

#

and then yes getWorld etc to move

#

multiverse probably easier unless your worlds are really basic

earnest girder
#

yeah I literally just need to TP players between 2 normal worlds

#

okay, thanks

rugged fern
#

Is there any way to have his own totem? With animation etc.?

mortal vortex
rugged fern
#

The totem animation how could i send it?

sullen marlin
slender elbow
#

Undeclared identifier playEffect
Cannot apply operator + to operands playEffect and TOTEM_RESURRECT

#

hm that might make an interesting concept for a functional language actually

#

thanks for the idea, I'll make sure to not credit you

young knoll
#

player + playEffect + TOTEM_RESURRECT

#

obviously no ; because we’re a cool language

slender elbow
#

I was thinking more so Player + playEffect + player + TOTEM_RESURRECT

#

this is just Haskell all over

#

the first part is funky

#

idk

sly topaz
#

sounds more like Erlang to me

slender elbow
#

it's all the same

rugged fern
#

And if u want a specific item to show up?

slender elbow
#

runs

sly topaz
#

or F#, even

#

player |> playEffect TOTEM_RESURRECT 🤑

slender elbow
#

I have yet to play around with F#

#

seems cool

sly topaz
#

I've only ever played around with it, it's a pretty cool language for language nerds

slender elbow
young knoll
#

Man they added a component for almost everything

sly topaz
#

death protection I think was it

young knoll
#

And yet no component to make an item act as a fire source

#

Like flint and steel or fire charges

sly topaz
#

I wouldn't be surprised if they add one for that sooner or later, given almost every item action has become a component now

young knoll
#

How about one for using the item on the surface of water, like lily pads and boats

#

Or one for deleting system32

sly topaz
#

now that I am looking at the FlintAndSteelItem and FireChargeItem, they have almost identical code for Item#useOn lol

young knoll
#

Well they both spawn fire

#

Makes sense

slender elbow
#

yeah but flint and steel was mentioned by the steve in the movie

short pilot
#

hey fellas

#

is there a cleaner way to cancel a BlockExplodeEvent just if a dragon egg is one of the blocks, or do I have to loop through all the exploded blocks to check?

#

because i think the current method im using is pretty inefficient

#

worst case O(n)

rough ibex
#

an explodeevent isnt coveringthat many blocks

#

probably not

sly topaz
#

O(n) isn't a measurement of efficiency, it is a measurement of time complexity

#

with that in mind, O(n) isn't necessarily slow, it all depends on the scale of n and for explosions I doubt it'd be an issue

sullen marlin
#

oh I replied to this thread

#

how could it possibly be made more efficient

#

there's no sub-O(n) way to check if n items are dragon eggs lol

sullen marlin
short pilot
#

ah i was thinking maybe there was an event for when a block breaks but it's due to explosion

#

or maybe the block break event already covers that?

slender elbow
short pilot
#

does RangedAttackGoal use ticks for timings?

sullen marlin
#

no idea but most of MC is ticks

short pilot
#

oops wrong image

#

    @Override
    public boolean canContinueToUse() {
        LivingEntity target = archer.getTarget();

        if (target == null || !(target instanceof Player player)) {
            return false;
        }

        Kingdom playerKingdom = kingdomManager.getPlayerKingdom(player.getUUID());
        UUID playerKingdomID = (playerKingdom != null) ? playerKingdom.getID() : null;

        return !player.isCreative() && !player.isSpectator() && (playerKingdomID == null || !kingdomID.equals(playerKingdomID));
    }
#

is overriding canContinueToUse necessary for ranged attack targeting?

sly topaz
#

is it necessary? No, for all the server cares you could put all your logic in the tick method

#

should you use it? Well that's a harder question to answer, but probably should since it's there

short pilot
#

hmm ok

#

im trying to debug why the skeleton keeps locking onto players even on gamemode changes and thought checking for those here would help

#

but no

sly topaz
#

what do you mean by locking, as in the goal never stops running? Or that it doesn't try to attack other players even when out of range?

short pilot
#

range is fine

#

stays confined to set targeting box

sly topaz
#

are you extending/using an existing goal or did you make your own?

short pilot
#

extending Goal

#

will try setting target to null upon loss of current target

#

maybe that will help

sly topaz
#

did you extend the RangedBowAttackGoal and override its canContinueUse method?

short pilot
#

oh i just extended the default Goal class

sly topaz
#

so you just made your own goal

#

I'd just extend the RangedBowAttackGoal

short pilot
#

ohh ok

#

i set both in the entity itself, that's what i meant

this.goalSelector.addGoal(1, new RangedAttackGoal(this, 1.0, 40, 60, 32.0f));
this.targetSelector.addGoal(1, new ShootNonFactionPlayersGoal(this, kingdomID));
#

oops

sly topaz
#

I mean, the RangedAttackGoal depends on NearestAttackableTargetGoal to find a target, so that isn't a bad way to do it

#

though that being the case, your goal could just be a TargetingConditions.Selector

fossil yew
sly topaz
#

of course, you'll have to add something that can verify you're in fact the author in the report

#

from what I can see though one is a skript and the other is a plugin, and just recreating an existing plugin is completely valid

#

just like there's a hundred Essentials clones, it really isn't something you can control

#

oh wait, are you the one who made the bliss smp? If so then you're pretty much out of luck, you can't stop people from copying your server lol

#

if you are feel really strongly about it, you can trademark bliss smp and legally bully them that way but that costs money

buoyant viper
#

is there a fully free API for global weather forecasts?

#

like one i dont need to sign up for

#

im just too lazy to register for OpenWeatherMap

blazing ocean
#

used it when I was making a weather app

blazing ocean
buoyant viper
#

at least not since the last time i tried it

paper viper
#

web scraping

blazing ocean
#

just use openweathermap...

wet breach
#

since you can look at world weather info

#

you might have to use long/lat for the locations

#

or if you know a particular station id that would have the weather you are looking for you can query the data from that specific station

buoyant viper
#

yeah, lat/long for london off of google maps fails

#

but lat/long for my current NJ location off google maps works

wet breach
#

the endpoint you used is not valid

wet breach
#

might have to use the location endpoint instead

#

from what I can tell they do provide forecast information for other countries via their api

buoyant viper
#

now i cant get any data 💀

mighty wind
#

anyone know if its possible to make mobs that cant usually fly, fly?

sullen marlin
#

sure its possible

mighty wind
#

omg the goat responded to me O_O

#

i guess it would be

#

are pathfinders still the sauce or should i use brains

sullen marlin
#

idk depends on the mob

mighty wind
#

probs a breeze

sullen marlin
#

depends whatever they use in vanilla

mighty wind
#

ill have to take a look

#

i didnt see anything remotely looking like flying but they do leap

buoyant viper
#

Phantoms

blazing ocean
#

you mean the sleep paralysis demons

grim hound
#

how do I write like \uF000

#

into json and not have it escape it?

#

and not convert it into a char?

#

just a literal

blazing ocean
#

apache StringUtils#unescapeJava

buoyant viper
grim hound
blazing ocean
#

not sure

grim hound
blazing ocean
buoyant viper
#

oh wait r u going from json -> java or java -> json

grim hound
sly topaz
#

because you're looking at commons-lang, not lang-text or whatever the submodule is called

buoyant viper
#

THATS NOT A YES OR NO QUESTION

sly topaz
blazing ocean
#

StringEscapeUtils sorry

sly topaz
buoyant viper
sly topaz
#

I'll begin answering multiple choice exams just with yes and see how it goes

blazing ocean
#

good idea

sly topaz
#

btw winn I vibe-coded a weather.gov api client in java and it worked just fine

blazing ocean
#

😭

blazing ocean
sly topaz
#

same for AI art, if I don't care about it then I just hit the proompt button

buoyant viper
sly topaz
#

it's just way faster when you're just trying to satisfy your curiosity, even more so when now we have editors which generate the whole thing at once lol

buoyant viper
#

the noaa.gov api, however, i couldnt get working at all

blazing ocean
buoyant viper
#

does someone have a MaxMind account i can download the geoip lite db from ❤️

#

(im too lazy to register for maxmind)

sly topaz
blazing ocean
#

just use retrofit

sly topaz
grim hound
#

I'm trying to create a resource pack and replace PUA characters with bitmaps

#

but like

#

it works normally (when in a folder)

#

and breaks when in .zip

#

...why

grim hound
drowsy helm
grim hound
#

well you see

#

like this

#

and just sending it directly to the client

#

(yes, I mean a download)

#

is that

#

uh

#

the problem

drowsy helm
#

I forget exactly what the reasoning was but when I used javas built in zip function thingo it didnt work with mc, I had to use a 3rd party lib

blazing ocean
#

Same lol

sullen marlin
#

That's whack

#

It'd be interesting to know the reason

drowsy helm
#

If I remember correctly it was placing the directory into another sub directory so
Resourcepack would be
Resourcepack.zip-> resourcepack (dir)-> contents

#

One of those niche issues with a library that you cant find any answers for online

radiant aspen
pseudo hazel
#

not all effects are particles

#

in fact looking at the classes, effect seems to have primarily sounds

#

and particle represents a single particle

radiant aspen
#

Yeah, it looks like its a combo of Sounds/Particles?

#

But whats the difference between the ANVIL_BREAK effect and the BLOCK_ANVIL_BREAK Sound?

pseudo hazel
#

yes

#

effects are created with sounds and particles

#

probably nothing

radiant aspen
#

But some of them are just sounds?

Is this just a weird legacy thing?

pseudo hazel
#

but I guess its in case that they somehow expand the anvil break effect

#

like if they add particles to it or smth

#

the idea is that effects are created with sounds and particles, so you actually play the effects

radiant aspen
#

ig, yeah

paper coral
#

Anyone understand the jobs reborn plugin. Struggling to change the colour of something with the code as codes not anywhere, when imputed it vanishes once reloaded.

rugged fern
fluid river
#

jree fava

rugged fern
#

Just saw it on the docs and got interested in it

fluid river
#

ignore it

rugged fern
#

Is there any way to handle this in spigot world generation itself?

#

Okay

#

Without using datapacks

dawn flower
#

u want to generate the world yourself? yes you can

rugged fern
#

Yea I want to generate worlds with terrain like its working with datapacks just with spigot itself how is that working?

umbral ridge
#

can you use asynchronous code to return completions? or are tab completions synchronous

#

if its synchronous.. then how am i supposed to retrieve values from the db? make my request synchronous and block the main thread?

quaint mantle
umbral ridge
#

I can't cache stuff

#

tab completions need to be updated every time the player fires the event

sly topaz
lean cairn
sly topaz
blazing ocean
lean cairn
#

thanks

sly topaz
umbral ridge
sly topaz
rugged fern
umbral ridge
#

i figured it out anyways

sly topaz
#

if you are using a command framework which hooks into brigadier, brigadier suggestions are asynchronous anyway

mighty wind
#

anyone know how to make a custom damage source? i want to cancel an NMS serverHurt and handle the damaging myself, i might just re-use falling out of world since its soemthing that wont ever occur

#

not sure how to use hitMob.damage(event.getDamage());

or rather hitMob.damage(event.getDamage(), <customdamagesource>);

sly topaz
#

is there a need for a custom damage source for that

#

you could just cancel the entity damage event

mighty wind
#

i guess, but i dont really waent to add it to a list or something

#

can you check if bukkit entities are instances of NMS entities?

sly topaz
#

bukkit entities are instances of CraftEntity(s) which are wrapper around NMS entities, you can get the NMS entity by calling getHandle on most of them

#

but I honestly don't know why you wouldn't just use the API for this, it purposefully makes your plugin incompatible with newer versions lol

mighty wind
#

sec

#

um, i guess its moreso that i want only player hits to deal damage, and everyhting else i dont want

#

and i have multiple NMS entities

sly topaz
eternal oxide
#

why NMS entities?

mighty wind
#

custom behaviours

sly topaz
#

I feel like you went into a rabbit hole for no reason

mighty wind
#

i dont rly know how to use brains

eternal oxide
#

ok

mighty wind
#

right

eternal oxide
#

just add a pdc tag to each entity

sly topaz
#

that works, yeah

mighty wind
#

pdc?

#

o.o

sly topaz
#

PersistentDataContainer

eternal oxide
#

its just a bukkit wrapper around tags

mighty wind
#

ok, dont mobs despawn tho and become dumb

#

so if i go X chunks out theyll forget it

eternal oxide
#

you add it to your entity when you spawn it

mighty wind
#

issue i can see though is

#

if i have entitydamagebyentityevent (what i want to happen) and entitydamageevent (where im cancelling it all)
the entity.damage() from my custom event which i will call will be negated becuse of entitydamageevent

#

unless anyone knows a workaround

#

or actually, is calling entity.damage(1) is that damagecause custom?

eternal oxide
#

pretty sure entity.damage(... does not throw any events

tardy ruin
thorn isle
#

put it in the bin and write your own

rotund ravine
kind hatch
#

Oh my god...
Kill me now

#

vcs2 was right

#

burn this shit and start from scratch

tardy ruin
#

oh my

slender elbow
#

abstraction in shambles

blazing ocean
#

nobody

slender elbow
#

I can

#

but I choose not to

hollow oar
#

who can make me a plugin for some money

#

usd

kind hatch
#

?services

undone axleBOT
light sinew
#

someone can help me with my dependencies of 1.21.3?

#

i tested some dependencies but it doesn't worked

kind hatch
#

Also

#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

kind hatch
#

Did you run BuildTools?

light sinew
#

i'm seeing now the build tools, but i don't understand

kind hatch
#

Ah, well if you want to use Spigot as a dependency, you need to run BuildTools in order to get the source code.
The reason for this is legal bs from years ago.
But once you run it for the version you want to develop against, all you need to do is reload your pom and you'll be good to go.

light sinew
#

would you make this for me? i send you the code with me link

kind hatch
#

?bt

undone axleBOT
kind hatch
#

There is also a GUI for it if you don't want to use the command line.

light sinew
#

If i have a problem, i can send a dm for you?

kind hatch
#

I don't typically do dms, but feel free to @ me here.

light sinew
light sinew
kind hatch
paper coral
# kind hatch Gonna need some more info on this.

I am trying to change the colours for

----<< Prev 1/10 Next >>----

However, in all the other lanauge ymls they have the below i have tried editting the english yml to incldue this however it still refuses to change the colours and in fact actually deletes the stuff below when converted to english. Anyone know how to fix this?

  prevPage: '&2----<< &6Zurück '
  prevPageOff: '&7----<< Zurück '
  nextPage: '&6 Nächste Seite &2>>----'
  nextPageOff: '&7 Nächste Seite >>----'
  pageCount: '&2[current]/[total]'
  pageCountHover: '&e[totalEntries] Einträge'
  prevPageGui: '&6Vorherige Seite '
  nextPageGui: '&6Nächste Seite'
#

I cannot find the nextpage bit etc in the correct yml, its only in the other languages .yml

#

In the en yml

  help:
    output:
      cmdUsage: '&2Usage: &7[command]'
      label: Jobs
      cmdInfoFormat: '[command] &f- &2[description]'
      cmdFormat: '&7/[command] &f[arguments]'
      helpPageDescription: '&2* [description]'
      title: '&e-------&e ======= &6Jobs &e======= &e-------'
  boost:
    help:
      info: Boosts jobs gains for all players
      args: exp/money/points [jobname]/all/reset [rate] [time]
    output:
      allreset: '&aAll boosts turned off'
      alltypereset: '&aAll &e%type% &aboosts turned off'
      jobsboostreset: '&aBoost of &e%boost% &aadded for &e%jobname%!'
      jobstypeboostreset: '&aBoost of &e%boost% &aadded for &e%jobname%!'
      nothingtoreset: Nothing to reset
      boostadded: '&aBoost of &e%boost% &aadded for &e%jobname%!'
      infostats: '&c-----> &a%type% rate x%boost% enabled&c <-------'
      boostStats: '&6%payments% &e%jobname%'```

In the other languages yml

```command:
  help:
    output:
      info: Schreibe /jobs [cmd] ? um mehr infos über einen Befehl zu bekommen.
      cmdUsage: '&2Verwende: &7[command]'
      label: Jobs
      cmdInfoFormat: '[command] &f- &2[description]'
      cmdFormat: '&7/[command] &f[arguments]'
      helpPageDescription: '&2* [description]'
      title: '&e-------&e ======= &6Berufe &e======= &e-------'
      page: '&e-----&e ====== Seite &6[1] &evon &6[2] &e====== &e-----'
      fliperSimbols: '&e----------'
      prevPage: '&2----<< &6Zurück '
      prevPageOff: '&7----<< Zurück '
      nextPage: '&6 Nächste Seite &2>>----'
      nextPageOff: '&7 Nächste Seite >>----'
      pageCount: '&2[current]/[total]'
      pageCountHover: '&e[totalEntries] Einträge'
      prevPageGui: '&6Vorherige Seite '
      nextPageGui: '&6Nächste Seite'
  moneyboost:
    help:
      info: Der Geldbonus für alle Spieler wird erhöht.
      args: '[jobname]/all/reset [time]/[rate]'
    output:
      allreset: Alle Geld-Boni sind ausgeschaltet
      jobsboostreset: Der Geld-Bonus für %jobname% wurde ausgeschaltet.
      nothingtoreset: Es gibt nichts zum Zurücksetzen.
      boostalladded: Ein Geld-Bonus um %boost% wurde für alle Jobs hinzugefügt!
      boostadded: Es wurde ein Geld-Bonus um &e%boost% &afür &e%jobname% hinzugefügt!
      infostats: '&c-----> &aGeldboost x%boost% eingeschaltet!&c <-------'```
#

Everytime i put it in the en folder, i reload the plugin and it just deletes it, ive tried deleting and restarting the server which makes a new yml with the same problem.

thorn isle
#

doesn't really sound like a help dev issue, but try stopping the server and editing the file while the server is offline

#

some plugins (over)write configs on disable/shutdown

paper coral
kind hatch
#

And, I found why it won't work as expected.

#

YamlConfiguration#copyDefaults() will override the entire file. Doesn't matter if you do it when the server is offline or not.

#

I have no idea why they decided to hard code the en language file into it, but it's dumb af if you ask me.

paper coral
kind hatch
#

Problem is you can't. It's coded into the plugin.
They only way to fix this is for the developer to update it, or for you to fork it and update it yourself.

You'd either have to add the missing config sections, which would arguably be easiest, or adjust the system to treat the en language file like every other language file.

light sinew
#

@kind hatch i'm having troubles on installing buildtools

#

i already asked for chatgpt, i readed spigot wiki thousand times

kind hatch
#

What about it?

kind hatch
kind hatch
light sinew
kind hatch
#

Are you still having problems with it?

light sinew
#

I tried to run BuildTools now, but i don't know if it is taking a long time to open or it is not opening

kind hatch
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

light sinew
kind hatch
#

Use one of those links to post pictures.

#

Are you using the GUI or the command line to run BT?

kind hatch
#

It should open fairly quickly.
If it already is open and is all greyed out, close it and launch it again.

lethal knoll
#

I just read somewhere on the forums that the max resource size is about 6MB? I am currently using a DI framework (Guice) which takes up about that much on it's own. Can anyone confirm the actual file size limit?

kind hatch
#

It's 4MB IIRC

chrome beacon
#

4mb I believe

#

Yeah

kind hatch
#

I think it used to be 3MB at one point

lethal knoll
#

wut

#

Okay, that's a problem

chrome beacon
#

Download Guice with the library downloader or if you want to support older versions there are 3rd party libs that can help download it at runtime

lethal knoll
#

I know there is the libraries thing

slender elbow
#

you can also use a DI framework that isn't that big

lethal knoll
#

It has nothing to do with the one I choose, Guice is just a well known framework

#

And 4MB is not much

slender elbow
#

ok and?

lethal knoll
#

So I wouldn't consider the library the issue

thorn isle
#

oorah oorah muh DI

lethal knoll
#

I guess self-hosting is the only remaining option

blazing ocean
#

you can also just use proguard to minimise (make sure to turn off obfuscation though)

thorn isle
#

into the 🚮

chrome beacon
#

What's wrong with grabbing it from Central

lethal knoll
#

I know there is a way to let the libraries feature of the plugin.yml download it at runtime

slender elbow
lethal knoll
#

But I also heard or read somewhere it causes issues when 2 plugins are dependent on the same library

chrome beacon
slender elbow
#

es

thorn isle
#

is it?

kind hatch
#

???

lethal knoll
kind hatch
#

Against which tos? Maven Central or Spigot?

lethal knoll
#

If it's against TOS, then why is it there?

slender elbow
#

central

#

forge had the same situation long ago, and they got a C&D, but they also covered clients so it was a much bigger deal

thorn isle
#

i'm fairly sure i have like 20+ libraries being loaded from central via the library system 🤡

#

oh well

lethal knoll
chrome beacon
#

I don't think a Spigot plugin would cause enough traffic for it to matter

#

🤷‍♂️

lethal knoll
#

I just remember that there was a shading issue with spigot itself causing it to conflict when multiple plugins depend on the same library

#

maybe that's solved now

chrome beacon