#help-archived

1 messages Ā· Page 103 of 1

keen compass
#

just iterate over it

#

or you can get a specific index in the List

#

index starts at 0 and ends at 3

#

making a total of 4 lines

#

only thing you need to make sure of is that the index you want isn't empty

frigid ember
#

@keen compass do you know where do i set a picture in my bungeecord server ?

hollow thorn
#
                Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                 cooldown.put(me, (System.currentTimeMillis()/1000));
                if((cooldown.get(me) + 5) >= (System.currentTimeMillis()/1000)) {
                   
                    ItemStack stuff = e.getItem();
                    ItemMeta em = stuff.getItemMeta();
                    em.setCustomModelData(3);
                    em.setUnbreakable(true);
                    em.setLocalizedName("Staff1");
                    stuff.setItemMeta(im);
                    me.getItemInHand().setItemMeta(em);
                    me.updateInventory();
                   loc = loc.add(loc.getDirection());
                 new BukkitRunnable(){
                  @Override
                  public void run() {
                      Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                loc = loc.add(loc.getDirection());
                while(loc.getBlock().getType() == Material.AIR) {
                    loc = loc.add(loc.getDirection());
                    world.spawnParticle(Particle.FLAME, loc, 0);
                    world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                }
                }}.runTask(new StaffWeapon());
            }```

@hollow thorn it worked before i made it a runnable

keen compass
#

@frigid ember should just be able to put the server icon in the same directory as the bungee jar

#

and it should pick it up

#

as long as it is to the specs that is required of a severicon

frigid ember
#

in what file ?

keen compass
#

you add the icon into that directory

reef sparrow
#

@reef sparrow its a list<String>
@keen compass oh okay

frigid ember
#

oh

sturdy oar
#

64x64 PNG named server-icon

keen compass
#

^

frigid ember
#

ho do i call it ?

sturdy oar
#

read above

frigid ember
#

oh lol

sturdy oar
#

Server-icon

frigid ember
#

it has to be PNG right ?

keen compass
#

yes

sturdy oar
#

Yeah a PNG exactly 64x64

#

won't load otherwise

frigid ember
#

anyway i am making the logo right now lol

ashen stirrup
#
    public static boolean isChestEmpty(Inventory chest){
        for (ItemStack itemStack : chest.getContents()){
            if (itemStack.getType() != Material.AIR || itemStack != null){
                return false;
            }
        }
        return true;
    }
#

Is this right?

sturdy oar
#

Wouldn't it be getContents.size() > 0?

regal siren
#

You can just do getContents().isEmpty()

ashen stirrup
#

Can you?

sturdy oar
#

Or that

regal siren
#

ye

ashen stirrup
#

I'm so dumb xD

regal siren
#

its a list lol

ashen stirrup
#

Doesn't look like you can 😦

regal siren
#

ehh wat

#

wait llemme check

ashen stirrup
#

Maybe chest.getStorageContents()?

regal siren
#

oh getContents return a normal array lol not a list but

#

what you can do is

#
final List<ItemStack> contents = new ArrayList<>(getContents());
return contents.isEmpty();
#

bruh

#

A list doesnt have it too

#

wtf

#

Oh it does lol

#

forgot to import it

ashen stirrup
#

Array.asList(chest.getContents());
or
Array.asList(chest.getStorageContents());

regal siren
#

Ye I mean array.aslist

keen compass
#

getContents().length works too

regal siren
#

bruh just do

return Arrays.asList(getContents()).isEmpty();```
keen compass
#

ah I see, its a master race for the shortest code possible

ashen stirrup
#

^

#

xD

regal siren
#

bruh

ashen stirrup
#

Cheers Phelix

regal siren
#

Its not even that

#

just learn new things

#

so make ur life easier

keen compass
#

I will probably forget about it later and then re-remember it if I have a place for it when I refactor code

#

XD

hollow thorn
#

@hollow thorn it worked before i made it a runnable
@hollow thorn still doesnt work

#
                Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                 cooldown.put(me, (System.currentTimeMillis()/1000));
                if((cooldown.get(me) + 5) >= (System.currentTimeMillis()/1000)) {
                   
                    ItemStack stuff = e.getItem();
                    ItemMeta em = stuff.getItemMeta();
                    em.setCustomModelData(3);
                    em.setUnbreakable(true);
                    em.setLocalizedName("Staff1");
                    stuff.setItemMeta(im);
                    me.getItemInHand().setItemMeta(em);
                    me.updateInventory();
                   loc = loc.add(loc.getDirection());
                 new BukkitRunnable(){
                  @Override
                  public void run() {
                      Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                loc = loc.add(loc.getDirection());
                while(loc.getBlock().getType() == Material.AIR) {
                    loc = loc.add(loc.getDirection());
                    world.spawnParticle(Particle.FLAME, loc, 0);
                    world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                }
                }}.runTask(new StaffWeapon());
            }```
@hollow thorn
reef sparrow
#

How do I get a List froma Field?

sturdy oar
#

you mean reflection Field?

frigid ember
#

the motd i need to change is the one in the proxy ?

hollow thorn
#
                Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                 cooldown.put(me, (System.currentTimeMillis()/1000));
                if((cooldown.get(me)+5) >= (System.currentTimeMillis()/1000)) {
                   
                    ItemStack stuff = e.getItem();
                    ItemMeta em = stuff.getItemMeta();
                    em.setCustomModelData(3);
                    em.setUnbreakable(true);
                    em.setLocalizedName("Staff1");
                    stuff.setItemMeta(im);
                    me.getItemInHand().setItemMeta(em);
                    me.updateInventory();
                   loc = loc.add(loc.getDirection());
                 new BukkitRunnable(){
                  @Override
                  public void run() {
                      Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                loc = loc.add(loc.getDirection());
                while(loc.getBlock().getType() == Material.AIR) {
                    loc = loc.add(loc.getDirection());
                    world.spawnParticle(Particle.FLAME, loc, 0);
                    world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                }
                }}.runTask(new StaffWeapon());
            }
            ```
sturdy oar
#
try {
final Class<?> yourClass = Class.forName("your.class.ClassName");
final Field yourField = yourClass.getField("fieldName");
List<Something> yourList = (List<Something>) yourField.get(yourClass);
} catch (NoSuchFieldException | ClassNotFoundException e) {
// handle the exception
}

Something like this @reef sparrow

reef sparrow
#

Okay thanks

sturdy oar
#

you might have to change it depending on what you're trying to get.

hollow thorn
#
                Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                 cooldown.put(me, (System.currentTimeMillis()/1000));
                if((cooldown.get(me)+5) >= (System.currentTimeMillis()/1000)) {
                   
                    ItemStack stuff = e.getItem();
                    ItemMeta em = stuff.getItemMeta();
                    em.setCustomModelData(3);
                    em.setUnbreakable(true);
                    em.setLocalizedName("Staff1");
                    stuff.setItemMeta(im);
                    me.getItemInHand().setItemMeta(em);
                    me.updateInventory();
                   loc = loc.add(loc.getDirection());
                 new BukkitRunnable(){
                  @Override
                  public void run() {
                      Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                loc = loc.add(loc.getDirection());
                while(loc.getBlock().getType() == Material.AIR) {
                    loc = loc.add(loc.getDirection());
                    world.spawnParticle(Particle.FLAME, loc, 0);
                    world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                }
                }}.runTask(new StaffWeapon());
            }
            ```

@hollow thorn

final verge
#

Brother

#

A) stop spamming it. When someone can help they’ll help

#

B) before anyone can help you need to explain what you mean by ā€œit doesn’t workā€

sturdy oar
#

yeah you've literally spammed it 4 times in 2 minutes

reef sparrow
#

@sturdy oar So try { final Field linesField = packet.getStrings().getField(384); @SuppressWarnings("unchecked") List<String> lines = (List<String>) linesField.get(linesField.getClass()); } catch (NoSuchFieldException | ClassNotFoundException e) { // handle the exception }??

sturdy oar
#

384?

#

no variable can be named with a number ...

#

hence you're doing something wrong

hollow thorn
#

it doesnt shoot the projectile

#

the runnable doesnt run

sturdy oar
#

wait

#

nvm

reef sparrow
sturdy oar
#

the hell is 384 tho

final verge
#

Add debugg lines @hollow thorn

hollow thorn
#

they breach the limit

final verge
#

???

hollow thorn
#

they are more than 2000 words

#

can someone send hastebin

final verge
#

No not to the code you are sending

#

add debug lines to your code you are running

#

Figure out what is running and what isn’t

reef sparrow
final verge
#

Print out things like the items name etc

hollow thorn
#

anything in the runnable isnt running

final verge
#

We aren’t going to fix it and send it to you. Spoon feeding is bad

#

And he’s

hollow thorn
#

the first part which changes the item works

#

the runnable doesnt

final verge
#

Okay

reef sparrow
final verge
#

So debug

#

Why the runnable isn’t working

sturdy oar
#

oh wait

#

you didn't need reflection

#

i thought you needed java.reflect.Field, but you were talking about another field

reef sparrow
#

Okay

#

and wich Field?

sturdy oar
reef sparrow
#

Yes but I dont know how to use this Field

sturdy oar
#

I don't know either, I've never used packets

#

i thought before you were talking about reflections but i was wrong

#

may I ask what are you trying to achieve?

reef sparrow
#

I will create a SignEdit Plugin but with packets because when I right click a sign it will open the SignEditor

sturdy oar
#

ehm

#

why not use Sign class

hollow thorn
#

Why the runnable isn’t working
@final verge i think its because of the use of e

reef sparrow
#

Bukkit dont contains any function to open the SignEditor

#

so I must use packets

#

...And when I will do it without SignEditor Window I also can download 1 of the hundreds of Plugins

sturdy oar
#

oh ok. so you're receiving sign modification packets and applying them to already existing signs?

reef sparrow
#

Right

#
    public static boolean openSign(Player p, int X, int Y, int Z){
        try {
            Class packetClass = Reflection.getNMSClass("PacketPlayOutOpenSignEditor");
            Class blockPositionClass = Reflection.getNMSClass("BlockPosition");
            Constructor blockPosCon = blockPositionClass.getConstructor(new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE });
            Object blockPosition = blockPosCon.newInstance(new Object[] { Integer.valueOf(X), Integer.valueOf(Y), Integer.valueOf(Z) });
            Constructor packetCon = packetClass.getConstructor(new Class[] { blockPositionClass });
            Object packet = packetCon.newInstance(new Object[] { blockPosition });
            Reflection.sendPacket(p, packet);
            return true;
        }catch (Exception ex){
            ex.printStackTrace();
        }
        return false;
    }```
sturdy oar
#

I'll go look at NMS real quick for you

#

or are you using ProtocolLib?

reef sparrow
#

Okay thanks

ashen stirrup
#

Chest Event Class
if (event.getInventory().getHolder().getLocation() == API.chestLocation){}

API Class
chestLocation = chest.getLocation();

#

I'm confused why this isn't working

reef sparrow
#

or are you using ProtocolLib?
@sturdy oar Yes only the code above is without ProtocolLib all the other thinks I do with ProtocolLib

sturdy oar
#

ok so you want to create a PacketAdapter with the UPDATE_SIGN

#

(the one from Client)

#

then you override the packetReceiving

#
PacketContainer packetContainer = new PacketContainer(PacketType.Play.Client);

You can then get values from the packet

vernal plank
#

Where can I report a bug in paper/spigot

sturdy oar
#

is it paper or spigot

hollow thorn
#

do runnables need to have everything defined inside of them

sturdy oar
#

wut

vernal plank
#

Seems like paper
[07:53:01] [Server thread/ERROR]: [global] TIMING_STACK_CORRUPTION - Report this to Paper! This is a potential bug in Paper (TimingIdentifier{id=Minecraft:world - Sync Chunk Load} did not stopTiming)

hollow thorn
#

wut
@sturdy oar i have a bukkit runnable inside an event

sturdy oar
#

well this is Spigot discord Cassy

#

you can report on their GitHub

vernal plank
#

Yes but they're realted

hollow thorn
#

do i need to redifine the event

vernal plank
#

Paper uses spigot as its base and adds optimizations

sturdy oar
#

yeah still, but this is Spigot's discord.

#

you can just report them on Paper's GitHub

vernal plank
#

I'll look through the full stack trace and see where the error is but it's rooted in chunk loading which is not exclusively paper

#

Well yes but I came here to ask where to report the error and I got my answer right? Seems fine to me.

sturdy oar
vernal plank
#

thx

hollow thorn
#
                Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                 cooldown.put(me, (System.currentTimeMillis()/1000));
                if((cooldown.get(me)+5) >= (System.currentTimeMillis()/1000)) {
                   
                    ItemStack stuff = e.getItem();
                    ItemMeta em = stuff.getItemMeta();
                    em.setCustomModelData(3);
                    em.setUnbreakable(true);
                    em.setLocalizedName("Staff1");
                    stuff.setItemMeta(im);
                    me.getItemInHand().setItemMeta(em);
                    me.updateInventory();
                   loc = loc.add(loc.getDirection());
                 new BukkitRunnable(){
                  @Override
                  public void run() {
                      
                      Player me = e.getPlayer();
                Location loc = me.getEyeLocation();
                World world = me.getWorld();
                loc = loc.add(loc.getDirection());
                while(loc.getBlock().getType() == Material.AIR) {
                    loc = loc.add(loc.getDirection());
                    world.spawnParticle(Particle.FLAME, loc, 0);
                    world.playEffect(loc, Effect.BLAZE_SHOOT, 4);
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                }
                }}.runTask(new StaffWeapon());
            }``` how do i import e into the runnable
sturdy oar
#

bro stop flooding oh god

hollow thorn
#

e is a defined event

#

or do i need to do runTask(this);

final verge
#

I’m confused on why you even need to run a task

#

It’s not even delayed

#

It literally is the same as not having it

hollow thorn
#

so its not on the main thread

final verge
#

????

hollow thorn
#

it uses a while loop

#

which would cause lag

final verge
#

Anything that calls anything bukkit related should be main thread?

#

Like particles and fire ticks??

#

Also you run the task not async

hollow thorn
#

but then it will cause the server to stop running while the while thread is active

final verge
#

Then run a task timer

#

And have the task repeat

#

And infinite while loop is bad practice

hollow thorn
#

its not infinte

#

did you read the code?

final verge
#

It could be infinite

#

What happens if there is an air block for as far as the eye can see

#

On top of that

hollow thorn
#

yes which is why it needs to be on another thread

final verge
#

You are doing so many things that should only be done on the main thread and will break if done async

#

Damaging entities, getting nearby ones, setting fire ticks, playing effects, getting blocks, spawning particles, getting location of a player

#

None of those should be done async

hollow thorn
#

but then it wont be able to run alongside other things

#

if i use the weapon as a sniper

#

you wont be able to doge in the time its travelling

#

because the server will have stopped for the event

final verge
#

Then you need to figure out ways to work around it. Because you literally should not be running those thing on an async thread

#

And you need to add a limit to that loop

#

Because it can just run forever

#

On top of that you aren’t running the task async in the first place

hollow thorn
#

i was told to run the things on a different thread by ford

#

on this exact server

final verge
#

Certain things can be done on another thread

#

Like logic

#

Anything that modifies the game should not be

hollow thorn
#

how can i make it run seperatly when doing a long task though

sturdy oar
#
ProtocolLibrary
    .getProtocolManager()
    .addPacketListener(
        new PacketAdapter(plugin, PacketType.Play.Client.UPDATE_SIGN) {
            @Override
            public void onPacketReceiving(final PacketEvent event) {
                if (event.getPacketType() == PacketType.Play.Client.UPDATE_SIGN) {
                    final PacketContainer packet = e.getPacket();
                    //and here you can get your values
                }
            }
        }
    );

@reef sparrow Something similar to this

final verge
#

The task in theory shouldn’t run that long. The logic behind the task is going to be the cause of the lag

#

Because of many reasons

#

You damage the same entities potentially

sturdy oar
#

you can then get the sign values from the packet methods

final verge
#

For every block you get nearby entities

#

There is no sanity check on a range

little lava
reef sparrow
#

No my problem is that dont even know how to get the lines from the Field... @sturdy oar

sturdy oar
#

you have to use StructureModifier i think

frigid ember
#

huh? event.getPacket().getStrings().readSafely(0 - 3); should be right

reef sparrow
#

Okay

sturdy oar
#

that's what i said FatalPacket

#

getStrings() returns StructureModifier

#

so he can read from it

reef sparrow
#

String[] lines = packet.getStringArrays().readSafely(384);Is it right so?

sturdy oar
#

i don't know about the 384

frigid ember
#

No just singular string

#

there is not 384 strings as well

sturdy oar
#

yeah xd signs have 4 lines

reef sparrow
#

Yes where i should insert/use the 384

frigid ember
#

nowhere

sturdy oar
#

i have no idea what the wiki intends by String (384)

frigid ember
#

^

reef sparrow
#

And for what it exists

sturdy oar
#

oh

#

max length

#

probably

reef sparrow
#

Okay

sturdy oar
#

not 100% sure

reef sparrow
#

But thanks anyway i test if this works now

sturdy oar
#

Yeah it seems like that number is the max. length of the string

#

although i wouldn't know what happens if you set it that high

#

because it's definetively too long to fit

barren abyss
#

F*ck that slime split thing 7210_jebaited

reef sparrow
#

@frigid ember But getStrings returns a String not a String List

frigid ember
#

yeah just realised that it returns null 4 times

#

uh

reef sparrow
#

I dont understand it should i use List<String> String[] or String

frigid ember
#

whatever this is

#

b={TextComponent{text='a', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}},TextComponent{text='', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}},TextComponent{text='', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}},TextComponent{text='', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}}

sturdy oar
#

oh yeah Json

reef sparrow
#

it returns the String list in json format

sturdy oar
#

yeah probably the whole sign as Json

#

no idea if you directly get the line

#

you might have to do some research

plucky relic
#

Quesiton

#

How could I make a mob store an Enum?

#

like, if I check him, I could get a Custom Enum I made.

chrome heron
#

which plugin can protect ddos on bungeecord

frigid ember
#

how do i revoke this advancement: end/levitate

barren abyss
#

just made a plugin that crashes servers...(Not my intenttion)

plucky relic
#

So uh

#

How could I get a mob to store an enum?????'

sturdy oar
#

PersistentDataHolder

plucky relic
#

But how?

#

Like, the tutorials I look up are confusing

#

I don't understand

frigid ember
#

Hello someone this is how to execute an order after being logged in with AuthME

sturdy oar
#

?

#

what does that even mean lol

plucky relic
#

Also

#

PersistentDataHolder uses a Namespaced key, doesn't it?

sturdy oar
#

y

frigid ember
#

Help me please 😦

frigid ember
#

Hello someone this is how to execute an order after being logged in with AuthME

plucky relic
#

What

#

That's not even a question

sturdy oar
#

get a better translator i guess

#

that's not even a question lmao

frigid ember
#

I dont speak english

#

after /login execute a command with authme

plucky relic
#

Wait, can I use the same Namespaced key for different mobs?

sturdy oar
#

yeah you can do it JeSuisAD

frigid ember
#

Yes but how @sturdy oar

sturdy oar
#

commands.yml

frigid ember
#

Yes but i can't

sturdy oar
#

the hell does that even mean

frigid ember
#

this is commands.yml

sturdy oar
#

so

#

what's the issue

frigid ember
#

Can you help me
When players are logged in, the /server lobby is used.

timid valley
#

Ask authme

frigid ember
#

I'am french

timid valley
#

This isn't authme support

frigid ember
#

dont speak english but use google translate

sturdy oar
#

like literally write inside onLogin

#

and put your commands

#

it's not anything complex

barren abyss
#

I speak french

#

I can help in translate

frigid ember
#

Vraiment?

#

@barren abyss tu parle bien franƧais?

barren abyss
#

**Him: **Baguette?

frigid ember
#

No x)

barren abyss
#

xD

frigid ember
#

Do you really speak french?

barren abyss
#

Neh the only french I speak is "Suce ma bite"

kind crow
#

Looking for a plugin or an idea how to write it myself if it doesn't exist. I need to filter chat messages, anvil renames and books with regex so that everything that doesn't match given regex will be removed (charset would be fine but I would like to have a little more control). Pls ping if answering

frigid ember
#

mdrr suck my dick x)

barren abyss
#

yeh... you have to be prepared in all languages

frigid ember
#

Okay, but can't you help me?

timid valley
sturdy oar
#

there's even a pre-written sample inside the commented lines

frigid ember
#

onLogin:

welcome:

command: 'server lobby'

executor: CONSOLE

#

as its ?

sturdy oar
#

?try

frigid ember
#

with or without the # ?

#

@sturdy oar

sturdy oar
#

don't ping me

#

the hell im here

frigid ember
#

sorry

sturdy oar
#

no comments

frigid ember
#

but help me

sturdy oar
#

i've said no comments

#

remove comments

frigid ember
#

What a comment

sturdy oar
#

bruh

frigid ember
#

dont speak english

#

I use google translation

sturdy oar
#

im out of here bye

frigid ember
#

No 😦

#

please help me bogoss

#

My friend

kind crow
sturdy oar
#

register listeners, get messages, and cancel the event if they don't match a RegEx i guess

wind dock
#

anyone know of any queue plugins that let players in slowly(to not crash the server) with donator priority support?

kind crow
#

register listeners, get messages, and cancel the event if they don't match a RegEx i guess
@sturdy oar I will replace by regex instead of cancellation. I know I have to register Event Listeners of course, but which ones?

mellow wave
#

There are javadocs you can use @kind crow

#
  1. Catch event
  2. Scan text with regex
  3. profit
brittle stone
#

@languid pewter I found out what was wrong. The POM was checked among ignored files in Maven settings

#

Discovered it by coincidence

kind crow
#

Is it really that simple? Just find an event and replace the text? Does it work with anvils and async chat?

mellow wave
#

Yes

#

It isn't hard

kind crow
#

Can it function like a middleware? I replace some things in the event string and that string will be send to the chat/renamed item

mellow wave
#

Yes

kind crow
#

Cool, thanks

frigid ember
#

hey guys, who know where i can find actual entity ids list for 1.15.2 for protocol

hollow thorn
#

whats the event for dropping an item

mellow wave
frigid ember
mellow wave
#
Entity    Entity refers to any item, player, mob, minecart or boat etc. See the Minecraft Wiki article for a full list.
EID    An EID — or Entity ID — is a 4-byte sequence used to identify a specific entity. An entity's EID is unique on the entire server.
frigid ember
#

it's not actual too, bcs armor stand id != 30

mellow wave
#

That's what the page says atleast

frigid ember
hollow thorn
#

whats the event for dropping an item
@hollow thorn

limber sierra
#

@obtuse rose about yesterday's issue - would you say it's down to poorly made plugins, or no? because that's exactly what the hosting company is saying fml

sturdy oar
#

is that skript or what

#

@frigid ember

frigid ember
#

ya thats skript i wanna make on my plugins.. thats skript just an example

opaque grove
#

:'(

sturdy oar
#

i have no idea how Skript would make delayed tasks

#

I can only help for Java

frigid ember
#

no im wanna using wait thingi on my java

#

can u help me ?

tiny dagger
#

skript is kinda basic at that imo

#

wait 7 seconds

#

or something

frigid ember
#

yea but on java how ?

tiny dagger
#

delayed task in java well

sturdy oar
#
Plugin#getServer#getScheduler#runTaskLater(Plugin plugin, Runnable r, long delay);
tiny dagger
#

really?

#

there you go

#

you should put the runnable as: () -> {
your code here
}

sturdy oar
#

yeah

#

i just copied the method

#

@frigid ember yes you can make animated GUIs

frigid ember
#

usingthat method?

tiny dagger
#

yup

worn gate
#

is there any java player.hasFire ?

red bolt
#

whats the best way to make a timer in java ? (preferably, one that is serializable)

hollow thorn
#

whats the event for dropping an item
@hollow thorn

sturdy oar
#

use that if you're inside EntityDamageEvent

worn gate
#

@hollow thorn PlayerInteractEvent

hollow thorn
#

i thought that was only for right andleft lick

worn gate
#

I think it also works 4 dropping

opaque swan
#

don't work
[21:21]
21:20:51 [INFO] [Rickylacio] <-> ServerConnector [lobby] has connected
21:20:53 [INFO] [Rickylacio] <-> ServerConnector [pryma] has connected
21:20:53 [INFO] [Rickylacio] <-> DownstreamBridge <-> [lobby] has disconnected

i have priorities in lobby
force default server true
and forced host to lobby

worn temple
#

Forced hosts bypass this.

So if your default IP is play.example.com that will go to lobby, but factions.example.com will bypass the lobby and go to the factions server. No matter if its offline or not.

#

We've been trying to help you for like a day or 2 now, its something you're doing wrong...

hollow thorn
#

isnt there a bungee option to set mode to offline

#

blocking all access except from a server

worn temple
#

Online mode for bungee just does what online mode for a bukkit server would.

#

it just encrypts and authenticates the client with the auth server, meaning cracked clients can't join.

#

That's it.

#

Forcing players to connect to a certain server is a different setting, and we've helped this person with this, but they are doing something wrong. So far all they are doing is showing that 2 lines of logs, and nhasn't given us configs or anything

#

We don't even know if they restarted bungee for the config changes to take effect.

ashen stirrup
#

How many packets per second are too high?

worn temple
#

depends on a number of factors lol ĀÆ_(惄)_/ĀÆ

ashen stirrup
#

For ViaVersion

worn temple
#

That's like asking how many people walking down the sidewalk is too many

proper cairn
#

i went from eclipse to intellij and now my plugin isnt working

#

was working completely fine with eclipse

#

i really wish i didnt hate eclipse

obtuse rose
#

@proper cairn please define "isn't working"

proper cairn
#

I can get the plugin to output to my plugins folder on my server but plugin doesnt work at all

#

so i can build it and it outputs to my plugins folder but doesnt work at all on my server and cant get it work

#

to*

soft tusk
#

Please help, how to create a Firewall on Hosting? I'm have spigot 1.8

gleaming mango
obtuse rose
#

@proper cairn can't get it to work, as it won't load?

proper cairn
#

Correct @obtuse rose

hoary parcel
#

its not a plugin you want to buy anyways

#

it sucks

obtuse rose
#

^ xD

gleaming mango
#

I need enchants for my Prison server and I like the jackhammer enchant

obtuse rose
#

@proper cairn so, have you inspect your output jar file with zip software to make sure that it has plugin.yml came out with it?

gleaming mango
#

I have EpicEnchant for Songoda but Idk if that has a Jackhammer enchant @hoary parcel

hoary parcel
#

songoda

#

oh god thats worse

gleaming mango
#

How?

#

I like Songodas plugins

worn temple
#

@hoary parcel loool They stole over $500 from me

lament cove
#

uhm

hoary parcel
#

songoda is one of the worst persons in this community

obtuse rose
#

As a developer/sysadmin, my friendly recommendation is DON'T even touch Songoda's plugin

worn temple
#

Her name is Bri, songoda is her "group" name

hoary parcel
#

her plugins are brought, rebranded and then maintained by her child dev sweat shop

worn temple
#

Mhm

#

Its awful

#

And she has no clue how to code at all

#

She is the literal worst person in the spigot community far and away

obtuse rose
#

Let's say this, I need to code a replacement plugin because Songoda's plugin performance is so bad it's killing the server

gleaming mango
#

Then recommend another Prison Enchants plugin

worn temple
#

She steals everything from everyone, rebrands it to hers, and if you so much as speak shit about her, she threatens to sue you. She stole over $500 from me, months of work, and cost me several friends. Even if her plugins were "decent" I'd still not tell anyone to use her shit

obtuse rose
#

@maiden zephyr we wouldn't know

gleaming mango
#

They said DDOS and one of their staff fucked the discord

obtuse rose
#

I can't live without SSH šŸ˜†

worn temple
#

Oh, and she threatened to sue me and rack up thousands of dollars of legal fees for me. She's a shit tier of a person and I have the evidence to back it up.

obtuse rose
#

sue her back?

worn gate
#

My does EntityDamageEvent don't work ?

obtuse rose
#

@worn gate please be specific, it won't get invoke or your computer catch on fire after the event got invoked?

worn temple
#

Threatened. She didn't go through with it, had her sugar daddy try and scare me too. @obtuse rose No real reason to bother, it would be small claims court anyway, and I'd rather just be rid of her than deal with her at all.

She got banned from spigot anyway lol

obtuse rose
#

she has a sugar daddy too? .-.

gleaming mango
#

Still what plugin should I use for prison enchants then?

worn temple
#

Yeah, she did adult livestreams for a bit because she couldn't make enough money from plugins, its a whole shitshow. @obtuse rose

obtuse rose
#

@worn gate I am not trying to be mean, but you need to be specific about the problem ya know šŸ˜„

#

*gasp*

#

LOL

#

how sad

worn temple
#

40 year old dude finances the 20ish year old adult baby that is Bri of songoda. I regret ever working with her

frigid ember
#

huh, for research purposes

#

nevermind

worn gate
#
@EventHandler
public static final onDamage(EntityDamageEvent event) {
//mycodedud            
}```
frigid ember
#

fucking hell 1,348 per month..

#

wow

worn temple
#

Oh, and she owns the black spigot like sites. Only to protect her plugins, she doesn't care about yours

worn gate
#

return type for this method is missing

worn temple
#

Her business model relies purely on screwing over everyone in the community.

obtuse rose
#

wait.... how did you even compiled that before .-.

worn temple
#

But I digress, I'm sure you get the idea by now

worn gate
#

can anyone help ?

obtuse rose
#

public static void

worn gate
#

howj ?

#

ah ok šŸ™‚

gleaming mango
#

So you tell me not to use TokenEnchant then tell me not to use EpicEnchants but you fail to say one to use in the place of them. Hmmm they still look like an option atm

frigid ember
#

tokenenchant if you want to pay an extra $5 for some of the enchants

gleaming mango
#

Yea I'm fine with that but the buy button on TokenEnchant is missing

worn gate
#
@EventHandler
public static void onDamage(EntityDamageEvent event) {
Player player = event.getPlayer;
}```
why does that not work ?
frigid ember
#

you never registered it maybe and you're not doing anything inside

worn gate
#

?

frigid ember
#

did you register it anywhere

worn gate
#

Does PlayerDamageEvent work ?

worn temple
#

Yeah, but you have to register the event listener on enable

worn gate
#

?

sturdy oar
#

gnaboo

#

that snippet is wrong

frigid ember
#

Bukkit.getPluginManager().registerEvents(Class<? extends Listener>, JavaPlugin); in your onEnable

thorny ledge
#

Getserver().getpluginmanager().registerevents(new Foo(), this)

sturdy oar
#

EntityEvent have no method such getPlayer()

#

you need to do instance checking

worn temple
#

its an entity object, there is a player damage event tho

worn gate
#

so how ?

#
Player player = event.getEntityType();
if(player==EntityType.PLAYER) {
//my code    
}```
sturdy oar
#

its an entity object, there is a player damage event tho
@worn temple nope

#

I'm 100% sure it doesn't exist, on Spigot at least

worn gate
#

doesn't work

#

how can i check with a variable if it's a player ?

thorny ledge
#

Winner ^

#

But if you wanna try and code without knowing how:

sturdy oar
#

no

#

don't spoonfeed people with code they don't understand

#

it's not a good idea

thorny ledge
#

Lol

#

Okay

sturdy oar
#

I mean if people used kotlin it would be more intuitive though

thorny ledge
#

Poor guy

sturdy oar
#

the is keyword is much cleaner

worn temple
#

@sturdy oar Ah, I'm thinking PlayerItemDamageEvent

#

event.getEntity() instanceof Player

thorny ledge
#

Instanceof*

#

Autocorrect šŸ˜„

worn temple
#

lol

thorny ledge
#

Gnaboo if you want to understand WHY that can be done

#

Look at the heir archy of Player

#

You may notice it is a child of Entity

sturdy oar
#

Scala people be like

if (player.isInstanceOf[Player]) {}
thorny ledge
#

Lol

sturdy oar
#

whatever šŸ¤·ā€ā™‚ļø i prefer Oracle documentation

thorny ledge
#

I prefer GeeksforGeeks and stack overflow. I’ll use Oracles in a pinch but I don’t like the way it is laid out

#

I always zone out when I read it lol

worn temple
#

Please don't use the amp versions of websites. its bad

hoary parcel
#

its fast tho

sturdy oar
#

what's amp

hoary parcel
#

its the no bullshit version of a website

#

served thru google

#

which is good and bad

sturdy oar
#

no ads?

hoary parcel
#

good for the user, bad for the internet as a whole

hoary parcel
#

not no ads, but less for sure

sturdy oar
#

well I use uBlock Origin

worn temple
#

That is an FAQ for what amp is and why its bad

hoary parcel
#

amp basically enforces restrictions on what a website can do

#

and then use google as a cdn

worn temple
#

yeah, basically for slightly faster loading times, you destroy the open internet and give google control of most of the internet. Also google trackers, so damn many trackers.

sturdy oar
#

what If i have VPN

thorny ledge
#

Seems subjective, but I understand where you’re coming from. It did it by default

worn temple
#

VPN doesn't stop that

thorny ledge
#

I’m on my phone and that’s why

worn temple
#

@sturdy oar if you are already using uBlock, add Privacy Badger, shuts down the rest of the trackers that ad blocking stuff doesn't detect.

sturdy oar
#

i have tampermonkey

#

i think it does the same

worn temple
#

@thorny ledge Its not really subjective. Its a fact that it gives google the monopoly over the internet. And its a fact that loading times are increased (but not by much, or really in any meaningful way) and google puts in trackers to the amp sites since they are now hosted on google owned and controlled servers.

The only subjective part of it is how much you actually care about it.

Perceived benefit for the user short team, hurts everyone except google in the long term.

reef sparrow
#

how can i set the BlockState of a block

worn temple
#

setData()

#

I think

#

Pretty sure blockstate is stored in the data

reef sparrow
#

But setData needs a BlockData

thorny ledge
#

Sounds like a situation of: use our service or lose traffic. I suppose that is a monopoly, more or less. Never even heard about this before today. Pretty interesting. Not sure how I feel about it, although I’m a big fan of freedom on the internet for users and publishers alike

worn temple
#

@reef sparrow it needs anything that extends blockdata. I believe block state is stored in this. I'm not 100% sure, I'd need to find my old code where I do some block state manipulation to confirm it for you, so give me a few minuets here.

frigid ember
#

So I'm getting this error:

[14:23:22] [Server thread/WARN]:        at java.lang.Class.getDeclaredField(Class.java:2070)
[14:23:22] [Server thread/WARN]:        at dtnr.events.WorldSaveEventHandler.onSave(WorldSaveEventHandler.java:20)
[14:23:22] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:23:22] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[14:23:22] [Server thread/WARN]:        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[14:23:22] [Server thread/WARN]:        at java.lang.reflect.Method.invoke(Method.java:498)
[14:23:22] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315)
[14:23:22] [Server thread/WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[14:23:22] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589)
[14:23:22] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576)
[14:23:22] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.WorldServer.save(WorldServer.java:801)
[14:23:22] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.saveChunks(MinecraftServer.java:655)
[14:23:22] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1004)
[14:23:22] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:824)
[14:23:22] [Server thread/WARN]:        at java.lang.Thread.run(Thread.java:748)```

And I understand what's going on for the most part, but I'm not entirely sure where I'm supposed to find the correct fields for 1.15. I copied this code from a prev project which was 1.12.
#
                field.setAccessible(true);
                field.set(chunk, false);```
worn temple
#

Okay, @reef sparrow To get block state its getState()

to set its state, its block#setBlockData(blockState.getBlockData())

#

@frigid ember please paste/hastebin that code

sturdy oar
#

probably NMS

#

issues

frigid ember
#

Gotcha @worn temple

worn temple
#

But yeah, NMS changes every release, so its possible you will have to just go about it trial and error until it works. That's usually how I do stuff on later versions when people haven't figured out what everything does yet.

frigid ember
worn temple
#

Yeah, you're either gonna have to get ahold of the CB jar and look at that class and find the method that does what you want, or a lot of trial and error.

frigid ember
#

lovely

#

ok thanks

reef sparrow
#

Okay, @reef sparrow To get block state its getState()

to set its state, its block#setBlockData(blockState.getBlockData())
@worn temple Oh thanks

worn temple
#

That's NMS for you. Kinda why I was making a library for my plugins/any one who wants to use it)

That way some of the common NMS stuff I use can be handled in one place, and any plugins using it don't have to bother with NMS versioning or anything.

#

@reef sparrow Np, can't confirm if it works on latest spigot, since I think it was deprecated at one point, but that's how I've always done it and its worked

reef sparrow
#

Okay yes i think i use this

frigid ember
#

That's NMS for you. Kinda why I was making a library for my plugins/any one who wants to use it)

That way some of the common NMS stuff I use can be handled in one place, and any plugins using it don't have to bother with NMS versioning or anything.
@worn temple Yeah im trying to use a command that will take a character argument and pass it into the field argument and see if it throws and error. No idea if that even works ... Also, would I possibly be able to achieve the same result if I just took the world the player was in and disabled world saving?

#

Because essentially what I'm trying to do is reset saved chunks. So it will save the chunks in a world and then reset the chunks on command. And in order to do that effectively, the world saving needs to be off.

worn temple
#

I mean, if that's what you are trying to do, you can just wrap it in a try catch.

As for that, I have no idea. Chunks are all saved in region files which store I think 16x16 chunks. So... I have no idea how you would actually do what you are trying...

frigid ember
#

Gotcha. I was successful with 1.12, but as you stated the NMS changes so it no longer likes to work haha

opaque swan
#

i can disable forced_hosts

#

?

#

I have pterodactyl panel, and the ports are protected with firewalls IP-Tables, what ip i need to use to forced_hosts?

worn temple
#

forced hosts just means connecting on a certain IP sends you to a certain server. That's it

opaque swan
#

i can use it? 127.0.0.1:25565 (lobby)

#

or real ip?

worn temple
#

I don't know what it would be in your case, but just disable forced hosts and set server priority and default server to the lobby server. That's how I have mine configured.

opaque swan
#

How i can disable forced hosts?

worn temple
#

forced_hosts: false

opaque swan
#

i try it

#

but don't work

worn temple
#

You must be doing something wrong then

opaque swan
#

20:47:07 [SEVERE] Exception in thread "main"
20:47:07 [SEVERE] java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.util.Map
20:47:07 [SEVERE] at net.md_5.bungee.conf.YamlConfig.getListeners(YamlConfig.java:253)
20:47:07 [SEVERE] at net.md_5.bungee.conf.Configuration.load(Configuration.java:85)
20:47:07 [SEVERE] at net.md_5.bungee.BungeeCord.start(BungeeCord.java:273)
20:47:07 [SEVERE] at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62)
20:47:07 [SEVERE] at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)

#

watch

worn temple
#

okay, clearly that's not what I meant

#

You can't change a map to to boolean

#

there's a flag somewhere in the file to turn it off

opaque swan
#

i'm trying to fix

#

Ok

#

Why

20:53:50 [INFO] [Rickylacio] <-> ServerConnector [lobby] has connected
20:53:52 [INFO] [Rickylacio] <-> ServerConnector [pryma] has connected
20:53:52 [INFO] [Rickylacio] <-> DownstreamBridge <-> [lobby] has disconnected

#

Now connect me all time in Lobby

#

but

worn temple
#

? isn't that what you wanted??

opaque swan
#

Nope, because i join but, don't stay in lobby

#

i don't use compass to switch

#

It's an automatic switch

worn temple
#

Then a plugin is doing that, not bungee

opaque swan
#

ok i will check later

near pasture
#

Hello, i need some help. I'm trying to develop a plugin using the 1.15.2 spigot but when i have it started and the server running, i can't drag and drop my plugin when it's built. Windows says i need can't perform this action but i'm administrator on the computer and there's only 1 session

narrow schooner
#

i bought a super expensive plugin but didnt get it

worn temple
#

@near pasture Stop the server, drag the plugin, start the server

narrow schooner
#

who do i ask for help

near pasture
#

yes but the problem is

narrow schooner
#

they got the moeny but i didnt get the plugin

near pasture
#

i'm developing and testing on another computer

#

which is away

worn temple
#

@narrow schooner contact resource staff if it takes longer than a day or two. It can sometimes take a day or two to sync.

#

@near pasture So, you're using SSH?

narrow schooner
#

a day or two your kidding

near pasture
#

i mean

narrow schooner
#

every other one i got was immediate

near pasture
#

i do have access to my pc

#

but its in another room

narrow schooner
#

its annoying since i know they got the money

#

shouldnt it be immediate if they get it

#

its 35 dollars

near pasture
#

and it's weird because it didn't do that before

#

like the others spigot versions (eg 1.12) didn't have that problem

worn temple
#

okay, so if you are using SSH, the ssh client is logging in on an account without permissions, or your windows share thing is fucked. Likely tho, some program has the file open. You have to stop and then start the server. You can't hotdrop things that are in use.

#

@narrow schooner Again, it can take time. If it still doesn't show up after a day or 2, contact the dev and/or resource staff for help. I'm just a user that happens to know a lot.

near pasture
#

ahhh well, ill try to explain my case better : i'm developing and i have minecraft started on my mac (with intellij opened) and when i build with gradle it sends the file to my other computer (which has the server started and also intellij to be able to receive the file)

#

i guess that's some weird windows shit

narrow schooner
#

imma call up paypal

worn temple
#

If a program is using the jar, it can't be replaced while in use, windows prevents it.

#

@narrow schooner Chargebacks will get you banned

narrow schooner
#

since they put it on hold

#

no

#

not chargebacks nova

#

they put it on hold

#

i got in contact with the plugin maker

#

they put it on hold for him

worn temple
#

Okay, so its on hold, so they don't have the money, therefore the transaction hasn't fully completed, meaning you don't get access to the plugin.

narrow schooner
#

yes

#

exactly

worn temple
#

So... what's your issue then?

#

Seems like everything is working as intended

narrow schooner
#

tell them its genuine payment so they make it go through

worn temple
#

@near pasture You need to stop the server, then change the plugin jar, then start the server again. you can't change the plugin out while the server is running. (jvm class loading stuff will throw lots of lovely errors if you do this, as you can bypass the safeguard for replacing files while opened)

near pasture
#

and idk why it does that because windows doesn't say "This file is used in another program" it says "You need administrator permission to continue" then i click continue and then it says "You need an authorization"

worn temple
#

@narrow schooner Okay, so this is completely outside of the scope of this server then, as everything is working 100% as intended. Good to know šŸ˜„

#

@near pasture Yeah... could be the permissions file file sharing got messed up some how. But I really don't know, I'd need more information to be certain about what it could be, and I don't know if I could help solve the issue

near pasture
#

well then ill find a program that can close the server, copy the file and reopen the server automatically and it's also annoying to have the 20s delay because the file is not the latest although i'm in 1.15.2

#

ahhh

#

i might know why

#

when i start spigot, the folder goes in "read only"

#

despite me keeping unchecking it

#

ah no

#

apparently it wasn't that

worn temple
#

That's the issue then. You can't write to read only folders.

narrow schooner
#

nova

#

it's not working as intended

frigid ember
#

hm I can change plugin jars during runtime with no problem for most plugins

narrow schooner
#

the way paypal works for businesses is they hold money to prevent scamming

#

after you give that money to the seller it is not yours

#

but it can be held for up to 21 days

#

not for you to get it back necessarily

#

it's to hold money incase the seller scams anyone

worn temple
#

You can in Unix OSs, but windows safe guards it. And even so, it can mess with the runtime and bunch of stuff and jhust shouldn't be done @frigid ember

narrow schooner
#

so if the seller take money out of their account there's still money there

#

meaning the payment has gone through

#

its not my money

#

that's why on my account the payment status is completed

#

theirs isn't

#

it's compeltely a problem on their side that could last for a month

worn temple
#

The money is held by paypal, neither you nor the seller has access to it, meaning the transaction hasn't actually completely. Sure, call paypal, talk to the dev. But this has nothing at all to do with spigot.

frigid ember
#

I'd say it's pretty safe as I do it in my network constantly so plugin updates come in next restart

narrow schooner
#

the money is still in their account

#

they just can't use it

#

the money is not in my account

#

i have no rights to the money they do however it's not spendable

worn temple
#

@narrow schooner They can see it, but can't touch it, its not theirs yet.

narrow schooner
#

due to the chance of them being a scaammer

near pasture
#

well i found that i can just copy the file instead of moving it idk why that's some weird sh** happening there

narrow schooner
#

yes but the payment went through

worn temple
#

@frigid ember Still should be avoided.

near pasture
#

thanks for your help šŸ™‚

narrow schooner
#

i'm not waiting a month to get a plugin that i already paid for

worn temple
#

@narrow schooner Technically no. Again, this is not with anything to do with Spigot. The transaction has not fully completed, therefore the plugin cannot be accessed on the forums.

#

@near pasture Np, glad you figured it out

frigid ember
#

just hope for it to come sooner than a month xD

worn temple
#

^

frigid ember
#

it seems to be put on hold more often if you're from small country

narrow schooner
#

can the plugin maker give me access early

#

just because they have their funds on hold doesn't mean i should wait 21 days

#

they've been suspected of scamming

#

that's not my fault

#

and it's no longer my money

#

that's completely on their account

worn temple
#

The system is working 100% as intended, albeit a bit inconvenient for some people.

To spigot the transaction hasn't completed, therefore the plugin cannot be downloaded. Once the money is deposited to the seller, the transaction is fully completed.

To the seller, the money is visible but cannot be touched or used. It is just there so the seller knows that there is money on hold. It is simply there to inform them that paypal is going to hold it for a bit to make sure it is valid.

To you, that money is gone, because it is, its in PayPal's "bank account" not the seller's.

So, everything is working correctly, you can contact the dev and see if they will manually authorize access, but this is all outside of what Spigot is responsible for.

narrow schooner
#

the money went through nova

#

it'd being held solely on their account

#

its not my problem

frigid ember
#

24 hours

narrow schooner
#

21 days

#

not 24 hours

worn temple
#

Its on hold, meaning PayPal actually has that money. Not you, not the seller, paypal.

narrow schooner
#

its a paypal thing that takes a month

worn temple
#

transaction 50% completed.

narrow schooner
#

its held on their account incase of fraud in their business

#

they have to resolve that

#

it has nothing to do with me

#

the money is no longer mine

worn temple
#

Can the seller withdraw the money? No, then its not theirs.

narrow schooner
#

they have it on hold incase they scam someone it's still their money but it's used for claims

#

not my claim

#

for claims in general

#

they hold a certain amount of money that comes in

#

so they cant hightail out

#

thats why it could take up to a month

worn temple
#

Again, this has literally nothing to do with Spigot anymore. This is literally just between you, paypal, and the seller

narrow schooner
#

it has nothing to do with me

#

it has to do with the seller and paypal

worn temple
#

You are one part of the transaction, so therefore it does involve you

narrow schooner
#

i have nothing to do with it once the money is no longer mine

#

paypal holds it on the sellers account so they can't just withdraw all their money and delete their account

#

its held only on their end

#

to prevent fraud

#

that's their fault they make hundreds

#

so paypal is suspicious of them

worn temple
#

The money is no longer in your possession, but you authorized the transaction and paypal is holding the money for verification.

This is you, the seller, and paypal.

narrow schooner
#

so they hold money to prevent fraud

worn temple
#

Again, nothing to do with spigot, don't know why you are complaining here.

narrow schooner
#

my point is it has nothing to do with me

#

they're not holding it for me

#

i'm saying i already gave them the money

#

the payment is "completed" fully i have no rights to it

#

if i wanted the money i'd have to make a dispute

#

it's being held on their account for 21 days

worn temple
#

It is on you and the seller to keep the contract you agreed to, spigot is simply the throughway.

narrow schooner
#

it's the same as if they receieved it in full

#

yeah i'm just saying it didn't go through via spigot it doesn't mean it's paypals fault

#

paypal does this for all sellers that doesn't mean they don't deliver the product

worn temple
#

Again, not sure why you are complaining in the spigot help server, this is something to take up with the seller and paypal alone.

narrow schooner
#

mostly because you're trying to tell me it's not the sellers money but it is

#

so it's a problem with the system i have to resolve

#

either with spigot or the seller

worn temple
#

Its technically not. I sell on amazon and they hold the money for 30 days, its not my money yet.

narrow schooner
#

because the money was technically received

worn temple
#

Spigot has nothing to do with it

narrow schooner
#

on amazon even if they hold it 30 days on your account you still ship the product

#

the payment is still technically received

worn temple
#

Yes, but only because amazon knows when it ships, its a physical product. Spigot here is dealing all digital, the transaction has not fully completed according to the API, the money is not accessible to the seller, the transaction is mostly but not fully completed. So they aren't automatically giving your account access to the plugin.

Spigot = working 100%
PayPal = working 100%

narrow schooner
#

i'm just saying if the payment went through on my end it's silly for it to be held for 21 days

worn temple
#

complain on the paypal forums then. ĀÆ_(惄)_/ĀÆ

narrow schooner
#

because 21 days is a long time when you need something like an anticheat

#

"paypal stop holding money to prevent scammers"

worn temple
#

ĀÆ_(惄)_/ĀÆ

#

Like I said, mild inconvenience, but working as intended

narrow schooner
#

"let the person transfer thousands of dollars that are all fraudulent and hightail on out and delete their paypal acc"

#

lol im jsing yeah paypals on at fault

#

but spigot doesn't have a system to read if there's a problem on the sellers end

#

like amazon does

#

amazon checks if the payment was sent

worn temple
#

ĀÆ_(惄)_/ĀÆ

frigid ember
#

Paypal has a 1 star review anyways

tiny dagger
#

where?

grand aurora
#

Does anyone know why this isn't working?
Directional dir = ((Directional) chest.getBlockData()); dir.setFacing(direction); chest.setBlockData(dir);

tiny dagger
#

seems fine to me

subtle blade
#

Make sure you're importing the right Directional

#

There are 3 lol

#

org.bukkit.block.data.Directional

tiny dagger
#

btw

#

i'm getting confused by these too

#

lol

frigid ember
#

Anyone know the cause for why a chunk fails to unload when you simply unload it?

dusty topaz
#

Is there any way to get the Hopper location from the InventoryMoveItemEvent

grand aurora
#

I am using org.bukkit.block.data.Directional

tiny dagger
#

btw phase, it can be at 1 star review but what can you do when they have all the power :p

dusty topaz
#
  @EventHandler
  public void onInventoryTransfer(InventoryMoveItemEvent event) {
    if (event.getSource().getType() == InventoryType.HOPPER && event.getDestination().getType() != InventoryType.PLAYER) {
      int amount = hopperManager.getAmountToMove(needsALocation)
    }
  }
#

wait, may have figured it out.. lol

#

🤦 I always do that

subtle blade
#

Well it looks fine to me, Backett. Show us all relevant code

#

Either it's not being called or something else is updating the state

grand aurora
#

I update the inventory right after, but I don't think that should change anything. I had a print statement in there, so it is being called

subtle blade
#

Inventory?

grand aurora
#

The chest's inventory. I update the contents with an ItemStack[]

#

chest.getInventory().setStorageContents(c.getValue());

subtle blade
#

Yea, but BlockData is _Block_Data

grand aurora
#

What should I change then?

subtle blade
#

I just don't know what you're trying to do lol

#

I need more context, bud

grand aurora
#

I want to recreate the chest if it was deleted with the proper contents

#

But the only problem I am having is that the chest always faces North

#

I did store the proper direction, but it doesn't actually update

worn temple
#

blockState.setData(BlockData)
blockstate.update(true/false)

#

Dunno if that is needed anymore, may have been removed in newer bukkit versions.

grand aurora
#

Thanks! What is the true/false for?

worn temple
#

if you want physics to apply to it or not.

grand aurora
#

Okay, thanks!

wheat summit
#

I'm sorry for asking a question this stupid though I can't think right now, what would the class to have effects like posion and regeneration be called? I'm making custom enchantments and never used a Bukkit Effect like Haste or Strength before

#

All I really need is the class name, thanks!

#

Nevermind Got it

#

I was just stupid lol

subtle blade
#

FAST_DIGGING and INCREASE_DAMAGE respectively, yea

#

Remnants of old school Minecraft effect names

wheat summit
#

Ok thanks

#

It seems to want a map to use as a parameter to build?

subtle blade
#

To build what?

wheat summit
#

So should this work?

PotionEffect poison = new PotionEffect((Map<String, Object>) PotionEffectType.POISON);
#

A potion effect

subtle blade
#

That's for deserialization. Don't use that constructor

wheat summit
#

Oh ok thanks, what should I use instead?

subtle blade
#

If you're just doing it based on type, PotionEffectType has a nice utility method that at least looks a bit nicer

#

PotionEffectType.POISON.createPotionEffect(duration, amplifier);

#

(might have gotten those arguments backwards but ehm, yea lol)

wheat summit
#

Oh ok thanks!

#

Seems like it would work

frigid ember
#

what is the best plugin for enchantments for spikes, armor etc

opal sigil
#

Has anyone ever run into an issue where the InventoryClickEvent will not always be called? If we add items to a normal chest by hovering over a slot and clicking it in every so often the InventoryClickEvent is not called at all. We have tested it on multiple different versions including 1.15 but the issue remains.

worn temple
#

Seems like a minecraft issue, not a bukkit issue. May be the client not correctly sending it over to the server somehow honestly.

opal sigil
#

Seems like a minecraft issue, not a bukkit issue. May be the client not correctly sending it over to the server somehow honestly.
We already tested this and it was indeed caused by the client sending different packets to the server. Just wondering if there is a way around that

worn temple
#

ah you're getting into networking and the old "Two Generals" problem.

dusty topaz
#
  public void onInventoryTransfer(InventoryMoveItemEvent event) {
    if (event.getSource().getType() == InventoryType.HOPPER &&
        event.getDestination().getHolder() instanceof BlockState) {
#

It looks like the Destination is a CraftInventoryDoubleChest

#

how can I get a location from that? .-.

#

nevermind, once again got it

sturdy oar
#

you make a selection

worn temple
#

math.

#

Basically, you make a rounded shape with worldedit, then you can make a selection in that shape, then you can use that selection for defining the region. I think.

sturdy oar
#

you can make irregular selections, I'm pretty sure of that

worn temple
#

Yeah, just needs math and patience to figure out the exact shape dimensions

sturdy oar
#

math?

#

i mean just click on every corner

worn temple
#

No corners in an oval

tiny dagger
#

rPI*2 :d

#

wait oval? šŸ¤”

sturdy oar
#

//sel poly

worn temple
#

The picture looked pretty ovular. it s a squished cicle

hard crane
#

hey what packettype in protocollib is emitted when a projectlie is launched? spawn_entity or named_entity_spawn doesnt seem to work

proper cairn
#

Does anbody know how to get spigot java docs to work with eclipse i have tried a good amount of tricks and still cannot get the javadocs to work

tiny dagger
#

you're using build path?

worn temple
#

that's what using eclipse is like. Switch to IJ and they just work ĀÆ_(惄)_/ĀÆ

frigid ember
#

Guys how would I enable and load a plugin from another one?

tiny dagger
#

why tho?

frigid ember
#

I'm trying to make modules

tiny dagger
#

well simplepluginmanager is the class you need to look into

worn temple
#

Bad idea honestly. Just have one plugin contain all the "modules" and only have their code "running" once enabled. so on server start and plugin load, check which modules are enabled, and register their listeners and commands. And when they get disabled, just run the enable backwards basically, just unregistering any commands/listeners (assuming you do this later on, not on load)

#

You don't really want to be dealing with loading/unloading plugins because it messes with the classloader and you're gonna get a shit ton of errors

nimble stump
#

You can make a module loader

#

You don’t want to be loading your own plugins

#

But

#

Something like that is basically what you want

#

@frigid ember

frigid ember
#

Alright, thanks

proper cairn
#

Does anybody use the minecraft plugin for intellij

worn temple
#

Which one?

proper cairn
#

Development plugin

#

it supports spigot and all sorts of stuff

worn temple
#

Haven't used it in a long time. Imo not super needed if you know maven/gradle.

#

Tho it does make the boilerplate for starting projects easier.

proper cairn
#

Yeah once create the project its got everything laid out pretty much for you too and templates too

worn temple
#

Makes project starting faster, otherwise not super useful, but its neat. Good for people starting I suppose, give them the proper starting structure.

Still, so many terrible practices in the mc dev community it boggles my mind.

old barn
#

Do you have any configuration in the spigot that unloads the chunks that are not being used? My server gets a lot of loaded chunks

strong star
#

In 1.15 how do I load a world from file? Old code, previously working in 1.14.4, now just returns null when getting the preexisting world.

worn temple
#

@old barn There's some anti-lag plugins that do this, but it can cause issues. I can't point to any one plugin to use, but plenty exist that do this, but be aware that it can cause visual issues for players and break redstone and other things if they are spread across multiple chunks and one gets unloaded

old barn
#

I have 4K+ chunks loaded on my server, this causes a lot of lag and lowers the TPS a lot, is there no other way you know to remove this "lag"?

hallow surge
#

optimization upgrading hardware etc etc

#

use paper

#

iirc better optimised

#

than there are better payed methods for optimised server jars

worn temple
#

Optimizing stuff, upgrading hardware, having multiple servers connected with bungee (assuming you have multiple worlds here), etc etc.

But lag plugins just force unloading of chunks and the server will then load the chunks back in over time. That's what it does.

hallow surge
#

also if your constantly loading 4k+ chunks probably not the best idea to be running regular spigot

#

xD

#

unless you have the know how on optimisation

worn temple
#

Also, at that size, you probably should be using a bungee network already, unless somehow you have huge amounts of players spread out everywhere on one map...

hallow surge
#

dont forget survival servers nova

#

if somehow

worn temple
#

like I said, lots of people all spread out everywhere

#

But even large survival servers can help mitigate it by having the overwold, nether, and end on different servers and having some plugins do some funky maths and other nonsense.

bitter oar
#

Yo why does my code not work i am tryna get item in hand object so like I have this but its not working and i searched up on the web how but couldnt find anyting

Player player = event.getPlayer
player.getObject().getName()``` this isnt working im confused
#

i shorteneed the first part just focus on .getName

worn temple
#

Define "not working"

bitter oar
#

like it wont get the name of the item in the hand

worn temple
#

Does it do anything tho? What is it returning?

bitter oar
#

o my

#

i Just look at java doccumentation its getDisplayName

worn temple
#

yup, read the docs

hallow surge
#

yo nova do you know anything about shopgui+ api

worn temple
#

Not well, messed with it a bit for a client.

hallow surge
#

do you know of a good way to do something like this

//(I know this part)checks block in hand:  gets players balance: buys item from shop if player has enough```
worn temple
#

That's just several chains of logic


Get balance & get item in hand.

Get shop with that item

Check if balance is higher than price

Buy
hallow surge
#

i dont know how to do that iwth the api im stuck on which methods i should use

worn temple
#

It should all be documented...

hallow surge
#

its doccumented I know this -_- im just not completely sure

#

because everything in the api seemes to piont to a shop rather than a block itself

worn temple
#

I mean, I don't really know how shop gui works, but you should be able to get the shop and then check the shop if it contains the block in question

proper cairn
#

i love intellij but for the love of god i cannot get the plugin to print out a simple println statement idk what im doing wrong

#

im pretty sure i set it up properly in intellij

worn temple
#

Has nothing to do with IJ

dusty topaz
white kite
#

Hello,
I'm Making a flying armor stand that stays to the left and behind the player, I define the position of the entity according to the player's yaw, but sometimes the armor stand goes in front on the left but not behind, here's is the code, if you need more details, don't hesitate

    float yaw = player.getLocation().getYaw();

                double additionX, additionZ;

                double sinYaw = Math.sin(yaw * (Math.PI / 180));
                double cosYaw = Math.cos(yaw * (Math.PI / 180));


               
                additionX = -1.5 * sinYaw * 0.35;
                additionZ = -1.5 * cosYaw * 0.35;

                double newX = 1.5 * cosYaw+ additionX;
                double newZ = 1.5 * sinYaw + additionZ;

                armorStand.teleport(player.getLocation().add(new Vector(newX, 0.0, newZ).normalize()));```
proper cairn
#

What could it be?

dusty topaz
#

That your statement isn't running

#

Show the code - you probably haven't registered a listener or something

worn temple
#

^

#

Simply put, the code with the print statement isn't being reached

proper cairn
dusty topaz
#

no plugin.yml?

worn temple
#

@white kite You have to handle direction, seems you're missing something about negative values. I don't know the fix from that code without testing a bunch of stuff. But usually a sign of not handling negatives correctly is "reversing" what is supposed to happen (instead of behind, it's front)

proper cairn
#

oh fuck

#

Wowwwwww

subtle blade
#

firstplugin.yml != plugin.yml

#

šŸ˜›

proper cairn
#

whoopsie

#

lmaoooooo

worn temple
#

Yup, not IJ. And I think you could have found that if you read the logs on server boot, should say that the jar is an invalid plugin because its missing it and it didn't load

proper cairn
#

i feel so dumb

worn temple
#

you're fine. Don't be like me and spend 24 hours trying to find a bug only to find its a typo (saving with capital letter, reading with lowercase letter, meaning no value was found because the key was incorrect)

wanton delta
#

yall is there a way to send a large amount of particles at different locations in one packet

subtle blade
#

No

white kite
#

@worn temple I recorded the issue.
The banner doesn't have the same position.
I want the banner to be in same position as the player

https://youtu.be/fsZodAj81ac

wanton delta
#

there should be 😭

worn temple
#

@white kite I couldn't really tell you what the issue is then... might be updating is position too fast, or its rounding errors, or loss of precision. I'd just keep working on it, fine tuning the calculation and such. This is way way out of my skill set. The code I do doesn't do any sort of positional math that would need to be that accurate in the way you are doing.

muted geode
#

Hey... I'm looking to make a custom recipe that uses a stack of each item how do i go about doing that this is the code I have now and I realize that RecipeChoice.ExactChoice is deprecated i would like to remove it but I don't know how...

#

        cactusStick.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 1);

        ItemMeta itemMeta = cactusStick.getItemMeta();

        itemMeta.setDisplayName("Cactus Stick");

        cactusStick.setItemMeta(itemMeta);

        NBTItem nbti = new NBTItem(cactusStick);

        nbti.setString("KEY:", "Cactus_Stick");

        ItemStack newCactusStick = nbti.getItem();

        NamespacedKey key3 = new NamespacedKey(this, "cactus_stick");

        // Create our custom recipe variable
        ShapedRecipe recipe3 = new ShapedRecipe(key3, newCactusStick);

        recipe3.shape("CCC", " C ", "CCC");
        recipe3.setIngredient('C', new RecipeChoice.ExactChoice(new ItemStack(Material.CACTUS, 64)));

        Bukkit.addRecipe(recipe3);```
proper cairn
#

foxed the plugin.yml and still cant get it to do anything

worn temple
#

is the plugin compiled and in the plugins folder? its not loading the plugin.

#

Infact, that actually looks like its the vanilla server?

proper cairn
#

Yeah built and in the plugins folder

#

Oh well that would be the reason why maybe

#

Stay tuned be right back

muted geode
#

lol

jaunty night
#

@proper cairn could be the fact that plugin.yml is not in the "resources" folder

muted geode
#

it doesn't have to be iv made many plugins with it outside the resources folder

worn temple
#

@jaunty night its not that, its the vanilla server. Spigot outputs a lot more than that, and even says exactly what spigot build you are using.

jaunty night
#

ohhhh

#

usually IJ auto creates a resources folder

worn temple
#

Also, resources only tells the compiler to include these non-code files in the compiled version, you could just have it in the artifact directory and it'll work just fine

jaunty night
#

ah

worn temple
#

Its just way better and the proper conventions to put it in the resources folder.

#

As if you decompiled the jar, you'd see there is no resources folder, just the base package with the stuff that was in the resources folder directly there.

#

But yeah, that's definitely just the vanilla server not the spigot/bukkit/paper server

#

If it found a jar in the plugins folder without the plugin.yml file, it would just spit out an error about that and say that it's not loading the plugin.

jaunty night
#

yeah

#

normally when I forget to add a plugin.yml to my plugin (I've done that more times then I want to admit) it spits out a massive stack trace.

worn temple
#

Yup

dusty cliff
#

hiya

#

anyone here know javvaaaa

jaunty night
#

yep

dusty cliff
#

Okay so.

#

I figured out a way to get a class from a string using Class.forName and it seems to work

worn temple
#

I hope that first question was a joke

dusty cliff
#

but I have an issue where I need to do cls.INVENTORY.Open(player);

#

but obviously it doesnt recognize that

#

You have any idea a way to get it to work?

jaunty night
#

um

worn temple
#

Don't shade

#

That's first and foremost part of the issue

jaunty night
#

I'll need more context for what you're trying to do before I can tackle this

worn temple
#

you can also get a method by name

#

but you shading is really really bad

dusty cliff
#

im basically trying to do [classname].INVENTORY.open(player);

nimble stump
#

Why are you trying to do it that way

worn temple
#

what is inventory, why are you shading, what's the point of any of this

dusty cliff
#

Im using a GUI api

nimble stump
#

@worn temple how do you know he’s shading something?

dusty cliff
#

and thats the method you need to do to open a inventory

nimble stump
#

I guarantee that is not the method

dusty cliff
#

Just the inventory name needs to be changable

nimble stump
#

What’s the name of the class

jaunty night
#

this looks like static abuse to me

dusty cliff
#

there is no exact name

#

thats the thing

worn temple
#

@nimble stump ClassForName is shading

jaunty night
#

so your trying to get a class that has variable called INVENTORY and you need get that and run open on it?

dusty cliff
#

yes

#

basically

worn temple
#

Yeah, you can't do that directly.

jaunty night
#

There are better ways to do this

#

abstraction for one

dusty cliff
#

explain

worn temple
#

If you're shading

get class for name, get parameter, get method.

All of this can be avoided if you just have the class already, or just cast to the class.

dusty cliff
#

yeah I know

#

but I cant

worn temple
#

This is all insanely bad practice

nimble stump
#

That’s not shading that’s reflection

dusty cliff
#

I need it to be defined in a config

jaunty night
#

are you doing NMS stuff

dusty cliff
#

no

#

Im trying to open a inventory thats definable in a config

worn temple
#

Okay, that's even worse letting it be config defind

dusty cliff
#

and thats the method used to open it

nimble stump
#

Why is the class configurable

jaunty night
#

Then just use a Map?

#

or an enum for that matter

worn temple
#

None of this is good practice at all

nimble stump
#

Why would your end user have any idea what class name it is

worn temple
#

And you can't just get a class name directly, you have to know the exact package structure too

dusty cliff
#

ill do some more thinking

#

thanks for the help

nimble stump
#

This sounds like an XY problem my dude

dusty cliff
#

yeah I just found of a way around it too

worn temple
#

Sounds like you were looking for a solution to a problem that just shouldn't exist....

dusty topaz
#
      PacketPlayOutOpenWindow packet = new PacketPlayOutOpenWindow(
          entityPlayer.activeContainer.windowId,
          "minecraft:hopper",
          new ChatMessage("Amount: " + amount),
          event.getPlayer().getOpenInventory().getTopInventory().getSize());
      entityPlayer.playerConnection.sendPacket(packet);
      entityPlayer.updateInventory(entityPlayer.activeContainer);
#

anyone got any idea why that isn't updating the inventory title

#

It's being ran, just not ... doing anything

proper cairn
#

jesus help lmao

#

now i cant even get the local spigot server to launch like god is mad at me today omg

worn temple
#

loool

proper cairn
dusty topaz
#

are you sure spigot.jar exists

worn temple
#

^ yeah, usually its spigot-version.jar or something

proper cairn
dusty topaz
#

its called spigot.jar.jar

#

you can tell because you don't have extensions on and can see the jar extension

#

(protip: turn on extensions)

worn temple
#

^

proper cairn
#

lmao that was the issue

#

thank you for the help

#

lmapo

#

lmao