#help-development

1 messages · Page 646 of 1

carmine mica
#

I thought you were saying "this is why its currently needed", not "this is why it was originally needed", my b.

chrome beacon
shadow night
#

Olivo how do you know so much?

river oracle
#

coding i suppose?

quaint mantle
#

ty

chrome beacon
#

🤷‍♂️ I'm just a fast learner ( when it comes to computer stuff )

river oracle
#

all good things come with time

shadow night
#

I could code for ages and always forget the two most basic things and remember super complex shit

river oracle
shadow night
river oracle
#

smh smh

shadow night
#

Do I need one?

#

I do

river oracle
#

🤷‍♂️ was a joke often times you have to do technical interviews which kinda just suck

carmine mica
#

so I think you can probably just remove those methods. Perhaps mention the createBlockState() method in the javadoc for the transformer too, so people know how to create an arbitrary one

shadow night
#

I'm just unable to talk to strangers for whatever reason

shadow night
#

I can't even drop a word

opal juniper
#

shame, some strangers are cool people

#

like me

#

😎

river oracle
#

work on your social skills :P they're just as important (if not more important) as practical job skills

shadow night
#

Ik

#

It works very weird

river oracle
#

used to be the same way I get you, Lots of therapy and practice helped me mostly overcome my fear of talking to people lol

shadow night
#

Like, for me I can somehow sometimes not open my mouth and in other cases I can talk like never before lol

quaint mantle
#

why i got this warning ?

worldly ingot
#

new Text() around the contents of the hover event

#

new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(...))

river oracle
#

my instinct was to blame paper good thing choco is here

worldly ingot
#

I mean that's also possible. iirc they deprecated like... everything BungeeChat-related

river oracle
#

they have a script for it xD

river oracle
#

this is why we don't use paperapi

#

choco when your bungeechat pr gonna be pulled lol

worldly ingot
opaque scarab
#

Still, has some useful things

worldly ingot
#

Just petty imo

river oracle
worldly ingot
#

They have a replacement, yes, but I still think deprecating the whole of BungeeChat is just unnecessary. It's still components. They still work

river oracle
#

idk what kind API they add though I only ever use spigot and rarely find myself touching NMS outside of some component stuff

quaint mantle
worldly ingot
#

Hm?

worldly ingot
#

Just working on getting it merged

opaque scarab
#

What makes me mad is I can’t use Maven with Paper’s remapped NMS

#

Unless I use a 3rd party plugin

mortal badge
#

@tender shard would this work in theory?
instead of the link i put the getconfig, i would do this for each song

put("intro", main.getConfig().getString("intro"));

opaque scarab
#

Which could stop being worked on at any time

river oracle
#

spigot needs a gradle special sources I want to make one, but I also don't wanna touch kotlin

#

but I seriously couldn't see myself making a gradle plugin in.. groovy

mortal badge
#

oh yeah a question I asked previously and then he responded

#

this one

river oracle
#

@worldly ingot I'm curious about something, why does spigot take so long to shutdown vs paper I've noticed on my pc atleast spigot takes quite awhile to stop

lavish hemlock
#

Well the startup/shutdown procedures of Paper are seemingly more optimized. Probably something to do with chunks, it usually is.

quaint mantle
#

Paper has async chunk load

#

Not sure if spigot has implemented them

river oracle
#

I wonder how hard async chunk load would be to add

quaint mantle
#

I think optifine does it 💀

river oracle
#

embed fail

quaint mantle
#

No, we are developers

#

It was not a fail, it was completely intended

#

But I regret at my decision and changed it

#

One question guys, how do I spawn a female?

#

Have been looking for one of them for too long, but can't find how to spawn them

#

World#spawn Female.class doesn't work

river oracle
#

idk tbh

#

my girlfriend spawned naturally I didn't need to spawn one in

quaint mantle
#

Wait, do you have one of those creatures?

#

How are they?

river oracle
#

like a developer minus the man part

#

and developer part

#

ofcourse all people are different

#

I'm just speaking for my experiences

quaint mantle
#

what is this ?

young knoll
#

tab complete

quaint mantle
#

in spigot is label ?

lavish hemlock
quaint mantle
#

I need answers, but you are generating more questions

quaint mantle
#

may be u know coll

lavish hemlock
#

TabCompleter interface

#

Well for BungeeCord I'm not sure but it's probably the same

lavish hemlock
#

Yeah a'ight.

quaint mantle
#

The functionality is exactly the same as in bukkit

tender shard
#

in australia they sell weird bags full of wine called "goon"

lavish hemlock
#

Alex is drunk again, this was not predictable in the slightest.

tender shard
#

i am not

#

0.00 ‰

tender shard
#

also I've never been to australia, i only know those weird goon wine bags from what people told me and from internet pictures

quaint mantle
#

what is the onplayerjoinevent in bungeecord ?
is loginevent ?

echo basalt
#

There are multiple

#

Depends on what you're doing

#

Events fire when the player joins the network, before and after the player switches servers, tries joining a server etc

quaint mantle
#

im trying to create yml file for player on join

echo basalt
quaint mantle
#

:DDDD

#

well u are experienced can u give me idea ?

#

i will write

#

brb

#

i will store player's friend in yml file
but am i create yml on first join server ?
or do i create when someone adds friends?

but i will store some settings for player
like "toggle dm"
"toggle friend requests"

young knoll
#

Might as well wait until they add a friend

#

No use having an empty file

quaint mantle
young knoll
#

Mhm

dire oyster
#

hi

quaint mantle
#

😄

echo basalt
#

You should just use a database at this point

quaint mantle
#

how u do that

echo basalt
quaint mantle
#

i have mysql

#

but is complex for storing lists

icy bone
#

Is there someone who maybe knows what im doing wrong here. I am trying to create like an enum with Location so i created:

public enum Locations {
    LOBBY_PROPHUNT(new Location(Bukkit.getWorld(Names.LOBBY_PROPHUNT.getValue()),8.5,-59,30.5,-180,0));

    private final Location location;

    Locations(Location location)
    {
        this.location = location;
    }

    public Location getLocation()
    {
        return location;
    }
}

and i am calling it by using:

player.teleport(Locations.LOBBY_PROPHUNT.getLocation()); break;

but for some reason this created a NULL error, does someone know why?

echo basalt
#

Enums are not the kind of thing for this

lavish hemlock
echo basalt
#

Using sql in java is quite basic

icy bone
#

What is a better thing for this?

dire oyster
#

can i have some help i am trying to make a plugin this is the second one i have ever made and i am trying to make a report plugin where someone can put in the comand/report then the usernam and then the reason and then it will ping curtain roles in a curtain channel in discord could someone help me with it

echo basalt
#

You can have an enum for your keys

#

But it's backed by a map

#

That you can load from the config

#

Here's an easy demo

dire oyster
echo basalt
#
public enum LocationType {
  SPAWN,
  END
}
public class LocationRegistry {

  private final Map<LocationType, Location> locationMap = new HashMap<>();

  public void setLocation(LocationType type, Location location) { // Loop through your config and call this
    locationMap.put(type, location);
  }

  public Location getLocation(LocationType type) {
    return locationMap.get(type);
  }

  /*
  public void load(ConfigurationSection section) {
     ... 
  }
  */
}
lavish hemlock
icy bone
#

Ohh so you like combine the ENUM with a Map to make it work with enums but the map handles the acual data

echo basalt
#

So you can eventually do

Player player = ...;
Location start = locationRegistry.getLocation(LocationType.SPAWN);

player.teleport(start);
#

Make sure you use DI for your locationRegistry and all

lavish hemlock
#

There's a number of ways to implement this. Hosting the bot through the plugin, hosting an API that the two can share, etc.

icy bone
#

DI?

echo basalt
#

?di

undone axleBOT
dire oyster
icy bone
#

Oh yeah ofc

#

Thats no problem

#

Thank you for helping out and thank you for the quick respond

young knoll
#

Generally for lists you store them as rows

echo basalt
#

Enums are a bit icky and I wouldn't use them with location objects because I've had issues with Bukkit.getWorld returning null

young knoll
#

IE a list of homes would be stored in a homes table, with each row being a single home

lavish hemlock
icy bone
#

Yeah i made a few Enums with some have Locations some have just Names but now it generated an NULL exactly like you said

#

But ill make an Registry for all of them so im not using enums anymore

echo basalt
#

Yeah your classes are loading before the worlds are

#

Enums are nice in a few niche scenarios but they're not really extensible

dire oyster
echo basalt
#

You need to modify the actual enum class in order to add functionality

icy bone
#

Yeah i saw this online and just assumed it worked like i expected it to work

echo basalt
#

It's a rather complex thing to do for a beginner

lavish hemlock
# dire oyster could you help me structure it i am new to java

I can't go too depth, I'm currently in the middle of something else. It's not difficult though, you just need to make the instance of your bot accessible to your command through its constructor, i.e.

public class MyCommand {
    private final DiscordBot bot;

    public MyCommand(DiscordBot bot) {
        this.bot = bot;
    }
}
echo basalt
#

^ If you're hosting your bot and your plugin in the same instance

lavish hemlock
#

Exposing services through constructors is called dependency injection.

#

?di

undone axleBOT
echo basalt
#

grr I gotta make a cuboid class that doesn't use bukkit vectors

crude arrow
#
public enum Locations {
    LOBBY_PROPHUNT() {
        @Override
        public Location getLocation() {
            return new Location(Bukkit.getWorld(Names.LOBBY_PROPHUNT.getValue()),8.5,-59,30.5,-180,0);
        }
    };

    public abstract Location getLocation();
}```
echo basalt
#

still not a fan

#

You're creating a new location each time

crude arrow
#

I think enums are cool

echo basalt
#

They are but this is not a good use case

crude arrow
#

Thats true

#

However, you could make a argument that worlds could change

echo basalt
#

So you're storing a mutable value in an enum

lilac dagger
#

it's immutable in this context

#

but still, use proper database class 😄

#

and also prop hunt? 😄

#

i love prophunt

echo basalt
#

It's not that hard to write honestly

#

I gotta get writing minigames once I'm done with this skyblock stuff

#

I got so many ambitious projects

lilac dagger
#

good luck

opal juniper
#

if i run a task with a delay of 0 ticks will it run the same tick (assuming sync context)

lilac dagger
#

i've already made my game engine

#

i just have to write a ton more games

lilac dagger
#

it'll run next tick

echo basalt
#

minimum is 1 tick

opal juniper
#

thanks

young knoll
#

Even just runTask happens next tick

echo basalt
#

my objective for this year is to make a competitor for SSB2 and like every single minigame out there

lilac dagger
#

i like that it does, it's awsome in async stuff

icy beacon
echo basalt
#

I have one

icy beacon
#

wanna learn some more stuff

#

oh you do?

echo basalt
#

it's really really basic

#

and barely covers the phase chain

lilac dagger
#

i might implement states in my minigames where necessary

icy beacon
#

well the only minigame I've made is kitpvp with like 19471 features but it's not exactly a minigame, it's more of an infinite megagame

worldly ingot
icy beacon
#

so if there's anything for me to learn about minigames I'm down

echo basalt
#

but I'd just clone :p

worldly ingot
#

If you're returning a Location from an otherwise immutable object, .clone()

echo basalt
#

or make an immutable copy

#

instead of having a weird supplier anon class

icy beacon
echo basalt
#

Sure

icy beacon
#

I gotta finish the discord bot, then the kitpvp, then I gotta stop slacking off on underscoreenchants, and by the time I'm done I'll probably have an idea for another non-minigame project

#

so fucking upsetting

lilac dagger
#

@echo basalt what do you think? 😄

echo basalt
#

nms StarePuke

lilac dagger
#

wait

icy beacon
#

what'd you censor

lilac dagger
#

how are you gonna do a cool minigame without using nms where necessary?

young knoll
#

Depends on the game

echo basalt
#

You don't need nms in most minigames

lilac dagger
icy beacon
lilac dagger
#

good

#

i didn't want you to sleep anyway

icy beacon
#

i go to bed at like 4-5 am every day

#

I do not have fun

#

in general I do not have fun

lilac dagger
#

you and me are so different

#

i go to sleep at 12

#

i'm a good boy

icy beacon
#

I wanna commit blanket but I have to finish all my projects at first

icy beacon
#

my sleep schedule checks out

twin venture
#

i have this installed on my intellij idea now , but for some reason , i can't send packets ..

lilac dagger
#

in 1 sitting?

#

wow

icy beacon
#

yeah

echo basalt
#

:p looks like enterprise code

icy beacon
#

I wanted to feel emotions again

twin venture
echo basalt
#

I have so much stuff to convert to multi-platform

icy beacon
lilac dagger
#

it makes sense sometimes ^

#

it's a class meant to be used as a skeleton

icy beacon
#

yeah but I want to understand the point

lilac dagger
#

it's a design pattern

eternal oxide
#

an uninstanceable parent class

echo basalt
torn shuttle
icy beacon
#

oh that makes sense

#

ty ty

quaint mantle
#

how do i create inventory i mean gui with bungeecord ?

echo basalt
#

The idea is that you expose no code while having a re-usable base

icy beacon
#

bungee is a proxy. you cannot

#

it's not a playable server per se

quaint mantle
grim ice
#

I never understood what "one line" means

echo basalt
icy beacon
sterile breach
#

Hello, i need to add an other plugin in dépendancy to my plugin form local. I use maven,y just compile the other plugin and add his local folder in my repository ?

icy beacon
#

knowing magma he might not even be joking rn

echo basalt
#

to piss me off or something

grim ice
#

like, everything is considered one line since `\n' is a symbol

echo basalt
#

He was writing like his own scripting lang for his plugin and it was all just a huge switch statement

echo basalt
#

And I got so pissed we're "enemies" now

#

and he used to threaten to firebomb my house all the time

grim ice
#

this is so nerdy

echo basalt
#

and piss me off in any way he knew how

#

Like by ruining my search index :)

icy beacon
#

he is the epitome of nerdy

echo basalt
#

But it's ok because I just blocked him and he doesn't show up there anymore

icy beacon
#

but I admire that

grim ice
#

that just means smart

echo basalt
#

blockbench does all the math for you

icy beacon
#

now you're nitpicking

echo basalt
icy beacon
#

a bunch of super calls

echo basalt
#

Yeah

icy beacon
#

well makes sense

echo basalt
#

It's a pattern that naturally came to my mind when I decided to multi-platform all of this garbage

grim ice
#

I would write Implementation instead of Impl

echo basalt
#

makes instancing the class go beyond the 120 character line ¯_(ツ)_/¯

echo basalt
icy beacon
#

btw what do you mean here by multiplatform? like spigot paper etc?

echo basalt
#

Industry has an ego problem

torn shuttle
# echo basalt magma likes to do shit in a single line

I'm a pioneer! I'm an explorer! I'm a programmer, and I'm coming! My code has animations! They're one line, it pumps tons of data through them fast! I like javascript too! I like to avoid exception handling! I like to replace comments with longer method names! I'm here! I've got a codebase! This is a programmer! This what we look like! This is what we program like! This is how our forefathers programmed! This is what I am! I'm a throwback! I'm here! I've got super hot fire repositories! I'm setting servers on fire! And programmers are turned on everywhere!

echo basalt
icy beacon
echo basalt
#

and they all work together

icy beacon
#

coding*

grim ice
#

😭

icy beacon
torn shuttle
#

In a rousing and inspirational call to embrace our humanity, Alex Jones says:

I'm a pioneer, I'm an explorer
I'm a human, and I'm coming!
I'm animated, I'm alive, my heart's big!
It's got hot blood, going through it fast.
..I like to fight too!
I like to eat! I like to have children!
..I'm here! I've got a life force!
This is a human, this is w...

▶ Play video
icy beacon
icy bone
echo basalt
#

Ideally I want to make the "networks" system multi-platform too but it's a nightmare

icy beacon
#

this is a serious development channel, we are all serious grownups with business to mind, definitely not talking the weirdest shit here

echo basalt
echo basalt
icy beacon
#

Duolingo is based

icy bone
quaint mantle
torn shuttle
#

ngl turns out that making a match have three ways of counting what wave they are on is a massive pain in the ass

echo basalt
#

I gotta write like an abstract publishing system or something

icy beacon
torn shuttle
#

this is really annoying

echo basalt
#

Got no clue how I'd do it

quaint mantle
quaint mantle
icy beacon
#

can you send some screenies plz Twitter is kinda blocked in my country and I do not wanna use a VPN rn

icy beacon
quaint mantle
echo basalt
icy beacon
#

I want some KFC so bad

torn shuttle
#

I'm releasing my tower defense plugin today

#

this took a stupid amount of work to get working

echo basalt
#

see you in 6 months

torn shuttle
#

?

icy beacon
torn shuttle
#

somehow I made two different support plugins for it

#

one for shading and one for acting as an api and in the future an easy and free way of displaying custom models

quaint mantle
#

Now make a premium version 😈

torn shuttle
#

all of it is free

#

the pathfinding solution that is made to be shaded, the plugin for managing in-game models and the tower defense game

#

but the td game will have two sets of premium maps on top of the free set and the free tutorial map

#

and people can just make their own levels

quaint mantle
#

I really love open source development, but If you spent that much time, why don't make it freemium? Like, leave the source code open so people can compile themselves, but sell the compiled plugin

quaint mantle
#

idk maybe with api

echo basalt
#

n o

icy beacon
#

you cannot play BungeeCord

#

it's not a playable server

#

it's a proxy

echo basalt
#

you need to do a lot more research

#

about how minecraft works

icy beacon
#

there's no way to create a gui in bungeecord simply because a gui is not a thing in bungeecord

quaint mantle
#

alright but

#

Is there something that allows me to communicate between the bungeecord and the spigot server?

icy beacon
#

chicken butt

#

yes

#

plugin messaging

quaint mantle
#

yep

icy beacon
#

look it up

quaint mantle
chilly hearth
#

It's kind of complicated

quaint mantle
icy beacon
#

send a message from bungee to spigot

#

and make a gui in spigot

#

you cannot do it in bungee

chilly hearth
#

But u will v get it sometime

quaint mantle
#

Yes, you will need two plugins

icy beacon
#

because it DOES NOT EXIST there

echo basalt
#

god fucking damn it

wet breach
echo basalt
#

BungeeCord is a minecraft proxy solution that originated because minecraft doesn't have any native way to send you to another server, so bungeecord "acts as a server" and does all the communication making the client think it's been connected to the same server for like 19 years

quaint mantle
#

In your BungeeCord plugin, you will have to make like a GUI wrapper which doesn't actually uses Inventory API (because it doesn't exist), but contains a bunch of information such as inventory title, size and (maybe?) ported Material enum and an ItemStack wrapper with the same as your wrapped inventory

quaint mantle
echo basalt
#

It has no concept of items, inventory and any more.. convoluted system

quaint mantle
#

Then send that data using messaging channels to a spigot plugin yo uhave, and read the wrapped inventory and items

echo basalt
#

You can send messages in it because sending a message is as easy as sending 1 packet

wet breach
quaint mantle
eternal oxide
#

I've seen a GUI on bungee but all it does is generate packets

quaint mantle
#

Plus it won't be complete functional, as it will require a player to be at least on the server

quaint mantle
#

but it is complex in mysql ?

#

i mean storing lists

quaint mantle
wet breach
#

depends on how you design your DB but in general no its not overly complex

unborn sable
#

How would I check if a player has any type of spawn egg

quaint mantle
quaint tapir
#

How can I create a zombie and store it as a member variable within a class without spawning it

quaint mantle
unborn sable
young knoll
#

Bukkit entities sadly have to be in the world

wet breach
quaint mantle
#

can u give me example ?

wet breach
#

not right now no

quaint mantle
quaint mantle
#

brb

#

Like

Material[] m = new Material[]{Material.DIRT, Material.STONE}
for (ItemStack stack = inventory.getContens()) {
  if (Arrays.stream(m).anyMatch(stack.getType()::equals)) {
    return true;
  }
}

return false;
#

Don't know if will even work

#

But I think you understand

torn shuttle
#

god I love being lazy

icy beacon
#

I feel like this could've been done with regex

torn shuttle
#

yep

#

def

#

but this is so much faster

lilac dagger
#

does chatgpt know regex?

icy beacon
#

but I admire your laziness

worldly ingot
icy beacon
worldly ingot
#

So probably

grim ice
#

what gpu r u using

icy beacon
grim ice
lilac dagger
#

i don't wanna learn the grammar

grim ice
#

or Google bard

icy beacon
#

I know regex, I often use it to replace a lot of shit that I've done wrong

#

it was worth learning

#

I'm no professional ofc

lilac dagger
#

i only know about s+w+e+a+r

icy beacon
#

but I can build a regex that fits my needs quite often

lilac dagger
#

to block words on my mc server

unborn sable
#

Are charged creepers seen as EntityType.Creeper

lilac dagger
#

yes

#

it's just a flag that's changed

unborn sable
#

I'm dumb, how do I check the flag

lilac dagger
#

let me look

rose trail
#

what database to use to save all online players of the server?

lilac dagger
#

sqlite and mysql most likely, but what exactly do you wanna save?

undone axleBOT
icy beacon
#

what exactly are you saving

rose trail
#

I need to receive players who are on a proxy server

#

for example, to invite a player to a group located on another server

tender shard
#

my debugger works but now I have to add some formatting and support for fields in nested objects D:

young knoll
#

Fancy

dawn plover
#

is it posible to remove this so it will be like the other screenshot?

glass mauve
#

is it possible to parse a .ttf font file into a MapFont?

chrome beacon
echo basalt
#

I'm trying to think of who's the poor soul that wrote the MinecraftFont class and hardcoded each single value

glass mauve
#

yeah just saw it

#

I might just use it

echo basalt
#

It does work but I'd rather just use awt and render my own images

#

That's what I do in my imageboard system and it allows me to have full control of rendering

#

I skip bukkit's system entirely and it ends up becoming a lot more performant

glass mauve
#

hm ok I currently actually use java.awt but saw this method but it accepts a custom Font class

#

so I will just use awt

quaint tapir
#

Is there a simple way to make turn the visual appearance of an iron golem into it's cracked state that happends when its low hp
i know I can just damage it a lot but surely theres a better way

echo basalt
#

uhh great question

#

It doesn't exist in the entity metadata so the only other way is packets

#

You'd have to send a packet saying its health is incredibly low

#

Stupid but go figure

glass mauve
#

cant you change its health without packets?

echo basalt
#

You can but then it dies quicker

glass mauve
#

ah ok yeah true, packets is just fake data

echo basalt
glass mauve
#

thas the source code of IRON GOLEM?

echo basalt
#

yea

#

who the hell

glass mauve
#

Crackiness lmao

shadow night
#

Lmao

echo basalt
#

So yeah it's just a health ratio

#

because the server wouldn't possibly want to control that

quaint tapir
#

alright thanks i'll try packets

shadow night
#

Spoofing? Or is that different

echo basalt
#

Yeah spoofing

shadow night
#

Hm

#

I'm gonna make the client believe it's dead

young knoll
#

Lying to the client is fun

#

“Trust me, this is a noteblock”

shadow night
#

"Why is this opening a furnace tho?"

#

Plugins:
Hey client, this is a noteblock
Okay server, but why does it open a furnace menu?
Because it is a workbench actually
But server?
And now it's a dispenser

young knoll
#

It’s actually a block that doesn’t exist on the client

echo basalt
#

menu animations be like

young knoll
#

But the client doesn’t need to know that

echo basalt
#

"yo new menu now, same id and contents tho"

young knoll
#

In fact the client gets very upset when it receives a custom block

vast ledge
#

And then it cries like a little bi**h

young knoll
#

Basically

#

Just refuses to render that chunk

vast ledge
#

I fucking hate windows

#

why cant i just replace the plugin in my plugin folder

#

who gives a shit if the server is using it

young knoll
#

I can :p

#

Can’t delete it tho

vast ledge
#

How cna i cange the direction of a furnace

#

i have the block

#

block.getState().getBlockData()

#

or

young knoll
#

Just Block.getBlock data

#

Cast, modify, and then setBlockData

vast ledge
#

heh

young knoll
#

Cast it

#

I believe furnace is rotatable

dawn plover
vast ledge
quaint mantle
#

am i store player's friends with name or uuid ? for offline

eternal oxide
#

uuid

quaint mantle
#

oh hi elgar

eternal oxide
#

hi

quaint mantle
#

i have a question for u
im doing friend plugin for bungeecord
i will save player's friend to yml file and get player's friend from this yml file
but i can't do GUI in bungeecord
do u have any idea for do gui ?

#

or i need do non bungeecord plugin so i need do with db ?

eternal oxide
#

don;t, its annoying and version specific

shadow night
#

Storing data in yml's was never a good thing, atleast that's what I've been told

vast ledge
#

no

#

yml bad for storing data

#

is good for config

#

its nice

#

but for storing data go with something like a db, json or binary

shadow night
#

Storing data you could do json

quaint mantle
#

alright

#

but

shadow night
#

But there is chance of corruption with json

quaint mantle
#

not only store friends

shadow night
quaint mantle
#

will store friend settings like
toggle dm
toggle friend requests

#

but i wanna do this with gui

#

but i can't do gui in bungeecord

vast ledge
#

@quaint mantle Look into plugin messaging channels

shadow night
vast ledge
#

the you can have a spigot plugin handle GUIs

shadow night
#

Atleast one time

quaint mantle
#

btw for to store list in mysql will like this ?

vast ledge
#

no

#

that

#

mother of jesus

#

Use an Array

#

for the friends

#

dont save under playername

#

save there UUID

quaint mantle
#

How will it look in mysql?

vast ledge
#

the playername can be changed, the UUID cant

vast ledge
quaint mantle
#

well which one

#

is for list ?

vast ledge
#

...

#

The plugin should generate the data

#

why are you pre creating the objects?

glacial narwhal
#

Does somebody have a idea of a plugin?

vast ledge
quaint mantle
glacial narwhal
vast ledge
#

irl

shadow night
shadow night
vast ledge
#

get wiener schnitzelet

quaint mantle
shadow night
#

Atleast I've made crafting of schnitzel possible + a texturepack

#

Now I flex

young knoll
#

Raw Chicken + anvil

shadow night
#

Lmao

#

And I could actually do that

river oracle
#

is there anyway to get gradle to nicely redownload a dependency instead of annoyingly cacheing it

#

as of right now I have to clear my entire gradle cache every time I update my dependency

vast ledge
#

That entire point of gradle is to cache the stuff so you dont have to reload it every time

#

the*

river oracle
#

so you're saying there's no way to reload a dependency without nuking my entire gradle cache

#

as if I needed a reason to switch back to maven

vast ledge
#

There might be

young knoll
#

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}```
vast ledge
#

yep

#

coll to the rescue

#

i dont like gradle

river oracle
vast ledge
#

it fast, but i no understand

young knoll
#

¯_(ツ)_/¯

#

Gnoogle it

vast ledge
river oracle
#

so does that just go in my build.gradle

#

or is it nested somewhere

vast ledge
#

Idk

#

I dont like gradle

#

it weird

young knoll
#

Just in build.gradle

#

The dependency may also need to be a snapshot version

#

Idk

river oracle
#

it is

#

oh ig its not but shouldn't matter with my repo the way I have it setup

#

it works fine replacing on maven

#

🤷‍♂️ I'll add -SNAPSHOT into the end and see if that does anything magical

quaint mantle
#
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onMove(PlayerMoveEvent e) {
  Player player = e.getPlayer();
  int networkId = UserDataHandler.getNetworkId(player);

  if (networkId <= 0) return;
  NetworkClient client = CurrentPlugin.getPlugin().network().getPlayer(networkId);
  UserSession session = client.session();
  if (session.isLogged() && session.is2FALogged() && session.isPinLogged()) return;

  Location from = e.getFrom();
  Location to = e.getTo();

  Block source = from.getBlock();
  if (player.hasMetadata("flySpeed") || player.hasMetadata("walkSpeed")) {
    if (to == null) return;
    Block target = to.getBlock();

    if (source.getX() != target.getX() || source.getZ() != target.getZ()) {
      e.setCancelled(to.getY() > from.getY());
    }

    return;
  }
  
  //Other non important code that does not affect this issue
}

(Yes, player has flySpeed and walkSpeed metadata values)
Why does this allow me to move? even though I'm telling to prevent the player from going to another block?

vast ledge
#

(PlayerMoveEvent event) { event.setCancelled(true); }

restive mango
#

Is there a way to get a persistentdatacontainer belonging to a different plugin?

young knoll
#

There is only one container

vast ledge
#

PDC is bound to item right?

river oracle
#

find the namespace they use to get the keys

young knoll
#

You can get the values stored by another plugin using the appropriate key

quaint mantle
river oracle
#

would be easiest to work with raw NBT if you're reading other pugins keys though

vast ledge
#

Aint that what he trying to do?

restive mango
#

That’s cool

quaint mantle
#

Also I want to allow him to go down, not up

vast ledge
#
private final Location source = new Location(1, 1, 1);
public void onPlayerMoveEvent(PlayerMoveEvent e) {
   if(e.getLocation != source) event.setCancelled(true);
}
chrome beacon
quaint mantle
vast ledge
#

It wont

river oracle
vast ledge
#

it will prevent the player from moving from the source block

quaint mantle
#

No, because you are checking exactly x y z values, not block x y z

vast ledge
#

Then do Math.round()

#

or

#

compare x y z

young knoll
#

Compare from.getBlock to to.getBlock

quaint mantle
#

No, I already have the method to check if the player is not in his source block, the problem is that is not working

vast ledge
#

ignoring the numbers after the .

quaint mantle
#
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onMove(PlayerMoveEvent e) {
  Player player = e.getPlayer();
  int networkId = UserDataHandler.getNetworkId(player);

  if (networkId <= 0) return;
  NetworkClient client = CurrentPlugin.getPlugin().network().getPlayer(networkId);
  UserSession session = client.session();
  if (session.isLogged() && session.is2FALogged() && session.isPinLogged()) return;

  Location from = e.getFrom();
  Location to = e.getTo();

  Block source = from.getBlock();
  if (player.hasMetadata("flySpeed") || player.hasMetadata("walkSpeed")) {
    if (to == null) return;
    Block target = to.getBlock();

    if (source.getX() != target.getX() || source.getZ() != target.getZ()) {
      e.setCancelled(to.getY() > from.getY());
    }

    return;
  }
  
  //Other non important code that does not affect this issue
}

tada

#

hi, how do you set a player completely invisible (not even the username is visible) ?

vast ledge
#

player.hidePlayer(target)

quaint mantle
#

oh

vast ledge
#

loop through all online players and hide the player you are trying to hide

quaint mantle
#

and does it reset after death?

shadow night
#

I actually did that for another project before

vast ledge
#

or test

quaint mantle
vast ledge
#

im not sure

quaint mantle
#

and after rejoning?

#

Yes

#

i see

#

alright

#

After rejoin you must call the method again

shadow night
#

I've had a plugin that added pants that would hide the player fully and other armor that had cool abilities, but it broke for whatever reason and I didn't even try to find out what broke and why

quaint mantle
timid hedge
#

Is there a server restart event so if i want the server to stop and start every day at 5 pm

shadow night
#

Uh what?

lilac dagger
quaint mantle
#

am i get variable from my bungeecord plugin with plugin message channel ?

quaint mantle
quaint mantle
quaint mantle
#

Then load the yml string

quaint mantle
# timid hedge ?

There's no way to detect if the server has been restarted. Restart means shutdown and start again, so there's no way to identify if the current start is a restart, a crash, or an intended shutdown

quaint mantle
#

can u give docs or guide for this ?

#

actually

#

which one ?

quaint mantle
#

Like, you want to read a variable from a yml file in your BungeeCord, and send it to a spigot plugin instance?

#

Or vice-versa

#

Or you just want to send a custom message through BungeeCord messaging channel?

timid hedge
quaint mantle
quaint mantle
#

so i get stored datas from bungeecord playerdatas.yml and send my spigot plugin

#

yes

quaint mantle
#

wydm for that ?

#

Or a task scheduler if your host allows it so, (for example, pterodactyl has something that allows you to automatically restart the server and do what you want)

#

Doing it from a plugin... It's possible, by scheduling and calling to Bukkit#getServer#shutdown

quaint mantle
shadow night
#

Is it possible to change the main thread? Like, let's say I have 3 threads, one of them is the main thread. Can I somehow tell it it's a secondary thread and tell another thread it's main now?

torn shuttle
#

uh sanity check

#

if I'm registering events and I have code that reloads the plugin do I need to unregister events?

civic tapir
#

hey, Im trying to make a command that allows the player to spawn in a dog with a custom name. two questions, 1: How do I allow them to make a custom name, and 2:in the listener I want the dog to die when they quit/get kicked. How would I do that?

quaint mantle
# quaint mantle so i get stored datas from bungeecord playerdatas.yml and send my spigot plugin

If you want to send the whole file data, then I would recommend this:

File fileToRead = /*get the playerdata file*/
StringBuilder builder = new StringBuilder();
try(FileInputStream stream = new FileInputStream(fileToRead); InputStreamReader isr = new InputStreamReader(stream); BufferedReader reader = new BufferedReader(isr)) {
  String line;
  while ((line = reader.readLine()) != null) {
    builder.append(line).append('\n');
  }

  String rawFileData = builder.toString();
  String base = Base64.getEncoder().encodeToString(rawFileData);

  //To send messages through bungeecord, you need a player unfortunately
  ByteArrayOutputStream baos = /*Create the ByteArrayOutputStream*/
  baos.writeUTF(base);

  player.sendData("mycustom:channel", baos.toByteArray());
} catch (Exception ex) {
  //Log the exception
}
#

This (is an example) would send all the data from the file "playerdata.txt" through BungeeCord messaging chanenl to the spigot plugin listening on channel "mycustom:channel"

#

event schedule.txt

#

Then you would need to "un-base" the raw data, and write it to a file (or load it directly)

#

How do I schedule events in my plugin from a file called eventschedule.txt which contains the time of the event, thanks

quaint mantle
civic tapir
quaint mantle
#

The part I need help with is reading the file for the time

quaint mantle
glass mauve
timid hedge
glass mauve
#

I know that there is Server.Spigot#restart

quaint mantle
timid hedge
glass mauve
#

1.8 💀

quaint mantle
glass mauve
#

yeah it should exist in 1.8

sullen marlin
#

Way better to just stop it and have your panel or script auto restart

mighty pine
#

what all exists for bungee docs

sullen marlin
#

?jd

mighty pine
#

yes the javadocs exist but what outside of that

timid hedge
#

Yeah i know it would be better but i just want it to be in a plugin

Im not trying to get spoonfeeded or anything but i have forgotten how to do this right, it says that time isnt a int

    @EventHandler
    private void serverRestart(){
        String time = String.valueOf(getConfig().getInt("Time"));
        Server server = Bukkit.getServer();
        switch (time){
            case 1:
        }
    }
sullen marlin
mighty pine
sullen marlin
#

Best way is a third party message queue

#

Or database

#

If you're desperate, plugin channels

tawdry monolith
#
Bukkit.getWorld(HubSquared2.mainClass.getConfig().getString("hub_world")).playSound(event.getPlayer().getLocation(), Sound.ENTITY_BAT_TAKEOFF, 0.5f, 1f);

this doesn't work for some reason, anyone know why it doesn't play the audio?

quaint mantle
sullen marlin
#

Such as redis, rabbitmq, etc

lunar wigeon
mighty pine
#

the whole point of what im doing rn is to not use a database 😛

mighty pine
#

so ill have to write my own netcode i guess

sullen marlin
#

Well the whole point of databases is to do what you're doing 😉

tawdry monolith
#

also question, why do people use # instead of . when talking about code on forums and here?

sullen marlin
#

In javadocs notation class#method is an instance method, class.method is a static method

#

I think anyway, who cares

lunar wigeon
mighty pine
#

guess that includes networking too

sullen marlin
#

Well you're definitely wrong there

#

Can't tell if serious

lunar wigeon
#

or java sockets if you are tryhard

mighty pine
#

oh i was just going to use sockets

#

if bungee didnt already have anything

lunar wigeon
mighty pine
#

looks way overkill for what i need

onyx fjord
#

redis

mighty pine
quaint mantle
silver robin
quaint mantle
#

how do i check server ? in bungeecord ?

civic tapir
quaint mantle
silver robin
civic tapir
#

Yea

quaint mantle
quaint mantle
#

no i mean

#

i wanna send message on connect to proxyserver

#

not below server in bungeecord

#

So you want to send a message when a client connects to server "lobby" for example?

#

Or when the client connects to BungeeCord?

quaint mantle
quaint mantle
quaint mantle
quaint mantle
#

aight ty

kind hatch
#

FAWE uses a different technique entirely to change blocks.

echo basalt
#

It skips bukkit

#

Writes to the block palette directly

#

And then sends packets to the player

young knoll
#

And then everything breaks

echo basalt
#

and then it tries relighting the chunk

opal juniper
#

let’s just say there is a reason it is known as Fast Async World Exception

echo basalt
#

It's not the cleanest or safest solution

#

let's just say it like that

opal juniper
#

well they are modifying the world state asynchronously which is bad

#

it isn’t designed to be

dire oyster
#

so i am trying to make a plugin where i can report someone in game and thaen it will ping in a curtain discord channel but i am struggerling to figure out how i would do it could anyone please help me i have googled it but i am not getting the result that i am after

dire oyster
#

i have brock it into steps

lunar wigeon
dire oyster
#

i have got the bot running but i am struggerling on how i would get the results from the report command and using jda make it ping in a discord channel

lunar wigeon
#

client? yes

kind hatch
young knoll
quaint mantle
#

Do you?

dire oyster
#

an java

quaint mantle
dire oyster
#

wel your helpfull

lunar wigeon
#

XD

young knoll
#

Guess someone woke up on the wrong side of the bed

quaint mantle
#

Look I’m just trying to keep it real

dire oyster
quaint mantle
#

No I wasn’t

#

You asked the dumbest question which you could have solved in 30 seconds by googling

dire oyster
#

not in my case

quaint mantle
#

How do you know how to get a JDA bot running but don’t know how to do anything else

#

That’s just outright stupidity

dire oyster
#

cause of the way the program is in different files also i dont i googlee dit and after 5 days of work finerly found it

quaint mantle
#

Learn English then you can come disturb my slumber.

dire oyster
#

but i am having problems with just making it into a string and sending it

#

sorry that i am not a "professer " like you

lunar wigeon
#

siemka memexurer

quaint mantle
#

😂😂😂😂😂😂😂

#

Dude, calm 🗿

vivid skiff
#

How can i make an armor stand follow a player as precisly as possible, because teleporting the armorstand makes it fall behind the player

dire oyster
quaint mantle
#

This channel name is help-development

quaint mantle
#

I don’t know who you are

#

Stop blaming him for asking help

quaint mantle
#

If you are not gonna help him, shut up

#

He’s being an idiot

#

You are

#

He just needs some help, stop being so rude

quaint mantle
#

😭😭😭

vivid skiff
#

Aren't there better ways?

quaint mantle
#

Whatever

#

“Karma Configs” you’re so broke you need to sell configs

#

It’s 2023

young knoll
#

The best way is passenger

dire oyster
#

how do i do that

young knoll
#

But you can’t have an offset if you do that

quaint mantle
#

Next time don’t speak on my name

kind hatch
young knoll
#

That only works vertically though

quaint mantle
#

It doesn’t need to give to you

#

You wouldn’t understand either way

dire oyster
#

can i put my code in chat so that you can help me undersand what i have to do better please

#

i am not a professinal programmer

kind hatch
#

?codeblock

undone axleBOT
#

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

}

}```
Becomes:

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

    }
}```
young knoll
#

?paste for big code blocks

undone axleBOT
dire oyster
#

i have only just started learning

kind hatch
#

?paste

undone axleBOT
quaint mantle
#

What are you good at in life @dire oyster

#

You’re not good at coding or English

#

What are your skills

dire oyster
kind hatch
#

Man really did wake up on the wrong side of the bed.

dire oyster
#

mother

#

keybopard is brocken

quaint mantle
#

Haha that one was funny

#

Yeah that one is nothing like I’ve heard before

#

Crazy how you couldn’t answer a simple question. You must be worthless

#

Yo, fr, if you are not gonna help, go away, shut up, and live your life, let others be

#

You’re web developer skills are seriously underwhelming

#

You should polish up a little

#

You couldn’t do anything better either way

#

Let’s face it

young knoll
#

@worldly ingot This is entirely silly

dire oyster
#

minecraft to discord report plugin

kind hatch
#

Bro's targeting everyone at this point. Do me next. xD

quaint mantle
#

You were looking at my message history that’s funny

#

Either way I wasn’t serious

#

What are your accomplishments slokxoxo?

#

Hm your GitHub looks dry

#

Not much progress for 2 months

#

I remember this 🤣🤣🤣

onyx fjord
#

@quaint mantle 👋

quaint mantle
onyx fjord
#

Hi

torn shuttle
#

uh real quick how do you remove a scoreboard again?

quaint mantle
#

player.setScoreboard(null);

vital ridge
#

How can I import NMS into my project?

young knoll
#

?nms

vital ridge
#

There is no specific maven dependency

torn shuttle
young knoll
#

You can also set them back to the main scoreboard

rain night
#

I have the problem that when joining the Server the main world, which is being reset at server shutdown, is getting loaded, tho the player is teleported instantly into a lobby world. How can i stop that behavior or preload the main world?

wet breach
rain night
#

Can i get the status of loading the main world so i dont let players join the server yet?

mighty pine
#

whats the non api package name and version for bungee called

rain night
#

Thanks!

undone axleBOT
wet breach
#

that event is thrown once the server is finished loading

#

so it should work for that 🙂

rain night
wet breach
#

so what you can do

#

is in the server.properties

#

whitelist the server

#

in the code, unwhitelist server in that event

#

this prevents players from joining until that event is thrown

rain night
#

Would have used the PlayerPreLoginEvent ...

#

And the disallow

young knoll
#

Also an option

#

Although use the async one

rain night
#

Sure just forget to write Async 👼

wet breach
#

just use the whitelisting

#

🙂

mighty pine
rain night
#

yes

wet breach
#

how is it jank?

#

you can disable whitelist from in the code

#

its called using what is already available

rain night
#

Its fucked when the properties are wrong

wet breach
#

why produce code to kick players when it already exists?

mighty pine
#

yes but players can still join with a whitelist on

wet breach
#

only if they are in the whitelist

tall dragon
#

what happens if you actually want to whitelist tho

wet breach
#

unless you have something overriding the functionality

tall dragon
#

might be annoying

wet breach
rain night
#

Im actually using a whitelist rn

wet breach
#

but, anyways I am never a fan of duplicating functionality that already exists

quaint mantle
#

hikaricp supports mongodb ?

worldly ingot
#

It should support anything that implements the JDBC API

wet breach
quaint mantle
#

btw i can't fix my problem
if we take it from the beginning, it can give me an idea in a clean way, wrong?

young knoll
#

You can even use it with databases that don’t support multiple connections

#

Yknow, for the luls

quaint mantle
#

im making friends plugin but this will need be for bungeecord and i wanna gui for this plugin but bungeecord doesnt support guis
u suggested to db

#

but u know any idea for store player's friends to db

young knoll
#

The gui would have to be done on the spigot servers

rain night
#

I waited like 2 minutes, the event is not getting called

wet breach
#

if it isn't then its a bug

rain night
#
    @EventHandler
    public void onServerLoaded(ServerLoadEvent event) {
        System.out.println("Server loaded!");
        Game.getInstance().setLoaded(true);
    }```
#

I dont get console output

tall dragon
#

did you register it? PepeLaugh

rain night
#

Im not that bad

#

hahah

tall dragon
#

gotta make suure

rain night
#

Its right under the Event that stops the player to join. Im pretty sure

#

It works on a reload tho tf

#

The event gets fired on reload but not on server start

young knoll
#

It should get called as soon as startup is done

twin venture
#

hi , i have a problem in a guild system , its kind of weird problem haha
it happend every time a user create new guild and there are users on the server with guild:
it will add the other users to the guild that just created
.

tall dragon
rain night
#

seems like it 🤷‍♂️

tall dragon
#

alternatively you could possibly use WorldLoadEvent

#

should be called when a world is done loading

rain night
#

Bro thats exactly what i need

#

I dont care about the server i need the woorld

tall dragon
#

well there you go

rain night
#

Btw for deleting a world the best way is to delete the dir right?

tall dragon
#

should probably make sure its unloaded

#

but yea

#

i think so

rain night
#

I only see the option to unloadChunks...

rain night
#

Ohh its not on the world object i see

wet breach
young knoll
#

You can’t unload the main world as well

wet breach
#

for all other worlds, unless you use some hacky reflection you can't remove them

young knoll
#

Any other world should work tho

rain night
#

Oh i have to reset the main world tho

wet breach
#

yeah should probably have some script that does that

#

I have scripts that control my servers for starting, restarting and detecting crashes etc

#

so upon shutdown, you could have a script that removes the main world

#

before starting it back up

tall dragon
#

why does it have to be the main world exactly

wet breach
#

ideally you would use the main world for lobby

#

but who knows why they need to lol

rain night
#

ehm

#

i need nether and stuff, but maybe im stupid

young knoll
#

Use your plugins logger

wet breach
#

broadcast?

#

depends what kind of message we talking about

young knoll
#

You can also use Bukkit.getConsoleSender.sendMessage

#

But logger is generally better

wet breach
#

you could also make the console run the command say with the message as well

young knoll
#

Yeah use logger

#

JavaPlugin#getLogger

wet breach
#

well you weren't specific so we were just tossing all the various ways you could send a message to console

#

or make console send a message XD

young knoll
#

Yes

#

But spigot already logs a message when your plugin enables

wet breach
#

don't worry there is still many plugin devs that still do that for some reason 😛

#

long time ago, it didn't

#

but, we are in modern times

zenith gate
#

Its honestly just muscle memory at this point.

rain night
#

I need a fully capable survival world, so you would suggest to use the world as lobby and create a second game world?

wet breach
#

then it is the main ones

#

so if you need a lobby, then the main world works for that

rain night
#

stupid question but do portals still work then?

wet breach
#

and t hen you can reset your game world without shutting down 😉

rain night
#

are they refering to world_end and world_nether?

tall dragon
#

it might make their own end / nether

#

dk tbh

rain night
young knoll
#

I believe they go to the default nether and end

rain night
#

But i can easily remove them?

young knoll
#

Mhm

#

You can unload any world except the main one

#

As long as no players are in it

rain night
#

I kick them anyway

#

Ill try that and let you know

young knoll
#

If it’s in plugin.yml spigot will load it

#

You can change the executor in onEnable with getCommand(name).setExecutor

#

Otherwise your main class is the executor

zenith gate
#

than if its in your plugin.yml itll work.

#

itll be loaded.

#

you need both. you need to set the executor of your command, then add it to your plugin.yml

rain night
#

What do you think creating the world right after deleting it shortly before server shutdown or creating it when starting the server?

wet breach
#

the only time that isn't true is when you are doing subcommands