#help-development

1 messages Β· Page 216 of 1

echo basalt
#

gangsta

white dew
#

Hi guys, I have a map I'm using to map uuid to an object of the class I made called "PlayerPlus"

#

However, more than one listener is gonna need this object

#

I thought about initializing the map in the onEnable method, on the main class

#

and distributing It to the listeners, passing the map for the constructor of the listeners

#

However, I'm not sure if this is a good idea

#

πŸ€”

#

what do you guys think?

wet breach
#

Make a custom event that extends the event you want. Make custom event return your object

wet breach
white dew
#

ah, I see

#

I'm not sure what is a singleton, tho

wet breach
#

If anything I would make it a concurrenthashmap though

white dew
#

but I understand the possible problem

#

I don't know what a concurrenthashmap is as well πŸ€”

#

sorry πŸ˜…

wet breach
#

Simgleton is a class that is setup in such a way that only a single instance of it can exist or be created

white dew
#

Ah, that makes sense

wet breach
#

Concurrenthashmap is the same as a hashmap but designed to allow multiple things to access it without running into concurrent modification exceptions

white dew
#

Ah, I see

#

isnt dependency injection my idea?

#

ah, ok!

#

Awesome

wet breach
#

Hope that helps with your questions you had uwu

white dew
#

Thank you a lot :)

#

thanks you too

hybrid spoke
#

i would not do the latter, that breaks the SRP

#

rather have a repository for the object

#

if the class on the one side represents a value object and on the other side handles and manages those instances, how does it keep the SRP

#

and thats where it breaks. first, the instance should not manage itself, second, the instance should not even know that it is managed from a higher being

white dew
#

Hey, I'm watching a video of how to do commands and the guy is making the onCommand method on the main class

#

however, the main class extends JavaPlugin but not CommandExecutor

#

How is he using "onCommand"? πŸ€” wound't he need to implement CommandExecutor in some way?

#

I mean, I'm doing in an exterior class, and I'm using "public class ChooseCommand implements CommandExecutor"

kind hatch
#

That's because if you go far enough down the chain, you'll find that at some point JavaPlugin extends TabExecutor, which extends CommandExecutor. Therefore it has access to it.

white dew
#

ooooooooooooh

#

that makes a lot of sense!

#

thanks

hybrid spoke
#

its inherits commandexecutor as well

hybrid spoke
vocal cloud
#

Terrible tutorial video if they do it in the main class YanSigh

river oracle
#

Truth

#

I'd assume it's a yotube tutorial which are notoriously awful

vocal cloud
#

99% of YouTube tutorials could be 1 minute quick bites

hybrid spoke
#

problem is

#

there are barely good youtube tutorials

vocal cloud
#

Be the change you want to see in the worldℒ️

hybrid spoke
#

i cant code

vocal cloud
#

Honesty is the best policy

#

Maybe I should dust off the ol YouTube channel kekw

river oracle
#

We should collaborate I suck at coding but I can teach

vocal cloud
#

I'm thinking making shorts since that's all the time you'd need to teach a core concept

tranquil dome
#

I have made my own class that extends the EntityFishingHook. What I want to do is to spawn a FishHook entity without the player having to hold a fishing rod in their hand. On 1.8 NMS, there's a method t_() that has a check for this exact thing, so I chose to override it. Removing the condition from the if statement, and even commenting out the this.die() method, did not stop the hook from despawning. Once I had overriden the this.die() method to do nothing, the hooks finally stopped despawning. Could there be another reason that causes the hooks to despawn? Note that the fishing hook never despawned when the player was actually holding a fishing rod.

Code used to spawn my custom fishhook (WireKunai):

    fun spawnWireKunai(player: Player) {
        val craftPlayer: CraftPlayer = player as CraftPlayer
        val entityHuman: EntityHuman = craftPlayer.handle as EntityHuman
        val world = entityHuman.world

        val wireKunai = WireKunai(world, entityHuman)
        val location = player.eyeLocation

        wireKunai.setLocation(location.x, location.y, location.z, location.yaw, location.pitch)
        world.addEntity(wireKunai)
    }
vocal cloud
#

1.8 moment

remote swallow
#

?1.8

undone axleBOT
tranquil dome
#

Aiming to support versions 1.8 and up

#

I know it's old, but many servers still use it for pvp.

echo basalt
vocal cloud
#

EU moment

echo basalt
#

be the reason your homies carry a pocket knife

vocal cloud
#

Be the reason she carries an AR-15

echo basalt
#

murica

vocal cloud
#

With an extended mag, laser sight and collapsible stock

hard pebble
#

?1.12

#

hello im currently making a lifesteal plugin however i really need the code line which to add when a player reach 0 hearts to ban

#

can anyone tell the code for it

chrome beacon
#

What lifesteal plugin

#

nvm

hard pebble
#

..

chrome beacon
#

?learnjava

undone axleBOT
chrome beacon
#

Start here ^^

hard pebble
#

-_-

#

hello im currently making a lifesteal plugin however i really need the code line which to add when a player reach 0 hearts to ban

can anyone tell the code for it

chrome beacon
#

No we're not going to spoonfeed you the code

hard pebble
#

why

#

so is not ahelp

#

😭

chrome beacon
#

If you cannot code or don't want to hire someone

#

We help people we don't write plugins for people

hard pebble
#

its only a line

#

not a code

#

only 1 line

molten hearth
#

you can't write only a line?

hard pebble
#

the line that i cant understand

molten hearth
#

also its only a dollar 😏

hard pebble
#

i tried

remote swallow
#

if (playerHealth == 0) PlayerGetBanned;

hard pebble
#

thank you bro u made my day

remote swallow
#

if you needed help for writing an if statement, you really need to learn java

chrome beacon
#

I hope you're not planning on copy pasting that

molten hearth
#

5 minutes from now: its red 😭

quaint mantle
#

My command is running twice :/ idk why

#

im only running it once through /home

remote swallow
#

?paste the code

undone axleBOT
eternal oxide
#

show your main class

quaint mantle
#

Housing.java is my main class

hybrid spoke
#

all i see is static abuse but no reason to execute it twice

remote swallow
#

yeah

hybrid spoke
#

maybe load the plugin somehow twice?

#

an old instance?

eternal oxide
#

its not running twice. you are returning false from onCommand so you get the error syntax output too

quaint mantle
#

should i be returning true?

eternal oxide
#

if its the correct command yes

hybrid spoke
#

depends if you want to get the set command usage sent

eternal oxide
#

you only return false if you want the syntax message displayed

quaint mantle
#

also when i first boot up the server the plugin has an error but when i reload it it works fine

#

could be related

eternal oxide
#

line 19 in Housing is causing yoru error

#

a static field initializes before worlds are loaded

quaint mantle
#

error messages not being very useful

hybrid spoke
#

it is

#

like elgar said, the worlds are not loaded yet

eternal oxide
#

I just told you why

quaint mantle
#

yes

#

ur useful but that message i dont understand

remote swallow
#

remove the static

eternal oxide
#

if you read teh full stacktrace it would tell you the exact line

#

move the initialization to your onEnable

quaint mantle
#

but what about the inst

#

how do i hold an instance

#

do i srsly have to pass it to every constructor

remote swallow
#

?di

undone axleBOT
quaint mantle
#

does onEnable not run during /reload

eternal oxide
#

it does

quaint mantle
#

weird cus i moved plotLocations = new HashMap<>(); to onEnable and now it says its null

little panther
summer agate
#

This line if (e.getReason() != EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY || e.getReason() != EntityTargetEvent.TargetReason.TARGET_ATTACKED_NEARBY_ENTITY || e.getReason() != EntityTargetEvent.TargetReason.TARGET_ATTACKED_OWNER) { needs to have && instead of ||, because if the first of the or is true, it will commence

#

On mobile so I could be wrong, linewrap is making it hard to read

little panther
#

oh yea, why did i not see that πŸ˜„ i think im too tired for this. Thanks mate!

summer agate
#

A fresh set of eyes tends to help haha

golden turret
#

hey guys, is there a way to replace the %20 %C3 to the actual character? I am using JavaScript and I need a function like fixText(text)

golden turret
#

thanks!

void mason
#

hi guys, i'm trying to make conveyor belt only with resourcepack and plugin but i don't know how to make entity move smoothly (tp is too jerky and doesn't work smoothly for items and motion tag doesn't work for players) can someone help me?

#

for information the conveyor belt is a block with unused blockstate and not an entity.

summer agate
#

Have you tried Entity#setVelocity?

fluid river
#

eh

#

noob @kindred valley ?

tardy delta
#

FREE JAVA LESSONS

fluid river
#

yes

tardy delta
#

what you got for me?

fluid river
#

idk

#

ask something

tardy delta
#

concurrency

#

unsafe

#

atomic operations

#

mongdb

#

ha

fluid river
#

i never worked with mongodb

#

i think you already know unsafe and concurrency

tardy delta
#

neither do i

#

ill see how much ram i can jank with unsafe off heap allocations 🀑

river oracle
#

Time to use unsafe to edit nms fields πŸ₯³

tardy delta
#

unsafe::putObject?

#

wondering what the dif would be versus reflection, probably native code

river oracle
#

Idk how unsafe works tbh can you even do that

tardy delta
#

unsafe.putObject(field, unsafe.fieldOffsetFor(s), newValue)

river oracle
#

But I need to edit a specific private static final fields which you can't do with reflection well technically you can but it's a bug and was removed after java 17

remote swallow
tardy delta
#

forgot how field offset method is called

#

instead do ||FREE LESSONS HOW TO GET BITCHES||

fluid river
#

good luck

#

tho why do you even need unsafe

tardy delta
#

just because you cann crash the jvm doesnt mean you should do it

#

learnt that one from alex fr 🀑

fluid river
#

that's exactly what i mean

tardy delta
#

takes only one line

#

well except for getting the Unsafe object

#

someone should explain me compare and swap

tardy delta
void mason
quaint mantle
#

Hello, has anybody here an idea how to fix this ?

java.lang.NoSuchMethodError: 'java.lang.String io.netty.util.internal.PlatformDependent.normalizedOs()'
        at io.vertx.core.impl.Utils.<clinit>(Utils.java:30) ~[?:?]
        at io.vertx.core.file.impl.FileCache.setupCacheDir(FileCache.java:52) ~[?:?]
        at io.vertx.core.file.impl.FileCache.setupCache(FileCache.java:31) ~[?:?]
        at io.vertx.core.file.impl.FileResolverImpl.<init>(FileResolverImpl.java:67) ~[?:?]
        at io.vertx.core.impl.VertxBuilder.initFileResolver(VertxBuilder.java:334) ~[?:?]
        at io.vertx.core.impl.VertxBuilder.init(VertxBuilder.java:274) ~[?:?]
        at io.vertx.core.Vertx.vertx(Vertx.java:87) ~[?:?]
        at io.vertx.core.Vertx.vertx(Vertx.java:77) ~[?:?]
tardy delta
#

since when is java.lang.String a method

quaint mantle
#

Man shit is is not my code

delicate lynx
#

ask whoever wrote it then

tardy delta
#

furr

quaint mantle
#

basicly from where comes a second netty instance?

delicate lynx
#

it's hard to tell without any examples of code

#

probably one of your dependencies has netty already

quaint mantle
#

vert.x is open source

hollow pelican
#

Has anyone got any clue how to fix this? Cannot read the array length because "<local3>" is null

#

I'm trying to iterate through an array and see if an element matches a certain value to check if it matches by using a boolean method.

tardy delta
#

array null?

golden turret
#

I need help with some regex

#

basically, I want to validate the following: <number here> (<some text>) <some text>

hollow pelican
#

The array is created by deserializing a JSON file to an array of the custom data object used.

#

It works in 1 set of code but not in my boolean method.

#

I'm doing essentially the exact same thing in a different method but it's broken in my boolean one and I have no clue why.

#

CustomDataObject[] customDataObjectArray = new Gson().fromJson(new FileReader(fileName), CustomDataObject[].class); (the actual name has been removed)

#

And fileName is a string argument that is specified.

tardy delta
#

does gson even know how to deserialize to an array lol

#

might give it a typeadapter

hollow pelican
#
for (CustomDataObject customDataObject : customDataObjectArray) {
            if(customDataObject.getProperty1().equals(theStringThatIAmTryingToCheck)) {
                return true;
            }
        }
        
        return false;```
#

I'm doing basically the same thing in another method so I have no idea why it isn't working here.

eternal oxide
#

BigINT

#

Big int has no limit

tall dragon
eternal oxide
#

well, the size limit of your storage πŸ™‚

hollow pelican
#

I just checked and it says that the array is null but I have no idea why that's the case since I do the exact same thing in another method.

tardy delta
#

null checks my friend

hollow pelican
#

πŸ˜•

#

confusion

tardy delta
#

my css is confusing too

kind hatch
#

CSS isn't all that confusing though. :3

tardy delta
#

my html sucks so applying css to it is even worse

hollow pelican
#

I'm confused as to why the array is null when it's fine in my other method.

kind hatch
#

But it's soooooooo freaking easy

tardy delta
#

cant seem to put a margin between indidual li element

hollow pelican
#

I've done some debugging and it's made me even more confused ngl

kind hatch
tardy delta
#

well those are two li elements, where 2nd has a a elem in it and i cant find to apply a margin-top to the li

kind hatch
#

That's why you use tools like sass. It makes css far easier.

tardy delta
#

dunno if this is the #help-webdev channel but anyways

vale ember
tardy delta
#

ignore that lmao, it doesnt get included anyways

kind hatch
tardy delta
#

well ideally i'd have a button class

#

or <li><a></li> would be the best selector

kind hatch
vocal cloud
#

Just use a css comment of /* */

kind hatch
tardy delta
#

i want to put a margin on top and on the bottom of a elements nested in a li

kind hatch
#
li <your element> {
  margin: 1rem 0;
}
#

Revised it

tardy delta
#

even putting a margin of 100px on my li a doesnt seem to change anything

vocal cloud
#

If you want all the children it's li *

vale ember
#

also ur trying to apply margin-top to awhich is inline, afaik u cant do that

vocal cloud
#

Applying margin to a elements is a bad idea

kind hatch
#

I mean, it depends on what you need. He could easily just make the list a display of flex and adjust the spacing with the gap property, but margin was the old way of doing it.

kind hatch
tardy delta
#

"If you change the display to block on your a element" whats that supposed to mean

kind hatch
#

display: block; or display: inline-block;

#

You can change any element's display. Generally it's block by default, but certain ones have a different default.

kind hatch
tardy delta
#

oh well display: block seems to work

kind hatch
vocal cloud
#

Yeah, use a reset file always

tardy delta
#

only it seems to apply a background color over the whole length now, due to display: block

kind hatch
#

Try changing it to inline-block

#

Or set a width

#

Your choice

tardy delta
#

inline-block saved it

#

we got a real expert here

kind hatch
#

If you want to get fancy and forego the margins, you can do this instead.

li {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

Where gap is your spacing between elements.

summer agate
#

Ah, css, the bane of my existence

vale ember
#

tailwindcss 😎

kind hatch
summer agate
sterile token
#

Related to this topic, is there any markdown interpreter for ts?

#

Im planning to add system similar to github wiki or readme file

#

So when u upload a markdown file its displayed

vale ember
void mason
vocal cloud
#

You can add velocity to items. Wouldn't that work?

summer agate
void mason
#

as i said im a noob at making plugins and its dificult for me to search because my english is trash

#

does velocity works for player ?

summer agate
#

Try it, idk

sterile token
vocal cloud
#

Velocity works on all entities

void mason
#

k thx

summer agate
sterile token
#

I didnt know how to search it

#

Im spanish also

summer agate
#

Honestly, searching is a skill of its own

sterile token
#

Yeah

summer agate
#

Don't blame you, I learned a thing too haha

sterile token
#

Wait keving taking a small look i realize that you can execute native js from the mardown file

#

πŸ’€

void mason
#

how can i check if an entity is walking on a block and apply a velocity if the if its the good block ?

tardy delta
summer agate
kind hatch
#

There are a lot of quirks sure, but for the most part, it's straightforward.

summer agate
#

I never actually learned css grid, I ususally do everything with flex, is there a point in grid if I already know flex?

kind hatch
#

Yes, I hardly use grid as well, but there are plenty of cases where grid would be the better option. However, as with all things, it depends on your layout.

tardy delta
#

i couldnt enter webdev classes cuz i was too late for lesson today lol

quaint mantle
#

rip

void mason
#

the conveyor is just a block like a grass block or a wooden plank

sterile token
#

Flexbox and grid are two fantastic layout tools. It can be hard to know which one to pick, but when you focus on the strengths of each one, it becomes a lot easier.

πŸ”— Links
βœ… The easiest way to get started with Grid: https://youtu.be/rg7Fvvl3taU
βœ… The easiest way to get started with Flexbox: https://youtu.be/u044iM9xsWU
βœ… Using the Grid ins...

β–Ά Play video
kind hatch
#

Straight up. Learned most of my css knowledge from that channel.

sterile token
summer agate
void mason
#

thanks

fallow violet
#

how can i store a location object in mongodb and read it without errors? If i store 0 for example and i try to get it as float or double im getting error that i cannot parse int to float or something like that

#

is there another way to store or read?

summer agate
#

is it stored as an int in your database?

fallow violet
#

the x y z cords are stored like that

#

can u store the whole object there?

summer agate
#

not sure

#

I'd say save xyz and world in seperate fields

fallow violet
#

yeah thats not my problem lmao

#

the problem: how can i store a long/double without the .0 because he removes it

#

and everytime i want to read a number without the .0 its an integer but i stored it as an long originally

#

yk what i mean

#

wait if you write 69L its a long right?

remote swallow
#

correct

fallow violet
#

how can i do this with double?

alpine cairn
#

Can anyone tell me how to get the spigot libraries for eclipse? After about an hour of searching I found that the spigot.jar for servers can't be used as a library and someone suggested using maven but I have no idea how to do that.

hazy parrot
#

69.0

fallow violet
summer agate
remote swallow
# alpine cairn Can anyone tell me how to get the spigot libraries for eclipse? After about an h...
BukkitWiki

This rather large tutorial aims at getting you started with plugin development in Bukkit. It is in no way a complete tutorial of all possibilities in Bukkit, but rather a general overview of the basics. It starts with making sure you understand Java, sets up your workspace in an IDE, and introduces the essentials of most Bukkit plugins. These tu...

sterile token
fallow violet
tardy delta
#

world uuid pls

fallow violet
sterile token
fallow violet
sterile token
#

Please check the docs

fallow violet
sterile token
#

?jd-s

undone axleBOT
sterile token
#

READ bruh its not diff

fallow violet
#

i know how this works but my database is converting every double without a number after the dot to an integer and thats why im asking if i am able to prevent that or store the location object as whole

fallow violet
undone axleBOT
sterile token
tardy delta
#

doubloe

#

store it as a double and read as a double, shouldnt cause problems right

south nacelle
#

Can anyone help me with this error?

java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getKeys(boolean)" because the return value of "org.bukkit.configuration.file.YamlConfiguration.getConfigurationSection(String)" is null

Which is weird because this is the config.

Players:
e454994c-62db-4a45-a469-889d18cd1429:
UUID: e454994c-62db-4a45-a469-889d18cd1429
NAME: PindaKaasGeitje

And this is the code to get the config

file = new File(Teams.getPlugin().getDataFolder() + "/players", name + ".yml");

            YamlConfiguration player = YamlConfiguration.loadConfiguration(file);

            for(String p : player.getConfigurationSection("Players").getKeys(false)) {
undone axleBOT
south nacelle
#

Sorry for long messag

tardy delta
#

section being null

south nacelle
sterile token
tardy delta
#

bruh the messages i sent last arrive first

fallow violet
#

gimme some time to paste the code

south nacelle
sterile token
#

@fallow violet sorry for being rude
Mongo document has a way to put and get stuff via double

fallow violet
#

bro wtf

#

I KNOW

remote swallow
undone axleBOT
sterile token
#

So, which is your issuee?

tardy delta
fallow violet
#

dude T^T let me paste my fucking code

sterile token
undone axleBOT
south nacelle
remote swallow
fallow violet
undone axleBOT
fallow violet
#

damn

sterile token
#

Sorry to all i having my days.... im not with the best mood

tardy delta
fallow violet
tardy delta
#

that code worked fine for me

tardy delta
#

none of those load lol

fallow violet
tardy delta
#

isp moment

#

if file not exists, create it ig

summer agate
south nacelle
tardy delta
#

this doesnt make sense, new FIle only creates a file object, but ::exists checks if the file exists on disk, if it doesnt, call plugin.saveResource("players.yml") or file::createNewFIle or smth

fallow violet
tardy delta
#

read it the other way but still doesnt make sense

#

also new File(fFile, uuid + ".yml")

#

automatically creates a file with fFile as parent folder

#

is my internet down again or are people just ignoring me?

south nacelle
#

im reading

remote swallow
#

isnt down

south nacelle
#

not ingoring

tardy delta
#

good

#

their reports page

south nacelle
#

But if the file does not exist i create one on plugin disable

remote swallow
#

why on disable

south nacelle
#

and it saves it

remote swallow
#

if its just 1 file for player info, create the file if it doesnt exist on enable then have a getter

south nacelle
#

and on enables loads it again

summer agate
south nacelle
#

so thats why if file exists

fallow violet
#

i have a plan

#

i store it as long and convert it do double damn im smart

tardy delta
#

same gooes with jsonsimple

fallow violet
#

is there a way to get the default world name

#

or uuid

tardy delta
#

what default world? overworld?

fallow violet
#

yepp

#

or is there a way to get the level name in server.properties

summer agate
#

You can get all of them with Bukkit.getWorlds(). Then maybe index 0?

tardy delta
#

Bukkit.getWorlds().get(0) is overworld, 1 is nether and 2 is end, all others are custom

#

just call ::getUid on the world object

fallow violet
#

im trying this now

sterile token
tardy delta
#

you can append an uuid too, it knows how to save it

sterile token
#

Then remember to do Bukkit#getWorld(UUID.fromString(document.getString("world")))

sterile token
#

I have try it

tardy delta
#

it has a dedicated codec

fallow violet
#

u cant

#

it gives error

tardy delta
#

so document.get(" ", UUID.class) should work

fallow violet
sterile token
#

Im just seen that you have problems and im telling you help

#

So if dont want to get help, look for help via dms or other discord

#

This channel is public

#

πŸ’€

tardy delta
#

only high

fallow violet
#

i want help but only HELP not tipps that i dont need like i never asked for

#

WE KNOW US? WTF

sterile token
#

Lol

#

I didnt know that

#

Just realize we are friends

#

🀣

fallow violet
#

not anymore

sterile token
#

haha

toxic sorrel
#

Hiya. I'm attempting to implement Teams this into a custom plugin of mine, but I'm struggling to find any documentation for Teams anywhere. I'm attempting to add prefixes, suffixes, color, etc in tab, but I'm not having much luck. I would be extremely grateful if you had any suggestions or snippets of code that you could share. thanks

    public void initTeam(ProxiedPlayer player) {
        Team team = new Team();
        team.setName(player.getName());
        team.setDisplayName(player.getName());
        team.setNameTagVisibility("always");
        team.setCollisionRule("always");
        team.setColor(1);
        team.setPrefix("test");
        team.setSuffix("test");
        team.setMode((byte) 0);
        team.setPlayers(new String[] {player.getName()});
        for(UUID p : connectedPlayers) {
            ProxyServer.getInstance().getPlayer(p).unsafe().sendPacket(team);
        }

^this Team is net.md_5.bungee.protocol.packet btw
and more specifically, the client is disconnecting with "Connection Lost" when this packet sends.

fallow violet
dire salmon
#

double with uppercase D?

glass tangle
dire salmon
#

probably no

#

its just weird Β―_(ツ)_/Β―

tardy delta
#

damn my internet is fast

remote swallow
#

in this day and age? Not allowed

fallow violet
#

im sorry that i like using the upperace one if i use the function right next to it

dire salmon
#

lol

fallow violet
#

(:

fallow violet
gaunt moss
#

Hi, how can I send a message in actionbar at login?

dire salmon
flint coyote
fallow violet
toxic sorrel
#

Attempting to push Team(defined packet)

glass tangle
#

yeah

#

paper is spigot fork

fallow violet
fallow violet
gaunt moss
fallow violet
#

alright

serene sigil
#

quick question: does InventoryCloseEvent call when a player is in an inventory but leaves the game without closing it?

glass tangle
#

no

dire salmon
#

i forgot about closing game lol

serene sigil
#

ye so u like alt+f4 when u are in an inv

dire salmon
torn badge
#

No if you just kill the process the client can’t send any packets anymore

torn badge
#

How did you close the game?

serene sigil
#

alt+f4

glass tangle
#

that's a good question

torn badge
#

Try killing it from task manager

serene sigil
#

whats the difference?

glass tangle
#

i don't think minecraft should send packets when game closes

glass tangle
#

the minecraft

#

fuck

serene sigil
#

oh

torn badge
#

Alt+F4 still lets the program respond to the termination call

serene sigil
torn badge
#

Yeah that’s called by the server

serene sigil
#

still works with task manager!!!

#

lets fucking go

torn badge
#

Okay so InventoryCloseEvent is also called by the server, good to know

serene sigil
#

ye

torn badge
#

Probably because the server closes all open inventories once a player disconnects

serene sigil
#

yea

#

that makes sense cuz u are not in an inv after u join

tardy delta
#

fuck went back to coding and my commit seems to be undone

serene sigil
#

rip

tardy delta
#

all code gone

glass tangle
#

i did git clean once thinking it will erase git configuration lmao

vocal cloud
#

I would personally never run git clean

glass tangle
#

there should be a warning when running this command

gaunt moss
glass tangle
#

what

#

you mean for how long it will stay on screen?

gaunt moss
glass tangle
#

you can call it in bukkit timer to show it again

fallow violet
#

i tried to set a time too but i failed xd just make a Bukkitraunnable with .repeatTaskTimer

glass tangle
glass tangle
#

why

fallow violet
#

its better :D

tardy delta
#

how can i undo a commit from github lol?

agile anvil
#

This is the same

remote swallow
fallow violet
#

:C

sonic goblet
#

(Don’t use that)

agile anvil
tardy delta
#

runTaskTimer

glass tangle
sonic goblet
#

xd

tardy delta
#

its not better

#

aaaaa

fallow violet
#

if u wanna cancel its easier in bukkitrunnable with

tardy delta
#

no

fallow violet
#

yes

tardy delta
#

scheduler.runTask(plugin, task -> task.cancel())

fallow violet
#

wtf thats too much shit

#

cancel(); is better

glass tangle
#

i think you can do Bukkit.getServer().getScheduler().cancelTask(id) in sheduler

fallow violet
agile anvil
#

Calling #scheduleSyncRepeatingTask basically need a BukkitRunnable so why are you even debating on this ?

glass tangle
fallow violet
#

YES

agile anvil
#

You don't see it because you use lambda expression but you can cancel the task the same way πŸ™‚

fallow violet
#

dont destroy my dreams now

dire salmon
#

i mean i always do bukkit.getscheduler...

fallow violet
#

did the same ages ago

#

but bukkitrunnable is better because its looking more beautiful >:C

#

accept.

#

my.

#

opinion.

#

and.

#

i will do the same

sonic goblet
#

Runnable do be better tho, lowkey

#

Fr fr

fallow violet
#

i hate u guys can we stop debating that bukkitrunnable is better? thanks

#

(:

gaunt moss
agile anvil
glass tangle
fallow violet
gaunt moss
#

Thanks a lot for your help anyway!

agile anvil
fallow violet
#

T^T

#

doc are liers (:

agile anvil
#

But just for you: BukkitRunnables are awesome

#

as well as BukkitSchedulers cause they're basically not the same

fallow violet
#

wait a second

glass tangle
#

i prefer never to go into docs because of light theme

fallow violet
#

this is more beautiful i change my mind

glass tangle
#

javadocs are so fucking ugly

fallow violet
remote swallow
#

i use dark reader

#

they arent light mode

dire salmon
#

most of times

agile anvil
fallow violet
fallow violet
#

yes

#

exactly

#

u die if u activate it

agile anvil
#

Just breath, leave your cave and enjoy the sun light

#

then light theme seems like darkness

fallow violet
#

@agile anvil i wanna apologise because i just wrote down the scheduler and its way more beautful im sorry :3

STOP REACTING >:C

dire salmon
agile anvil
sonic goblet
#

Have a backbone

glass tangle
#

mf is humiliated

sonic goblet
#

If you have an opinion stick to it

agile anvil
sonic goblet
#

I agree but their opinion changed within 3 minutes xd

glass tangle
tardy delta
sonic goblet
#

After they got pushback

fallow violet
tardy delta
#

my wifi letting that image thro after 10 minutes.

fallow violet
#

xd

glass tangle
#

can't wait for twitter to cancel someone what he has done in a preschool as a child

agile anvil
gaunt moss
glass tangle
#

stays until you disable plugin?

gaunt moss
glass tangle
gaunt moss
#
 @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        event.setJoinMessage("");

        Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, () -> {
            player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("Β§3TEST"));
        }, 5, 5);
    }
somber hull
#

Ye

glass tangle
#

ah yes spaces

tardy delta
fallow violet
#

what if u cancel PlayerJoinEvent? Does he get kicked?

glass tangle
#

it does nothing

fallow violet
#

whyy

#

dun make sense

glass tangle
#

idk

#

i think it will only cancel the player join message

fallow violet
#

sadge

glass tangle
#

every event is cancelable

tardy delta
#

isnt

agile anvil
alpine cairn
#

Anyone coded a plugin before that wants to hop into a vc and try to help me?

agile anvil
#

and still PlayerJoinEvent does not implement it, it's not

fallow violet
alpine cairn
fallow violet
alpine cairn
glass tangle
#

wtf πŸ’€

fallow violet
#

damn i will never help u ever

sonic goblet
#

Absolutely Chad energy

alpine cairn
#

Good you'll probably start telling me about your favorite hentai or something

glass tangle
#

please do not do this on nnn

fallow violet
#

wtf

#

im not watching hentai

glass tangle
#

yeah i also touch grass

agile anvil
#

are you guys really doing nnn?ΒΏ

fallow violet
#

im not but he thinks

alpine cairn
#

NNN is probably easy when the only girls you know have two dimensions

glass tangle
#

my girl has 0 dimensions

fallow violet
#

what is wrong with u @alpine cairn i wasnt rude to u but why u r rude to me?

fallow violet
alpine cairn
#

You said some weird shit to me off cuff I’m not just gonna pretend that’s normal

fallow violet
#

if u say so

#

i wish u good luck making a plugin lmao

alpine cairn
#

I can’t even get the spigot libraries to work on eclipse I’ve been trying to all day

fallow violet
#

karma

sonic goblet
#

Are you using the spigot-api jar?

alpine cairn
glass tangle
#

maven is shit

fallow violet
#

gradle better

remote swallow
# alpine cairn Ppl kept saying use maven but o can’t figure out what to download and where to p...
BukkitWiki

This rather large tutorial aims at getting you started with plugin development in Bukkit. It is in no way a complete tutorial of all possibilities in Bukkit, but rather a general overview of the basics. It starts with making sure you understand Java, sets up your workspace in an IDE, and introduces the essentials of most Bukkit plugins. These tu...

alpine cairn
glass tangle
#

maven throws zip header end errors and for some reason this doesn't happen on gradle

fallow violet
#

+1

remote swallow
#

if you want to have it done in the easiest way possible get intellij with Minecraft Development plugin

alpine cairn
glass tangle
fallow violet
sonic goblet
#

He was rude because you typed something cringe

#

That’s not random

glass tangle
sonic goblet
#

Unjustified maybe, not random

gaunt moss
alpine cairn
glass tangle
agile anvil
tardy delta
#

?paste

undone axleBOT
fallow violet
gaunt moss
sonic goblet
#

Lol you got him

alpine cairn
glass tangle
tardy delta
#

doesnt change anything

fallow violet
tardy delta
#

compiler will do that anyways

glass tangle
alpine cairn
fallow violet
#

thanks

glass tangle
#

it works without L for some reason

tardy delta
#

just use runTaskTimer with a runnable

fallow violet
#

xd

gaunt moss
#

Same error

tardy delta
#

what?

agile anvil
#

delay is the time before the task starts, and period the time between each repetition

agile anvil
sonic goblet
glass tangle
tardy delta
#

when will people understand that that L suffix doesnt change anything at all lol

gaunt moss
agile anvil
alpine cairn
tardy delta
#

it definitly wont solve the error

glass tangle
#

i wish (Double) 0 was real

sonic goblet
tardy delta
#

(Double)0.0 is real

glass tangle
#

ill check it

#

damn it

#

fucking java with 4 different types for numbers

tardy delta
#

glad you arent using c++ then

agile anvil
glass tangle
agile anvil
#

This method is deprecated

glass tangle
#

microsoft java

tardy delta
#

lmfao

wet breach
wet breach
gaunt moss
agile anvil
glass tangle
#

only Double.fromValue() or whatever it is called

agile anvil
undone axleBOT
wet breach
tardy delta
#

we told to use runTaskTimer

wet breach
fierce whale
#

Is there anyway to play resource pack's custom sound?

gaunt moss
#

I give up it's too hard for me, thank you for your help!

wet breach
#

yeah you can't cast between class and primitive

agile anvil
#

You're almost done

tardy delta
#

cuz people tell him to use the wrong methods maybe

gaunt moss
wet breach
gaunt moss
wet breach
#

some people who come here like to not believe they have limits

#

so they end up way over their head because they don't understand and refuse to believe their skills are not as great as they think lol

#

at least you are honest about your skill level and needing to learn more

sterile token
#

what talking about?

#

I wanna give my op

tardy delta
#

i was shit at java too when starting this πŸ₯²

sterile token
wet breach
#

should started at Java's beginning

river oracle
#

I didn't know java when I started spigot

wet breach
#

would have had so much fun πŸ˜„

sterile token
gaunt moss
tardy delta
#

java 1 😒

glass tangle
sterile token
#

That why i dont like when ppl wants help without learnt java first

wet breach
river oracle
wet breach
#

lets also not forget 1.4

tardy delta
#

i started with java 7 or smth

glass tangle
#

there's too many java versions i don't know on which i started

wet breach
wet breach
#

you can easily learn java in like 3 months time where you can make stuff, not stuff of quality per-say but at least make things πŸ˜›

agile anvil
#

Java versions feels like minecraft versions to me. Before 1.8 it was slow as hell and now it's way too quick

river oracle
#

My first program was a minecraft plugin admittedly a bad one but it was a plugin that ironically enough was somehow good enough that someone wanted to buy it

wet breach
#

Well, Minecraft is one of the catalysts that brought Java back on the map

sterile token
river oracle
agile anvil
wet breach
#

I would say if there wasn't minecraft, Java would probably still be on the road to fully dying out

agile anvil
#

Not actual performance

wet breach
#

Java performance is actually not that bad anymore

#

it is now comparable

alpine cairn
#

Java is everywhere just not in games

tardy delta
#

android hehehe

wet breach
agile anvil
wet breach
#

before Minecraft which is 2010 time frame, There wasn't really much planned in ways of significantly improving java

sterile token
glass tangle
#

i'll just ask here what is the best way to make custom items metadata because i use "#{ID}" at the bottom of lore or is it good enough

agile anvil
#

I'm maybe too young for this, but according to its history it's not the case

wet breach
#

Java 1.7 was the version then and had been for like several years, until minecraft came along and development of Java started to pick up because Minecraft hosting became super popular

sonic goblet
#

And then they saw all the 12 year old kids playing Minecraft and decided to go ham further developing Java. True and real

glass tangle
#

in short what is this?

wet breach
agile anvil
#

Before 2010 there wasn't many devices everywhere, or at all. It's like comparing an old community of ants with more than 100k bugs and a new one that is just born

sonic goblet
#

^^^

alpine cairn
agile anvil
#

This example is shit as hell but I hope you understand me

glass tangle
#

holy shit

wet breach
agile anvil
wet breach
#

Well, Java wasn't as popular as you think it was. Most of what java might have been used for is some off brand embedded system

agile anvil
#

Most of the systems rely on Java : banks, erps, hr management, logistic systems, ...

sonic goblet
river oracle
wet breach
#

All the systems I have used from the above categories do not use java at all

agile anvil
alpine cairn
alpine cairn
agile anvil
river oracle
wet breach
agile anvil
river oracle
#

Both maven and gradle are good though I am used to maven I have nothing against gradlew

alpine cairn
sonic goblet
river oracle
glass tangle
#

maven is good for beginners but not for your nerves

river oracle
#

Use the internet

alpine cairn
alpine cairn
wet breach
glass tangle
#

maven does dependency funny stuff

wet breach
#

if you know how to make java programs, you can make maven plugins to literally do anything you want it to

glass tangle
#

i spent a fucking day on fixing it

#

still havent

sonic goblet
wet breach
#

sounds like a corrupted archive then

river oracle
glass tangle
river oracle
#

If your against learning new things this won't end well for yoh

sonic goblet
wet breach
agile anvil
glass tangle
#

i still cant wait for java 1.9

quaint mantle
#

awesome

alpine cairn
sonic goblet
river oracle
alpine cairn
wet breach
#

Java development picked up traction when Minecraft became popular, it didn't take long from once Minecraft became popular from one year of release that we got Java 1.8

quaint mantle
agile anvil
wet breach
#

And then, even quicker before Java 9 and then 10 because 9 had too many bugs lmao

glass tangle
alpine cairn
sonic goblet
#

He made this same argument on another topic with someone else a day or two ago, just used personal experience as his definitive reason

river oracle
sonic goblet
#

Very based

quaint mantle
sterile token
#

Agree i dont know why i really get mad when ppl came for help and they dont even know the basis from Java

wet breach
#

I agree it is just an opinion until proven otherwise in regards to me saying that without Minecraft Java would probably have died

quaint mantle
#

loser

river oracle
#

Eclipse πŸ‘πŸ½based

alpine cairn
wet breach
#

but I believe Minecraft revitalized it

quaint mantle
#

@alpine cairn get intellij

sterile token
river oracle
sonic goblet
river oracle
#

Learn a skill now that you'll likely need to learn later anyways

sterile token
#

@alpine cairn get intellij x2

alpine cairn
wet breach
#

There wasn't a sudden need for Java before Minecraft

glass tangle
#

does anyone here use vscode for java

river oracle
#

Me

wet breach
#

But since MC is made with Java and the projects like Bukkit and spigot used java for plugins

#

Java need just skyrocketed

#

and then it went outwards to other things

#

not sure if Github provides a timeline in regards to languages being used

agile anvil
# alpine cairn I just want to make a few MC pluginsπŸ˜₯

I understand your point. And I think it's bad to learn java and maven in the same time. However you HAVE to use maven or graddle nowadays to use spigot. So my advice is just to stick to tutorials when using maven (without trying to understand if you don't want to), and you'll understand it better later. Everything will make sense

wet breach
#

but if they did, it probably could show the Java language just spiking between 2010-2012 time frame lmao

glass tangle
#

how it would look like to mod minecraft in lua

alpine cairn
wet breach
#

you would need a plugin to expose API's to lua and incorproate lua to make lua work since lua isn't standalone and doesn't work on its own

river oracle
#

No but intellij is more widely used

#

I prefer eclipse

#

But it's up to you

tardy delta
#

πŸŽ‰

glass tangle
alpine cairn
glass tangle
quaint mantle
tardy delta
#

4 hours sleep for college again πŸ™„

glass tangle
river oracle
#

Just use vscode like me

tardy delta
#

ill sleep in the afternoon

river oracle
#

Lol

tardy delta
#

gn yall

quaint mantle
sonic goblet
#

I wonder what the shareholder meeting was like of the CEO of Oracle trying to rationalize furthering millions of dollars of development because the kids game Minecraft was starting to take off

quaint mantle
#

Vscode only good for web dev

sonic goblet
#

How do you think they convinced the shareholders to go for it

tardy delta
#

and rust

agile anvil
quaint mantle
glass tangle
#

web development πŸ’€

tardy delta
#

what ya using then

quaint mantle
#

IntelliJ

#

Whatdya think

tardy delta
#

web dev is webstorm

glass tangle
#

hell no

tardy delta
#

if you got a licence atleast ig

quaint mantle
#

Ive never tried any of the paid ides

quaint mantle
#

but im sure thats wrong

tardy delta
#

we gotta use all the jetbrains stuff for college

quaint mantle
#

webstorm doesnt look good

#

id rather use vscode

tardy delta
#

now im going to bed lol

#

plugins and themes lol

sterile token
#

Stop arguing please

#

Stop it

tardy delta
#

stop doing weed

quaint mantle
#

Maybe i do free trial

tardy delta
#

gh student uwu

agile anvil
sterile token
tardy delta
#

github

agile anvil
#

Maybe they improved some of Java

sterile token
agile anvil
#

But the impact is like a water drop

wet breach
sonic goblet
#

What does that mean

#

When was Java not popular

glass tangle
#

adobe dreamwiener is the only paid ide i know

#

always pirate adobe software

sonic goblet
#

Leading up to 2015 show me where Java wasn’t Popular

wet breach
sonic goblet
#

Can I see some evidence

wet breach
#

had memory leaks out the wazoo its web applications sucked as well

sonic goblet
#

Cause everything I’ve seen says it was the most used still

quaint mantle
#

Im trying out webstorm

#

Gonna see if its any good

glass tangle
#

spoiler it's not

wet breach
sonic goblet
#

XDDDD

#

True dude, I’ve fallen for β€œbig oracle”

#

You’ve seen past the fog

wet breach
#

every company brags and exaggerates how much their products are used

sonic goblet
#

I’m on 3rd party sites and they’re all saying the same thing

#

Can you show me a site that doesn’t?

glass tangle
#

3 BILLION DEVICES LETS GOOO

wet breach
sonic goblet
#

…

#

I rest my case

river oracle
#

But an important question none the less

wet breach
#

the US military does not use Java

#

And a lot of other government places do not use Java as well

#

So already there is a big chunk of the market gone not using it

glass tangle
#

js -> ts, java -> kotlin?

river oracle
#

C?

agile anvil
wet breach
quaint mantle
#

RUST !!! ferrisBigBrain

river oracle
#

Kotlin is mid as hell

glass tangle
wet breach
sonic goblet
#

xd

agile anvil
wet breach
#

Yes but a good one though

glass tangle
#

i hate kotlin for calling function a fun

river oracle
eternal night
#

Java was never popular before MC because it really sucked
eyes_zoom

agile anvil
river oracle
#

Method > function

#

My mind can't be changed

#

I'm stuck in my java ways

glass tangle
#

ah yes function is method and variable is field

agile anvil
wet breach
#

Had oracle not bought Java, it also probably would have died, also since Oracle didn't see much of a way to profit from Java it remained free for private use to such an extent that once MC made it popular for those wanting to learn a programming language, and then since Java had a much larger following then it ever had, Oracle attempted to make a profit that it created such a backlash that Oracle didn't keep going with that idea for fear of losing their following as quick as they gained it lmao

glass tangle
#

doesn't android run java

river oracle
#

Don't do me like that

agile anvil
river oracle
#

Shut up shut up shut up new ideas I can't handle it

wet breach
river oracle
glass tangle
#

so why people hate java when there's c# which is kinda the same

river oracle
#

C# sucks

agile anvil
wet breach
#

c# was created when Sun Microsystems still owned Java

#

Anyways so how that happened was like so

river oracle
#

Why was c# even made its just a Java with a reskin I swear

glass tangle
#

microsoft presents java

#

oracle c#

wet breach
#

Sun microsystem allowed creating custom JVM's but to be considered an Official JVM you had to submit it to Sun Microsystems for them to test it and vet it to see if it met the criterias they created. If it passed you got a stamp from them sayings it is an Official JVM

#

Anyways, so Microsoft submitted one to them

#

they rejected it

#

Microsoft decided instead of throwing all that work away, they created C# out of it

#

so this is why C# and Java are similar πŸ™‚

river oracle
#

Now we have gross java reskin

glass tangle
#

vm languages are great for debugging

river oracle
#

Microsoft should just do the right thing and dispose of C#

eternal night
#

why hasn't everyone switched to v yet

glass tangle
#

what the fuck is v

quaint mantle
#

unstable