#help-development

1 messages · Page 735 of 1

lofty badge
#

sorry

#

bro.. i'm stupid

#

it's really worked

#

thank you ^^

lost matrix
lofty badge
#

and.. what about sit? 💀 if (command.getName().equalsIgnoreCase("sit") && sender instanceof Player) { Player player = (Player) sender; player.setMetadata("sit", new FixedMetadataValue(FluffieCraft_Commands.getPlugin(FluffieCraft_Commands.class), true)); }

lost matrix
#

For sit you can spawn an invisble, temporary armorstand and mount the player on it

lofty badge
#

i promise u, if i make this now, i won't touch you for a couple more days...

lost matrix
#

Write some code and play around. Let us know if you have something and need help.
I would strongly recommend writng a manager class for this.

echo basalt
#

?spoon

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.

thin iris
#

is yaw vertical or horizontal in spigot

echo basalt
#

horizontal

thin iris
#

whatt

#

i thought it was vertical

echo basalt
#

pitch is vertical

#

roll doesn't exist

#

well

#

Yaw is rotation in the Y axis

#

like looking left or right

#

Pitch is in the X axis

#

like looking up and down

thin iris
#

i see

sullen canyon
#

in this case just use chatgpt lol

lofty badge
quaint mantle
#

How did this developer had multiple CraftBukkit dependencies?

bronze notch
#

Hello, I'm seeing an issue with the BlockPlaceEvent. This code should get the item that was in the player's hand. In my case a single enderchest. But somehow it contains the itemmeta, but not the type:
@EventHandler
fun onBlockPlace(event: BlockPlaceEvent)
{
val item = event.itemInHand
}
DOCS of BlockPlaceEvent#itemInHand:
The ItemStack for the item in the player's hand when they placed the block

tall dragon
#

each module can have its own dependencies

#

with either maven or gradle

opaque scarab
#

Is it possible to download and install python through a plugin?

#

I’m guessing so

#

But just want that confirmed

young knoll
#

Sure

river oracle
#

otherwise things get FUNKY

opaque scarab
#

It really depends on the service

#

But I was wondering what’s more likely

river oracle
#

I'd say you probably can't since on linux you need sudo privaleges to install programs

#

which means the plugin'[s permissions would need to have been escalated

#

personally I wouldn't bundle python with your plugin it makes things to complicated just make users download python

#

maybe link to the python exe for the windows peoples

opaque scarab
river oracle
#

e..g warning in console. This plugin needs python to run download from

hazy parrot
#

Tbh I would not let plugin install binary on my system

#

Also take note that a lot of servers are containerized

sullen marlin
#

Why not use jython

#

It's python in pure java

trim lake
#

Is there way how to get block breaking time (how long it will take to break block) calculation or edit block hardness? I will probably need to calculate breaking speed manually I guess? My goal is just edit how fast block can be broken. I was thinking about edit block hardness and than calculate (like minecraft do) how long it will take to break for every tool.

#

thats what I found to. I was just thinking if there is way only to edit block hardness. But probably I will need to use that calculation. Now trying to find witch block can be harvested, is there some sort of tag on material for that?

#

perfect... that is wat Im looking for thanks a lot. So if Tag contains material it should mean it can beHarvested right?

young knoll
#

Tags are also data driven

#

Datapacks can fuck with them

trim lake
#

thats could be issiue and I will be not able to calculate that accurate.. well I will give a try and I will compare with Block#getBreakSpeed(Player) output witch should be accurate I guess

mighty mason
#

Hello. Is there any reason for this.entity to be null?

public ZooFeeAnimal(EntityType type, Location location){
        ZooFee.getInstance().getServer().getPluginManager().registerEvents(this, ZooFee.getInstance());

        System.out.println(location);
        this.type = type;
        this.entity = (Entity) location.getWorld().spawnEntity(location, this.type);
        System.out.println(this.entity);
    }
young knoll
#

Not sure what happens if you spawnEntity in an unloaded chunk

mighty mason
#

No, im actually running it on player location

#

Maybe because im typing a EntityType into an Entity?

#

Should not be an issue

young knoll
#

Is something cancelling the spawn

mighty mason
#

Nop

#

Maybe cuz im type casting from org,Bukkit.Entity to net.minecraft.World.Entity?

young knoll
#

Oh

#

Yes that would do it

mighty mason
#

Yep, it was that

#

Thanks

restive jackal
#

if all I'm doing is checking to see if an item has a specific custom tag in the nbt, is there a simple way to access it via item.itemMeta or do I need the nbt api?

young knoll
#

What version

restive jackal
#

1.20.1

young knoll
#

You should use pdc

vapid inlet
#

hi

#

Does anyone know the name of this plugin? Your head comes out and thanks you in the chat when you buy in the server store

mighty mason
#

How do i cancel a player milking a Cow? This doesnt work for me altough it should.

if(e.getPlayer().getItemInHand().getType().equals(Material.BUCKET)){
                e.setCancelled(true);

            }

echo basalt
#

You using PlayerBucketFillEvent?

mighty mason
#

How do i get the class of the entity clicked with that one?

young knoll
#

You don’t

#

It’s only designed for filling a bucket from a block

#

PlayerInteractEntityEvent should work

mighty mason
#

    @EventHandler(priority = EventPriority.HIGHEST)
    public void onInteractEvent(PlayerInteractEntityEvent e) {
        e.setCancelled(true);
    }

This code should work, right?

echo basalt
#

but not really

young knoll
#

So it does work

#

But doesn’t give you context of the entity

echo basalt
#

it only works for goats and cows

#

¯_(ツ)_/¯

#

it's weird

#

should be a dedicated event

#

pr it

#

rip backwards compat

young knoll
#

And it also just gives you whatever block is at the entities location

#

Wack

#

I mean I think the backwards compatible approach would be to add a nullable entity to the event

mighty mason
#

Even whit the PlayerInteract Event it doesnt not work

#

It doesnt cancel the event

echo basalt
#

something something you're probably not registering your listener

mighty mason
#

Im actually souting and yes, its registered

#

inside the event

#

Working on 1.20.1

quaint mantle
#

How can I expose a field using lucko's shadow?

#

I want to expose it in a getter

echo basalt
#

niche library, they don't have a support server?

quaint mantle
#

Nope

echo basalt
#

yikes 20 stars

#

that's a hard one

quaint mantle
#

I'm trying to expose CraftBlockState's world (CraftWorld) field. The idea is not having to spend that much time maintaining NMS and CBC methods

#
import me.lucko.shadow.Shadow;
import me.lucko.shadow.bukkit.ObcClassTarget;
import net.minecraft.core.BlockPosition;

@ObcClassTarget("block.CraftBlockState")
public interface BlockStateBase extends Shadow {

    BlockPosition getPosition();

    Object getWorld();
}```
#

I am not sure if it exposes correctly the world field from CraftBlockState...

mild pecan
#

Hello so I was wondering if anyone wanted to help me create a RPG based server, if you do feel free to DM me 😁

young knoll
#

?services

undone axleBOT
trim lake
#

Why are the nemuber same.. I need to get how long it will takes block to brake in ticks:

player.sendMessage("getBreakSpeed spigot: " + block.getBreakSpeed(player));
        player.sendMessage("getBreakSpeed spigot (in ticks?): " + (block.getBreakSpeed(player)*1000)/1000);
young knoll
#

You multiply it by 1000

#

And then divide by 1000

#

Which just cancels out the multiplication

trim lake
#

The number is 0.05 something so, I need how many times its need to be run to get 1, am I correct? So I just think devide thath number by 1 would be it xD

worldly ingot
#

It's the progress/tick

#

So if it's 0.05, it will be done in (20 * 0.05), about 1 second

#

(20 being the amount of ticks every second)

trim lake
#

Yeah, its progress per tick. So block will break if number reach 1. I need amount of tick what it will take

worldly ingot
#

1/speed

#

0.05 would take 20 ticks because 1/0.05 = 20

#

Then I suppose Math#ceil() the value for anything that's fractional

trim lake
#

What I want is just change hardenss of block and base on that calculate amount of time what is needed to break a block. Looks like my calculation is wrong. Base on spigot calculation it should take 18 ticks to break a block, but my results is 60 for some reason xD

#

I jused this but I get diferent results for some reason

#

?paste

undone axleBOT
worldly ingot
#

getBreakSpeed() uses those calculations automatically, if it's that number you're applying those to

trim lake
#

I will just do the calculation for new hardeness on block on my own thats probably best way?

vital sandal
#

I want to constantly update the item lore
is there any way for it to not play the reload animation?

trim lake
raw sky
#

Anyone know of a good, working, JVM spiget api wrapper?

#

is the one by inventiveTalent good? Scared that it doesnt even have a repo its hosted at

#

status errors on jitpack too

#

May be time to just make my own 🤷‍♂️ kind of a time crunch

#

Made one for hangar

noble lynx
#

Do player's have PDC's?

quaint mantle
#

Has anyone made any open source system for like per player blocks that are interactable and same for entities?

echo basalt
#

don't think mine is open source

#

and it also doesn't support tiles

quaint mantle
echo basalt
#

think I shared mine here but it's prob gone

#

heyl ook it's not

dense geyser
#

I'm moving from 1.8 to 1.20 and use a book system with chatcomponents in it which requires NMS. I force the book open in 1.8 by having the player hold the book and then using the PacketPlayOutCustomPayload packet with the MC|BOpen string and a pdc. However this no longer works, the packets constructor now takes a MinecraftKey which due to not satisfying the regex expression, cannot take MC|BOpen as a string. Does anyone know what this changed to?

minecraft:book_open
https://wiki.vg/Protocol_History

quaint mantle
#

Or would it be better to use something to edit the server jar to work?

#

kasm or whatever its called

distant wave
#

should i serialize/save permissionattachments?

small current
#

Player#setBedSpawnLocation
Should be called on death or only once on join?

lost matrix
#

Once on join should be fine. But what for?
*Just make sure to prevent them from changing it themselves.

small current
#

@lost matrix setting the respawn location

lost matrix
#

I would probably use the respawn event and teleport them to a location.

small current
lost matrix
small current
#

@lost matrix they dont

lost matrix
#

So they just respawn where they died?

small current
#

Yeah

#

All their items will go

#

And the state will be lobby

#

So they are just there in the arena

lost matrix
#

This is 100% not an issue with the RespawnEvent but the EntityDeathEvent or EntityDamageEvent

small current
#

Well, the other codes in the event gets executed

#

Like setting the state

lost matrix
#

You should look into your damage or death event methods

small current
#

@lost matrix the respawn event seems to be called

lost matrix
#

Sure, but on rare occasions you prevent it from being called by doing some shady things when a player dies

upper hazel
#

how can i solve the problem of flexible customization of placeholders? I used to think that they update on their own, but I have to manually update them in certain places. And I would like them to update themselves regardless of the location in the config. And also to bind them to certain items or conditions

lost matrix
upper hazel
#

I thought about trying to do an update system, getting values from the config and updating in each lore or placeholders text, but I don't even know if that's the best solution. DeluxMenu can also use them from other plugins no matter where in the plugin's config the Placeholder is located

upper hazel
#

without having to update them myself.

lost matrix
upper hazel
#

Don't make it PlaceholderAPI.setPlaceholder or whatever it is

lost matrix
#

*And you should use PlaceholderAPI

lost matrix
upper hazel
#

and how does deluxMenu do that

#

it goes through every place in the config and looks for a Placeholder to update it?

lost matrix
#

They use PlaceholderAPI and replace Strings

upper hazel
#

or other plugins

lost matrix
#

They use PlaceholderAPI and replace Strings

upper hazel
#

for fill it

#

in every locate in config

lost matrix
#

PlaceholderAPI is responsible for detecting placeholders in text

lost matrix
upper hazel
#

You misunderstood me, I'm talking about filling them regardless of the location of placeholder in config

#

it has to be filled out manually. Select text then check and fill in

#

and so on for every text in the config

lost matrix
#

You need to call PlaceholderAPI.setPlaceholders

#

For. Every. Single. String. You. Load.

upper hazel
lost matrix
#

If you write clean code then you really only need to write it once.

upper hazel
#

in a specific text. I have to choose the right text myself

#

it does not go through all texts in the config to fill Placeholder if it is there.

lost matrix
#

You should never replace placeholders inside a config...

upper hazel
#

you have to select the text yourself and call the code yourself to fill it in.

lost matrix
#

And whats the problem with that?

#

You can load your stuff from a config without knowing what is in your config and simply call PlaceholderAPI.setPlaceholders
for everything you load...

upper hazel
#

this code accepts text as input, how can I do this?

#

Okay I'll rephrase my question. how does DeluxMenu know where my Placeholder is in its config.

remote swallow
#

It calls that method on all strings if papi is found

lost matrix
#
Player player = ...;
String someText = ...;
String replacedText = PlaceholderAPI.setPlaceholders(player, someText);
remote swallow
#

For ease of use, make a method that takes a player and a string and returns it formatted and coloured

upper hazel
glossy venture
#

is there a way to disable bungeecord scoreboard tracking or whatever it does
its complaining about scoreboard packets

i asked in help-server but its development for my attempt at a bungeecord network so

lost matrix
#

I have the same problem with one of my plugins. Tell me if you find something.

glossy venture
#

this shit keeps happening

glossy venture
#

it used to work tho

#

but i dont know why

#

because the packets were fucked up

fair breach
#

Hey, i want to React to the event when a Cat gifts a player after waking up. But i dont know wich event that is

#

is it the EntityDropItemEvent?

glossy venture
#

why is System.out broken tf

#

very hard to debug when System.out.println doesnt fucking work

small current
idle epoch
tall dragon
#

this is more of a general java question but perhaps someone here has some insight for me. i often find myself needing to "Register" objects i often opt for then using an Enum and initializing whatever object that enum entry belongs to in its constructor. but this obviously does not support "Registering" on the fly. another option would be to use a Map<String, Object> but this would require me to remember all the ids i used to register stuff. which could be fixed by using a class full of constants storing these ids. is this the most elegant solution? any advice?

pseudo hazel
#

wdym by registering objects

tall dragon
#

well just an example, custom items. id register custom items by an ID which is also stored on the itemstack

#

so i can get its functionality

pseudo hazel
#

right

#

so the id is just like a name of the item?

tall dragon
#

kinda yea

pseudo hazel
#

I would remember those string names honestly, its by far the easiest

tall dragon
#

xy is i want to extract some of my code to an API would limits me from using enums

pseudo hazel
#

if you are being consistent it shouldnt be a problem

tall dragon
#

would you create constants?

pseudo hazel
#

you could but there is almost no point to it

#

then you have to remember the constant instead of the string name

idle epoch
#

if you're initializing the object each enum entry belongs to in the constructor then why bother using an enum at all?

pseudo hazel
#

at that point just use the name for the constant as the id

tall dragon
#

yea fair point

idle epoch
#

just have a bunch of static fields on your class and initialize statically. if you want lazy initializtion use a getter and create your object when you retrieve the field for the first time

tall dragon
#

i mean generally if i want to supply lazily id just a supplier

#

but yea u also make a valid point

pseudo hazel
#

also by using a string as the id to create/register an item your users have more options for adding items

#

like using commands and stuff or config files

fair gate
#

Hello, I know I shouldn't ask to ask, but would it be fine to ask for help with "CommandAPI" here? Or just the Brigadier command system in general?

pseudo hazel
idle epoch
#

I know I shouldn't ask to ask
at least you're self aware

tall dragon
#

alright thanks for the insight guys i uhh should probably refactor all this properly

fair gate
#

Hello. I'm now using CommandAPI for registering commands, and it seems to work great! The only problem is using it inside command blocks. Although I'm using the executes() method which should technically accept any command sender, it fails when executing the command through a command block. I simply get this as the "Previous Output" whenever I run the command. "An unexpected error occurred while trying to execute that command"

Here is the code I'm using to register the command:

new CommandAPICommand("entitycount")
    .withArguments(
            new EntitySelectorArgument.ManyEntities("entities")
    )
    .executes((sender, commandArguments) -> {
        Collection<Entity> entities = (Collection<Entity>) commandArguments.get("entities");
        int size = entities.size();
        if (entities.size() < 1) throw CommandAPI.failWithString("No entities found.");
        if (size == 1) {
            sender.sendMessage("Found 1 entity.");
        } else {
            sender.sendMessage("Found " + size + " entities.");
        }
        return entities.size();
    })
    .register();
fair gate
wraith dragon
#
PacketPlayOutMap packetPlayOutMap =
new PacketPlayOutMap(view.getId(),
(byte) 3,
emptyList(),
getColors(renderer.getBufferedImage()),
0,
0,
128,
128);

I'm using the code above but it still doesnt work :/

short pilot
#

what's the best way to sync faction data I have to a database? And what type of database could I run with the server?

#

data like players in the faction, the name, date created, claimed territory, etc

shadow night
#

If I want my commands to be able to use @a, @e, @p, etc. is there something I can use or do I need to implement it myself

chrome beacon
covert silo
#

how can i test out my changes to bukkit/craftbukkit, i have the server but idk what you're supposed to actually test if something is working in the implementation

chrome beacon
#

There should be unit tests you can run

#

If you added new api or changes you might want to write some yourself to make sure everything is working as intended

covert silo
#

i just added methods to an existing class to add more functionality, i see some unit tests, do i just find the one for my class and customize it to my needs?

quaint mantle
#

Hi , how to sell my plugins on spigotmc ?

rigid otter
#

Hello, I want to unregister my implemented Listener class. How to accomplish that?

tranquil beacon
tranquil beacon
lost matrix
lilac dagger
#

It might be a design problem, but it still is useful

#

I have a lot of my games registering and unregistering events as they are in or out of context

#

Sure i could do a check for the context

#

Which i start doing now

#

But i still like it

quaint mantle
lilac dagger
#

Yes

#

In 2 days from the requirment

covert silo
lilac dagger
#

Not sure how fast the bot refreshes thi

quaint mantle
shy forge
lilac dagger
#

But yeah, you need to be helping people on forums and stuff

#

Don't actually scam your way out of those messages

lost matrix
#

*Ignoring that rebaking the entire handlerlist can be pretty expensive

tall dragon
#

what about when you have Modules that can enable, disable independendly of your plugin.

#

those modules then having listeners

lost matrix
lost matrix
tall dragon
#

well no its not constandly. but ive considered building my own event system on top of bukkits effectively creating my own handlerlist

#

dk if its a good idea tho

#

on bukkit side the listener would then just remain registered

lost matrix
#

Thats what i mean by cleanly propagating events.

tall dragon
#

right, right

#

thats probably what il end up doing then

#

cuz using bukkit when having as many events as i am

#

is a pain too

#

i hate the listener system

rigid otter
#

Don't scare me about unregistering listeners please

#

But, my custom GUI managing class is entirely register and un-register event listeners. So far I have no problems.

eternal oxide
#

registering new and unregistering live is not a good idea

tall dragon
#

why would you need to unregister anything in a gui class

rigid otter
#

e.g. listen for clicking. then stop listening to it after the gui is closed.

eternal oxide
#

learn to use consumers/functions and you have no need to register again

rigid otter
#

It seems like building a new event listening system on top of the bukkit.

tall dragon
lost matrix
tall dragon
#

no need to unregister the whole listener for that

rigid otter
#

Oh, I'll check that modern trend

#

The GUI just discussed is my old context. Like I said above "So far...". But current context I'm working on it is trying to modularize my features on top of plugin. Any idea of it? It's similar to @shurikennen talked above.

rigid otter
#

but not independantly of plugin

#

like one plugin have several shared features.

tall dragon
#

well as i talked about. you can create your own handlerlist on top of bukkits system and propegate the events to the modules when enabled

lost matrix
#

Pakages are enough for most projects when it comes to organization. Modularizing in shirukennens way only makes sense if you want to
enable/disable modules while the game runs. Rarely usefull.

odd adder
#

Hi , is there a way to get structure saved from structure blocks into org.bukkit.structure.Structure?
Does it need NMS?

small current
#

Instead of using maps

tall dragon
covert silo
tranquil beacon
#

?nms

quaint mantle
#

so its pretty good for any scaling project

manic crown
#

Hey, I have a Question:

Is it normal, that when a Sign is loaded from Startup, and the line has for example "MyText" in it and you set it to another value (any) and then try to set it back to "MyText" it doesn't apply the text and just does nothing?

eternal oxide
#

LInes is set using a State, so you need to call an update to make a change

manic crown
#

Yea, you mean with Sign#update?

fair gate
eternal oxide
#

?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!

fair gate
quaint mantle
#

Brigadier or command api

#

Not both

#

@fair gate

#

Ideally brigadier but yea

grand flint
#

Why in intellij, when I right click src, and press new, there is no option to create a package?

manic crown
#

It's maybe because you haven't specified a Java project version, then it just tells create folder or smth like that?

grand flint
manic crown
#

Yea, then it should ask you somewhere to select a Java-Version or "load script configuration"

warm mica
fair gate
#

I am using CommandAPI. But the issue is not tied directly to commandAPI

quaint mantle
#

Just ask your question

fair gate
#

CommandAPI uses Brigadier under the hood

#

I have already, look at the message I replied to

quaint mantle
#

Yes but its designed to be completely decoupled from brigadier

#

which means in theory it could use another impl

fair gate
#

Ok

quaint mantle
#

Tho idk why u would commit to anything other than brigadier but alr lemme read

quaint mantle
#

Since the command source stack is different if its a command block entity

wraith dragon
quaint mantle
#

@fair gate id just use brig tbh, idk why you even bother with some third party thing

chrome beacon
grand flint
#

What is this error to do with?
[ERROR] [LegacyPluginLoadingStrategy] Could not load 'plugins/limbo.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: Cannot find main class `net.craft2.limbo'
This is my jar

quaint mantle
#

That’s mad copium

#

Might get you less lines

#

But debugging is harder

wraith dragon
chrome beacon
grand flint
grand flint
echo basalt
wraith dragon
#

or anything

grand flint
wraith dragon
#

to show why its not working

chrome beacon
#

not limbo

echo basalt
#

my.example.package.MyPluginClass

#

for example

grand flint
chrome beacon
#

Yeah but not in the plugin.yml

#

You put limbo instead of Limbo

grand flint
#

Thanks

halcyon hemlock
#

Hello everyone, hope your day is going great.
I want to build some kind of dependency for plugins. Like for a better command system through annotations. How can I do it so I can add that package as dependency and use it automatically? Tell me how I would automatically run reflections on the *users package. Thanks.

echo basalt
#

woeisme reflections and automatic package scanning

echo basalt
#

if I get it working within 5 minutes you owe me uhh

#

peace

halcyon hemlock
chrome beacon
echo basalt
#

hes on 1.8

chrome beacon
#

also you can save time by having plugins register their classes for scanning

#

instead of having to search every class

halcyon hemlock
#

register each class in some kind of list?

#

That's what I'm trying to avoid lol

#

I currently have a system that auto inits with reflection

echo basalt
#

that's pain

chrome beacon
halcyon hemlock
#

I just want to just make a class and it automatically works instead of cluttering my main class

#

I have a system like this

#

reflections scan every class with annotation and automatically add the command

echo basalt
#

ehh I'm not a fan of reflection-based commands honestly

#

so I won't weigh in

halcyon hemlock
#

I don't like making a new class for each command

#

or well using match statements

#

This method seems way better

pine forge
#

How can i check whether a World is the end?

halcyon hemlock
#

wait

#

let me tell you a better way

forest mountain
#

player.getWorld()

#

boom

#

then check it

halcyon hemlock
#

They're asking if it's the end

pine forge
#

how do i check it

halcyon hemlock
#

not how to get it

forest mountain
#

ye

halcyon hemlock
#

let me check it wait

forest mountain
#

then put it into an if statement

#

problem solved

pine forge
#

...

glad prawn
#

check it environment ig

forest mountain
#

get the player's world and check if it equals to the end

#

whats so hard

pine forge
halcyon hemlock
#

get biome?

pine forge
#

thats not reliable

halcyon hemlock
#

oh yeah

#

check environemnt

#

like im_tptuaasn said

pine forge
#
if(event.getWorld().getEnvironment() == World.Environment.THE_END)``` this should work i think
halcyon hemlock
pine forge
#

even though i cant find that method in the docs for some reason

pine forge
#

theres only these two but no World.getEnvironment

glad prawn
#

World extends WorldInfo so

odd adder
wraith dragon
echo basalt
#

got the board to spawn, map not rendering properly

#

might just be some wrong params

wraith dragon
#

hmmm

#

lets see

#

man the only reason im on 1.8 is because im doing this for a cosmetics addon

#

otherwise I would be on 1.20

echo basalt
#

mm okay so if I send the colors directly nms fucks it up

#

but if I render the image in the view it works

#

good enough

subtle folio
#

chat why is he making cycadelics

echo basalt
#

¯_(ツ)_/¯

subtle folio
#

lmao it actualy is cycadelics

#

if i want to caluclate every prime number up to 2^64, and wanting to use sieve's method, id need a big array

#

but arrays dont go up that high

worldly ingot
#

I mean yeah you'll probably run out of memory by that point lol

wraith dragon
#

ok

#

so I owe you a joke

#

here it goes

#

what do you call somebody with no body and no nose?

subtle folio
#

i can just store a bunch of arrays in a list

#

thats meta

echo basalt
#

nobody nose

wraith dragon
#

you actually got it....

#

Ive asked

#

probably

#

20-30 people

#

and they've all been wrong

echo basalt
#

200 iq plays

wraith dragon
#

the reason they got wrong was

#

they didnt spell it right

#

instead they put

#

nobody knows

echo basalt
#

ppl probably hate you for that ngl

wraith dragon
#

🥶🥶🥶

silent slate
#

hi, if i want to use my ban screen and not the default one, how to do that??

I ve done this:

@EventHandler(priority = EventPriority.LOWEST)
    public void onPlayerLogin(PlayerJoinEvent event) {
        Player player = event.getPlayer();

        if(player.getServer().getBanList(BanList.Type.NAME).getBanEntry(player.getName()) != null) {
            player.kickPlayer("kicked because banned");
        }
    }```

But this isnt changing anything...
sacred saffron
#

How can I get the Netty Channel of a CraftPlayer in Spigot 1.20?

lofty badge
#

guys

#

i have one problem, who can help? i have one plugin with commands, how i can check player permissions from other empty plugin?

grand flint
#

What event triggers an item frame to break if a block is placed inside it?

eternal oxide
#

physics

grand flint
uncut folio
#

i'm trying to rotate an ItemDisplay but it's refusing to update

lofty badge
lofty badge
glad prawn
#

i can't even understand your question clearly

subtle folio
#

real

young knoll
#

Alright guys I’ve got a great new idea

#

Built in api in spigot that allows you to yell at the maintainers from your plugin

zealous osprey
#

XD

#

what happened

young knoll
#

Idk I just feel like people would appreciate that

#

:p

young knoll
#

Lol

#

No no not the maintainers of the plugin, the maintainers of spigot

ivory sleet
#

oh

quaint mantle
#

is there any pathfinding engine?

#

or just best to use nms

ivory sleet
#

nms has their navigation framework

quaint mantle
#

I swear i saw one on gh but i cant find it

ivory sleet
#

which I mean might be what u want

quaint mantle
#

yeah

chrome beacon
#

Pathetic

quaint mantle
#

i think that was it

#

ty

grand flint
#

How do I deal with this?

kind hatch
#

Reload the pom

kind hatch
silent slate
#

is the event called "PlayerLoginEvent"?

grand flint
blazing ocean
#

how do I make a player glow, but only for their team?

silent slate
young knoll
kind hatch
#

There's an async one?

young knoll
#

Yes

#

You only have a uuid not a player object, but it’s perfect for querying bans

silent slate
#

but how to look for banlist then?

#

does this still work

Player player = event.getPlayer();

#

and is eventpriority.lowest best or highest?

kind hatch
#

No, you only have a UUID.

silent slate
#

how to get the player with that

kind hatch
#

You'll have to use a bukkit call to get an offline player object.
Bukkit#getOfflinePlayer()

silent slate
#

oh ok

kind hatch
#

Then you can check if they are banned, etc

silent slate
#

but what to parse in

#

how to get the uuid it returns

kind hatch
#

OfflinePlayer#getUniqueId()

silent slate
#

Player player = Bukkit.getOfflinePlayer(event);

young knoll
#

You can make a game profile from the uuid and use that with the ban list

river oracle
#

you can't just pass in the event

#

?jd-s

undone axleBOT
kind hatch
#

AsyncPlayerPreLoginEvent#getUniqueId()

silent slate
#

event.getUniqueID

#

what

#

not working

river oracle
#

there is no event to beable to pass in. Do you know java? you should probably learn more java before you make spigot plugins

#

?learnjava

undone axleBOT
silent slate
young knoll
#

Don’t bother with OfflinePlayer

#

Use profiles

silent slate
#

not saying more dont wanna get banne

river oracle
silent slate
#

i know java

kind hatch
river oracle
#

it takes 10-20 minutes to brush up on bsaic methods and such

silent slate
#

i just never worked with spigot before

#

So now, do i need to get the ID from the event or from the OfflinePlayer

young knoll
kind hatch
kind hatch
silent slate
#

well i didnt have those args in the event, mhh dont know why i didnt understand It -_-

young knoll
#

Bukkit.createPlayerProfile(uuid)

glossy venture
#

yay i love java security

young knoll
#

Nope

glossy venture
#

ima have to get getters

#

wth methdo handles

blazing ocean
#

how do I give a player the glowing effect but the glowing only gets shown for their scoreboard team?

glossy venture
#

yaya

kind hatch
#

Probs way cheaper than an OfflinePlayer object too.

young knoll
#

Should be

kind hatch
#

Yea, @silent slate use that method instead. You can get what you need out of it.

silent slate
#

buit what is this: public void AsyncPlayerPreLoginEvent(String name, InetAddress ipAddress, UUID uniqueId) {

this it says on the DOCs

kind hatch
#

What version are you making the plugin for?

silent slate
#

1.19.0

young knoll
#

That’s the constructor for the event

#

Oof

kind hatch
#

sigh this is where @since tags would come in handy.

young knoll
#

I don’t think that had the new ban api

river oracle
#

no it was added in 1.20.1 iirc

young knoll
#

Please update to 1.19.4 at least

silent slate
#

server is running on 1.19.0

#

so i make a plugin for that version

young knoll
#

Didn’t 1.19.0 have exploit issues

kind hatch
#

Who keeps their server on the major versions?

river oracle
glossy venture
#

anyone know if theres a way to get the 'unsafe' object field offset of a record component? ik java did some weird shit with them being special needs but it has to store the data somewhere so it has to be somewhere right

silent slate
#

im not the owner, im the developer making the owner happy

kind hatch
silent slate
#

prob the reason why we didnt update

#

ask the owner why no update not me

young knoll
#

I thought it was later than that

#

Imma have to look

silent slate
#

now

young knoll
#

To the (new) wiki

river oracle
river oracle
lofty badge
#

who can go to my java dev team for fluffiecraft project?

kind hatch
silent slate
#

i still dont know what event countructor to use

young knoll
#

None

#

You don't construct the event, bukkit does

silent slate
#

the thigiy

#

this

#

public void AsyncPlayerPreLoginEvent(String name, InetAddress ipAddress, UUID uniqueId) {

hazy parrot
#

Why do you need to use it

kind hatch
#

You'll probably have to use another event then.

hazy parrot
#

But that doesn't seem like constructor lol

zenith gate
#

how can i convert human entity to player?

silent slate
#

cause i wanna do custom ban screen

hazy parrot
zenith gate
young knoll
#

You don't need to construct the event

#

Just listen for it

lofty badge
#

guys..?

silent slate
#

i dont know english well, i dont care if it event or constructor or listener

young knoll
#

IIRC before the new ban api you just converted uuid to string and then checked that against the ban system

silent slate
#

i need da public void thing

hazy parrot
#

Lmao

young knoll
#

public void onPreLogin(AsyncPlayerPreLoginEvent event) {
// code
}

#

Don't forget @Eventhandler

silent slate
#

Parameter is not a subclass of org.bukkit.event.Event Compiling and running this listener may result in a runtime exception

chrome beacon
#

Show us the code

silent slate
#
public class AsyncPlayerPreLoginEvent implements Listener {

    @EventHandler(priority = EventPriority.LOWEST)
    public void onPreLogin(AsyncPlayerPreLoginEvent event) {
        Player player = Bukkit.createPlayerProfile(uuid);

        if(player.getServer().getBanList(BanList.Type.NAME).getBanEntry(player.getName()) != null) {
            player.kickPlayer("kicked because banned");
        }
    }
}
hazy parrot
#

Don't name your class like that, it's interfering with bukkit one

glossy venture
#

istg this took 5 minutes to build if i made some stupid mistake ima cry

river oracle
slender elbow
#

man

chrome beacon
silent slate
chrome beacon
#

You said you knew Java earlier ._.

young knoll
#
public class SomethingElse implements Listener {

    @EventHandler(priority = EventPriority.LOWEST)
    public void onPreLogin(AsyncPlayerPreLoginEvent event) {
        if(Bukkit.getBanList(BanList.Type.NAME).isBanned(event.getUniqueId().toString())) {
            event.disallow("kicked because banned");
        }
    }
}
#

Believe that should be it

kind hatch
river oracle
glossy venture
#

WYDM IT HAS A AGETRR

#

hwy is it privtae

silent slate
river oracle
young knoll
#

Don't use createPlayerProfile in 1.19.0

#

It won't work

#

Well it will, but you can't check bans with it

silent slate
#

ok

#

the toString is error

#

annot resolve symbol 'toString'

hazy parrot
#

That is kinda impossible

young knoll
#

I assume they don't have the () after

river oracle
kind hatch
#

Prolly syntax

young knoll
#

I edited the message

hazy parrot
#

Why my discord crash every time I open their profile lol

silent slate
#

Cannot resolve method 'disallow(String)'

hazy parrot
#

Yes

silent slate
#

cause of sound

#

that crashes mobile users

hazy parrot
#

Lmao

silent slate
#

ye

#

discord exploits

#

are fun

kind hatch
young knoll
#

Ah okay you need more than just a string

#

disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED, "whatever");

silent slate
#

ok works

#

now should i use eventpriority

#

highest

#

or lowest

worldly ingot
#

Shouldn't really need any priority

#

Default is fine

river oracle
#

meh you can just ignore it unless you're fine tuning something

worldly ingot
#

Unless you have an explicit reason to specify a priority, default will suffice

young knoll
#

Integer priorities when

silent slate
#

ok works

#

also my ban text is long sometimes if bedrock user gets banned it cuts of half

#

is normal?

young knoll
#

Probably

#

Idk how bedrock handles things

silent slate
#

geyser

#

i use geyser it java server

young knoll
#

Well yeah, but idk what bedrock allows

eternal oxide
#

use a shorter message

young knoll
#

If it can only handle so many characters geyser probably just chops it off

echo basalt
#

can't wait to see servers with resource packs send custom ban msges

young knoll
#

Would that even work

#

Does the pack unload before or after the kick screen

glossy venture
#

bro what how is objectFieldOffset throwing an IllegalArgumentException

#

which isnt even documented

manic crown
#

Hey, I have a Question:

Is it normal, that when a Sign is loaded from Startup, and the line has for example "MyText" in it and you set it to another value (any) and then try to set it back to "MyText" it doesn't apply the text and just does nothing?

young knoll
#

Only at startup?

manic crown
#

when the sign has been loaded and not freshly placed

eternal oxide
#

what?

manic crown
#

but it's only for that specific text

eternal oxide
#

a non placed sign has no text

echo basalt
#

or somn

glossy venture
#

Unsafe doenst check access im pretty sure

mellow edge
#

is there any class I could cast the World into or smth to respawn ender dragon like the player would

glossy venture
#

i found this ini the jdk source code though

#

which seems to be where its coming from

manic crown
# eternal oxide a non placed sign has no text

no, I mean, on a fresh sign you can set the text to anything you want but when it was loaded from serverstart or reload if you change the text and change it to the same value it was on load, it doesnt do it

eternal oxide
#

No one understands what you mean settign it from server start

manic crown
#

if the sign was already there

eternal oxide
#

when are trying to set it?

glossy venture
manic crown
#

when needed

eternal oxide
#

you are too confusing to understand

glossy venture
#

lmao

eternal oxide
#

setting a sign text works anytime so long as the chunk is loaded

#

your settings may be overwritten if you do it in an event though

manic crown
#

imagine following thing:

  • There is a sign in the World with the text "HelloWorld"
  • The server starts now
  • You change the text to "HelloWorldFun"
  • Wait for a few Seconds
  • You want to Change it back to "HelloWorld" <- This text was on loading on the Sign and does not update to this new "old" value

with Sign#setLine(i,text)
Sign#update

glossy venture
#

oh my days how is it still failing

eternal oxide
#

what you describe is the correct way to set text so the error must be in the way you are doing it

manic crown
#

no, it works perfectly fine with every text except for that text that was on the sign on startup

eternal oxide
#

without code we can go no further as what you are describing should be impossible

glossy venture
#

of course i manage to fuck shit up this bad

young knoll
#

What on earth are you doing

manic crown
# eternal oxide without code we can go no further as what you are describing should be impossibl...

example code:

public void sign(Location l) {
  BlockState state = l.getBlock().getState();
        if (state instanceof Sign sign) {
            new Thread(() -> {
                try {
                    sign.setLine(0, "foo");
                    Bukkit.getScheduler().runTask(plugin, () ->{
                        sign.update();
                    });
                    Thread.sleep(1000);
                    sign.setLine(0, "bar");
                    Bukkit.getScheduler().runTask(plugin, () ->{
                        sign.update();
                    });
                    Thread.sleep(1000);
                    sign.setLine(0, "foo");
                    Bukkit.getScheduler().runTask(plugin, () ->{
                        sign.update();
                    });
                    Thread.sleep(1000);
                    sign.setLine(0, "bar");
                    Bukkit.getScheduler().runTask(plugin, () ->{
                        sign.update();
                    });
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }).start();
}

Place a sign at the location, no text
call the method
now the text is "bar" at the end
now Reload/Restart the Server
now call the method again
now it will only display the "foo1" and "foo2"

young knoll
#

You never call .update

#

Pretty sure you need to do so to change the text properly

manic crown
#

that was code written now in seconds

#

used it in my code

young knoll
#

Okay well show us your actual code

eternal oxide
#

changing sign text from a seperate thread is not safe

quaint mantle
#

Do worlds have pdc

eternal oxide
#

yes

manic crown
# eternal oxide changing sign text from a seperate thread is not safe

this is what my code actually looked like:java public void sign(Location l) { BlockState state = l.getBlock().getState(); if (state instanceof Sign sign) { new Thread(() -> { try { Bukkit.getScheduler().runTask(plugin, () ->{ sign.setLine(0, "foo"); sign.update(); }); Thread.sleep(1000); Bukkit.getScheduler().runTask(plugin, () ->{ sign.setLine(0, "bar"); sign.update(); }); Thread.sleep(1000); Bukkit.getScheduler().runTask(plugin, () ->{ sign.setLine(0, "foo"); sign.update(); }); Thread.sleep(1000); Bukkit.getScheduler().runTask(plugin, () ->{ sign.setLine(0, "bar"); sign.update(); }); } catch (InterruptedException e) { e.printStackTrace(); } }).start(); }

eternal oxide
#

ItemStacks, Entities, World and Chunk

undone axleBOT
ivory sleet
#

is all I can say

#

dont need to use thread sleep and create a new os mappable thread

quaint mantle
#

instead of creating thread

#

Its addtional cost

manic crown
#

it's just for showing purposes

#

normally I use Schedulers

#

I know how they work, dont worry

ivory sleet
#

well your code looks silly, but alr thats good

eternal oxide
#

We need to see your actual code not what you think we need to see. What you descible should not happen so the fault has to be IN your code.

manic crown
#
@Override
    public void update() {
        Bukkit.getScheduler().runTaskLater(DuelWarper.getInstance(), () -> {
            AdventureUtil.broadcast(Component.text("Updating sign (" + lines.size() + ")"));
            for (int i = 0; i < lines.size(); i++) {
                List<ValuePair> line = lines.get(i);
                Component component = Component.empty();
                for (ValuePair valuePair : line) {
                    component = component.append(valuePair.merge(this));
                }

                sign.setLine(i, AdventureUtil.serialize(component));
                AdventureUtil.broadcast(Component.text("Set line " + i + " to ").append(component));
            }
            sign.update(true, false);
        }, 1);
    }```
glad prawn
#

is that Paper? 🤨

eternal oxide
#

what does your debug output show?

manic crown
manic crown
eternal oxide
#

debug the lines

#

the error is probably in your List

manic crown
#

The Value is the Value that is Correct, as I said, if you execute the earlier code, with only that text, this will not work correctly either

faint tide
#

hey, i dont like resorting to discord but i cant seem to find any info about this. My plugin uses a resourcebundle with about 6 language files in it. is it possible to physically generate these property files so players have access to them and maybe make changes?

mellow edge
#

ok so I am really consfused, how can I get instance of DragonBattle if I don't even know how to get an existing EnderDragon instance except for spawning it. Do I check for entity list in the end dimension?

eternal oxide
manic crown
#

Just try it, you`ll see :D

eternal oxide
#

a reload/restart would make no difference

manic crown
#

maybe it is only on 1.19.4

manic crown
eternal oxide
#

were double sided signs added in 1.19?

manic crown
#

1.20 I think

eternal oxide
#

I can;t test it myself at teh moment

manic crown
#

I can record a video if you like

#

and send it via onedrive

young knoll
#

Discord can support videos

manic crown
#

thats why onedrive

lofty badge
#

who can write plugin for mee?

young knoll
#

You can just shove the mp4 in discord

manic crown
#

if it is not too big yes

young knoll
#

Server is boosted so I think you can do 100mb without nitro

manic crown
#

ohh, okay

lofty badge
shadow night
eternal oxide
lofty badge
eternal oxide
#

permission plugins also have prefix

kind hatch
#

LuckPerms has support for that.

lethal coral
#

how does spigot do offline player ip bans if said offline player has never joined before

shadow night
lofty badge
shadow night
shadow night
#

Ip?

lethal coral
#

ip ban

#

do they wait for said offline player to join

#

then save ip

shadow night
#

Maybe

lethal coral
#

then any player that joins from that ip

shadow night
#

Or uuid

lethal coral
#

cause that's the only way I can think of it

lethal coral
shadow night
#

They just save uuid as if it's a normal ban or they may wait for the user to join

#

But who knows

#

Any experts here?

manic crown
young knoll
#

bad code!

lofty badge
manic crown
eternal oxide
#

You have full control over all permissions and prefix in all permission plugins

odd lark
#

Hello, do you know how from the interaction with an item I can suggest an order to the user?

I thought about doing the same as with the TexteComponent but that is not the solution

createButton(Material.SPYGLASS, "§r§6Recherche §8(Pas disponible)", SEARCH_BUTTON_SLOT, viewer -> {
    viewer.closeInventory();
    new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/viewreport ");
});
lofty badge
eternal oxide
#

interact via Vault

#

then you can use any permission plugin

kind hatch
kind hatch
young knoll
odd lark
young knoll
#

You can't

#

You can make them run commands, but you can't suggest commands from an inventory click

lethal coral
kind hatch
young knoll
#

Wat goin on with bans

kind hatch
#

Figuring out what happens when you ip ban an offline player who hasn't ever joined.

young knoll
#

How ya doing that

lofty badge
#

it's bad idea? public static void Init() throws ClassNotFoundException, SQLException { conn = null; Class.forName("org.sqlite.JDBC"); conn = DriverManager.getConnection("jdbc:sqlite:plugins/FluffieCraft/FCG/players.s3db"); statmt = conn.prepareStatement("CREATE TABLE IF NOT EXISTS players (name TEXT, groupID INT, prefix TEXT)"); statmt.executeUpdate(); }

young knoll
#

Doesn't the IP ban system take an INetAddress

kind hatch
#

It does internally

#

Spigot lets the string input be either a player name or an IP address.

young knoll
#

Okay but that is deprecated for a reason

#

Unless this is old ban system

lost matrix
lofty badge
# lofty badge it's bad idea? ``` public static void Init() throws ClassNotFoundException, S...

also i have: ``` public static void addUser(String name, int groupID) throws SQLException {
statmt = conn.prepareStatement("INSERT INTO users (name, groupID) SELECT ?, ? WHERE NOT EXISTS (SELECT 1 FROM users WHERE name = ?)");
statmt.setString(1, name);
statmt.setInt(2, groupID);
statmt.setString(3, name);
statmt.executeUpdate();
}

public static int getID(String name) throws SQLException {
    int fvalue = 0;
    String query = "SELECT groupID FROM users WHERE name = ?";

    try (PreparedStatement statement = conn.prepareStatement(query)) {
        statement.setString(1, name);
        ResultSet resultSet = statement.executeQuery();

        if (resultSet.next()) {
            fvalue = resultSet.getInt("groupID");
        }
    }
    catch (SQLException e) {
        throw new RuntimeException(e);
    }

    return fvalue;
}

public static void setNewGroupID(String name, int newID) throws SQLException
{
    statmt = conn.prepareStatement("UPDATE users SET groupID = ? WHERE name = ?");
    statmt.setInt(1, newID);
    statmt.setString(2, name);
    statmt.executeUpdate();
}```
young knoll
#

Still doesn't hurt to use afaik

kind hatch
slender elbow
#

yes but no

#

should be using ProfileBanList or IpBanList

#

to make the compiler happy

young knoll
#

Yeah there are subclasses

slender elbow
#

and the server :trollface:

young knoll
#

The generics for the ban system are kinda weird

manic crown
young knoll
#

Technically doesn't do much for sqlite

#

But still nice

lofty badge
#

my test command crashes, ``` @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (command.getName().equalsIgnoreCase("setgroup") && sender instanceof Player) {
Player player = (Player) sender;
String name = args[0];
int groupID = Integer.parseInt(args[1]);

        try {
            if (Database.getID(name) == 0) {
                player.sendMessage("Player");
            }
            if (Database.getID(name) == 1) {
                player.sendMessage("Admin");
            }
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }

    return true;
}```
quaint mantle
#

Lol

#

I mean you need to check the bounds of the indices you access

lofty badge
#

guys

lofty badge
# lofty badge guys

if i make this in plugin.yml, will luckperms work? randomteleport: aliases: [rtp, randomtp, randomteleport] permission: fluffiecraftcommands.randomteleport

quaint mantle
#

Yes

lofty badge
#

than i don't need groups plugin

lost matrix
lofty badge
quaint mantle
#

No not really

#

I mean a database is more optimal

#

But a flatfile storage implementation works fine

#

Assuming you implement is correctly ofc lmao

lost matrix
#

The amount of online players is no argument. Loading/Saving data needs to be done async either way.
You should use Files if this is your only argument.

quaint mantle
#

I mean there are some problems with flat files

lofty badge
quaint mantle
#

You dont get any good migration and other things u might wna have like analysis stuff

lofty badge
drowsy cosmos
#

When extending Enchantment class for a CustomEnchantment, is there any method I could use to somehow trigger an effect on hit?

For example, I'd like to make an enchantment that can inflict poison, or slow effect to target on hit.

Is it possible to embed the on hit effect inside CustomEnchantment, or do I need to make a separate Listener instead? Thanks.

lost matrix
lost matrix
slender elbow
#

wise insight

lofty badge
drowsy cosmos
lost matrix
tacit drift
mellow edge
#

why doesn't that respawn the ender dragon if there is no ender dragon?

     World world = Bukkit.getWorld("world_the_end");
     DragonBattle dragon = world.getEnderDragonBattle();
     dragon.initiateRespawn();
young knoll
#

The crystals need to be placed

#

If you are in a modern spigot version you can use initiateRespawn(null);

mellow edge
#

ok

short pilot
#

how can we run a sqlite database with the server

grim hound
#

What packet is now used instead of PacketPlayOutPlayerInfo?

hazy parrot
#

can you describe problem ur having

winter flower
#

I use the function Bukkit.getScheduler().runTaskTimerAsynchronously() and I want it to somehow cancel itself from inside the runnable itself, I saw the answer of adding it to a variable and cancelling that variable with it's id but you can't access a variable from inside itself.

hazy parrot
#

i believe you can use consumer overload

#

runTaskTimerAsynchronously(task -> task.cancel())

winter flower
#

got it, I'll try that

winter flower
grim hound
shadow night
#

I want to make a kit system where you can customize kits using an inventory and name kits using the anvil ui, how do I? I have no idea of how something like that works

#

how do I like open a fake chest inventory and how do I know when something is happening in it

grim hound
#

InventoryClickEvent

#

Bukkit.createInventory

#

Player#openInventory

winter flower
#

could've taken you 2 seconds lol

shadow night
winter flower
shadow night
#

hmm

onyx fjord
#

how do i get started with learning non regular shape regions

#

with X amount of points

#

how do you calculate that?

grim hound
# shadow night hmm

record your Player#openInventory in a Set<UUID> and remove at InventoryCloseEvent

#

the uuid's of players

shadow night
#

rn as I'm looking at this

#

I'm too lazy to do it, but thanks

#

maybe in the future

grim hound
glossy venture
#

genuinely how

chrome beacon
#

old code running

quiet ice
shadow night
quaint mantle
#

Ok so I’m listening for packets like player move and stuff wondering if canceling that and canceling block placing does dtuff on the client and if I need to send back another packet

#

With protocollib

young knoll
#

Have you tested it

distant wave
#

how can i use JsonWriter to write serialuzed Map<String, Object>?

upper hazel
#

how i can create this?

#

stats in paper

#

or map

#

how this

#

this hard?

young knoll
#

Not really

#

There's a map api, and it lets you put text on maps too

upper hazel
#

this 1 map or?

chrome beacon
#

No

#

there is one map per block

upper hazel
#

Do I need to put my own text on each map?

young knoll
#

^ in item frames

#

Yes you’ll need to handle the text

#

And splitting it across maps

upper hazel
#

end always update this?

young knoll
#

Yes

upper hazel
#

I feel like this will take a lot of resources

#

item in in frame this block or

#

ssomething other?

#

map

#

for exemple

young knoll
#

What

upper hazel
#

item in frame this

#

block

#

or item

#

i can save item, paste in frame end update him?

young knoll
#

Sure?

upper hazel
#

how can i update the map in the frame ? Or rather, get it

#

i need get block

#

or save item end use it

young knoll
#

You can save the frames uuid and get it from that

#

You can probably also just hold the item refrence

upper hazel
#

That's why I'm asking if the Item in the frame is an "Item" or a block.

young knoll
#

Item

upper hazel
#

oh nice

young knoll
#

Item frames hold items

upper hazel
#

I've heard that you can create client maps

#

this true?

scenic onyx
#

how i can get block distance of "private Location to, from;"

worldly ingot
#

to.distance(from)? :P

#

If you don't want diagonal distances then Math.abs(to.getX() - from.getX()) + Math.abs(to.getY() + from.getY()) + Math.abs(to.getZ() + from.getZ())

young knoll
#

Wow no api method for that?

worldly ingot
#

I mean it's a rather trivial method

young knoll
#

So is distance :p

worldly ingot
#

You're welcome to PR blockDistance() :D

young knoll
#

taxiDistance

#

Spawns a taxi to calculate it

worldly ingot
#

👀

young knoll
#

Wut

upper hazel
#

I found a very good code to study how do you think if I study it completely and understand it my programming knowledge skills will improve?

upper hazel
#

NMS and importing some weird bukkit libraries that I don't know.

scenic onyx
#

yes

#

gg bro

#

spero ci rivedremo

upper hazel
# remote swallow practice

I've been practicing for two years, but I don't feel like a professional. There's no criteria for judging

#

you mean contradictory standardts?

#

how sonarList

remote swallow
#

a lot of what i know is just from seeing other people giving help

upper hazel
#

i want try undestand this code

#

so many folders

remote swallow
#

looks like a normal project with nms

upper hazel
#

end imports

#

this plugin do animations lol howw

#

just update map?

young knoll
#

Just keep sending map packets with different contents

upper hazel
#

I'm also wondering if it's optimized

#

how i was read this plugin do "client maps"

#

but you not can just do with client

#

smt

young knoll
#

What

upper hazel
#

I just look at such projects and I wonder how people say that bukkit api is so simple.

remote swallow
#

bukkit is simple compaired to some projects

young knoll
#

Tbf that doesn’t use much Bukkit

ripe moat
#

I'm trying using MySQL in my plugin. Anyway, i tried the link jdbc:mysql://localhost/neostats, but i just get a long error and can't connect to the database

#

yes i used the right password and username

upper hazel
#

I know the simple things that allow you to manipulate the game, but these NMS

undone pebble
upper hazel
#

wait, maybe there are 2 maven in the project?

young knoll
#

Yes

#

You can have multiple modules