#help-development

1 messages ยท Page 1653 of 1

plain scroll
#

what should i search for?

eternal oxide
grim ice
#

um

#

i just tried debugging

#

the debug works for the first gui

#

for second, it does not

opal juniper
#

found this

#

idk if it is any good

#

but ElgarL's method looks good too

plain scroll
eternal oxide
paper viper
#

its pretty nice

eternal oxide
#

then detect clicks on any head

plain scroll
#

so in theroy i should remove my current code

#

and just go off what this says

eternal oxide
#

I'd add it as a class and try it. See how it goes. Keep your old code until you decide

#

The code I posted you'd just loop bukkit.getOnlinePlayers()

#

and create an itemstack for each

plain scroll
#

hmm okii

#
 public void openMenu(Player player) {

            ConfigurationSection section = plugin.getConfig().getConfigurationSection("warps");

            if (section == null) {
                player.sendMessage(ChatColor.RED + "There are no warps.");
                return;
            }```
#

ok so on this selection

#

do i just add my old code?

eternal oxide
#

you can scrap all that

plain scroll
#

kk

#

i remove that and i get a ton of errors

eternal oxide
#

this for (String childSection : section.getKeys(false)) { you would change to for (Player online: Bukkit.getOnlinePlayers()) {

plain scroll
#

            for (Player online: Bukkit.getOnlinePlayers()) {

            }```
eternal oxide
#

Then the ItemStack section you create your head ItemStacks

plain scroll
#

so like thi s

eternal oxide
#

yes

#

then change currentPage.addItem(item); to currentPage.addItem(playerHead);

eternal oxide
plain scroll
#

worked!

#

but what is this here

#

for (String childSection : section.getKeys(false)) {

#

section is red

eternal oxide
#

don;t need

#

you replaced that with a for loop over onlinePlayers

plain scroll
#

so i can remove it?

eternal oxide
#

yes

plain scroll
eternal oxide
#

change the page title. Keep the (page: %d) on the end though

eternal oxide
lusty cipher
#

Is it preferred to make it air myself and cancel the event myself? I currently just cancel the drops and drop it naturally, but don't cancel the event so the game knows to break the block itself.

plain scroll
#

liek this

eternal oxide
#

Its best to set AIR and cancel so other plugins don;t so anything with it

lusty cipher
#

do I have to set it to air a tick later?

eternal oxide
#

no, you can set air any time

lusty cipher
#

๐Ÿ‘

plain scroll
#

i dont understand this lmao

eternal oxide
#

?paste your whole class

undone axleBOT
plain scroll
eternal oxide
#

You seem to have missed out a lot of the fields

lusty cipher
#

wait how do I set a block at a location

eternal oxide
#

Location.getBlock().setType

lusty cipher
#

oh like that

#

I was searching for a .setBlock func in World

eternal oxide
plain scroll
#

oh

#

should i remove the old one then?

eternal oxide
#

Yes

#

then register the class as an event handler

plain scroll
#

so all this ?

eternal oxide
#

yes, but you ordered some of the code incorrectly too

plain scroll
eternal oxide
plain scroll
#

oh

#

i have no errors

#

oh

#

i now have issues in my open command

grim ice
#

@eternal oxide

#

so uh

#

?paste

undone axleBOT
eternal oxide
grim ice
#

as u see

#

if(event.getClickedInventory() == null || event.getClickedInventory().getTitle() == null) System.out.println("1");
if (!event.getClickedInventory().getTitle().contains(ChatColor.GREEN + "Warps")) System.out.println("2");
if (!event.getCurrentItem().hasItemMeta()) System.out.println("3");

#

none of these were printed

plain scroll
grim ice
#

nothing was printed in second gui

plain scroll
#
package bangui.me.duke.Me.commands;

import bangui.me.duke.Me.Duke;
import bangui.me.duke.Me.utils.BanMenuUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;




public class BanGUICommand implements CommandExecutor {
    Duke plugin;
    public BanGUICommand(Duke plugin){
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {
            Player p = (Player) sender;
            if (p.hasPermission("ban-em.open")) {

                BanMenuUtils.openBanMenu(p);
            }else {
                p.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("Noperm")));
            }
        }
        return true;
    }
}

grim ice
#

first gui it worked fine

plain scroll
#

this is the open command

quaint mantle
#
class SubOperator : Operator('-') {
    override <reified T> fun operate(a: T, b: Any): T {
        return null
    }
}

Expecting member declaration

eternal oxide
grim ice
#

so

#

elgar, u have any idea

plain scroll
eternal oxide
quaint mantle
plain scroll
#

but i think bc i change the thing in the util i think it just brakes the command code

quaint mantle
#

use a set

hollow sand
#

how would someone, make a chance system with a gui. Saying like, when you join, there is a chance for 1 gui opening, and when you join again, another gui opens

grim ice
eternal oxide
quaint mantle
#

i dont see a difference

grim ice
#

no he meant the getTitle

#

but

#

why is it

#

not wroking

#

oarghuergnrubgsuerobgesgsegug

quaint mantle
#

use a record

record WarpGui(Inventory inv, int page)
eternal oxide
#

debug. Its impossible for one Inventory to trigger events but not a second

cinder plume
#

guys help with this pls

eternal oxide
#

then yoru debug code is shit

grim ice
#

WDYM

#

if(event.getClickedInventory() == null || event.getClickedInventory().getTitle() == null) System.out.println("1");
if (!event.getClickedInventory().getTitle().contains(ChatColor.GREEN + "Warps")) System.out.println("2");
if (!event.getCurrentItem().hasItemMeta()) System.out.println("3");

grim ice
#

this shouldved print 1 / 2 /3 if it has shit in it

eternal oxide
#

if yoru debug code doesn;t trigger its not telling you crap so its not really a debug is it

quaint mantle
grim ice
#

it is

#

IDK MAN

cinder plume
#

Anyone know the solution to this?

grim ice
#

then what am i supposed to do

plain scroll
#

@eternal oxide

eternal oxide
#

None of those debugs shoudl have triggered, they are all for return statements

quaint mantle
plain scroll
#

Modifier 'static' not allowed here

cinder plume
#

i did that already

hollow sand
lost matrix
hollow sand
cinder plume
eternal oxide
quaint mantle
hollow sand
#

i tried to use Math.random

#

but didnt work .>.

plain scroll
quaint mantle
#

use what i sent

plain scroll
#

then in there how can i open the menu ?

grim ice
#

@eternal oxide then how do u want me to make the debugs lmao

eternal oxide
quaint mantle
#

this channel is shit

cinder plume
#

@quaint mantle i restarted but its still not working

eternal oxide
#

channel is spammed

quaint mantle
#

we need multiple

plain scroll
#

ikr

grim ice
#

OH LMAO

plain scroll
grim ice
#

I THINK I KNOW WHY @eternal oxide

#

there are 2 onclick events

#

may that be the case?

#

since 2 events cant run on the same time

#

maybe thats the case?

cinder plume
#

Help with this if possible please.

quaint mantle
#

Stop

#

asking so much

cinder plume
#

THen wtf do i do

quaint mantle
#

have you googled it

cinder plume
#

google has no answer as well

#

ye i did

quaint mantle
#

then go to their discord

plain scroll
eternal oxide
#

BanMenuUtils banManu = new BanMenuUtils(this);

#

then pass banManu to whatever classes need it

plain scroll
#

oh

#

BanMenuUtils.openBanMenu(p); <<< this still wont work tho?

eternal oxide
#

no, thats a static access

plain scroll
#

oh what should i use then??

eternal oxide
#

you would use banMenu.openBanMenu(p)

#

I just told you

plain scroll
eternal oxide
#

now pass that to yoru command class through a constructor

grim ice
#

WHY DOESNT IT WORK BAWUGBFAUGBEURG

#

bro it legit works on first gui but not on second wtf

eternal oxide
#

are you registering multiple listeners and canceling the event in one?

quaint mantle
#

aPES_Wow developer screaming over easily debuggable error

#

put your code on github

plain scroll
#

bc this worked before

quaint mantle
#

?di

undone axleBOT
eternal oxide
#

It worked before because you used different code and used static

plain scroll
#

oh

#

so what needs to be added/cahnged>

grim ice
#

now i get laughed at for being a total bozo

quaint mantle
grim ice
#

ok so

#

is having 2 events of the same type in different places and one has a cancelling thing

#

kill the one with no cancel?

plain scroll
eternal oxide
#

pass the instance to your command class

regal anchor
#

just upgraded the code to 1.16

#

doesn't work, but yea it's different TrapDoor is in package block.data instead of material and functions names changed

#

I did the debug again and everything is called

waxen plinth
#

You can set BlockData on a block directly, you know

#

b.setBlockData(door, false)

grim ice
#

@eternal oxide is having 2 events of the same type in different places and one has a cancelling thing
kill the one with no cancel?

#

if so whats the solution

#

do i just chuck them into 1

eternal oxide
#

set teh one that you want to listen anyway to ignoreCancelled

#

sorry set ignoreCancelled = false

grim ice
#

so do i set both of them to ignoreCancelled true or false

eternal oxide
#

false

plain scroll
quaint mantle
#
class SubOperator : Operator('-') {
    override <reified T> fun operate(a: T, b: Any): T {
        return null
    }
}

expected member, why isnt the generic working

chrome beacon
undone axleBOT
grim ice
#

@eternal oxide how btw

#

OH IN THE @EVENTHANDLER

plain scroll
grim ice
#

DUDE

#

IgnoreCancelled is false by default

#

why do i need to do it lmao

plain scroll
#

its making me make it static.......

covert valve
#

what the shit is that

#

imagine

quaint mantle
#

Halp

covert valve
#

can't be reified unless its inline

grim ice
quaint mantle
#

i just wanna make a generic

eternal oxide
covert valve
#

inline <reified T> fun operate

grim ice
#

why do i have to do ignorecancelled false

covert valve
#

or remove the reification

grim ice
#

its by default like that

covert valve
#

or add the reified type parameter to the class itself

plain scroll
covert valve
#

but reified types only work on inline functions because bytecode

quaint mantle
plain scroll
eternal oxide
quaint mantle
#

yall are making ElgarL life hell

#

its simple java duke

covert valve
#

kotlin lang docs are 11/10

quaint mantle
#

Ikr

covert valve
#

i learned the entire language from just reading the docs

plain scroll
eternal oxide
#

NO

keen lake
#

Hi guys. I am getting main scoreboard and try to register a team right after server starts. I read that the scoreboardManager can be null until world is loaded but I even use delayed task in onEnable() to make sure the world is loaded but it is still null. Anyone who came across this?

plain scroll
#

im honestly confused....

quaint mantle
#

?learnjava

undone axleBOT
eternal oxide
#

?di

undone axleBOT
quaint mantle
#
override fun operate(a: T, b: Any): T { ^ compiler.kotlin:2:15: error: expecting member declaration

@covert valve

eternal oxide
#

read that

quaint mantle
#
class SubOperator : Operator('-') {
    override <T> fun operate(a: T, b: Any): T {
        return null
    }
}
covert valve
quaint mantle
#

Ah

grim ice
#

@eternal oxide SAME PROBLEM LOL

tardy delta
#

why java doesn't have operator overriding : (

grim ice
#

i set them both to ignorecancelled true t

keen lake
#

I'm not getting world. I am trying to use scoreboardManager and it is null

eternal oxide
covert valve
eternal oxide
#

events will not simply be ignored

covert valve
#

ecoskills gang

tardy delta
covert valve
#

yes

#

kotlin masterrace

#

@ivory sleet @quaint mantle yes

plain scroll
#
public class FancyLogger {
    private final JavaPlugin plugin;

    public FancyLogger(JavaPlugin plugin) {
        this.plugin = plugin;
    }
#

so i need to add soemthing like this

#

in the command class?

tardy delta
#

cpp operator overloading : )

quaint mantle
#

its 10x harder

covert valve
#

nah

plain scroll
covert valve
#

kotlin is so much easier and faster once you get the hang of it

plain scroll
#

so i just change it

tardy delta
#

ill learn java further

covert valve
#

learn kotlin

grim ice
#

@quaint mantle uh do u have an idea

covert valve
#

or learn both like a gigachad

grim ice
#

so i have 2 guis

#

and a clickevent listener

tardy delta
#

yes

grim ice
#

the listener is working only for the first gui although

#

the second gui is the same

covert valve
#

make a proper gui library or use an existing one

grim ice
#

yes i did

covert valve
#

gui coding using just the spigot api will make you want to shoot yourself

grim ice
covert valve
#

make one then

#

that's what i did

#

i made my own gui lib

grim ice
#

do i use it

covert valve
#

make your own

grim ice
#

but umm

#

auhfuaewfhauowefbahewug9abweugawheguoaweg

#

WHY

plain scroll
grim ice
#

IS MY LIFE LIKE THAT

plain scroll
#

ffs

#

i jjust

#

wont work

covert valve
#
open class ClassWithDI(
  plugin: EcoPlugin,
  other args
): Listener {
}
#

done

forest edge
#

Is there a Tag for concrete? (Tag as in Tag.BANNERS, etc.)

covert valve
#

probably

grim ice
#

dude

#

ur not serious right

covert valve
#

or just material.name().lowercase().contains("concrete")

grim ice
#

im so fucking done

#

WHY IS SPIGOT LIKE THAT

plain scroll
#

bruh

forest edge
#

I'd like to avoid string concatenations, can't find anything under tag

plain scroll
#

me brain dead

grim ice
#

DO I ACTUALLY HAVE TO MAKE A LIBRARY

tardy delta
#

loll

grim ice
#

JUST TO USE GUIS

covert valve
plain scroll
grim ice
#

AWGUAWUEGBAWEUOGBAWEIUGFAEGUAEWJGAEG

covert valve
#

it wont work in a java class

plain scroll
#

oh

#

LMAO

#

yea

#

just thaught

covert valve
plain scroll
#

can u do it in java for me

#

pweeex

covert valve
#

bro

chrome beacon
#

?di

undone axleBOT
chrome beacon
#

Go read

grim ice
eternal oxide
plain scroll
grim ice
#

IS IT NOT WORKING

chrome beacon
eternal oxide
#

because you haven't properly debugged your code

plain scroll
#

i dont get what i need to put

grim ice
#

how do i 'properly' do it then

eternal oxide
#

add actual debugs to see what code is running and what isn't

grim ice
#

i did

eternal oxide
#

sysout before each line. see whats not working

grim ice
#

ok

eternal oxide
#

no, you did sysouts on the actual conditions is all

grim ice
#

if(event.getClickedInventory() == null || event.getClickedInventory().getTitle() == null){
System.out.println("inv / title is null");
return;
}
if (!event.getClickedInventory().getTitle().contains(ChatColor.GREEN + "Warps")) {
System.out.println("title does not contain warps");
return;
}
if (!event.getCurrentItem().hasItemMeta()) {
System.out.println("item no meta");
return;
}
if (event.getCurrentItem().getType() == Material.PAPER) {
System.out.println("material is paper");

#

like dis or what

eternal oxide
#

yes, and add one after to see if it gets passed fine

grim ice
#

after what

plain scroll
#

elgarl can u reply to the message u sent that tells me what 2 do?

eternal oxide
#

after all your test. You wan tto know if it even entered your code

eternal oxide
undone axleBOT
plain scroll
eternal oxide
#

Line 16 is yoru constructor

#

change it to java public BanGUICommand(Duke plugin, BanMenuUtils banMenu){ this.plugin = plugin; this.banMenu = banManu;

plain scroll
#

i get 24errors

eternal oxide
#

It will ask to create a Field.

plain scroll
#

oh yea

eternal oxide
#

add a field for banManu

#

Field not local variable

plain scroll
#

yea

#

it just highlights Object

eternal oxide
#

then in your main class where you do new BanGUICommand(this) you have to change it to pass your ban util too new BanGUICommand(this, banUtil)

#

or whatever you called it

reef wind
#

ENTITY_GENERIC_EXPLODE plays a random explosion sound but is there a sound effect for when a tnt explodes?

plain scroll
#

its now asking for another field

eternal oxide
#

what?

halcyon mica
#

How do I set up mixins for spigot?

plain scroll
#

Expression expected

eternal oxide
#

oh my. NO, don;t pass it the class. Pass it the field you created at teh beginning

#

Please read what I write and not guess

plain scroll
#

command class

eternal oxide
#

I clearly said banUtil which is camel case. Lower case first letter, so its a variable

plain scroll
#

main class

covert valve
reef wind
cloud berry
#

hi guys wat time dose th โ›ด๏ธ dose th ferry come 2day

opal juniper
#

12pm GMT

cloud berry
#

wtf is gmt

covert valve
#

its built into eco

#

which is my glorious framework

cloud berry
#

wtf r we in euro

eternal oxide
covert valve
opal juniper
opal juniper
covert valve
#

someone asked what it was

opal juniper
#

smh

#

the self plugging

opal juniper
#

itโ€™s overwhelming

covert valve
#

ITS A FREE LIBRARY JEFF WHAT WOULD I PLUG FOR

eternal oxide
opal juniper
plain scroll
#

oki

eternal oxide
#

now fix yoru main

plain scroll
#

so now in main class

#

right

narrow furnace
#

sellout aux

grim ice
#

@eternal oxide guess what

covert valve
#

sellout aux

plain scroll
#

banUtil? what is this

covert valve
#

see what you've done bingie is just promote my shit for me

grim ice
#

it souted the last message (the only after all the checks)

#

the one before the last }

covert valve
#

thanks

eternal oxide
#

Sod off with the spam. It makes it very difficult to talk in here

covert valve
#

now use code auxilor

tardy delta
grim ice
#

help

eternal oxide
halcyon mica
#

I assume by the lack of a response that mixins are yet another thing spigot's not capable of. So how am I supposed to access variables defined in a nms method

covert valve
#

reflect your shit around

plain scroll
#

getCommand("banem").setExecutor(new BanGUICommand(this, banUtil)); <<< What sould the banUtil be?

covert valve
#

or use kotlin

plain scroll
#

idk if i even have a var with that name

covert valve
#

you should learn java

opal juniper
#

class

eternal oxide
grim ice
tardy delta
eternal oxide
#

where you used new BanMenuUtils(this)

eternal oxide
grim ice
#

u do now

#

lol

covert valve
#

AMOGUS

plain scroll
grim ice
#

yes

plain scroll
#

i called it banMenu

covert valve
halcyon mica
#

God, this place is more shitpost than anything, isn't it

covert valve
#

glorious

eternal oxide
plain scroll
#

but i get the error...

plain scroll
#

thsi?

eternal oxide
#

you shoudl have no error in main

grim ice
#

SOMEONE HELP

#

aohnfauowbeuaoebgauwoegbaweuogbawgeuaowbeguawbg

plain scroll
#

works

#

lol

#

just that command class is still 99% read

eternal oxide
plain scroll
#

red

eternal oxide
#

see where its failing

plain scroll
#

is it bc u put manu

#

not

#

menu

covert valve
#

no

#

because your method is inside your constructor?

#

what the fuck are you doing

eternal oxide
#

banMenu.openMenu(p)

plain scroll
#

that works

#

just

#

its all still errors

eternal oxide
#

errors?

tame coral
#

That's not how you make a command

plain scroll
lost matrix
plain scroll
#

^^ see

tardy delta
#

fix your shit

plain scroll
#

so why

tardy delta
#

wdym why all that errors

halcyon mica
#

How anything usable comes out of this is beyond me

eternal oxide
#

close teh constructor

halcyon mica
#

I can't even properly debug path generation because I am unable to access the process

lost matrix
eternal oxide
#
public BanGUICommand(Duke plugin, BanMenuUtils banMenu){
  this.plugin = plugin;
  this.banMenu = banManu;
}```
halcyon mica
#

Just telling people to use something superior instead of trying to provide options is one way to run a community, I guess

outer crane
#

not really

grim ice
#

@eternal oxidebtw

#

i have one after my paper test

#

and the one after the paper test is the only one working

outer crane
lost matrix
eternal oxide
grim ice
#

until the end

halcyon mica
#

What even is the point if I am unable to change pathfinding or properly debug it

grim ice
#

it skips the whole event basically

eternal oxide
#

no

grim ice
#

all the functions of the event get skipped

#

also @plain scroll wtf r u fucking

eternal oxide
#

look at yoru code and see if you can see whats wrong

tardy delta
#

close constructor

grim ice
#

he has double constructor

#

and one is open

#

ANYWAY

#

elgar do u have an idea

halcyon mica
#

Want to debug the A* algo and properly display it to render? Can't do that
Want to modify vanilla pathfinding for vanilla entities? Can't do that

eternal oxide
grim ice
#

@EventHandler(ignoreCancelled = true)
public void onClick(InventoryClickEvent event) {

    all the event shit {

}
System.out.println("did it pass all, yes");
}

#

and the sout ran

tardy delta
lost matrix
grim ice
#

IT IS NOT A LOGIC ISSUE @eternal oxide

#

if (event.isLeftClick()) {
System.out.println("left");

grim ice
#

i have one of t hese

#

for every thing

#

they do not run

#

RGAWRHGRHEGUGRHEGHGEHGGOGHOGR

halcyon mica
#

Then please tell me how I access the closed and open node set and target node list

grim ice
#

GHUORGHAUORGHAUROGAURGAHEGHAUEROGAHUORGAHEURGHAUEROGAHERGUAERHGUAERGAERG

halcyon mica
#

Which are solely located in a method inside Path and not written to a local field

grim ice
#

@lost matrix

#

do u have an idea

lost matrix
grim ice
#

why this fuckery is happening

#

basically, an event is working for a gui but not the other ones

#

and theyre the exact same

halcyon mica
#

So that's not a valid option, init

eternal oxide
grim ice
#

its 100% not the thing though

halcyon mica
#

And to my knowledge, there is no way to access fields inside a method

#

Through reflection anyway

grim ice
#

how can it even do smth

lost matrix
grim ice
#

pls help

halcyon mica
#

The thing not supposed to be used with spigot?

tacit oak
#

Hi! I'm trying to create an AntiCheats in Intellij IDEA in Maven, but I'm having trouble importing Spigot-API version "1.8.8-R0.1-SNAPSHOT".

lost matrix
grim ice
#

u shouldnt make an anticheat

#

if u dont know that

lost matrix
grim ice
#

and that's not why

#

its not working

tacit oak
#

There's nothing I can do?

grim ice
#

@eternal oxide ru there

halcyon mica
#

Not to mention that ASM injection needs applying on a much earlier state than plugins are initialized

#

So how does that work with spigot

eternal oxide
#

I don;t use 1.8 so no idea

grim ice
lost matrix
eternal oxide
#

Its your code, you tell me

#

all I did is the paginated UIs for you

tacit oak
#

So, is it impossible I managed to create a plugin for 1.8.8 now?

lost matrix
waxen plinth
#

You shouldn't create plugins targeted for 1.8

#

The most you should do is make plugins that target latest but are compatible with 1.8

#

Which isn't always easy either

halcyon mica
grim ice
#

most mc servers are 1.8

tacit oak
#

yea

grim ice
#

almost all pvp servers are 1.8

eternal night
eternal oxide
eternal oxide
#

Thats only a guess due to it being 1.8

waxen plinth
tacit oak
eternal oxide
#

oh I rewrote the menu opening code```java
/**
* Deal with clicking the next button.
*
* @param event
*/
@EventHandler
public void onClick(InventoryClickEvent event) {

    if (!pages.contains(event.getClickedInventory())) return;
    event.setCancelled(true);
    
    if (!next.isSimilar(event.getCurrentItem())) return;

    int index = pages.indexOf(event.getClickedInventory());

    // Make sure we have a new menu to display.
    if (pages.size() > index) {
        event.getWhoClicked().openInventory(pages.get(index + 1));
    }
}```
waxen plinth
#

No it's literally not

paper viper
waxen plinth
#

People need to fucking move on from 1.8

#

And stop acting like it's the end all be all

#

1.8 is a shrinking minority

#

8.2%

tame coral
#

yeah

#

especially with plugins portraying 1.8 PVP to higher versions

waxen plinth
#

Yeah you can emulate 1.8 pvp with 1.17

grim ice
#

if (m.find()) {
event.getWhoClicked().closeInventory();
event.getWhoClicked().openInventory(pages.get(Integer.parseInt(m.group())));

#

so like this

#

Elgar, ^

tacit oak
#

what i do to create a 1.8.8 plugin

#

need that

paper viper
#

?

eternal oxide
#

No need for regex or anything.

grim ice
#

WHY

#

DO U HAVE = FALSE

#

oops caps

#

it's default

#

ur doing nothing by that

eternal oxide
#

yes, I was testign your issue

#

its not needed

grim ice
#

o

#

do i make it true

#

maybe it makes a difference

eternal oxide
#

no

quasi stratus
#

How does one use hex color codes? for example - lore.add(ChatColor.GRAY + "An enhanced version of the survival");

halcyon mica
#

@lost matrix That requires initialization on a much earlier spot than possible with plugins

waxen plinth
#

Use the bungee chat color class

grim ice
#

ok

waxen plinth
#

You can do ChatColor.of(Color) I believe

#

And pass it new Color(r, g, b)

#

Alternatively you can do new Color(0xFF0000) or something

paper viper
#

We should convert more people to adventure

halcyon mica
#

Building a custom server jar is not really viable, is it?

tame coral
paper viper
#

good chat component lib

eternal oxide
#

Paper only

eternal night
#

it isn't paper only

paper viper
#

well spigot can use it too

waxen plinth
#

I'm pretty sure you can shade it for spigot

#

But paper has it by default

grim ice
#

who made the inventoryclickevent

waxen plinth
#

If only the desktop market share graph looked like this too lol

grim ice
#

i hope he gets diarrhea

eternal night
#

ngl, linux on desktop feels pretty good since protondb

waxen plinth
#

It really does

#

I use arch btw

#

With steam deck coming out more and more games may start working on linux

eternal night
#

are you potentially a reddit mod

#

xD

tame coral
waxen plinth
#

Nope

paper viper
waxen plinth
#

Just a linux enthusiast

lost matrix
covert valve
#

linux on desktop always feels like a hack to me

waxen plinth
#

Why

grim ice
#

nvm its my fault

covert valve
#

personal choice im not a fan

waxen plinth
#

I've been using it for years and it's amazing for development

covert valve
#

i hate windows

grim ice
#

prob my code that is shit

covert valve
#

but i'm not huge on using linux

halcyon mica
waxen plinth
#

What did you try that made you feel that way?

covert valve
#

macos is my personal favourite rn but i'm not gonna run a hackintosh lmao

paper viper
#

breh

#

mac?

#

but why

covert valve
covert valve
waxen plinth
#

It's a middle ground between linux and windows

#

Unix-based

#

But still has more compatibility

lost matrix
waxen plinth
#

And ease of use

covert valve
#

i need compatibility

#

and i love ease of use

paper viper
#

but with other stuff the majority of people dislike

halcyon mica
#

The world is not the earliest interaction

covert valve
#

i might be technical but i still want it to be nice and easy to use

waxen plinth
#

Everything I need runs on linux though

halcyon mica
#

Very, very far from it

paper viper
#

like the stupid security things it does

grim ice
#

windows best

covert valve
#

not for me and im not going to run everything under proton

waxen plinth
#

Why not?

covert valve
#

because no

waxen plinth
#

Proton has near-native performance

covert valve
#

i rather run native

waxen plinth
#

Why lol

covert valve
#

personal choice

halcyon mica
waxen plinth
#

With proton you literally can't tell the difference most of the time

lost matrix
waxen plinth
halcyon mica
#

And it doesn't

covert valve
#

unless it's completely transparent and doesn't exist to the end user then it's too hacky

paper viper
#

fortnite god no

#

please dont bring that over

waxen plinth
#

With proton you click a few buttons and it's done

#

Most games don't even require any extra steps

lost matrix
covert valve
#

i dont want to have to click any buttons at all

quaint mantle
#

I keep getting this error when loading a world, I believe I'm loading it correctly as it does load and I get teleported to it but I still get this error https://paste.md-5.net/mazajivoha.sql

waxen plinth
#

Yeah all I have to click is "continue" when it says "this game is running through a compatibility tool"

#

I don't see the problem

halcyon mica
waxen plinth
#

That's literally it

#

And only on the first launch

covert valve
#

what if i want to run creative cloud apps

waxen plinth
#

Other than that I just click play and it runs through proton

halcyon mica
#

Say "you can't" instead and be done with it

covert valve
#

i dont just game on my pc

#

what if i want to play a game that isn't on steam

waxen plinth
#

Proton can be used on non-steam games

covert valve
#

does it need extra steps?

lost matrix
waxen plinth
#

With lutris, not really

halcyon mica
waxen plinth
#

You search for the game, get the script, and launch

covert valve
#

why hasn't anyone decided to make a company with an operating system that's both stable, unix-based, and easy to use

grim ice
#

IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED
IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED
IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED
IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED
IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED
IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED
IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED
IM HAVING A FUCKING SEIZURE IT FUCKING FINALLYL WORKED

halcyon mica
#

The conversation with you was a borderline insulting waste of time

eternal night
#

๐Ÿ˜‚

waxen plinth
#

OSX?

grim ice
#

HOLY SHIT IM DONE WITH THIS CYA

eternal night
#

your attitude is fun

waxen plinth
#

RedHat?

covert valve
#

mac is the only example of that but it's proprietary and you can't just run it on whatever you want

#

redhat doesn't run everything

waxen plinth
#

.-.

covert valve
#

anyway ciao

waxen plinth
#

Compatibility is a problem that is solved by more people using linux

#

The more people use linux, the more incentive there is for companies to make sure their shit works on it

eternal oxide
vale ember
#

can anyone help please,
i wrote method that spawns armor stand via protocollib
and i call it 3 times and it work 3 times
but only 1 armor stand beign spawned
i debugged but i didnt found nothing weird
no errors just dont work
here is method code: https://paste.md-5.net/ecibacaqej.cs
(I AM 100% SURE THAT ITS BEIGN EXECUTED MORE THAN ONCE!)

grim ice
#

i changed other stuff too

#

but it worked

eternal oxide
#

k

lost matrix
halcyon mica
#

My parents have been dead for a while, but I'll be sure to send a message in a bottle down to hell

#

Thanks for the suggestion though

grim ice
#

tbh vatuu i feel bad but i also dont cuz ur a toxic little fuck

halcyon mica
#

Toxic isn't the word I would use

#

Also, don't feel bad

#

I know better than to be insulted by some kids that think they are hot shit while not even grasping basic computer science

vale ember
#

hey can anyone help me?????????????

lost matrix
lost matrix
halcyon mica
#

The fact that this is the official spigot server

#

Though I seem to have been severely mistaken in my expectations

vale ember
lost matrix
halcyon mica
#

No need, there is plenty of alternatives

lost matrix
halcyon mica
#

Besides, I seem to have found a alternative that works just fine

lost matrix
vale ember
eternal oxide
halcyon mica
#

While this place might not be helpful, it's still interesting to watch what people come up with with such severe limitations

quaint mantle
eternal oxide
lost matrix
quasi stratus
#

How would I use the Color I've just created in an item's lore? ```java
Color light_brown = new Color(196, 164, 132);
...
lore.add(ChatColor.???? + "An enhanced version of the survival");

quaint mantle
vale ember
eternal oxide
tame coral
#

Lemme check

quasi stratus
quaint mantle
tame coral
#

lore.add(ChatColor.getByChar("#000000") + "An enhanced version of the survival");

#

Always check the docs

eternal oxide
severe zenith
#
    public Timer(boolean running, int seconds) {
        this.running = running;
        this.seconds = seconds;
        this.mode = TimerMode.UP;

        Bukkit.getScheduler().scheduleSyncDelayedTask(Deathrun.getPlugin(), () -> {}, 1 ); 
        
        playerManager = Deathrun.getPlugin().getPlayerManager();
    }

hey, does anyone know how to make one tick delay, this is not working, playerManager is null

fluid cypress
#
[15:20:19 INFO]: deleting .\world_the_end_custom\DIM1\region\r.-441.73.mca (exist: true)
[15:20:19 INFO]: deleting .\world_the_end_custom\DIM1\region\r.407.-579.mca (exist: true)
[15:20:19 INFO]: deleting .\world_the_end_custom\DIM1\region\r.-311.198.mca (exist: true)
[15:20:19 INFO]: deleting .\world_the_end_custom\DIM1\region\r.-274.-286.mca (exist: true)
[15:20:19 INFO]: deleting .\world_the_end_custom\DIM1\region\r.288.184.mca (exist: true)
[15:20:19 INFO]: deleting .\world_the_end_custom\DIM1\region\r.-447.-443.mca (exist: true)
...
public static void deleteUselessRegionFiles() {
    for (UUID world : uselessRegionFiles.keySet()) {
        Bukkit.getWorld(world).setAutoSave(false);
        for (File regionFile : uselessRegionFiles.get(world)) {
            if (!regionFilesSnapshot.get(world).contains(regionFile)) {
                System.out.println("deleting " + regionFile + " (exist: " + regionFile.isFile() + ")");
                try {
                    java.nio.file.Files.delete(regionFile.toPath());
                } catch (java.io.IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

the files are not being deleted, but i dont get any error
i also tried with just regionFile.delete() and it doesnt work either, and it returns true, like if it really was deleted, but it wasnt
im even turning off the autosave, just in case, and still the same
i even tried calling that method from a command, after waiting a few minutes, and nothing, the files are still not deleted, why???

lost matrix
vale ember
eternal night
#

entityId is dynamic through the server runtime

#

well, consistent through the runtime

#

but beyond that, post restarts, dynamic

quaint mantle
lost matrix
vale ember
lost matrix
severe zenith
grim ice
#

why runtask tho

#
  • it works rn why is that required
lost matrix
vale ember
#

only for first packet (entity spawn)?

lost matrix
vale ember
#

for metadata too

#

?

lost matrix
severe zenith
#

yes i just want the next statement to run later

eternal night
#

that is not how the scheduler works tho

lost matrix
# vale ember for metadata too

You should wrap your custom armorstands in a class that keeps track of their UUID and entityID.
Then construct a spawn, despawn and metadata packet once and send it to the players you want.

eternal night
#

only the passed runnable is executed after the delay

#

your method progresses as normal

severe zenith
vale ember
severe zenith
#

how to do it otherwise?

lost matrix
# vale ember for metadata too

Example from one of my older plugins:

public class ProtocolArmorStand implements IPacketArmorStand {

  // Pls dont judge
  private final int entityID = ThreadLocalRandom.current().nextInt();
  private final UUID entityUID = UUID.randomUUID();
  private final PacketContainer showPacket;
  private final PacketContainer hidePacket;
  private PacketContainer metaDataPacket;
  private PacketContainer equipmentPacket;
  private PacketContainer movePacket;
  private LineRepresentation currentRepresentation;
  private Location currentLocation;

  public ProtocolArmorStand(final Location location, final LineRepresentation representation) {
    this.currentRepresentation = representation;
    this.currentLocation = location;
    this.showPacket = this.createSpawnPacket();
    this.hidePacket = this.createDeSpawnPacket();
    this.metaDataPacket = this.createMetaDataPacket();
    this.equipmentPacket = this.createEquipmentPacket();
    this.movePacket = this.createMovePacket();
  }
  ... a ton of stuff
waxen plinth
#
() -> {
  //The code you want to run should go in here
}```
#

Instead of () -> {}

severe zenith
#

playerManager is final, can not be done in a lamda

waxen plinth
#

Why would that matter

severe zenith
#

yeah

lost matrix
#

You need it to be effectively final

waxen plinth
#

You mean the method has the final keyword, right?

severe zenith
#

cant set in a lamda

waxen plinth
#

Oh

#

I thought you meant a method lol

#

You can put it in a 1-length array

#

But you can also just move it to be a field

#

I don't see that variable being defined in the method

lost matrix
waxen plinth
#

So where is it defined?

waxen plinth
#

I usually just try to rescope the variable if it makes sense, otherwise use atomic for primitives or a 1-length array otherwise

severe zenith
ivory sleet
#

@covert valve do u use kotlin dsl?

vale ember
#

hey, shud entityid and uuid be unique only for one player or on server overall?

covert valve
storm turtle
#

I'm trying to compile my plugin, but I get this error:

cannot access net.minecraft.network.chat.ChatComponentText
lost matrix
vale ember
storm turtle
waxen plinth
#

Right

#

You're probably adding the spigot api as a dependency

#

You need the full server jar

storm turtle
#

I'm adding spigot

#

Not spigot-api

waxen plinth
#

Did you use BuildTools to build spigot 1.17.1?

lost matrix
waxen plinth
#

So it should be in your cache

storm turtle
#

Pretty sure it is

waxen plinth
#

Not sure what the problem is, then

storm turtle
#

I can access other nms components

lost matrix
#

Whats the scope of your dependency?

waxen plinth
#

Should be provided

storm turtle
#

It is

lost matrix
#

What is your projects java version?

storm turtle
#

13

waxen plinth
#

That should be 16

lost matrix
#

Make it 16 just to be safe

storm turtle
#

Oh bruh

#

I'll try

quaint mantle
#

thats why

#

compile errors

waxen plinth
#

The newer versions are compiled for java 16 so you can't access nms without targeting java 16

storm turtle
#

Yea, I didn't even think of that

#

It worked now

#

Thanks

opal juniper
vale ember
#

hey, why
destroyPacket = manager.createPacket(PacketType.Play.Server.ENTITY_DESTROY);
destroyPacket.getModifier().writeDefaults();
destroyPacket.getIntegerArrays().write(0, new int[] {entityID});
giving Caused by: com.comphenix.protocol.reflect.FieldAccessException: No field with type [I exists in class PacketPlayOutEntityDestroy.
exception?

lost matrix
storm turtle
#

Am I able to set an entity's target player/entity?

chrome beacon
#

AI?

ivory sleet
#

Yeah

#

Tho itโ€™s probably not efficient since it might get overridden by target goals I suppose

hexed hatch
storm turtle
hexed hatch
#

if the entity is a mob yeah

#

you're going to want to make sure the entity is instanceof mob first

storm turtle
#

Yea, I am

#

My plugin is centered around zombies

plain scroll
reef wind
plain scroll
# plain scroll

ok i get that i use a dubble constructor, but when i remove one i still get the errors

reef wind
#

show your new code

plain scroll
#

``java

#
  this.plugin = plugin;
        this.banMenu = banManu;
        }
#

is it bc i close it

#

}

eternal oxide
#

?paste the whole class

undone axleBOT
plain scroll
eternal oxide
#

You don;t even have a class now

reef wind
eternal oxide
#

nor Fields

reef wind
#

?learnjava

undone axleBOT
eternal oxide
reef wind
plain scroll
#

im in sch for java

#

๐Ÿ’€

plain scroll
reef wind
#

so? if you don't know you need a class you def don't know enough, I am not being toxic or rude I am just saying that you will not be able to make a plugin if you don't even know you need a class.

plain scroll
#

oh yea ik

wary harness
reef wind
wary harness
#

it should be full sphear

#

but I am getting only like 1/4

#

of it and it is rotating in circle

#

to finish full sphear

#

is it maybe because 1.8 limits particals which are sent to client I am on 1.17

#

thru viaversion

#

server is 1.8

#

so just from curiosity

earnest lark
#

?paste

undone axleBOT
earnest lark
#

can someone help me on why this is not working

#

i thinkj it may be my main so ill send that as well

wary harness
#

did u register

wary harness
eternal oxide
#

What isn;t working?

earnest lark
eternal oxide
#

I see the code, what isn't working?

earnest lark
#

i think the thing is not registering but i cannot find out why

reef wind
#

bro

#

what is not working

earnest lark
#

idk

reef wind
#

"not working" doesn't say anything

reef wind
earnest lark
#

i dont get a eroor message or anything

wary harness
#

debug it add few messages

#

betwean your lines of code

eternal oxide
#

do you get ANY messages?

earnest lark
#

no

eternal oxide
#

show where you register teh event

earnest lark
plain scroll
reef wind
#

"you died bad. L get gud full bm bad get a life. you play this game 24/7 and you still died so bad omg go outside and touch grass" cringe

earnest lark
#

i found out why

eternal oxide
earnest lark
#

i think it is because i had a public final class

#

AND not just public class

reef wind
#

I also recommend separating events and not having every single one in 1 class

earnest lark
#

imma test it

eternal oxide
plain scroll
#

oh

#

where

eternal oxide
#

I gave you the UI code is all

plain scroll
#

OG

#

i think ik

eternal oxide
#

in an InventoryClickEvent

plain scroll
#
if (e.getView().getTitle().equalsIgnoreCase(ChatColor.WHITE + "[" + ChatColor.RED + "Player List" + ChatColor.WHITE + "]")) {```
#

dont i need to change this

#

on my liseneer

#

java.util.MissingFormatArgumentException: Format specifier '%d'

#
 if (e.getView().getTitle().equalsIgnoreCase(ChatColor.GREEN + String.format("Players: (Page %d)"))) {
#

o get that error when i change it to this

reef wind
opal juniper
#

dont check inventories using the view title smh

plain scroll
#

oh lol

#

what should i check then?

opal juniper
#

You should use a custom inventory holder

#

and also - instead of using the chatcolor enums in your name in teh if statement, iirc you can use ChatColour.stripColor

eternal oxide
#

add a method to your utils class java public boolean isBanGUI(Inventory inv) { return pages.contains(inv); }

plain scroll
#

where abouts?

#

anywhere?

#

kk

reef wind
eternal oxide
#

not inside any other method, but inside the class

opal juniper
#

Elgarl i think you deserve a medal - i have seen you helping duke all day ๐Ÿ…

plain scroll
#

lmao sry for this

opal juniper
#

its not a problem

plain scroll
#

i promise im acc learning java

#

just i really wanna do this

opal juniper
#

just as long as elgarl wants to help that is

reef wind
#

You do whatever you want but it will be way easier if you feel your time too learn Java first just saying.

#

otherwise you may end up in a not so fun pit

plain scroll
#

yea the 2nd i finnish this update on this plugin

#

im gonna work on learning java

plain scroll
eternal oxide
#

yes

plain scroll
#

if (e.getView().getTitle().equalsIgnoreCase(isBanGUI == true)

eternal oxide
#

if (banMenu.isBanGUI(e.getClickedInventory()))

plain scroll
#

getClickedInventory is red

#

Cannot resolve method 'getClickedInventory' in 'InventoryView'

eternal oxide
#

find the correct method. Its in teh event somewhere

#

e.getClickedInventory()

plain scroll
#

noice

#

that worked

#

java.lang.NullPointerException: Cannot invoke "bangui.me.duke.Me.utils.BanMenuUtils.isBanGUI(org.bukkit.inventory.Inventory)" because "this.banMenu" is null

eternal oxide
#

have you passed the instance to your listener class, the same as you did for the other?

plain scroll
#
    public boolean isBanGUI(Inventory inv) {
        return pages.contains(inv);
    }```
#

is null