#help-development

1 messages · Page 285 of 1

solemn meteor
#

Oh does it?

#

so all I need is to make the class TabExecutor and remove the TabCompleter part?

jagged monolith
#

Remove the getCommand("chud").setTabCompleter(new CoordinatesHUDTabExecutor());

solemn meteor
#

alright

rough drift
#

Should I make the tab api synchronized? (only on main thread), or should I just support multiple threads editing it?

quaint mantle
#
package me.pulsesapphire.firstplugin;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class BlockBreaks extends JavaPlugin implements Listener {
    @EventHandler
    public void BlockBreakEvent(Block brokenBlock, Player player){
        final String playerName = player.getName();
        final Location brokenBlockLocation = brokenBlock.getLocation();
        String position = brokenBlockLocation.getBlockX() + " " + brokenBlockLocation.getBlockY() + " " + brokenBlockLocation.getBlockZ();
        Bukkit.broadcastMessage(playerName + " broke " + brokenBlock.getType() + " at " + position);
    }
}```
#

i am trying to look send a message in chat when a player breaks a block.

#

This is the code i wrote so far but it gave me an error when i tried running it on the server.

remote swallow
#

thats not how to write a listener

#

?event-api

undone axleBOT
small current
#

How can i prevent ghost items in my gui

#

Whenever i click a ghost item appears

remote swallow
#

the ghost items are pretty much all client side so there isnt really much you can do

small current
#

I dont see it always happening in othet gui plugins

remote swallow
#

wheres the ghost item

#

on the cursor or in the inv

small current
#

In my cursor

remote swallow
#

you could try and set the cursor to null

small current
#

Lemme try

#

Thanks

#

It worked

quaint mantle
#

how do i find event function names? like onPlayerJoin() and onBlockBreak()?

remote swallow
#

normally they are called BlockBreakEvent or PlayerJoinEvent

quaint mantle
#

those are the class names though of the event objects.

remote swallow
#

@EventHandler
public void onBlockBreak(BlockBreakEvent event) {
    event.doSomething();
}
#

that is without registering the listener

quaint mantle
#

so just get rid of 'event' and prefix 'on'?

#

is that the convention of spigot plugins?

remote swallow
#

onBlockBreak can be anything

#

thats custom

quaint mantle
#

oh

#

ok

#

oh got it!

#

appreciate the help!

remote swallow
#

the BlockBreakEvent in the parenthesis should be which event you want

quaint mantle
#

Oh ok!

remote swallow
#

also make sure to register your events

quaint mantle
#

yep.

sage patio
#

How i can place a block with face direction?

jagged monolith
#

Most likely using the BlockFace enum

dawn hazel
#

My ocd when unreadable code 🤬

rotund ravine
#

There’s also rotational

dry yacht
#

I'd personally just call it at, otherwise I like it! :)

undone axleBOT
hushed pawn
#

i want to spawn schematic, and than despawn it, did anyone know methods?

lethal knoll
lethal knoll
hushed pawn
#

there is no info how to despawn

lethal knoll
#

But what you mean with despawn?

remote swallow
#

remove all the blocks?

lethal knoll
#

You should keep track of where you placed hte schematic

#

And remove the blocks

#

^^^^

hushed pawn
#

remove all blocks

remote swallow
#

if you already have the schem you could make a copy of it with all air, then just paste that over the old one

lethal knoll
#

Yes, so just keep track of the 2 corner locations

remote swallow
#

otherwise you would have to work out a bounding box

lethal knoll
hushed pawn
lethal knoll
#

Follow the tutorial

hushed pawn
#
SchematicFormat.getFormat(schematic).load(schematic).paste(session, new Vector(0, 200, 0), false);
#

i do that thing but how to get corners?

lethal knoll
#

Not too sure, you might have to iterate over all the blocks in the clipboard and fetch the corners yourelf

#

Okay, so let me ask the all knowing AI lol

#
// Load the schematic from file
File schematicFile = new File("path/to/schematic.schematic");
Schematic schematic = MCEditSchematicFormat.getFormat(schematicFile).load(schematicFile);

// Paste the schematic at the specified location with the `false` option set
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1);
WorldEdit.getInstance().getPasteFactory().createPaste(schematic).to(editSession, new Vector(x, y, z)).ignoreAirBlocks(false).paste(false);
#

so by setting false, it would remove it again the AI say's

#

not too sure if this is reliable

#

so I ssume that x y z represents the exact location of where the schematic was pasted

#

then WE does the rest for you

hushed pawn
lethal knoll
#
// Load the schematic from file
File schematicFile = new File("path/to/schematic.schematic");
Schematic schematic = MCEditSchematicFormat.getFormat(schematicFile).load(schematicFile);

// Paste the schematic at the specified location
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1);
WorldEdit.getInstance().getPasteFactory().createPaste(schematic).to(editSession, new Vector(x, y, z)).ignoreAirBlocks(false).paste(true);

// Remove the schematic from the world
editSession.remove(schematic.getRegion());
grand wren
#

Spigot Server Build Failure

small thistle
#

Hi, would a kind soul be able to point me in the right direction on where to begin with adding a permission to craft my custom item?

#

The results that I'm finding are from 2015 or earlier and seem to be outdated. Thanks in advance

vague swallow
#

check if the player has the permission if(player.hasPermission("your.permission.path"))

#

and then log the permission in the plugin.yml

#
permissions:
  your.permission.path:
    default: op
small thistle
#

something like if (recipe === custom item) check for permission permission.example then allow or disallow based on permission

#

I'm currently looking at the event.getRecipe() but I think this is the wrong one

sage patio
#

How i can set block face to south or smth else in 1.12.2?

opal juniper
#

use the Rotatable Interface

sage patio
#

what is that

undone yarrow
#

Is it possible to change a mobs behaviour, or perhaps even add custom behaviour to a model/armorstand (such as a custom mob following you around and it attacking specified mobs. Basically a wolf but with more custom behaviour)?

quaint mantle
#

hi

#

how do i iterate through all 16 colors of wool blocks?

#

i am trying to make an array of blocks with all 16 colors of wool.

#

how can i do it?

undone yarrow
quaint mantle
#

i know that

#

but how do i generate the array?

#

instead of manually typing out each color?

#

anyway to iterate all colors?

undone yarrow
#

Hmm good question. In this case I think it'd be easier to just type it out 🤷‍♂️

#

there are only 16

quaint mantle
#

ok.

undone yarrow
#

it might be possible though, but not that I know of

undone yarrow
quaint mantle
#

also

#

the Material class represents the type of item a block is, right?

#

like wheat_seeds or diamond swords or grass blocks, right?

#

if i got that correctly?

tardy delta
#

ye

dry yacht
tardy delta
#

do you have java experience?

quaint mantle
#

i know java, yep.

#

i making a 1.19.2 plugin.

undone yarrow
quaint mantle
#

i am making a small minigame.

vague swallow
# undone yarrow Is it possible to change a mobs behaviour, or perhaps even add custom behaviour ...

In this episode, I talk about how to spawn a custom mob naturally into your world! It is very simple, just uses an event but you need to make sure you code it correctly or lag may occur. When making the "spawning chance" I recommend making it very low however, this ultimately depends on the mob! I hope you all enjoy this video, many more coming ...

▶ Play video
tardy delta
#

just make a list with all of the wool colors in

#

Arrays.asList like

dry yacht
tardy delta
#

or that, didnt even know wool had a tag too

#

kinda stupid that specific tools dont have a separate tag too

dry yacht
sage patio
#

i learned coding spigot from that guy

quaint mantle
vague swallow
sage patio
vague swallow
#

agreed

quaint mantle
#

how does spigot run on paper?

undone yarrow
vague swallow
quaint mantle
#

by that i mean, how well does spigot run on paper?

vague swallow
quaint mantle
#

ok

dry yacht
tardy delta
#

paper is a fork of spigot so all spigot plugins should work on paper

tardy delta
#

ah floating point division

humble tulip
#

000000000001

tardy delta
#

when using a float as divider it only becomes worse: 0.12300000106915832

#

could also use a double but then i have overflow after around 10 digits behind the comma

humble tulip
#

Can i see current()?

dry yacht
tardy delta
#

17

dry yacht
#

That loop label got me good, haha

tardy delta
#

otherwise it breaks the switch and not the loop so cant do anything else

dry yacht
dry yacht
tardy delta
#

ok thought i'd have overflow but no

subtle folio
tardy delta
#

one dark

subtle folio
#

ew

humble tulip
tardy delta
#

then dont ask it

subtle folio
#

haha

round finch
#

*asked

humble tulip
#

Did you compare times between those?

tardy delta
#

Double.parseDouble is slow

dry yacht
undone yarrow
#

Why does this not work?```
@EventHandler
public void onXPBottleBreak(ExpBottleEvent event){
Block block = event.getHitBlock();
block.breakNaturally();

}``` event.getHitBlock() always returns null (it also didn't work in the tutorial)
tardy delta
#

and it tests for a bunch of things like NaN which i dont need

subtle folio
humble tulip
#

Did you compare to your method?

#

Ah ok

tardy delta
#

ye i did, forgot how much slower it is actually

undone yarrow
hushed pawn
#

why worldEdit spawn schematics witch are exact same size with the same code in 2 different places?

SchematicFormat.getFormat(schematic).load(schematic).paste(session, new Vector(20, 64, 0), false);
quaint mantle
#

You need to null check it

#

return if null

undone yarrow
#

how will that solve the issue

#

it will just prevent it from giving an error

tardy delta
#

all parser i tested seem to have the same rounding issues

undone yarrow
#

but it won't fix the thing will i

chrome beacon
round finch
#

if it doesn't return null everytime
null check is the option

tardy delta
#

6.5*7.8^2.3 + (3.5^3+7/2)^3 -(5*4/(2-3))*4 + 6.5*7.8^2.3 + (3.5^3+7/2)^3 -(5*4/(2-3))*4 + 6.5*7.8^2.3 + (3.5^3+7/2)^3 -(5*4/(2-3))*4 + 6.5*7.8^2.3 + (3.5^3+7/2)^3 -(5*4/(2-3))*4 guess why

quaint mantle
dry yacht
#

Has nothing to do with the parser, at all.

undone yarrow
#

fine

hushed pawn
tardy delta
#

ye ik it just sucks

quaint mantle
#

Idk what you're trying to achieve but you always have to null check something that can be null, that's how it works lol

undone yarrow
#

Like this? public void onXPBottleBreak(ExpBottleEvent event){ if(event.getHitBlock() == null) return; Block block = event.getHitBlock(); block.breakNaturally();

chrome beacon
#

If you spawn two of the same sized structures with the same code and they're the same size

#

then there is no problem

tardy delta
#

Optional.ofNullable(event.getHitBlock()).ifPresent(Block::breakNaturally) :)

undone yarrow
#

what the heck is that

tardy delta
#

the short and weird way

undone yarrow
#

Can you explain what it is?

chrome beacon
hushed pawn
tardy delta
#

wraps a nullable thing and executes a consumer when its present lol

undone yarrow
#

right...

dry yacht
quaint mantle
#

oooh

tardy delta
#

lemme guess that jit will optimize it

hushed pawn
# hushed pawn i thought one will replase another, but they spawn like with 3 blocks offset

   static public void spawnFinish(Location loc) {
        try {
            EditSession session = worldEdit.getWorldEdit().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorld("world")), 999999);
            File schematic = new File("plugins/WorldEdit/schematics/finish.schem");
            SchematicFormat.getFormat(schematic).load(schematic).paste(session, new Vector(20, 64, 0), false);


        } catch (DataException | IOException | MaxChangedBlocksException e) {
            throw new RuntimeException(e);
        }
    }

    static public void despawnFinish() {
        try {
            EditSession session = worldEdit.getWorldEdit().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorld("world")), 999999);
            File schematic = new File("plugins/WorldEdit/schematics/voidfinish.schem");
            SchematicFormat.getFormat(schematic).load(schematic).paste(session, new Vector(20, 64, 0), false);
        } catch (DataException | IOException | MaxChangedBlocksException e) {
            throw new RuntimeException(e);
        }
    }
tardy delta
#

whatever, thre are people who code like that

dry yacht
tardy delta
#

just in time compiler

#

glad you didnt ask 'whos joe'

hushed pawn
#

bru

chrome beacon
#

Schematics save the relative position where you are when creating them

chrome beacon
#

A normal if statement

chrome beacon
#

To the schematic

dry yacht
dry yacht
chrome beacon
#

0, 0, 0 in a schematic is one of the corners

tardy delta
#

hot meaning thats its called often enough or smth

dry yacht
#

Ah, you mean the "JIT optimizer", so to say. Alrighty. But still, it first has to get hot. Why make it hot, if you can just do != null. I think that's just wrong.

tardy delta
#

probably 2nd time it runs it will be considered hot

#

got the same thing for my parser

#

a simple '1+1' executes in 12000µs without taking jit into account, second time that becomes a magically 30µs or smth

undone yarrow
dry yacht
#

Are we really starting to get into the age of brainless coding because our machines get smarter than the average programmer? Ouch.

quaint mantle
#

Yeah just say if its null return;

chrome beacon
#

You can't return null if the return type is void

dry yacht
chrome beacon
#

Just keep that in mind

undone yarrow
tardy delta
#

ok not 12000 but whatever :)

dry yacht
undone yarrow
#

k

rotund ravine
chrome beacon
#

Change that last block to hitBlock

rotund ravine
jade roost
#

how do i give items to player on join?

quaint mantle
rotund ravine
#

What he said

hushed pawn
dry yacht
quaint mantle
tardy delta
rotund ravine
quaint mantle
#

Damn

#

Money grabbers man

undone yarrow
rotund ravine
#

I paid some onlyfans chick and she didn't even pose without bikini. Very dissapointed.

undone yarrow
#

...

dry yacht
undone yarrow
tulip drift
#

Hello, no matter how hard I try I cannot use craftbukkit dependency. I have run buildtools and it has generated the jars.
I am using maven for my dependencies. Even when i add the craftbukkit dependency manually as a jar with systempath it still doesn't allow me to import anything from craftbukkit.

Does anyone know how to help me?

chrome beacon
#

Don't depend on CraftBukkit

dry yacht
rotund ravine
chrome beacon
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

chrome beacon
#

Also this ^^

tulip drift
#

I should have mentioned im using 1.8.8, and I need craftplayer to try and remove arrows stuck inside players

drowsy helm
undone yarrow
dry yacht
chrome beacon
quaint mantle
undone yarrow
#

break the block which the expbottle hit

dry yacht
undone yarrow
#

...

quaint mantle
#

Why you using expevent then? Or am i tripping

tulip drift
#

need help importing craftbukkit using maven dependencies 1.8.8 (sending again to create a thread)

undone yarrow
quaint mantle
#

ohh i see

#

Send code again

dry yacht
quaint mantle
#

how do i get the overworld dimension?

dry yacht
quaint mantle
#

World overworld = getServer().getWorld("overworld");
is this going to work?

#

whats your world called

chrome beacon
#

if you have a world named overworld yes

quaint mantle
#

"world" probs

chrome beacon
#

Otherwise no

quaint mantle
#

i need the overworld.

tardy delta
#

Bukkit.getWorlds().get(0)

quaint mantle
tardy delta
#

0 is always overworld, 1 is nether and 2 is end and all others are custom worlds

quaint mantle
#

the world folder is named "world".

chrome beacon
#

It's called world by default

#

then use getWorld("world")

quaint mantle
#

then put world in the string args

#

okay.

undone yarrow
# quaint mantle Send code again

@EventHandler
public void onXPBottleBreak(ExpBottleEvent event){
if(event.getHitBlock() == null) return ;
Block block = event.getHitBlock();
block.breakNaturally();

}
quaint mantle
#

Any new errors?

#

World overworld = getServer().getWorld("world").get(0);

undone yarrow
quaint mantle
#

the get() method is red.

quaint mantle
#

oh ok.

chrome beacon
#

Don't combine the two

tardy delta
#

Bukkit.getWorlds().get(0), Bukkit.getWorlds() returns a list of all worlds on the server

#

get(0) gets the first one remember

quaint mantle
#

oh ok.

undone yarrow
#

that's the issue

#

event.getHitBlock()

#

it just returns null

#

every single time

quaint mantle
#

put null check after the block variable declaration and check if block == null

tardy delta
#

testing smth new is always fun

quaint mantle
#

How do you know its returning null did you debug?

undone yarrow
#

I-...

#

I'm just going to go

dry yacht
#

Wait, I'll send you a solution in a second

#

proguard just eliminated my events as unused code and I was wondering why the heck nothing works, damn dude

#

need a better conf

remote swallow
#

been as yesterday using player#damage would crash the server then this

dry yacht
#

Why the hell can't i paste code into the chat bar without it being ruined... Stupid ass app.

dry yacht
chrome beacon
quaint mantle
#

He wants natural drop

dry yacht
#

Oh, didn't read that

chrome beacon
#

Depends on what your goal is with that task

dry yacht
#

Well, not that hard either once you got the right event

quaint mantle
#

I think he gave up anyway

#

rip

chrome beacon
#

Then onEnable is fine

undone yarrow
#

Ill give it a test

undone yarrow
dry yacht
undone yarrow
chrome beacon
#

Personally I think the block is just null so the code isn't running

dry yacht
chrome beacon
#

I've seen you discuses this for a while now but you haven't actually checked if it passes the null check

dry yacht
dry yacht
undone yarrow
#

Sorry, didn't mean to come over that way. I was just a bit pissed because everyone asked the same question 10 times over. Thanks for helping, I appreciate it a lot 🙂 I'll share the code in the comments of the video (the dude who made the vid also wasnt able to get it working)

chrome beacon
#

Sounds like a Spigot bug if it's always null

#

?jira You can report it here

undone axleBOT
dry yacht
undone yarrow
chrome beacon
#

ExpBottleEvent extends ProjectileHitEvent

#

So it would supprise me if the event fired is the same instance passed to different listeners

dry yacht
chrome beacon
undone yarrow
#

Well I wasn't talking about just you lol. But I get it, the chat can get cluttered

dry yacht
#

Here's your reason

#

The API's confusing as hell tbh.

#

So this is intended, don't file anything, btw.

chrome beacon
#

It's still an improvement you can still create an issue

#

or make a PR

undone yarrow
chrome beacon
#

It's always null in the spigot code

dry yacht
# undone yarrow I don't get it

When they call the event in CraftBukkit, they use the constructor (ThrownExpBottle, int), which internally calles the super-constructor of the ProjectileLaunchEvent, as every ExpBottleEvent is a ProjectileLaunchEvent, because it inherits from it. But that super constructor invokes a constructor of the ProjectileHitEvent where the block as well as the thrower have null as their default values.

undone yarrow
#

ahh alright

tardy delta
#

why cant java do defaults args like in kotlin or c++ smh

dry yacht
#

No idea why you wouldn't call the event with it. Seems like a weird decision to me.

chrome beacon
#

That's not Mojmaps

dry yacht
#

Who cares about mappings?

chrome beacon
#

It's called HitResult in Mojmaps

#

So yes that appears to be the information required

ivory sleet
#

Mojmaps are nice tho

dry yacht
#

I just grep -rni around within the build tools folder, not really thinking much about anything, just want to get my information.

chrome beacon
#

If making a PR was easier I would have fixed that

#

Doesn't seem like a hard thing to fix

#

Yes, use the spawn method that takes a consumer

#

(modify the armor stand in the consumer)

spice shoal
vague swallow
#

I applied a wither effect to a player but it doesn't damage the player, does someone know why?

quaint mantle
#

loc

#

Ooc

spice shoal
#

ooooooc

quaint mantle
#

What is loc

spice shoal
#

idk wdym

quaint mantle
#

Object oriented concepts

#

bros repeating OOC like the guy knows what he's talking about lol

#

No

#

I mean the other guy

#

He's asking what you mean

#

You're just repeating "OOC" lol

dry yacht
#

@humble tulip Was it you that I shared my proguard conf for shrinkification with? Because there's an important update, xD.

humble tulip
#

Nah

kind patrol
dry yacht
#

Okay, weird.

#

Cant seem to remember who it was, hahaha, hopefully they're not using it.

humble tulip
#

W

#

T

#

F

dry yacht
spice shoal
undone yarrow
vague swallow
#

Does anyone know why this:

player.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 2, 3, true, false, false));

adds the effect but doesn't damage the player?

fluid river
#

is wither supposed to damage player

#

oh true

undone yarrow
#

Wither: "
Deals damage to an entity over time and gives the health to the shooter."

dry yacht
chrome beacon
undone yarrow
#

oh right thats it

dry yacht
#

Yep, it's in ticks, so at least a multiple of 20 i'd say, for you to see it

undone yarrow
#

duration is in ticks, not seconds

fluid river
#

ticksamount

undone yarrow
#

But usually wither is given to a player by a different entity (or the other way around) so now there's no entity to gain the health taken away from the player

#

perhaps that can cause problems, but Im not sure

fluid river
#

?tas i guess

undone axleBOT
remote swallow
#

?jav17 dont mind this

#

?java17

undone axleBOT
fluid river
#

?jd-b

#

?jd-s

undone axleBOT
remote swallow
#

?jd-bcc

fluid river
#

bruh

remote swallow
#

?jd-bc

fluid river
#

?di

undone axleBOT
dry yacht
#

The bot gets a run for it's money today, huh

fluid river
#

lez go

#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

fluid river
#

?paste

undone axleBOT
dry yacht
fluid river
#

))

undone axleBOT
#

ntm#1234 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.

fluid river
#

truuuue

#

forgot about this one

#

?ask

undone axleBOT
#

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

fluid river
#

another one

remote swallow
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

#

ntm#1234 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.

remote swallow
#

love notworking

fluid river
#

which other commands are present

undone axleBOT
fluid river
#

i guess we listed most of them

undone axleBOT
fluid river
#

oh

remote swallow
#

do ?cc list in #bot-commands

fluid river
#

oh

ivory sleet
#

Guys this is not a command spam channel

fluid river
#

why

remote swallow
#

it is

#

also no one needs help so its fineeeee

ivory sleet
#

That’s not how it works

fluid river
#

jar

remote swallow
#

im gonna get banned

ivory sleet
#

Good tack

undone yarrow
ivory sleet
#

Dont think the bot works in threads

undone yarrow
#

lets try

tardy delta
#

no

ivory sleet
remote swallow
#

spigotcraft is just our shitposting channel

undone yarrow
#

k it doesnt work in trheads

humble tulip
#

Is there anyway to send a bytebuf as a packet?

undone yarrow
vague swallow
undone yarrow
ivory sleet
#

Its not supposed to work here also afaik

dry yacht
# humble tulip Is there anyway to send a bytebuf as a packet?

Not sure what you mean. A packet by definition has to travel across the network, so you can only send bytes. It would be best to destruct the ByteBuf into it's real byte[] before sending and reconstructing it at the receiver's endpoint. If you're talking about the client, there's a plugin message packet which offers you a way to transmit raw bytes.

undone yarrow
#

?cc list

#

oh

#

it only works in #bot-commands

quaint mantle
#

this.getCommand("blockparty").setExecutor(new CommandBlockParty());

#
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "me.pulsesapphire.firstplugin.MainClass.getCommand(String)" is null
        at me.pulsesapphire.firstplugin.MainClass.onEnable(MainClass.java:19) ~[FirstPlugin-1.0-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-307]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:422) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:306) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-307]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
dry yacht
humble tulip
#

Make sure the command is in your plugin.yml

quaint mantle
#

oh ok.

#

where is plugin.yml?

chrome beacon
#

Depends on how your project is setup

quaint mantle
#

its running a paper server.

dry yacht
chrome beacon
#

Since you don't know where it is I assume you used the Minecraft Development Plugin for Intellij to create your project

remote swallow
#

server type doesnt mean project setup

quaint mantle
#

Anyone know how to get working placeholders on your own scoreboard? I parse them in game and they work but on my scoreboard they don't?

chrome beacon
dry yacht
chrome beacon
#

?paste

undone axleBOT
dry yacht
quaint mantle
#

My own scoreboard

#
commands:
  blockparty:
    description: Creates a block party game.
    usage: /<command>
    permission: FirstPlugin.operator```
#

is this looking right?

chrome beacon
quaint mantle
dry yacht
quaint mantle
#

i am trying to make it so that only a player with /op can run the command

quaint mantle
humble tulip
quaint mantle
#

um

chrome beacon
ivory sleet
quaint mantle
#

did i get the thing above correct?

chrome beacon
#

ofc it isn't working

quaint mantle
remote swallow
quaint mantle
#

I have placeholders...

humble tulip
remote swallow
#

you need to use PlaceholderAPI.setPlaceholders

quaint mantle
#

They work in game when i /papi parse me

quaint mantle
chrome beacon
remote swallow
#

you just use CC.translate

quaint mantle
#

I have a seperate class for them of course

quaint mantle
#

Okay so i need to set as placeholder

#

Will do

chrome beacon
#

PlaceholderAPI won't magically change strings for you

quaint mantle
#

should it be /<command> or do i have to put the command name there?

ivory sleet
#

In ur plugin.yml

permissions:
  firstplugin.operator:
    default: op
chrome beacon
#

You need to tell it to replace placeholders

ivory sleet
#

basically saying, this permission will be by default inherited to all OP players

dry yacht
quaint mantle
#
permissions:
  firstplugin.operator:
    default: op

commands:
  blockparty:
    description: Creates a block party game.
    usage: /<command>
    permission: firstplugin.operator```
dry yacht
humble tulip
#

Nah

quaint mantle
#

should the usage be /<command> or /blockparty>?

humble tulip
#

Just wanted to know if it's possible

remote swallow
#

<command> just shows the command

quaint mantle
#

okay

chrome beacon
quaint mantle
#

kk

dry yacht
quaint mantle
#

um

humble tulip
#

Send a packet but without creating a packet object

quaint mantle
#

i am still getting an error.

chrome beacon
humble tulip
#

I know

#

I want to write the packet myself

dry yacht
#

io.netty Channel#writeAndFlush can write Objects, you'd need to inject the player using my code to gain this type of direct access. But again, you need to modify the client or it'll either crash or drop the packet.

tardy delta
#

ah right you cant extend records \😢

humble tulip
#

To a bytebuf

quaint mantle
#
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "me.pulsesapphire.firstplugin.MainClass.getCommand(String)" is null
        at me.pulsesapphire.firstplugin.MainClass.onEnable(MainClass.java:19) ~[FirstPlugin-1.0-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-307]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:422) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:306) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.19.2.jar:git-Paper-307]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-307]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]````
humble tulip
#

And send it

chrome beacon
#

So you're making custom packets?

humble tulip
#

Nope regular packets

chrome beacon
#

What's the point of rewriting them?

quaint mantle
dry yacht
humble tulip
#

The chunk packet

quaint mantle
#

?paste

undone axleBOT
dry yacht
#

You just spammed away my message with your mile long stacktrace, haha :,D.

#

This is why pastes are preferred.

quaint mantle
humble tulip
#

I'd like to send modified chunks to certain players by sending a chunk packet

chrome beacon
#

So use the vanilla one

humble tulip
#

But using mc to send a chunk packet is slow

remote swallow
dry yacht
# quaint mantle sorry!

All good, just wanted you to understand the reason of pastes, rather than to just tell you to use them.

chrome beacon
#

Your chunk packet isn't going to be faster

#

You will still need to follow the exact same format containing the same information

#

and the client will process it in the same way

humble tulip
#

Lol yes but i won't have a lock on the palette

#

To modify it

tardy delta
#

nah records are final classes, forgot that

#

its stupid

quaint mantle
humble tulip
#

The problem is modifying the chunksection is slow

#

Not writing the packet

chrome beacon
#

And what plugin.yml are you changing

quaint mantle
#

the one in the resources folder

tardy delta
#

how does it make sense, immutable data carier ok i understand that

quaint mantle
#

OH

#

i was using the one in the orange resources folder lol!

chrome beacon
#

ah yeah that's the wrong one

#

The target folder is the output from when your plugin is built

quaint mantle
#

yay, the command works!

dry yacht
ivory sleet
#

Fourteen, don’t forget that they’re not only immutable data carrier, but also transparent

subtle folio
#

Can I use spring boot in a spigot plug-in ?

chrome beacon
subtle folio
#

To host a rest api

chrome beacon
#

Yes you can do that

chrome beacon
tardy delta
#

they should make record classes to avoid writing a bunch of fields and getters

#

meanwhile lombok 😬

subtle folio
chrome beacon
subtle folio
#

yeah no not for me

#

I use JPA

#

never will i ever 😂

#

even rust is better than go

ivory sleet
#

Just read the jep fourteen

#

That says everything

tardy delta
#

mmmh

ivory sleet
#

Well sort of zacken

tardy delta
#

which one tho

ivory sleet
#

395

#

In this case transparency as in that for all terms X of record type T, all fields are known for X

#

If we suppose T is non final, a subtype S could presumably add additional fields

#

And that’d remove the transparency

tardy delta
#

got it, its still annoying tho

ivory sleet
#

So you’re gonna become a lomboker?

tardy delta
#

i dont dare

ivory sleet
#

🥲

tardy delta
#

ill see

chrome beacon
#

Lombok is fine tbh

dry yacht
tardy delta
#

probably in the future

ivory sleet
#

Mye, just dont find its usefulness personally

tardy delta
#

annotations just look brr

chrome beacon
#

I usually use @Data

ivory sleet
#

Ah

chrome beacon
#

Basically a record thing

#

but for older java

tardy delta
#

i always find it confusing when you find just a few annotations instead of a class' impl

ivory sleet
#

Yeah, sounds like kotlin data classes

chrome beacon
#

I've also used @Delegate

rotund ravine
tardy delta
#

that comes in handy

rotund ravine
ivory sleet
tardy delta
#

is there a way to specify what methods to delegate or does it just delegate everything?

remote swallow
#

does anyone use intellij on linux and know if i can access other storage devices in the file browser thingy

ivory sleet
#

Kotlin + lombok must be a death sin then

chrome beacon
remote swallow
#

i cant access the other partition on my ssd or my other hdd

rotund ravine
#

since kotlin already does everything lombok does

tardy delta
#

maybe try pasting it the path in the box above?

remote swallow
#

idk what its location would e

#

be

chrome beacon
#

I don't use it very often either

#

Just when I really need it

#

I usually write my own getters and setters

tardy delta
#

@remote swallow you can

#

accessing my windows ssd

#

just do /media

remote swallow
#

ah its /media

#

thanks

tardy delta
#

ye i was thinkign about /dev/sda whatever too

remote swallow
#

do you ever just open all of your intellij projects at once to have them available to use

tardy delta
#

no

#

i have 2 projects open at most

ivory sleet
remote swallow
#

im most likely never gonna use them all at once or most again

#

i just like having them there

#

so incanse i need them

remote swallow
ivory sleet
#

It was maybe 10 or less

tardy delta
#

my pc once crashed when i opened a txt file optic sent me with a few thousand lines and it tried rendering it 🤔

remote swallow
ivory sleet
#

But yeah, that was a year ago

#

IntelliJ is probably more optimized now

remote swallow
#

ive just opened 43 projects

#

and my computer is fine

#

it seems

tardy delta
#

just why

ivory sleet
#

Yeah lol

remote swallow
#

so i can open them if i need them in the future

hushed pawn
remote swallow
#

might need code out of them

tardy delta
#

bruh just open them when you need them

ivory sleet
#

Just have it on github?

#

And browse the code there

tardy delta
#

or open the whole project structure on vsc

#

ya

remote swallow
tardy delta
#

💀

remote swallow
ivory sleet
#

Lol

ivory sleet
remote swallow
#

i could upload the entire folder but meh

tardy delta
#

you cant be a git noob for that

ivory sleet
#

Well, you are a developer so I assume laziness is prevalent in you

remote swallow
#

if you ask me to code something thats fun ill do it in an hour

tardy delta
#

imagine having discipline

remote swallow
#

everything else i need atleast 4 working days

tardy delta
#

i got out of my bed at 11am this morning

ivory sleet
#

Havent for some months

#

But used to swim, and go to the gym

#

18 now

tardy delta
#

:o

#

didnt know we were the same age

ivory sleet
#

Yea

#

Gymnasium?

#

Teknik

#

Or like technology whatever

#

Ye

#

Epic

#

Ah

chrome beacon
#

Nice

quaint mantle
#

games.put(name, new BlockParty(x, y, z, length, width, sender.getServer().getWorld("world")));

#

public static HashMap<String, BlockParty> games;

tardy delta
#

whats with the world

compact haven
ivory sleet
#

Or well it points to null

#

So using any method on it, games.someMethod() results in an exception

#

You’d have to assign it to some value, probably a HashMap

compact haven
#

mfw they only post code but no error

tardy delta
#

exposing maps hehe

chrome beacon
compact haven
#

and also explicit typing of HashMap

#

:(

tardy delta
#

and static abuse

#

basically my first plugin

compact haven
#

🤣 so true

grand magnet
#

I have a question. Why is the player name not displayed in the desired color in the tablist? This is my code

compact haven
#

why do I feel like there’s a better way to do that

#

oh that’s because there is :C

tardy delta
#

💀

tardy delta
#

oh i remember again, my first plugin was an ode to static abuse

compact haven
#

mate hasn’t learnt about lists or arrays yet

#

it’s like so funny in my hs coding classes how they teach stuff like that late

#

and you end up seeing like 20 variables each numbered

tardy delta
#

oh we learnt about arrays like 4 weeks ago in college 💀

#

we learnt the arraylist before

compact haven
#

they taught lists before arrays?

#

💀 in Java?

tardy delta
#

arraylist ye

compact haven
#

that’s just too funny

tardy delta
#

it was so stupid, using lists where a map should be used

compact haven
#

mfw arraylist is just an expanding array

grand magnet
#

Can someone help me?

tardy delta
#

no

#

?ask

undone axleBOT
#

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

compact haven
#

oh fourteen

#

he did ask

#

we just mocked him first

tardy delta
#

If you have a question, please just ask it.

#

hmm

compact haven
#

he’s the scoreboard dude

#

with the 14 copies

chrome beacon
compact haven
#

instead of a list and loop

tardy delta
#

ah wait he asked first and then asked if someone could help

dry yacht
tardy delta
#

maybe try creating a method dude

chrome beacon
#

They even taught basic Swing before learning how to read and handle stacktraces

tardy delta
#

whats spring

chrome beacon
#

mb

#

Spring is for web stuff

#

I meant Swing

compact haven
#

honestly I can’t with coding classes, that’s such a problem

#

how do you teach a library before the actual language

tardy delta
#

ah in the beginning of the year they showed us some graphical stuff and then said oh we arent gonna tackle that this year 💀

chrome beacon
#

I'm not sure if anyone actually understood how the stacktraces work

tardy delta
#

a few people of my class cant even properly write a class

#

and im just bored in class

dry yacht
compact haven
#

I’ll be going into ap csa next year (Java class)

#

can’t wait to see how that’s taught 😏

tardy delta
#

lol

chrome beacon
dry yacht
chrome beacon
#

A few of us started web dev and they're completely lost with js

#

It's back to the basics

compact haven
#

tbf I can only imagine what Swing stacktraces look like

#

probably a shit ton of internal methods

compact haven
#

correct

dry yacht
#

That would suck, actually

chrome beacon
#

Well if you're generating actual code you can't bypass that

#

So normal reflection is required

hearty wedge
#

Here is my code in spigot 1.16.5 :

package best.lahuiss.linkedinventory.listeners;

import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.scoreboard.Team;

import java.util.Set;
import java.util.UUID;

public class InventoryListener implements Listener {
    private void syncInventories(UUID id, Set<OfflinePlayer> targetPlayers) {
        Player initPlayer = Bukkit.getPlayer(id);
        Inventory inv = initPlayer.getInventory();
        for(OfflinePlayer player : targetPlayers){
            initPlayer.updateInventory();
            //Bukkit.getServer().broadcastMessage(initPlayer.getInventory().getContents().toString());
            Player p = (Player) player;

            p.getInventory().setContents(initPlayer.getInventory().getContents());
        }
    }
    @EventHandler
    public void onItemPickup(PlayerPickupItemEvent e){
        Player p = (Player) e.getPlayer();
        p.updateInventory();
        UUID uuid = p.getUniqueId();
        Bukkit.getPlayer(uuid);

        Team team = Bukkit.getScoreboardManager().getMainScoreboard().getTeam("bleus");
        Set<OfflinePlayer> players = team.getPlayers();

        syncInventories(uuid,players);
    }
}

It's sensed to be a listener that listens to every change in an inventory and sets the content of the inventory to every people in the team "bleus". But every change is offbeat ; for example, if player 1 gets a diamond block, the inventory of player 2 is empty, then when player 1 gets an emerald block, player 2 gets the diamond block but not the emerald block. How can I fix that ?

fluid river
#

why is there so much unused code

compact haven
#

my guess is that it’s a cancellable event and it’s dispatched before the inventory object is updated

#

you can put it into a schedule if u want

fluid river
#

just sync inv 1 tick later

dry yacht
#

First of all, I'd advise a few code changes to you in order to clean the code up and not perform unnecessary actions, but the reason is simple: The pickup event is called before the inventory is actually modified in order for you to have a chance to cancel pickup. Delay the code in the event by one tick (runTask on Scheduler) and your problem should be solved

quaint mantle
#

is paper multithreaded?

compact haven
#

negative

fluid river
#

is java multithreaded

compact haven
#

only chunk generation iirc

quaint mantle
#

is each command run in its own thread, asynchronously?

compact haven
#

is it?

fluid river
#

AsyncPlayerChat comes in

opal juniper
#

nope

#

only chat really

quaint mantle
#

okay.

compact haven
#

forgot about the chat event kekw

#

There might also be an async player join event

#

iirc, but I’d not take my word for it

#

that’s what I meant

spring minnow
#

Would this change the compass direction with only That Compass?

#

because the player.setCompassTarget changes it for every compass

#

i would it only with that one

dry yacht
# quaint mantle is each command run in its own thread, asynchronously?

Packet I/O happens asynchronously, but bukkit often times synchronizes to the main thread in order for you to not have to do so before - for example - manipulating the world. I'm sure commands are parsed asynchronously and then the executor is invoked within the main thread. If you want async commands, you need to listen to the AsyncPlayerChatEvent (or whatever it's called), cancel it and continue to operate out of that async context.

dry yacht
fluid river
#

well, im quite sure this code won't work

#

cuz modified itemmeta is not set back to an item after that

compact haven
#

this

dry yacht
fluid river
compact haven
#

null

fluid river
#

ArrayIndexOutOfBoundsException

#

😎

compact haven
#

throw

fluid river
#

new

compact haven
#

Throwable

remote swallow
#

Exception

fluid river
#

Cloneable

compact haven
#

Compilation error

fluid river
#

MAVEN BUILD ERROR --

compact haven
#

Cloneable not of type Throwable

compact haven
fluid river
#

😭

#

Error: A JNI error has occured...

dry yacht
#

The hardcore version of that would be to intercept the PacketLoginInStart and just close the pipe without any warning if they're banned, lol.

fluid river
#

JREE FAVA LESSONS

fluid river
compact haven
#

I actually never used the JNI before

#

🤔

#

well, directly at least

fluid river
compact haven
#

Can you invoke JNI manually? Is that like a thing

fluid river
#

like this one

fluid river
#

you can call a JNI method of course

compact haven
fluid river
#

you just do System.loadLibrary(...) and run an associated native method

compact haven
#

interesting, will need to fuck around with that someday

fluid river
#

and well, code a .dll on c++ 64bit

#

to work with this method

#

i have a guide to hello world somewhere on my telegram java channel

#

native version

compact haven
#

I’ve never used telegram before 😂

fluid river
#

no worries, my channel is on russian anyways

compact haven
#

ah ic

fluid river
#
public class JNIExample {

    static {
        System.loadLibrary("exampleLib");
    }

    public native void helloWorld();
}```
```java
public class MainClass {

    public static void main(String[] args) {
        var jnie = new JNIExample();
        jnie.helloWorld();
    }

}```
```cpp
// c++: some generated shit after you run javac -h
tardy delta
#

what kind of exception do you get when you call a native method that isnt implemented?

vale ember
#

iirc UnsatisfiedLinkError

tardy delta
#

ah

vale ember
#

Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.

fast sedge
#

help?

#

anyone

#

can anyone say how this fix this multiscreen pls

#

I dont know most of hidden controls of IntelliJ

#

@ancient plank

#

@crimson jasper If you can?

#

@wild nexus ?

#

@mossy loom

#

?

#

Sorry for the Ping but.

ancient plank
#

Don't ping random people/staff for development help @fast sedge

fast sedge
#

Sorry

rotund ravine
#

What a disgusting theme

wild nexus
rotund ravine
#

Press view and look at the settings

fast sedge
#

Ok thanks

austere wave
#

Hello, I have this error when I try to call a kotlin class from a java file

Could not initialize class me.keano.azurite.coins.EconomyKt

wild nexus
remote swallow
#

or just close the apps onthe right

fast sedge
#

I am just new to IntelliJ , Cause I used Eclipse.

fast sedge
analog vapor
#

Ok so this might be a weird question, I wanted to make a quick plugin that would give me data when I input something, just that

rotund ravine
analog vapor
#

So I am totally new and totally understand spoonfeeding is illegal

fast sedge
analog vapor
#

is there any help I could get?

rotund ravine
remote swallow
#

?spoon is the reason

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

analog vapor
rotund ravine
analog vapor
#

Ah no worries 😅, I am newbie but I am in urgent help atm, I also have exams but I cant let the server I work for down

ancient plank
#

The multitasking experience

rotund ravine
ancient plank
#

The multitasking experience

rotund ravine
#

Whatever

analog vapor
#

The multitasking experience

analog vapor
austere wave
#

Does anyone know how to fix it?

rotund ravine
#

Where is that at

#

like do you build it properly

#

etc.

analog vapor
# remote swallow depends on what

well it is supposed to be a simple minecraft mod where you input a number and get an output number as I can make the parameters to be

Like in the image below, if I enter 450, I want output to be P20 and Degree 45

austere wave
remote swallow
#

plugins are made with the spigot api

analog vapor
#

aw man

remote swallow
#

fabric or forge?

rotund ravine
austere wave
analog vapor
austere wave
#

Kotlin is configured in the project

remote swallow
rotund ravine
analog vapor
rotund ravine
#

fabric is great

#

hf with it

ocean hollow
#

hi guys, can you help me?

rotund ravine
undone axleBOT
rotund ravine
#

@ocean hollow we need more context than those two lines.

analog vapor
rotund ravine
olive lance
#

is there a way to tell which version of spigot a plugin was compiled on?

ocean hollow
#

now it doesn`t have errors👍

rotund ravine
olive lance
#

is there no way to get jre 19 without the jdk?

#

default jre download is 8

rotund ravine
#

there is no reason to download it seperately

olive lance
#

why wouldnt there be any reason?

rotund ravine
#

@olive lance Why would there be a reason with the newer java features?

olive lance
#

i thought the jdk was only for development, is it required for running compiled code too?

rotund ravine
#

@olive lance The JDK includes a JRE.

olive lance
#

yeah, i mean all it is is wasted space if youre not going to use the jdk unless im wrong about that

serene sigil
#

hi, i have a question: how do you make a loop that starts whenever u open an inventory and stops when u close it?

obsidian drift
#

Is there a way to set Player.getItemInUse

#

and make it null

jade roost
#

how do i get a player's skull (heads)?

obsidian drift
#

Using SkullMeta

remote swallow
#

add a variable outside of that that can be set by 2 locations

#

in that scheduler check if the var is false

#

if it is cancel it but on the first run set it to true

river oracle
#

Use a map uuid bukkit task to track session

#

Make sure it's emptied on inventory close

serene sigil
river oracle
#

You don't know how to make a hashmap?

serene sigil
#

no, i mean..

river oracle
#

Bukkit schedulers return BukkitTask variables just add them to the map with the p l ayers uuid

serene sigil
river oracle
#

Yeah but make it private static final

serene sigil
#

ok

river oracle
#

Also you might beable to store task ids look into that if you can just store the task Id

ocean hollow
#

Can I somehow refer to the collection by index?

river oracle
#

Yeah that's how you get things from a collection lol

serene sigil
river oracle
serene sigil
#

okay

river oracle
#

Highlighted portion returns BukkitTask

serene sigil
#

yes

ocean hollow
serene sigil
#

but like what do i put in here

river oracle
undone axleBOT
serene sigil
remote swallow
#

how else do you add things to hash map

river oracle
serene sigil
#

oh now i understand

#

bruh my brain

#

ok

river oracle
#

👍🏽

tulip drift
#

Using 1.8.8 how can I make a player punch/swing their hand.
On newer versions there is a player.swingMainHand() function.
However on older versions I think you have to send an nms packet, how can I do this and what packet do I send?
Thanks in advanced

river oracle
#

You won't recieve good support for legacy versions please update you can mimic the api with plugins

tulip drift
#

thats what im asking, how do I work out which packet to send?

river oracle
#

?1.8