#help-development

1 messages ยท Page 733 of 1

upper hazel
#

who know why this error exists in my console? java.lang.NoSuchMethodError:

lost matrix
upper hazel
#

I changed the version of my api but it is loaded on the site

young knoll
#

?stacktrace

undone axleBOT
upper hazel
#

i was think problem with dependanc

#

but

lost matrix
young knoll
#

Okay so me.galtap.galtapautomine.settings.MineSettings.loadMineData(MineSettings.java:66) is trying to run me.galtap.galtapcustomranks.core.RankManager.getRankFromId

valid burrow
#

okay i might shouldve checked the console..

upper hazel
#

"You are most likely called jarhell. This is a confusion with library dependencies. Most often, this error occurs when the classpath application considers the same libraries with different versions during implementation. Or a group of libraries that should be the same version, but for some reason their version does not match. In such cases, the search class usually helps, which is used by the program throughout the entire project (including) and the analysis of libraries (jars) in which this class appears. We also carefully read pom.xml/build.gradle/where-you-have-described-the-dependencies on the library control object." - find this

#

i have in repos siteseveral versions my api

#

cuse not can delete my old versions

lost matrix
#

Stop with that gibberish pls

young knoll
#

Make sure the right version of both plugins are on the server

#

And make sure you are doing a fresh start and not a reload

upper hazel
lost matrix
#

And dont shade other plugins

upper hazel
#

how i undestand

#

need off my server

young knoll
#

If you are having issues

#

The first step is to read the stacktrace

#

The second step is to restart the server if you have been using /reload

upper hazel
#

i just was need off server

ivory sleet
#

its not identical

#

but somewhat yes

#

cuz u have like walk speed for instance

#

and then thats just the velocity at that given time

young knoll
#

I mean move event has from and to

#

I would assume so

shy forge
#

Does anyone know how I can set the tab executor of a BukkitCommand I don't have registered through plugin.yml? For context, here's what I'm trying private void registerCommand(@NotNull final Command command) { this.getServer().getCommandMap().register("PLUGINNAME", command); Objects.requireNonNull(this.getServer().getPluginCommand(command.getName())).setTabCompleter(command); }
BTW, my Command object extends BukkitCommand and implements TabCompleter

lost matrix
#

*Depending on your TPS. But it most cases its about 1/20th.
You could also average over 3-5 ticks if you wanted a smoother reading.

echo basalt
#

it's still a lerp

young knoll
#

no

#

Before you ask, yes it has been suggested

#

and yes it has been denied

echo basalt
shy forge
lost matrix
#

You shouldnt need it that accurate. Just assume 1/20th

echo basalt
#

PluginCommand has

shy forge
#

Yeah but at what point do I have access to the PluginCommand instance?

echo basalt
#

I just create mine with reflections

#

Because it's uhh

#

package private

shy forge
#

Wait, how are you creating an instance and registering it?

echo basalt
#

Reflections

valid burrow
#

?paste

undone axleBOT
valid burrow
echo basalt
#

code

valid burrow
#

not really sure why it happens

echo basalt
#

rules = (List<List<String>>) plugin.getConfig().getList("rules");

#

wtf is this

#

And how is your config formatted

valid burrow
#

a List containing another list

#

oh waitz

#

conmfig yh

echo basalt
#

Something tells me that's just read as a string list

valid burrow
#

im sure it works because i used before somewhere else

echo basalt
#

I'd just do like

#
rules:
  whatever:
  - ...
  whatever2:
  - ...
#

and you just loop through all keys

young knoll
#

Nah we need more nested lists

#

kek

valid burrow
#

okay but how can i make it work cause otherwise i need to change like alot

#

like alot alot

#

there gotta be a way i can get my nested list to work

#

List<List <String>> correctAnswers = readCorrectAnswersFromYAML(triviaName);

#

i used it like this before

#

in a discord bot

#

that worked just fine

echo basalt
#

Then copypaste it

valid burrow
#

i cant

#

cause

#

uh

#

well

#

i cant just read the yml file myself can i

#

im kinda stuck using config.getList

shy forge
# echo basalt Reflections

Could you pls explain a bit more? I'm familiar with reflection but IDK how it's supposed to help me turn a BukkitCommand instance into a PluginCommand one

echo basalt
#

you simply don't use BukkitCommand

#

you make a class that impls both CommandExecutor and TabCompleter

#

And you make a plugincommand

shy forge
echo basalt
#

Make one with reflections and register it normally

#

It's trivially simple

shy forge
#

The "normal" way is #Plugin.getCommand()...

#

At least for me

echo basalt
#

The syncCommands method is used when registering commands after the server has started

civic apex
#

how can I write JUnit tests for methods that also log/broadcast using bukkit calls

#

ideally i'd just ignore those methods/use a mock method (like System.out.println) for when its run as a test

young knoll
#

MockBukkit might be able to handle that?

civic apex
#

ill look into it

smoky oak
#

is there a way to check if a server is running cracked so that i can purposefully crash my plugin

young knoll
#

You can check if it's in offline mode, yes

#

But:

  1. It may just be behind a proxy
  2. That may be considered malicious
smoky oak
#

if i have to pay so do they

young knoll
#

Well

#

We can find out

smoky oak
#

yall literally refuse to help cracked cuz its cracked

#

but boycotting it aint allowed?

vagrant stratus
#

Potentionally malicious code != boycotting

smoky oak
#

i meant my plugin not the server

#

yea i did say that

#

why wouldnt i be allowed to be like 'doesnt work, sorry mate'

vagrant stratus
#

Yes, if your plugin contains that code then it could be considered malicious.
If malicious, the plugin gets removed and you get banned

smoky oak
#

i mean i could understand if it's about premium resources but I'm talking in general here
what's considered malicious about a plugin disabling itself?

lilac dagger
#

You're disabling everyone behind a bungee like too

young knoll
#

You can check that

#

Idk how reliable it is though

quaint mantle
#

ProtocolLib, what's the right packet for entity movement<

solid matrix
#

Looking for someone who can make resource packs dm me for recurring commissions (need someone who can put together a resource pack in the next 6 hours) already have all the content and stuff (Need to be able to work with MythicMobs and ModelEngine

young knoll
#

?services

undone axleBOT
echo basalt
#

oh hi sean

winter flower
#

Is there a way to have custom player heads on block displays? The way I used to modify block display blocks was using

display.setBlock(Material.PLAYER_HEAD.createBlockData());

But I can't seem to find a way to make it a player head with custom texture?

prime reef
#

spigot's config API is horrifically bad

#

it is 100% valid to write your own

prime reef
winter flower
prime reef
#

you need to use an item display, i'm pretty sure?

#

it's in the same boat as armor

#

just that it creates an "entity" when placed

winter flower
#

Oh yeah I forgot item displays are a thing

#

Sorry about that, and thank you lol

hazy parrot
#

Why is spigot configuration api bad?

valid burrow
prime reef
#

last I checked it was tedious, finnicky, only dealt with YML, had type erasure issues and didn't support automatic injection

valid burrow
# valid burrow found another way thx though :)
        rules = new ArrayList<>();

        if (rulesSection != null) {
            for (String key : rulesSection.getKeys(false)) {
                List<String> rule = rulesSection.getStringList(key);
                rule.add(key);
                rules.add(rule);
            }
        } else {
            // Handle the case where 'rules' section is not found in the config
            plugin.getLogger().warning("The 'rules' configuration section is missing or invalid.");
        }```
#

a bit complicated but it works

prime reef
#

manual config reads ๐Ÿ’€

#

that's directed at the spigot API, not your code snippet

valid burrow
echo basalt
#

rather do this than write a mongodb codec

young knoll
#

If you have issues with the api

#

Spigot is open to PRs or suggestions

prime reef
#

said it was tedious

echo basalt
#

ehh

prime reef
#

look I wrote a whole ass library to do this, that's how much i hate it

#

lmao

prime reef
livid dove
prime reef
#

honestly thought about it

#

maybe I should make a PR

livid dove
#

Don't tell me, show me

prime reef
#

nobody uses my damn library

#

so i have no idea if it's shit or not ๐Ÿ’€ but i think it's relatively easy to use

ivory sleet
#

well I judge libs by design, how opinionated it is, how tested it is (integration/unit tests), if others use it and who made it

prime reef
#

yeah nobody uses it.

#

i would not PR it

ivory sleet
#

oh

#

its that bad? :>

prime reef
#

no, there's just

#

400 other config libraries with larger userbases

#

and mine has a bunch of other shit because it's a core for my own plugins

ivory sleet
#

well

#

if you can offer something other config libraries cant

#

then that would be enough for someone to use it given their satisfaction

prime reef
#

yknow what's funny

#

i've never written a unit test and still don't know how

ivory sleet
#

oh

prime reef
#

we don't use unit tests at work

#

:)

#

i have no idea why

ivory sleet
#

ehm its not that complicated tbf, yeah well its just u write test code to test ur production code

prime reef
#

it's so fucking hard to test anything we do to begin with and then there's no testing procedure lmao

ivory sleet
#

it may be hard if the code base is written poorly

prime reef
#

oh yeah

#

production codebase in game dev?

#

written like shit.

ivory sleet
#

well I know a lot of games write data oriented design

#

which can compromise testability and readability

prime reef
#

honestly man

#

I just want to work in a govenrment job where I don't have to do anything

#

I don't give a rat's ass about making 200k or whatever

#

not that you make that much in game dev anyway

#

i want to be able to do game dev on the side and do nothing at work because there's no profit motive ๐Ÿ˜Ž

torn shuttle
#

have any of you ever done 3d printing?

remote swallow
#

Magma probably had

#

Has

smoky oak
#

not professionally but i had the chance once

torn shuttle
floral drum
#

hi i need help coding basic hello world plugin!

smoky oak
#

uh step 1 run buildtools

eternal oxide
#

if your NPC is an actual entity and not packet based you can simply getBukkitEntity and call swingArm

dire pewter
#

hello, so I just noticed there are 3 Interact Events and I wanna know the difference between the first two ones

young knoll
#

InteractAtEntity contains the point on the entity you interacted with

#

Generally not required

smoky oak
#

the other one is if you interact but not with an entity

#

think clicking on blocks

young knoll
#

Clicking on blocks, the air, or stepping on pressure plates

smoky oak
#

isnt preassure plates a different event alltogether

young knoll
#

nop

smoky oak
#

oh i see, Action.PHYSICAL

dire pewter
#

thanks guys โค๏ธ

echo basalt
#

@young knoll you play with spigot internals too, right

#

one thing that just popped in my mind

#

why tf do event classes need the handlerlist thing

young knoll
#

It stores what classes are listening to them

echo basalt
#

something something performance

#

right?

lofty badge
#

i need help with html css, who can help write to dm

sterile axle
#

if you want help you can ask your question right here. no one is going to dm you just to help you with your website

lofty badge
sterile axle
lofty badge
graceful musk
#

Hi

#

I need help, how can I make a plugin that gives a diamond to a player every 5 minutes if they are in a specific worldguard region?

quaint mantle
upper hazel
#

who know why i cannot load price end blocks in config?

#

the names seem normal

#

but section not can find

#

price end blockCount

quaint mantle
upper hazel
#

sonarList not like it too

#

but idk

#

i think this be long

quaint mantle
#

Well... are you referring to custom.1 in the ConfigurationSection? Because you should

upper hazel
#

oh now i see

#

lol forgot to put a dot with the key

quaint mantle
upper hazel
#

bruuh

quaint mantle
#
- '&f'
short pilot
#

What's good practice for keeping multiple commands related to something in one class?

#

I'm trying to figure out a good way to do so

#
public class MyCommandExecutor implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (label.equalsIgnoreCase("command1")) {
            return handleCommand1(sender, args);
        } else if (label.equalsIgnoreCase("command2")) {
            return handleCommand2(sender, args);
        return false; // Return false if the command label doesn't match any of your commands
    }

    private boolean handleCommand1(CommandSender sender, String[] args) {
        ......
    }

    private boolean handleCommand2(CommandSender sender, String[] args) {
       ......
    }

Would something like this work?

#

is it efficient?

chrome beacon
#

If you want everything in one file use a switch statement

lost matrix
smoky oak
#

qq is there a specific event for tree generation (NOT growth!) or is it just ChunkGenerateEvent or whatever its called?

lost matrix
#

You can create a folder in your plugin folder and throw your files in there.

JavaPlugin yourPlugin = ...;
File pluginFolder = yourPlugin.getDataFolder();
File nbsFolder = new File(pluginFolder + "/music");
File someNbsFile = new File(nbsFolder, "cool_music.nbs");
#

You can also list all files in that Folder:

JavaPlugin yourPlugin = ...;
File pluginFolder = yourPlugin.getDataFolder();
File nbsFolder = new File(pluginFolder + "/music");
File[] nbsFiles = nbsFolder.listFiles();
quiet ice
#

Is anyone aware of a CME-safe variant of LinkedHashMap?

smoky oak
#

what are you on about lol

quiet ice
#

Well I'm running a modded server and I've made some big dum-dum and now the server is crashing due to a ConcurrentModificationException in GoalSelector while it tries to iterator over the keys of some LinkedHashMap

smoky oak
#

ah

#

wasnt sure what you meant with CME

#

I think i have an idea though

quiet ice
#

While purging all nearby entities will obviously be a good workaround I don't think it is a permament solution

smoky oak
#

clone the map, and iterate over the keys of the original. Modify the copy, and once you finished, assign the clone to the reference of the original

#

alternatively you might be able to do something with streams and maps, but idk how that interacts with linkedhasmaps

echo basalt
#

you might want a synchronized map

#

doodoo for performance but oh well

quiet ice
#

Thing is outside the stacktrace I have 0 idea what is happening

smoky oak
#

cant you step through it with a debugger then?

quiet ice
echo basalt
#

mm some mod is playing with async entity manipulation

#

or might just be removing goals while iterating them lmfao

quiet ice
smoky oak
#

how the fuck do u have a cpu with a frequency of 0

#

the skeleton is just where it crashed i think

echo basalt
#

bros using the athlon

#

never seen that model before

#

prob laptop

quiet ice
#

It's a PC mainly meant for offices

uncut folio
#

how do i rotate a player by 180ยฐ?
i've tried both adding 180 to the yaw and multiplying it by -1 but neither of them work. they just force me to look in a set direction no matter which way i'm facing
here's my code

BlockIterator blocks2 = new BlockIterator(player.getEyeLocation(), 0, 50);
                    while (blocks2.hasNext()) {
                        Block block = blocks2.next();
                        if (block.getType().isSolid()) {
                            Location loc = block.getLocation().add(0, 1, 0);
                            loc.setYaw(loc.getYaw() + 180);
                            player.teleport(loc);
                            break;
                        }
                    }
#

(please ping me when replying)

thin iris
#

video?

smoky oak
uncut folio
smoky oak
#

also isnt yaw in a double between 0 and 1?

lost matrix
uncut folio
smoky oak
#

yea in the display

echo basalt
#

a yaw is a float

#

first of all

smoky oak
echo basalt
#

can't wait to have roll in minecraft

smoky oak
#

guess it depends how you obtain the rotation

uncut folio
#

is this correct?

BlockIterator blocks2 = new BlockIterator(player.getEyeLocation(), 0, 50);
                    while (blocks2.hasNext()) {
                        Block block = blocks2.next();
                        if (block.getType().isSolid()) {
                            Location loc = player.getLocation();
                            loc.setYaw(loc.getYaw() + 180);
                            player.teleport(block.getLocation().add(0, 1, 0));
                            break;
                        }
                    }
smoky oak
#

that would snap the player to 'straight', youre not setting their direction

uncut folio
#

i see

lost matrix
uncut folio
#

how do i get it then?

smoky oak
#

create a location instance, set it to the location you want the player to teleport to

#

then set that location's direction

#

teleport the player to that location

#
Loc loc = block.getLoc();
loc.setDirection(playerLoc.getDirection);
player.teleport(loc);
wraith dragon
#

anyone expert in NMS

#

can you help me pls?

smoky oak
#

smile ur up

echo basalt
#

:)

#

I've done this before

#

it's easy

#

smile has also done this before

#

Given you're going with the all-nms route

#

Instead of setting the durability you actually need to set the view in the map meta

#

Or with nms

private ItemStack createMapItem(MapView view) { // nms itemstack
  ItemStack item = new ItemStack(Items.FILLED_MAP);
  item.getOrCreateTag().putInt("map", view.getId());
  return item;
}
#

So you can then do the usual

MapView view = ...;

WorldServer world = ((CraftWorld) world).getHandle();
Vec3 pos = new Vec3(location.getX(), location.getY(), location.getZ());

ItemFrame frame = new ItemFrame(EntityType.ITEM_FRAME, world);
frame.setPos(pos);
frame.setItem(createMapItem(view));
#

No clue why you're sending 71 as the hanging rotation of the frame, it should be from 0-5

#

in the order of
UP
DOWN
NORTH
SOUTH
WEST
EAST

#

For spawning the itemframe, easy as

ClientboundAddEntityPacket packet = new ClientboundAddEntityPacket(frame, hangingRotation);
ClientboundSetEntityDataPacket metadataPacket = new ClientboundSetEntityDataPacket(nmsFrame.getId(), nmsFrame.getEntityData(), true);

and sending those packets

#

You can send the view with player.sendMap iirc but I'd rather set the colors myself as it's much much much faster

#

@wraith dragon

raven sedge
#

Hello i was trying to understand how can i read the spigot javadocs

chrome beacon
#

?jd-s

undone axleBOT
raven sedge
#

Like how can i read it and code anything out of it

remote swallow
#

search for the clas top right, eg ItemMeta

#

it then shows its super interfaces, so stuff it implements

#

then it shows what implements it

#

then it shows the class javadoc

smoky oak
#

if you want it in your IDE compile buildtools with the javadocs flag, then press ctrl q while hovering over something

remote swallow
#

then you get the methods, below that inheritied methods

#

then method details

#

with the javadocs for the methods

raven sedge
#

Oh god i never clicked those buttons HAHAHAHA

#

Thx so much guys :D

smoky oak
#

see when i type i'm not having my hand on my mouse

#

ctrl q is faster to input

raw prairie
#

I'd like to assign 3D models to tools (e.g. Iron Hoe) using meta.setCustomModelData and allow the player to equip them as helmets, can anyone recommend good existing plugins or a good place to start with coding this? I was messing with ArmorMechanics but it doesn't have that functionality

onyx fjord
#

how can i check if worldguard is present on onLoad stage? (i want to softdepend and register flags)

quaint mantle
#

java.lang.StackOverflowError
On this:

private Menu iterateThrough(Menu menu) {
        if(menu.getInventory().getItem(44).isSimilar(MenuConstant.MENU_CONSTANT_ARROW_FORWARDS.getItem())) {
            return iterateThrough(menu);
        }
        return menu;
    }
#

...why?

onyx fjord
#

you probably created a recursive method

eternal oxide
#

method calls itself

onyx fjord
#

that never stops

quaint mantle
eternal oxide
#

it won;t as it passes the same inventory

#

once tru its always true

quaint mantle
#

Wait im an idiot

#

It works now! ๐Ÿ™‚

lilac dagger
echo basalt
#

me with my 7 years of spigot experience

quaint mantle
#

hello guys, i've make the config for my class, this creates from folder "resources" in plugin sources

so, when i call the function saveConfig();
all working perfectly, but in the config.yml, spigot deletes quotes

normal config:

example: "hello world"
nickname: "carrot2009"

my config without quotes

example: hello world
nickname: carrot2009

and when im try get the string from config, plugin can't read the key, because the key without quotes

how to fix this?

echo basalt
#

show code

#

because you don't need quotes for string

quaint mantle
quaint mantle
chrome beacon
#

Your config code

quaint mantle
#

okay

#

msg_ondeath: "you died" # Is written when the player dies
msg_onalive: "you have been resurrected, and %spawnbacker_spawnloc% has appeared" # Is written when the player is resurrected
msg_trynow: "enter the command again" # Is written when the player is new and his data is written to the config
msg_noargsghome: "you entered the command incorrectly, enter /changespawnloc home (name of the sethome)"
msg_homesetted: "you set the place of appearance on the sethome"
msg_spawnsetted: "you set the place of appearance on the spawn"
msg_noperm: "not enough rights"
msg_reloaded: "plugin has been reloaded"

# vars

menu_title: "Change location after death"

# cmds

onaliverespawnHOME_cmd: "/home " # When respawning, the command that is specified here is written (LEAVE A SPACE!)
onaliverespawnSPAWN_cmd: "/spawn " # When respawn, the command that is specified here is written (LEAVE A SPACE!)

# glass

glass_name: "execnoclass" # The name of the glass, you can make it empty in quotes, you can write the name of the server
glass_data: 14 # Date of the glass, 14 is red, that is, idistekla:Red color, it turns out - 160:14

# items

spawnitem_name: "Spawn" # The name of the item in the menu appears if the player's spawn location is spawn
spawnitem_lore: # Description of the item
- ""
- "After death,"
- "You appear on spawn"
- ""

homeitem_name: "Sethom" # The name of the item in the menu appears if the player has a place of appearance -
sethom homeitem_lore: # Description of the item
- ""
- "After death,"
- "You will appear at the point of the house set by you"
- "To change the point of the house,"
- "Write the command /changespawnloc home (the name of the sethome)"
- ""```
lost matrix
#

Do you get an exception? How did you determine if your code worked or not.

quaint mantle
#

wait a sec pls

eternal oxide
#

missing new line? sethom homeitem_lore: # Description of the item

upper hazel
#

omg why so hard create gui

#

i have 7 objects this all just button

#

with dissimilar inventory decoration

quaint mantle
#

i cant send the file

#

the exception too large

upper hazel
#

although I would describe it more as a chore

quaint mantle
#

the config is filled in normally, except for the quotes

eternal oxide
#

you are missing a new line after sethom

quaint mantle
#

I need them so that the color code for the messages works, without quotes the labels are not output

quaint mantle
# eternal oxide you are missing a new line after `sethom `
msg_onalive: "you have been resurrected, and %spawnbacker_spawnloc% has appeared" # Is written when the player is resurrected
msg_trynow: "enter the command again" # Is written when the player is new and his data is written to the config
msg_noargsghome: "you entered the command incorrectly, enter /changespawnloc home (name of the sethome)"
msg_homesetted: "you set the place of appearance on the sethome"
msg_spawnsetted: "you set the place of appearance on the spawn"
msg_noperm: "not enough rights"
msg_reloaded: "plugin has been reloaded"

# vars

menu_title: "Change location after death"

# cmds

onaliverespawnHOME_cmd: "/home " # When respawning, the command that is specified here is written (LEAVE A SPACE!)
onaliverespawnSPAWN_cmd: "/spawn " # When respawn, the command that is specified here is written (LEAVE A SPACE!)

# glass

glass_name: "execnoclass" # The name of the glass, you can make it empty in quotes, you can write the name of the server
glass_data: 14 # Date of the glass, 14 is red, that is, idistekla:Red color, it turns out - 160:14

# items

spawnitem_name: "Spawn" # The name of the item in the menu appears if the player's spawn location is spawn
spawnitem_lore: # Description of the item
- ""
- "After death,"
- "You appear on spawn"
- ""

homeitem_name: "Sethom" # The name of the item in the menu appears if the player has a place of appearance  sethom

homeitem_lore: # Description of the item
- ""
- "After death,"
- "You will appear at the point of the house set by you"
- "To change the point of the house,"
- "Write the command /changespawnloc home (the name of the sethome)"
- ""```
eternal oxide
#

better

quaint mantle
#

but it doesn't work

#

exception are same

eternal oxide
#

?pase error

lost matrix
#

Post them, pls

eternal oxide
#

?paste

undone axleBOT
eternal oxide
#

the error you posted does not use the config you showed us

lost matrix
#

^

#

The config in this exception is missing quotation marks

quaint mantle
#

    public FileConfiguration cfg = YamlConfiguration.loadConfiguration(cfgfile);

    FileConfiguration cfgget = spawnbacker.getInstance().getConfig();```

I use this variable cfgget to access the config

config created in the resources folder in the sources of plugin
hazy parrot
#

send your exact config

#

quotes are not mandatory for strings if no special characters are present

kind hatch
quaint mantle
kind hatch
#

It'll strip them if it deems them unncecessary to save on file size.

hazy parrot
#

if there is special char, quotes will not be removed

quaint mantle
#

i need to try this

hazy parrot
quaint mantle
hazy parrot
#

a bit edited

quaint mantle
#

only msg_reloaded is edited

#

msg_reloaded: &cplugin reloaded

#

oh

#

sorry

#

I really sent you the wrong config

hazy parrot
#

msg_noargsghome: &cyou entered the command incorrectly, enter /changespawnloc home (the name
of the sethome)

#

you cant write like this

quaint mantle
#

when I wrote the config, quotes are removed if there are no special characters, but I would like quotes to always be there, regardless of whether there are special characters there

valid burrow
#

guys i wanna make a quit vote
โŽ - Close SQL connection after every request
โœ… - Keep Connection open the whole time

hazy parrot
#

new line ?

#

like that

#

?

valid burrow
quaint mantle
valid burrow
#

localhost db

hazy parrot
#

linter showing only that as a problem

uncut folio
#

how do i disable an entity's AI?
i'm trying to stop a shulker from teleporting but i can't find a proper answer on the forums

#

that's the issue
neither of them seem to exist

kind hatch
#

1.8 moment

uncut folio
#

i'm using 1.20 ๐Ÿ˜ญ

hybrid spoke
#

cast to livingentity

#

you probably only have an entity rn

uncut folio
#

wait
do i need something else?

#

i thought i just needed the entity

uncut folio
#

ah nevermind i didn't read the message above properly

#

thanks for the help!

hybrid spoke
kind hatch
#

Most of the time you want to close it after the request so the connection becomes available for another task. You only have a certain number of connections before your requests become stuck in the backlog and possibly just drop.

lost matrix
river oracle
#

^ I'd keep it open, but this heavily depends on if youre using something like sqlite

#

imho it'd be dumb to close your sqlite connection after every request

#

but with something like mysql you would probably more benefit from using a connection pool

hybrid spoke
#

just use apache

kind hatch
#

Not me using Hikari

valid burrow
#

a lot of effort

kind hatch
#

Not really

valid burrow
#

is it worth 4(โ‚ฌ

kind hatch
#

The pool does most of the work.

valid burrow
#

45โ‚ฌ

kind hatch
#

Wat?

hybrid spoke
#

what are you talking about

valid burrow
#

its a commission

kind hatch
#

ConnectionPools are free. They are built in to Java.

valid burrow
#

is it worth to learn how to use a pool for 45โ‚ฌ

hybrid spoke
#

ever heard of try resource?

#

for the pooling just use apache dbcp2

valid burrow
#

?paste

undone axleBOT
echo basalt
river oracle
echo basalt
#

You need to send an entity metadata packet

lost matrix
#

You need to send the metadata packet as well as the equipment packet

echo granite
#

How to not repeat the description in the @return tag? For example:

public class User
{
    private final UUID playerUUID;
        
    /**
     * Returns the {@link UUID} of the player encapsulated by this object.
     * 
     * @return Copy paste??
     */
    public UUID getPlayerUUID() 
    {
        return this.playerUUID;
    }
}
hybrid spoke
#

or what do you mean

echo basalt
#

make it

echo granite
echo basalt
#

ClientboundSetEntityDataPacket

#

something something entity equipment

hybrid spoke
lost matrix
hybrid spoke
#

"Returns the" -> "@return"

echo basalt
hazy parrot
echo granite
valid burrow
#

thx

hybrid spoke
#

also getters dont need a javadoc

#

and if they do more then returning the object they are supposed to its not a getter anymore

#

.

echo basalt
#

just look at how spigot does it

hybrid spoke
#

yeah no dont look at spigot

kind hatch
#

lol

echo basalt
lost matrix
#

Love comments like those. I would exclusively tolerate those in public APIs.

echo basalt
#

fuck it let's see how Unsafe does it

echo granite
echo basalt
#

there you go

#

perfect

echo granite
#

awesome!

echo granite
#

jk

echo basalt
#

and there's the other ones

hybrid spoke
echo basalt
#

well

quaint mantle
#

whats that? memory api??

echo basalt
#

uhh

#

unsafe

#

lets you mess with memory

quaint mantle
#

oh

echo basalt
#

and other unsafe stuff

#

a single wrong call and jvm crashes

quaint mantle
#

incubator?

echo basalt
#

entity.getEntityData iirc

lost matrix
#

pack it dirty

echo basalt
#

I'm packin' I'm slappin' who knows might be rappin'

lost matrix
#

pls dont

echo basalt
#

:(

#

bro about to block me after that one

pseudo hazel
echo granite
#

Map#isEmpty:

pseudo hazel
#

and put what it returns in the return tag

echo granite
#

beautiful

echo basalt
#

yeah 1.19 whatever

#

just packDirty

#

or getNonDefaultValues

#

either works

#

That's the SetEquipment packet

#

ClientboundSetEquipmentPacket

#

no clue why they do it with a list of pairs

#

But you'll need to create that list manually

#

Or given you're going with packet entities just make a crappy list

#
List<Pair<EquipmentSlot, ItemStack>> slots = List.of(
  new Pair<>(EquipmentSlot.HEAD, new ItemStack(Material.END_ROD))
);
#

just use the constructor

#

Instead of Material it's Items

#

and make sure you have the right import

#

Yeah so

#

Items.END_ROD

lost matrix
#

You can also use the CraftItemStack#asNMSCopy(ItemStack) if you want an easy conversion

echo basalt
#

You'll get the hang of it fast

undone axleBOT
echo basalt
#

took me years to figure out and memorize old nms because we didn't have mappings

lost matrix
#

Its mojangs code after all... They have docs but they are internal.

echo basalt
#

mappings make it easy

#

and easy is the opposite of fun

#

bet

lost matrix
#

Obfuscate it a second time so nobody can help you

remote swallow
#

obsfucate the obsfucation

echo basalt
#

I relied on these a bit

#

no

#

:)

#

I only started using mappings on 1.18

remote swallow
#

mappings realeased 1.14

#

spigot used 1.17

short pilot
lost matrix
mellow pebble
#

?paste

undone axleBOT
short pilot
wet breach
#

the link I gave, I only have really like 2-3 real commands, all the rest are sub commands

mellow pebble
#

hi im trying to use Kraken Tab API and i added it as JAR to my project and added it to maven and configured it as dependency as i should but when i try to start my server it says that class Kraken is not found even though it should be fine as it is shown so on github where that api can be found

https://paste.md-5.net/uvozenalub.xml

wraith dragon
wet breach
#

and don't require registering but I also keep them organized in their own classes and easily call them when needed ๐Ÿ™‚

short pilot
#

hmm interesting

#

I'll be sure to take a look

#

back when I was working with sponge the command API has a nice command executor

lost matrix
echo basalt
#

Basically there's a limited color palette

#

And each color is distributed in 4 shades

#

With all the colors and shades combined, it's still under 255 so it's represented as a byte array

#

Of 128 x 128 pixels

mellow pebble
echo basalt
#

0 is transparent

#

bukkit has a class for the colors but none of it is cached

mellow pebble
lost matrix
mellow pebble
echo basalt
lost matrix
lost matrix
mellow pebble
echo basalt
#

So you grab your image, you downscale it to 128x128 and loop

vital sandal
#

which packet do I use for display itemname ?

echo basalt
vital sandal
lost matrix
vital sandal
#

like the line below actionbar

mellow pebble
echo basalt
echo basalt
#

Chat with the message type as ACTION_BAR

vital sandal
vital sandal
lost matrix
echo basalt
#

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, ...)

#

gtg too

#

meeting a friend that I haven't spoken with for months

#

(he likes 2km away)

wet breach
echo basalt
#

yeye it's about time

#

called him like 15mins ago and we're down to meet in another 15

#

leaving fr now

rigid otter
#

When I apply some PermissionAttachment to a player, I want the tab complete of player's commanding to be refreshed. e.g. I remove a permission from a player, he really cannot perform the command, but the tab complete is still there. So how to refresh that tab complete?

#

Note, I didn't use any Permissions plugin

young knoll
#

Player.updateCommands

rigid otter
#

Let me try it!

wraith dragon
rigid otter
#

Thank you!

grand flint
#

How can I detect a premium player on an offline server?

grand flint
glad prawn
#

Ask them

vital sandal
#

how may I use this packet :l
ClientboundContainerSetSlotPacket

grand flint
vital sandal
grand flint
#

Are there specific packtes premium players send that cracked doesn't?

lost matrix
#

I guess you could proxy the client request and query mojangs server manually

grand flint
#

If a cracked player joins thru my username they instantly get blocked

vocal cloud
#

Imagine if they just used legit accounts only.

lost matrix
grand flint
grand flint
grand flint
upper hazel
#

can i add to inventory id?

#

how dataContainer

#

insaide inventory

#

i nah now i no need

river oracle
#

you can't make custom trims with spigot. I suppose its possible you can use a texture pack to edit the current ones but thats about it

upper hazel
remote swallow
#

what

upper hazel
#

translate erro

#

wait a sec

#

I say it's rare to find a female bukkit programmer in this group.

remote swallow
#

no not really

#

chloe, adele, pixie, choco

upper hazel
#

oh

#

I was comparing this phenomenon to girl gamers.

#

so I thought it was rare

#

bruh wth with translate

#

when this be normal

river oracle
#

using a texture pack sure

#

as I explained earlier

grand flint
#

One more question guys, how can I prompt the user with a resource pack, as in I want to send them a message when they join the server for the first time, then send a chat message that says Dark Theme and Light Theme which are messages you can click on, how can I make it so if you click on this message, it will prompt the user to install the resource pack, as in like the server resource pack, not them just going out to install it, I only need the prompt part, the others are all set

grand flint
#

I was on the wrong class ;(

chrome beacon
grand flint
remote swallow
#

this is my current project layout, for some reason the build.gradle in ebiclib-nms refuses to pickup the spigot-v1_20-R1 subproject, its registered but no combination of ebiclib-nms and spigot-v1_20_R1 with colons works

grim hound
#

GraphicsEnvironment.getLocalGraphicsEnvironment()

#

I use this code

#

and some guy just reported it throwing an InternalError

#

what the fuck

#

getAllFonts to be exact

#
[19:54:01 ERROR]: Error occurred while enabling AlixSystem v2.7.0 DEV-1 (Is it up to date?) java.lang.InternalError: java.lang.reflect.InvocationTargetException at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:87) ~[?:?] at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?] at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:75) ~[?:?] at sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(SunGraphicsEnvironment.java:139) ~[?:?] at sun.java2d.SunGraphicsEnvironment.getAllFonts(SunGraphicsEnvironment.java:158) ~[?:?] at sun.java2d.HeadlessGraphicsEnvironment.getAllFonts(HeadlessGraphicsEnvironment.java:76) ~[?:?] at 
chrome beacon
#

Well Headless environment

grim hound
#

how

#

can I fix it then?

raw prairie
#

Hi, can anyone recommend a plugin allowing tools with CustomModelData to be equipped as head armor?
The tool should be equipped upon inventory Slot interaction, not console command

scenic onyx
#

hi! How i can do:
private static final String PREFIX = "ยง8ยงl[" + MiniMessage.miniMessage().deserialize("gradient:#0040FF:#00FBFFIBW</gradient>") + "ยง8ยงl] ";
dont go because return Component.

remote swallow
lost matrix
# grim hound can I fix it then?

Using the sun.java2d package with headless servers is always a headache and should be avoided if possible.
Let them start the jvm with headless mode enabled -Djava.awt.headless=true

grim hound
lost matrix
#

So

 private static final TextComponent PREFIX = ...;
young knoll
#

I just turn all my minimessage stuff to strings

lost matrix
#

Otherwise using adventure/minimessage is kind of stupid

young knoll
#

Since spigot doesn't support adventure components, and bungee components only work in like 3 places atm

scenic onyx
lost matrix
grim hound
scenic onyx
lost matrix
grim hound
#

I cannot really invoke anything

lost matrix
#

No idea what you are using a GraphicsEnvironment for, so cant help

scenic onyx
lost matrix
# scenic onyx

Not sure if MiniMessage alone has any means to serialize your components to plain text

grim hound
grim hound
lost matrix
# scenic onyx emmm.......

You are aware that the dataset of GPT is a few years old and wont be helpful for up-to-date libraries at all?

remote swallow
#

call text() on the component iirc

grim hound
#

maan who the hell uses a headless enviroment for minecraft hosting

lost matrix
# scenic onyx emmm.......
    MiniMessage miniMessage = MiniMessage.miniMessage();
    Component msgComponent = Component.text("Some message");
    String msg = miniMessage.serialize(msgComponent);
lost matrix
grim hound
#

how do they display stuff?

proper notch
#

wym? what do they have to display?

grim hound
#

is there like a library I could compile with my plugin and would work in a headless enviroment?

lost matrix
#

They dont display anything. They have management ports for on-site and provide SSL for their clients.

scenic onyx
#

try it

grim hound
lost matrix
paper viper
#

Why are you doing graphics on a server?

#

If anything the client should handle all graphics related things

grim hound
paper viper
#

For what?

grim hound
#

128x128

#

translating to a map

paper viper
#

like why?

grim hound
#

and rendering the map

scenic onyx
#

@lost matrix dont go

paper viper
#

Yeah but

#

that doesnt explain why

#

you have to use 2D Graphics

lost matrix
#

too bad

remote swallow
grim hound
#

and captcha is necessary

#

how can I get something like this without 2d graphics render?

remote swallow
#

maps

lost matrix
scenic onyx
remote swallow
#

formatted?

paper viper
sullen marlin
#

That's a 2d renderer

paper viper
#

clients don't see awt components

#

but u can display as a map as said above

scenic onyx
grim hound
remote swallow
scenic onyx
grim hound
#

like a map doesn't have drawLine method

lost matrix
grim hound
#

also I just get those bytes and render it with an async packet send

remote swallow
#

wdym wont have

grim hound
#

but I need the image first

remote swallow
#

thats just example code

grim hound
#

and it always needs to be random

lost matrix
lost matrix
#

He wont have that

scenic onyx
#

i want a string and not a component

remote swallow
#

ah, add the dep for it then

lost matrix
grim hound
#

so, no one knows how to help, a?

remote swallow
#

illusion would

#

be hes having a life atm

scenic onyx
#

LegacyComponentSerializer???? how version of minimessage is it?

remote swallow
#

its included in adventure platform bukkit

lost matrix
grim hound
#

and the rest is not

lost matrix
#

Full stack trace pls then

grim hound
#

since an uncaught exception was thrown

grim hound
#

the rest is just yeah so that's why yo plugin failed to enable

lost matrix
#

Send the full stack trace pls

remote swallow
#

?stacktrace

undone axleBOT
grim hound
#

this is the full stack trace the guy

#

that got the error reported

lost matrix
#

Why is this in such an abysmal format??

lost matrix
grim hound
#

maybe the way the console formats stuff

grim hound
#

in a headless enviroment

lost matrix
#

Should be possible. The only problem im seeing here is that the font manager doesnt have
access to the system fonts.

grim hound
opaque scarab
#

What are the item slots of a campfire blockstate? I've tried getting an itemstack at slot 0, but it returns null

pseudo hazel
#

did you put anything on the campfire?

#

I assume its the slots of the things you're cooking

grim hound
#

and chat gpt suggested non-existent ones

lost matrix
grim hound
#

I'm makin an antibot

#

so I need a random map captcha

#

so I need it's bytes

lost matrix
#

Then draw using the graphics capabilities

grim hound
#

and I get the the bytes from a temporarily created image

remote swallow
#

its always player

pseudo hazel
#

I usually dont check

lost matrix
#

Myeah, just cast. I dont think there has ever been a plugin that utilized HumanEntity

grim hound
kind hatch
#

You could either scan their system for installed fonts or allow them to use a url that points to a font.

grim hound
#

equals

#

then ==

#

but only if you're absolutely sure

#

then == is fine

#

nice

grim hound
#

This is the method that fails

#

a java built-in method

#

And Font uses it for rendering

#

so uh

#

help wanted

echo basalt
#

doubt your system has the fonts it needs

#

You can always just hardcode the shapes like minecraft does for its fonts

quiet ice
#

AWT probably won't exist on a general server either

echo basalt
#

idk I run a standard server on a pterodactyl panel using ubuntu 22.04 and never had any issues

torn oyster
#

when making a minigames system, is it a good idea to keep a record of all minigames that have happened, including who played in it, the time it was played, individual stats, etc?

#

i've seen real games do this but i'm not sure if it has a purpose with minecraft minigames

wraith apex
#

only if you want to

#

if you want leader boards

#

then yeah

young knoll
#

You donโ€™t really need to keep track of each game for that

#

Youโ€™d normally just tie that data to the players

wraith apex
#

^

torn oyster
#

so keep individual stats on a database for each player rather than keep a log of all games

wraith apex
#

ye

young knoll
#

However if you want to have the history and information for the games available you can

wraith apex
#

unless you need game history for some other reason

young knoll
#

Nothing stopping you

wraith apex
#

like if you actually wanted the player to be able to view each of their games history

#

which ones they won/lost

torn oyster
#

i feel like it would only be useful for matchmaking systems

#

so you can tell what skill level a player is

#

based on what games they won/lost against their opponents skill level

young knoll
#

I mean you can still do that without tracking each game

torn oyster
young knoll
#

Eh, not really

wraith apex
#

you could match them based on win/loss ratio

young knoll
#

When a game ends you can assign the player a score based on k/d, opponents, etc

#

And then just save that score to the player

#

Preferable to going through all the players past games and calculating a skill level on the fly

torn oyster
#

it could be post-game for the last 10 games or smth

young knoll
#

If it was me I would do it like the chess ELO system

rough blaze
#

<dependency>
<groupId>me.boxxing.reviveme</groupId>
<artifactId>reviveme</artifactId>
<scope>provided</scope>
</dependency>

isnt working, im trying to make a pom.xml dependency and im getting this error

Dependency 'me.boxxing.reviveme:reviveme:' not found

delicate lynx
#

provide a version

valid burrow
#

if i return inside onEnable does it just stop the other stuff from being enabled or does it stop the whole plugin

valid burrow
#

alrioght

nova jasper
#

some1 know what plugin that give more structures easyly to use help me pls

valid burrow
#

this is the wrong channel for that kind of stuff

wraith dragon
obsidian lynx
#

hello there..

public class Test {
    public static void main(String[] strings) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .version(HttpClient.Version.HTTP_2)
                .uri(URI.create("http://localhost:3000/"))
                .build();

        HttpResponse<String> response =
                client.send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }

}
Exception in thread "main" java.net.ConnectException
    at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:573)
    at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
    at cz.coffee.skjson.api.http.Test.main(Test.java:27)
Caused by: java.net.ConnectException
    at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.checkRetryConnect(PlainHttpConnection.java:230)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$1(PlainHttpConnection.java:206)
    at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
    at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.nio.channels.ClosedChannelException
    at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:195)
    at java.base/sun.nio.ch.SocketChannelImpl.beginConnect(SocketChannelImpl.java:760)
    at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:848)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185)
    ... 9 more

Hello, I have a problem with java.net.http.HttpClient JDK17 I can't send a request to a port other than :80 I've tried everything. No effect, address works normally I tried it using Browser and also postman and other APIs all tests were without problem

wraith dragon
#

I have the code above

#

that produces

#

an empty map

#

@echo basalt I tried to follow your solution but it still didnt work :/

obsidian lynx
#
"C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.2\jbr\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.2\lib\idea_rt.jar=60418:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\nexti\Desktop\Project-SkJson\SkJson\target\classes;C:\Users\nexti\.m2\repository\org\eclipse\jetty\jetty-client\12.0.1\jetty-client-12.0.1.jar;C:\Users\nexti\.m2\repository\org\eclipse\jetty\jetty-http\12.0.1\jetty-http-12.0.1.jar;C:\Users\nexti\.m2\repository\org\eclipse\jetty\jetty-util\12.0.1\jetty-util-12.0.1.jar;C:\Users\nexti\.m2\repository\org\eclipse\jetty\jetty-io\12.0.1\jetty-io-12.0.1.jar;C:\Users\nexti\.m2\repository\org\eclipse\jetty\jetty-alpn-client\12.0.1\jetty-alpn-client-12.0.1.jar;C:\Users\nexti\.m2\repository\org\slf4j\slf4j-api\2.0.7\slf4j-api-2.0.7.jar;C:\Users\nexti\.m2\repository\de\tr7zw\item-nbt-api\2.11.3\item-nbt-api-2.11.3.jar;C:\Users\nexti\.m2\repository\de\tr7zw\functional-annotations\0.1-SNAPSHOT\functional-annotations-0.1-20220407.142433-7.jar;C:\Users\nexti\.m2\repository\com\google\code\gson\gson\2.10.1\gson-2.10.1.jar;C:\Users\nexti\.m2\repository\org\bstats\bstats-bukkit\3.0.2\bstats-bukkit-3.0.2.jar;C:\Users\nexti\.m2\repository\org\bstats\bstats-base\3.0.2\bstats-base-3.0.2.jar cz.coffee.skjson.api.http.Test
Exception in thread "main" java.net.ConnectException
    at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:573)
    at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
    at cz.coffee.skjson.api.http.Test.main(Test.java:27)
Caused by: java.net.ConnectException
    at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.checkRetryConnect(PlainHttpConnection.java:230)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$1(PlainHttpConnection.java:206)
    at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
    at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.nio.channels.ClosedChannelException
    at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:195)
    at java.base/sun.nio.ch.SocketChannelImpl.beginConnect(SocketChannelImpl.java:760)
    at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:848)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185)
    ... 9 more

Process finished with exit code 1
#

i actually did.

#

it's actually running on 3000 but i tried to many ports only 8080 works.

upper hazel
#

who has an optimized version of auto inventory generation for List<ItemStack>

upper hazel
#

I just need to put 1 ItemStack each in my inventory.

#

oh thenks i gess

#

this not what i was want

kindred gull
#

Hello how can I do something that saves the default configuration only once?

sullen marlin
#

saveDefaultConfig() does exactly that

kindred gull
sullen marlin
#

no?

#

This should fail silently if the config.yml already exists.

#

it just does nothing if the file already exists

kindred gull
#

oh

#

ok

#

thanks

#

I've been working on this for 2 hours. You saved my life

sullen marlin
#

no problem

quaint mantle
#

I need plugin A to unload before plugin B

#

I'm author of plugin A

#

Could this be done through plugin.yml?

#

Plugin B is not hard dependency

upper hazel
quaint mantle
upper hazel
#

np

unreal swallow
#

Hi

#

I am looking for a plugin that makes the
(redstone, buttons, repeaters, etc.), are considered as blocks, so the water flows over them like a normal block.

quaint mantle
# quaint mantle Will try loadbefore, thanks

Just to clarify for future readers. loadbefore will load your plugin (A) before plugin B and unload it after plugin B.
soft depend will load plugin A after plugin B and unload it before plugin B

unreal swallow
#

help please

#

customer plugin ?

#

I am looking for a plugin that makes the
(redstone, buttons, repeaters, etc.), are considered as blocks, so the water flows over them like a normal block.

tepid turret
#

[HELP] Interclass Code Errors

wraith dragon
shell robin
#

Can i change value of played minutes statistic?

quaint mantle
#

New to Spigot. I can set up a command just fine, but I commonly see stuff like /OverarchingCommandName SecondaryCommandName Arguments.
Would I just use arg[0], or is there another method to achieve this?

hazy parrot
#

Yeah, args array would be everything after the command

quaint mantle
hazy parrot
#

There is TabCompletion interface which you may implement

quaint mantle
#

Alright. Thank you.

pale pulsar
#

Hi, do you know an API or a library to display text in an inventory, something like that

shadow night
tepid turret
pale pulsar
shadow night
cinder abyss
#

Hello, what is the default damage (integer) for a TNTPrimed?

lost matrix
cinder abyss
#

(I found, it's 4f)

quaint mantle
grim hound
#

so does anyone know

#

What I could do

#

to be able to create a temporary graphic in a headless env

lost matrix
#

Sure, do the usual but provide a fallback font with your plugin

grim hound
lost matrix
#

Just create a BufferedImage and use its Graphics2D

grim hound
#

would setting the system property of headless help?

#

to false

#

because I think that once the class is loaded it doesn't really matter

lost matrix
#

Show some code first

#

*And no

grim hound
lost matrix
#

How you are rendering the images

grim hound
#

bruh

#
if (GraphicsEnvironment.isHeadless()) System.setProperty("java.awt.headless", "false");
#

I just did this

#

and the guy says he no longer gets the error

#

what the hell

#

and nevermind

upper hazel
#

List.copyOF can ganarate java.lang.UnsupportedOperationException: ?

lost matrix
grim hound
#

he just changed the config to not use maps

tall dragon
#

since it returns an Immutable list

lost matrix
#

^

upper hazel
#

oh now i see

#

i try remove

#

list

#

was

forest mountain
#
private void createStoneWall(UUID playerUUID, Block centerBlock) {
        Map<Block, Material> originalBlocks = new HashMap<>();
        for (int x = -2; x <= 2; x++) {
            for (int y = 0; y <= 3; y++) {
                    Block block = centerBlock.getRelative(x, y, 1);
                    originalBlocks.put(block, block.getType());
                    block.setType(Material.BRICKS);
            }
        }
}

So i made this wall creation method, now I want the wall to be placed at the direction the block is placed at, how will I do that?
This works by placing bricks on the ground.

upper hazel
#

return

#

i not can remove or add?

tall dragon
#

you could just do new ArrayList(originalList); iirc

#

to create a usable copy

grim hound
upper hazel
#

lol so then the whole point of List.copy is lost, I thought it returns a COPY that can be edited lol

lost matrix
tall dragon
#

i mean mostly copies are used in read only context?

#

at least for me

upper hazel
#

lol

lost matrix
orchid gazelle
#

yo, I have been trying to run my server in eclipse using ant builders. Whenever it is starting the server, I get the following error:

org.bukkit.plugin.InvalidPluginException: java.lang.IllegalStateException: JavaPlugin requires org.bukkit.plugin.java.PluginClassLoader
tall dragon
#

if u rlly want a copy like that i guess Collections.copy(); would work

lost matrix
tall dragon
#

yea same tbh

upper hazel
eternal oxide
orchid gazelle
#

it does lol

#

and it also works whenever im really building it, this is an issue with live-testing

tall dragon
#

but why would anyone use ant

orchid gazelle
#

I use normal maven for normal builds

tall dragon
#

well cant u use maven for this as well?

orchid gazelle
#

idk anything about ant and shit, I just followed some tutorial for live debugging

orchid gazelle
tall dragon
#

im confused, ur just running a mc server in ur ide no?

orchid gazelle
#

yes

tall dragon
#

so all ur doing is building the plugin copying it to the plugin folder and starting the server

#

i dont see how thats not possible with maven

orchid gazelle
#

I want it to auto-compile and then run server whenever I laucnh

tall dragon
#

eh not sure bout eclipse tbh

#

but intellij is defo possible

#

idk if u got something similar to intellij's run configurations

orchid gazelle
#

I have a runtime config to run the server, but I wanna build the plugin first automatically

tall dragon
#

should be able to run mvn clean package in the correct dir then no?

orchid gazelle
#

can I do that before the config?

tall dragon
#

idk dont think i can rlly help with this, i dont know what kinda features eclipse provides

#

but it does look like it supports something similar to intellij

#

called "AutoBuilders" or somethn

orchid gazelle
#

yeah

#

there are Builders

#

but there are only the options "Ant Builder" and "Program"

#

oooo wait I think I managed to pull it off

#

nope I didn't

#

ok NOW I got it. I should probably write a guide for it on the spigot forum?

#

you press on "launch" and it maven builds your plugin and then runs your server

quaint mantle
#

Should I run this?

upper hazel
#

why for skips the loop if the condition is still true

#

for just say bye

orchid gazelle
quaint mantle
#

Okay

eternal oxide
orchid gazelle
#

I am literally writing a guide for eclipse testing rn