#help-development

1 messages · Page 916 of 1

sullen marlin
#

how do I make this work?

kind hatch
#

I think it’s just CommandSender in bungeecord.

kind hatch
tardy delta
#

Predicate btw

#

and ProxiedPlayer.class::isInstance

deep herald
#

thats why im asking

kind hatch
#

Did you even read what I said?

#

I said to use CommandSender instead.

deep herald
#

that wouldnt narrow it to only console tho

dawn flower
#

how do i save a json string in config?

#

it just creates a section

sullen marlin
#

like any other string

dawn flower
sullen marlin
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

sullen marlin
#

whats the string

dawn flower
#

1 sec

kind hatch
dawn flower
#
  if (value instanceof Map && mapJson) {
    Map<String, List<String>> stringMap = new LinkedHashMap<>();
    for (Map.Entry<String, List<Object>> e : ((Map<String, List<Object>>) value).entrySet()) {
      stringMap.put(e.getKey(), convert(e.getValue()));
    }
  }
    return new Gson().toJson(stringMap);```
#

oh crap

austere cove
#

you cast and it works fine, but thats not that clean

deep herald
dreamy chasm
#

Would anyone be able to have a look in the thread I created, I have ran out of things to test/change/update to try and solve the issue

ivory sleet
#

one solution is also to just assume something to be of type Type in the variable declaration, and then use a getter to cast it

sullen marlin
#

its mainly that adding the <X> screws it

#

without <X> it is fine

zinc moat
#

Hi md_5

#

Cool to see you 😄

#

If an api depends on another api do i need to add that into my pom?

sullen marlin
#

not if it uses maven

deep herald
sullen marlin
#

sender == ProxyServer.getInstance().getConsole()

grim hound
#

Yep

deep herald
#

mb

quiet ice
# grim hound Yep

You're defo doing something wrong, but I cannot say what without having a look at your jar

deep herald
#

also @sullen marlin question. is there cmd label in bungee?

sullen marlin
#

no, because a command shouldnt vary based on the alias used to execute it

deep herald
#

what does that mean

sullen marlin
#

what are you trying to do

deep herald
#

i have my own cmd api that im converting to bungee from bukkit

#

and i need label for it

#

i could prob make my own label system but idk

sullen marlin
#

getName() ?

#

still doesnt really answer the question

deep herald
#

oh

#

ok theres no description or no aliases ig :D

sullen marlin
#

there are aliases

#

but you dont get which alias was used in .execute because that is unecessary

deep herald
#

um

sullen marlin
#

theres no usage or description

deep herald
#

why tho

tardy delta
#

how is this always true when reached

sullen marlin
#

| '_" doesnt do what you think

worldly ingot
#

Yeah

#

Some bitwise magic going on there

tardy delta
#

that sets the lowercase bit doesnt it?

worldly ingot
#

You could always Character.toLowerCase() 👀

sullen marlin
#

^

worldly ingot
#

It's waaaay more readable

sullen marlin
#

and works with non-ascii

#

and underscore is ascii 95 so would definitely blow everything above z, I dont think ascii is bitwise at all

tardy delta
#

wait its ' ' dammit

#

my bad

tardy delta
sullen marlin
#

bruh you're not coding the moonlander in 1965

native nexus
#

I was about to say, why be so precise xD

sullen marlin
#

call the method rather than write shit code

dreamy chasm
#

are there any strings that are disallowed as PDC namespacedkey ID's? Specifically wondering if 'id' might upset something, below being what I mean
meta.getPersistentDataContainer().set(new NamespacedKey(MLcore.getInstance(),"id"),PersistentDataType.STRING,ID);

sullen marlin
deep herald
#

like i thought it would be a thing

sullen marlin
dreamy chasm
deep herald
#

also can u not set aliases?

sullen marlin
#

I already told you there's aliases

native nexus
deep herald
sullen marlin
#

no, it's final

#

part of the constructor

deep herald
#

oh

grim hound
tardy delta
dreamy chasm
grim hound
tardy delta
#

anyways said enough

deep herald
sullen marlin
grim hound
#

It just copies a char array

sullen marlin
deep herald
#

sob

grim hound
deep herald
#

hi

native nexus
#

I do setAliases in my constructor... what is the problem? yes I know harded coded values are ehw

native nexus
#

Yes my custom cmd api

deep herald
#

can u help me with mine?

#

cause im getting aids from this

grim hound
#

I made a simple system for that

#

For spigot

#

It just directly accesses the command map

native nexus
#

Honestly I do not really recommend writing your own when there is this resource but if you want to really make it custom to your liking then surehttps://github.com/aikar/commands

GitHub

Java Command Dispatch Framework - (Bukkit, Spigot, Paper, Sponge, Bungee, JDA, Velocity supported, generically usable anywhere) - aikar/commands

grim hound
#

And then synces the commands

deep herald
#

no way. never heard of it 💀

#

i use acf but im challenging myself to make my own

grim hound
native nexus
#

If you want an example of how I did it then you can look at my github linked to my discord profile but I am not going to spoon feed :/

grim hound
#

Since setAliases is broken

native nexus
#

how is it broken?

grim hound
#

It doesn't work

native nexus
#

are you extending command? what are you extending?

native nexus
deep herald
#

this is for bungee but yes i extend

native nexus
#

I haven't really touched bungee except for TextComponent

deep herald
#

real

#

@sullen marlin will you ever add descriptions and usages?

tender shard
sullen marlin
#

bungee doesnt have a help command so its not really useful

quaint mantle
#

how would i get the amount of damage an itemstack does

tacit arrow
#

Is there a way to make it so player's do not do a sweep attack?
I saw something about generic_attack_speed but that dosent do anything when actually hurting the mob.

inner mulch
#

does somebody know how i can ensure read - modify - write atomicity with rliveobjects in redisson?

timid hedge
kind hatch
#

What's the stacktrace say?

timid hedge
# kind hatch What's the stacktrace say?

This is everything thats being sent:

issued server command: /kit reload
[00:37:35 WARN]: [Kits] Default system encoding may have misread config.yml from plugin jar
quaint mantle
#

how would i get the facing of a player but its just
west north east south instead of of the extra things

drowsy helm
# quaint mantle how would i get the facing of a player but its just `west` `north` `east` `sout...
public static String getDirection(Player player) {
        double rotation = (player.getLocation().getYaw() - 90.0F) % 360.0F;
        if (rotation < 0.0D) {
            rotation += 360.0D;
        }
        if ((0.0D <= rotation) && (rotation < 22.5D)) {
            return "W";
        }
        if ((22.5D <= rotation) && (rotation < 67.5D)) {
            return "NW";
        }
        if ((67.5D <= rotation) && (rotation < 112.5D)) {
            return "N";
        }
        if ((112.5D <= rotation) && (rotation < 157.5D)) {
            return "NE";
        }
        if ((157.5D <= rotation) && (rotation < 202.5D)) {
            return "E";
        }
        if ((202.5D <= rotation) && (rotation < 247.5D)) {
            return "SE";
        }
        if ((247.5D <= rotation) && (rotation < 292.5D)) {
            return "S";
        }
        if ((292.5D <= rotation) && (rotation < 337.5D)) {
            return "SW";
        }
        if ((337.5D <= rotation) && (rotation < 360.0D)) {
            return "W";
        }
        return "";
    }```
quaint mantle
#

thanks

drowsy helm
#

its a pain in the ass finding the proper values lol

quaint mantle
#

wait

#

it has south west and south easy and north west and north aesy

drowsy helm
#

yes

#

do some math and you can reduce it to N S E W

quaint mantle
#

okk

wet breach
#

and from there you could get cardinal directions?

echo basalt
#

eh that's not really scalable code

#

I remember I once made a lil plugin that just had a list of directions and it used the list size and some math to get what direction you were looking at

#

That way you can add more directions and it'll just work

wet breach
#

not sure what is not scalable about using getDirection()

#

but ok

echo basalt
drowsy helm
#

whats the difference with getDirection

#

thats just a vector

#

you'd still have to discriminate by yaw

drowsy helm
wet breach
#

there is a total of 8 cardinal directions

echo basalt
#

¯_(ツ)_/¯

#

made it like a year ago

#

for some rando commission

drowsy helm
#

public static final BlockFace[] axis = { BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST }; public static final BlockFace[] radial = { BlockFace.NORTH, BlockFace.NORTH_EAST, BlockFace.EAST, BlockFace.SOUTH_EAST, BlockFace.SOUTH, BlockFace.SOUTH_WEST, BlockFace.WEST, BlockFace.NORTH_WEST }; 

public static BlockFace yawToFace(float yaw, boolean useSubCardinalDirections) {
  if (useSubCardinalDirections) {
  return radial[Math.round(yaw / 45f) & 0x7];
 } else {
  return axis[Math.round(yaw / 90f) & 0x3];
 }
}
}```
thsi seems nice
echo basalt
#

that's cool if you have like

#

block faces

#

mine's exclusively for like a placeholder or whatev

drowsy helm
wet breach
#

must have been removed or something but I am pretty sure you used to get the cardinal direction a player was facing

#

all well, guess your solution is the next best or illusions

drowsy helm
#

nope

#

thats the exact reason why i used the code i sent, because it wasnt in api

wet breach
#

Well idk when you looked

#

the api goes back many years

drowsy helm
#

4 years ago

wet breach
#

many forget I been here since nearly the beginning of bukkit

drowsy helm
#

may 22nd

#

2020

wet breach
#

I guess that could be something someone pr's

#

cardinal direction

drowsy helm
#

im surprised its not a thing with the player's dir on F3 being cardinal

wet breach
#

it used to tell you in F3 the cardinal direction

echo basalt
#

still does

#

that's prob clientside though

#

p sure nms has a yaw to blockface method somewher

torn shuttle
#

my car broke down in the highway and somehow I just know it's illusion's fault

echo basalt
#

I replaced your oil with chicken grease

torn shuttle
#

I think he snuck into my car in the middle of the night~ day and ruined the transmission

torn shuttle
#

see you in 15 years in court

echo basalt
#

lmfao

torn shuttle
#

mark your calendar for my repayment in 40 years

echo basalt
#

im still waiting for my "come check out the army" letter

torn shuttle
#

what?

#

how old are you?

echo basalt
#

18

#

19 in like 3 weeks

torn shuttle
#

ah yeah that would make sense

#

that's fine if you skip it you go to jail and I can live with that

echo basalt
#

I also went to my bank like a month ago and asked for physical letters on the mail and they still havent sent me shit

torn shuttle
#

lmao I can already picture the PSP showing up at your door with handcuffs

echo basalt
#

what for

#

why would my landlord arrest me :)

torn shuttle
#

if you don't do the army day you go to jail

echo basalt
#

I know

#

but

#

they didn't send me the fuckin letter

torn shuttle
#

bet you they'd still put you in there

#

we have a very competent system

#

you'd be one of the few people who might actually get a better diet behind bars than as a free man

echo basalt
#

what's wrong with eating one meal every 35 hours

torn shuttle
#

it was fine when I did it for 10 years but now I'm not doing it anymore so it's wrong again

#

too bad for you

#

the new hotness is having a nutritionist

sullen marlin
#

why tf are people trying to download literally thousands of versions of kotest

small valve
#

I have a teleportation plugin and when I teleport players they are getting kicked for "flying is not enabled". I know the easy fix is enabling flight on server.properties, but is there a way to do this via code?

rotund ravine
#

How are you teleporting then

#

@small valve

small valve
#
        // Used to stop console spam of "MOVED TOO QUICKLY"
        Bukkit.getScheduler().runTaskLater(
                plugin,
                () -> player.teleport(location, PlayerTeleportEvent.TeleportCause.PLUGIN),
                1
        );
small valve
rotund ravine
#

Version?

small valve
#

1.20.4-R0.1-SNAPSHOT

rotund ravine
#

U doing other sketchy stuff?

small valve
#

Sketchy? 😭

slender elbow
#

sussy

small valve
#

;^; sketchy as in like bad or

slender elbow
#

something we can hold you accountable for

small valve
#

It's an RTP plugin ;-;

rotund ravine
#

What’s the rest of the method before the to

#

Tp

native nexus
#

What do you guys recommend for dependency injection, guice or just classic old pass in via the constructor

echo basalt
#

classic

wet breach
native nexus
#

Well my project is going to become larger every week and I am just not sure what is the best pattern. I am currently doing a Provider kind of pattern

sullen marlin
#

Idk I just code whatever

native nexus
#

If the first and last are the same then why does Guice exist o.O

sullen marlin
#

Well aren't the first and second the same then

young knoll
#

There’s only 2

wet breach
#

anyways the purpose of guice is so that you didn't have to specifically depend on various stuff, and instead it was more centralized.

echo basalt
#

you're doing this kind of patterns but you still can't follow naming conventions

#

or follow decent beginner habits like avoiding static

small valve
# rotund ravine What’s the rest of the method before the to
    public static boolean teleport(Player player) {
        World world = player.getWorld();

        if (safeLocations.get(world).isEmpty()) return false;

        Location location = safeLocations.get(world).remove(0);

        // Used to stop console spam of "MOVED TOO QUICKLY"
        Bukkit.getScheduler().runTaskLater(
                plugin,
                () -> player.teleport(location, PlayerTeleportEvent.TeleportCause.PLUGIN),
                1
        );

        if (safeLocations.get(world).size() <= getMinLocationsCount())
            populateLocations(settings.getAllowedWorlds());

        return true;
    }
echo basalt
#

CONSTANTS_ARE_NAMED_LIKE_THIS

#

OnlyClassesAreNamedPascalCase

native nexus
#

Oh you mean the static functions should be methodsAreNamedLikeThis

echo basalt
#

yeah

#

You're also not following the basic principles of OOP

#

Like encapsulation

quaint mantle
#

Is it ok to prefer inheritance over composition for only holding data

#

There's no actual behavior or anything

torn shuttle
#

also none of it is trash so get that garbage collection out of here

deep herald
echo basalt
torn shuttle
buoyant viper
#

just buy more RAM

young knoll
#

Just download more ram

torn shuttle
#

just mine raw materials, process them and turn them into ram at your home forge

torn shuttle
#

that kid is probably dropping out of college by now

deep herald
#

LMFAO fr

river oracle
#

is there a way to tell if a player clicks a display entity

#

not getting any response from EntityInteractEvent

kind hatch
#

They have no hitbox, so no.

river oracle
#

oh yeah pepe_laugh

#

any way you can add a hitbox to them or no

kind hatch
#

You could try setting up an interaction entity to be the same size as the display entity, but its kinda hacky.

river oracle
#

ahhh

#

meh I'm fucking around I'll just trigger it by walking into it

kind hatch
#

How do you plan on doing that?

river oracle
#

getNearbyEntities

#

unless that doesn't work

torn shuttle
#

can you tell I'm progressing?

young knoll
#

You can rayTrace and get display entities

#

Thanks to the raySize param

torn shuttle
#

isn't there an interaction entity?

#

doesn't that have a hitbox?

#

that's what I was planning to do in a little bit

young knoll
#

Sure

#

But that’s an extra entity!!!!111one

torn shuttle
#

my cpu started crying when you sent that message

river oracle
#

unless the player has an item in their hand ig

young knoll
#

Simply force the player to always hold a pineapple

river oracle
river oracle
#

🥲 looks like I need packets I really wonder if this could just be an event

torn shuttle
#

I think I might actually do it today guys

#

after like 5 years of having this stream deck I might actually bother to put some programming shortcuts on it

#

hot reload would be nice to have

#

... actually I might start this project by printing my own custom stream deck mount first

wet breach
river oracle
#

unfortuantely

#

luckily packet events is so easy

#

cbf with packets tbh rn just tryna fuck around lmao

worldly ingot
sullen marlin
#

I think it never got updated to provide a clear and sensible API as opposed to just dumping packets into an event

deep herald
#

@sullen marlin sry to ping again, but i did this
KEY:
red: old method
green: new method

sullen marlin
#

what are you asking

deep herald
#

will the new one work

river oracle
#

I feel like this is a TAS moment

deep herald
#

whats tas

sullen marlin
#

I'm not here to tell you whether random snippts of code work

river oracle
undone axleBOT
river oracle
#

should probably just spam ping forums staff instead sad

worthy star
#
[07:00:16 WARN]: [ZyptrikBoard] Task #11 for ZyptrikBoard v1.0-SNAPSHOT generated an exception
java.lang.IllegalArgumentException: Cannot translate null text
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143) ~[guava-32.1.2-jre.jar:?]
        at org.bukkit.ChatColor.translateAlternateColorCodes(ChatColor.java:356) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at me.hothifa.zyptrikboard.Utils.color(Utils.java:10) ~[ZyptrikBoard-1.0-SNAPSHOT.jar:?]
        at me.hothifa.zyptrikboard.tasks.BoardTask.createBoard(BoardTask.java:37) ~[ZyptrikBoard-1.0-SNAPSHOT.jar:?]
        at me.hothifa.zyptrikboard.tasks.BoardTask.run(BoardTask.java:55) ~[ZyptrikBoard-1.0-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.4.jar:git-Paper-430]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[paper-1.20.4.jar:git-Paper-430]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1636) ~[paper-1.20.4.jar:git-Paper-430]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.20.4.jar:git-Paper-430]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1515) ~[paper-1.20.4.jar:git-Paper-430]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1216) ~[paper-1.20.4.jar:git-Paper-430]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-430]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
#

wtf does this mean

#

the config file is not empty

#

it says null

#

wait are configs case-sensitive?

river oracle
worthy star
#

oh lol

#

uh what

#

why it says just line 0

#

there is all this

#

no errors in console

topaz cape
#

:kekw:

worthy star
#

i debugged and it just broadcasts line 0

deep herald
worthy star
#

?paste

undone axleBOT
worthy star
deep herald
#

idk

#

sry

#

i use a scoreboard api not default

worthy star
#

which one?

deep herald
#

assemble

worthy star
#

does it update itself with the teams thing so no flicker or i have to make it?

deep herald
#

it updated

worthy star
#

cool but i coded that :/

#

and

#

i debugged and it just goes for line 0

deep herald
#
// Set Interval (Tip: 20 ticks = 1 second);
assemble.setTicks(1);
assemble.setAssembleStyle(AssembleStyle.MODERN);```
worthy star
#

i changed line 0 into 1 and made 1 into 0 and now it broadcasts the new 0

deep herald
#

use assemble :D

worthy star
#

:/

#

but i don't think the problem is assamble

#

what i do is

deep herald
#

bro

#

use assemble

#

itll fix all ur problems

worthy star
#

i create a map, then loop over the lines in config and add them to the map, then i loop the map and put the line with its key (the score line)

rare rover
deep herald
rare rover
#

Fastboard better

deep herald
#

fastboard is aids

rare rover
#

how

river oracle
#

Fastboard is still updated too lmao

deep herald
#

i used it with my friend

#

and it breaks

rare rover
#

legit skill issue

#

works fine for me

river oracle
#

I smell skill issues too

rough ibex
#

fastboard is pretty widely used

#

if it was that bad, I'm not sure why it'd be used.

rare rover
#

fr

maiden lotus
#

hey all, I'm currently trying to figure out how to detect when a villager is "looking for a job" in order to let them check for a new custom block for a custom profession

kind hatch
#

Don't you love it when you can't figure out why something isn't working for a good chunk of time, just to then realize that you didn't format a string correctly? 💀

sterile flicker
#

is it possible to use @EventHandler in BukkitRunnable?

minor junco
sterile flicker
minor junco
#

You do ofc

#

You have to register the events of your runnable

#

And make sure they're removed once your runnable ends. Otherwise it could produce memory leakage

sterile flicker
#

how do I register it?

dreamy chasm
minor junco
sterile flicker
minor junco
#

Bukkit.getPluginManager().registerEvents(bukkitRunnable, plugin)

#

You have to extend BukkitRunnable

#

In your class where you want to add the listeners

#

So you end up with a class that extends BukkitRunnable

#

That class you have to allocate an object of, that you can then register

sterile flicker
#
[11:44:02 INFO]: sumeru2 died
[11:44:04 INFO]: UnloadChunkEventx: 39z: 62
[11:44:04 INFO]: §b§lArcade
[11:44:04 INFO]: UnloadChunkEventx: 40z: 61
[11:44:04 INFO]: §6§lOITC
[11:44:04 INFO]: have npcs
[11:44:04 INFO]: LoadChunkEventx: 40z: 61
[11:44:04 WARN]: net.minecraft.server.v1_12_R1.CancelledPacketHandleException
[11:44:04 INFO]: §6§lOITC
[11:44:04 INFO]: have npcs
[11:44:04 INFO]: LoadChunkEventx: 39z: 62
[11:44:04 WARN]: net.minecraft.server.v1_12_R1.CancelledPacketHandleException
[11:44:04 INFO]: §b§lArcade``` https://pastes.dev/hZNRJA5oBi please help when a player teleports between worlds with command or dies through / kill, the NPCs disappear, although events are triggered in the logs, if the the player rejoin, or if he teleport through the portal of mini-games to another world, they will also be visible
eternal oxide
#

They don;t really exist so you have to send their creation packets to the player again

sterile flicker
#

send packets again?

#

if the name of the NPC is written in the logs, then they exist

#
[11:44:04 INFO]: have npcs```
eternal oxide
#

If they are packet based NPC's the server does not know about them

sterile flicker
#

so what should I do to solve the problem?

eternal oxide
#

and thats why you have to send the right packets as needed

#

I already told you how to fix it

sterile flicker
eternal oxide
#

if the player dies, respawns or teleports you shoudl send the add player/entity data packets

sterile flicker
winged anvil
#

looking back on some old code and this is just...wow. ```
if (executor.isForPlayer() && executor.isForConsole())
executor.execute(sender, args);
else if (sender instanceof Player && executor.isForPlayer())
executor.execute(sender, args);
else if (sender instanceof ConsoleCommandSender && executor.isForConsole())
executor.execute(sender, args);

#

probably what happens when you code for too long without breaks

wet breach
winged anvil
#

uh yeah

#

and i couldnt be the one to tell you

wet breach
#

my guess is the first one

shadow night
#

what in holy god does this even achieve

winged anvil
#

not sure

#

this code was from like 2 years ago

shadow night
#

lmfao

winged anvil
#

lmao

upper hazel
#

How slow will reflection be if there are more than 20 created annotations in class fields?

dreamy chasm
#

when it comes to creating large plugins, is there any real value in splitting it up into multiple projects/plugins? I have the main plugin, and I want some functionality on the side that will listen for rabbitMQ messages and triggers functionality within the main plugin. Is there any real reason to have this queue listener in another plugin and have the main plugin as a dependency, or is it generally easier to just bundle it all together

drowsy helm
vocal cloud
#

If it's just going to be messaging the main plugin it might as well just be in it. The only reason to make something 2nd party is if it's standalone.

wet breach
#

however, the benefit though if you could split into another plugin, is if its something that can function on its own

#

the benefit is not having everything else with it for that one thing

drowsy helm
#

SRP principle definitely is applicable here

dreamy chasm
sterile flicker
eternal oxide
#

just resend the add player/info packets for all NPC's

#

in that world

sterile flicker
#

I need a runtasklater

#

otherwise it won't work

#

and do I need to do this when an player dies or only when respawns?

eternal oxide
#

respawns

tawdry echo
#

i have to check if player is under specific Y and better to use is task or move event?

sterile flicker
lost matrix
grim hound
#

I am confused

#

linux

#

fucks up

#

my characters

#

but windows does not

#

what the hell

#

On windows

#

On Linux

#

👍

#

(it should be noted that this happened when I stored every line and then wrote it back in alongside new lines)

#

like this

#

CHARSET is utf8

ivory sleet
#

you know Files.newBufferedReader exists right?

#

:>

grim hound
ivory sleet
#

🥲

#

Not sure if it’d help tho, but yea for consistency might be worth swapping over

grim hound
#

so I can't change it since it only accepts a Path

ivory sleet
#

what other types of input streams do u accept?

grim hound
#

only this

#

I'm mostly confused as to why it only happens on Linux

grim hound
drowsy helm
#

Sometimes it’s literally just the thing you are using to view the file

ivory sleet
#

Yea well, in any case, zipfilesytem is rly nice

drowsy helm
#

Cat the file and see if it’s the same

ivory sleet
#

that too ^

drowsy helm
#

I see you’re using notepad so im assuming you’re ftping into it

grim hound
#

wassdat mean

drowsy helm
#

cat filename just prints the content on the linux terminal

grim hound
#

that's not it

#

I made sure

#

it affects minecraft messages as well

#

and it shows up polish characters normally in files I don't read and then rewrite

drowsy helm
#

Oh thats very strange

wet breach
#

because generally it uses ANSI

grim hound
#

why is that?

wet breach
#

because its for the latin character set and the windows default

#

its always been like that as far as I can remember

#

anyways, just tell notepad to read it as utf8 lol

#

well another mystery solved

grim hound
#

uh

#

now my plugin throws an error

#

before loading

wet breach
#

o.O

#

did you edit with notepad?

grim hound
#

well I just changed the characters to polish

wet breach
#

ah another knowledge to bestow on you then

grim hound
#

and it now does this

wet breach
#

yeah so, if you edit files on windows, it changes the line endings and what not and causes the lines to technically not be correct

#

so you need to fix that on linux side

wet breach
#

yeah, fun games with windows and linux you know

#

anyways, there is a program on linux you can use to change it back

#

so install dos2unix

grim hound
#

uhhhhhhhhhhhh

wet breach
#

then dos2unix (file name)

#

and it should fix it

grim hound
wet breach
#

well you edited the file on windows

#

and then put it back on linux

grim hound
#

no

#

I copied the contents of the windows

#

and pasted into the linux

wet breach
#

yeah, so you also copied the line endings

grim hound
#

ooh

wet breach
#

windows and linux disagree with these things, its dumb

#

uh, idk if notepad lets you see hidden characters

grim hound
#

can't I just change something here?

wet breach
#

probably could I suppose

grim hound
#

I wouldn't want others having the need to install programs just because they use linux

#

most even can't

wet breach
#

you need to detect which type of OS they are using

#

Windows, Linux, and Mac

#

because all three have different line endings 🙂

grim hound
#

what about this?

wet breach
#

Windows uses \r\n Linux is \n and Mac is \r

candid inlet
grim hound
#

it's what the java devs do all the time

wet breach
#

so, all you have to do is once you detect which OS they are using, replace all the line endings with the OS appropriate ones

candid inlet
grim hound
#

like Reference

grim hound
sterile flicker
#
public static void setBlockInNativeChunk(World world, int x, int y, int z, int blockId, byte data) {
        net.minecraft.server.v1_12_R1.World nmsWorld = ((CraftWorld) world).getHandle();
        net.minecraft.server.v1_12_R1.Chunk nmsChunk = nmsWorld.getChunkAt(x >> 4, z >> 4);
        BlockPosition bp = new BlockPosition(x, y, z);
        IBlockData ibd = net.minecraft.server.v1_12_R1.Block.getByCombinedId(blockId + (data << 12));
        nmsChunk.a(bp, ibd);
        org.bukkit.Chunk bukkitchunk = world.getChunkAt(new Location(world, x, y, z).getBlock());
        world.refreshChunk(bukkitchunk.getX(), bukkitchunk.getZ());
    }
for (int platformRow = 0; platformRow < 4; platformRow++) {
            for (int platformCol = 0; platformCol < 4; platformCol++) {
                for (int rowIndex = 0; rowIndex < 16; rowIndex++) {
                    for (int colIndex = 0; colIndex < 16; colIndex++) {
                        DyeColor randomColor = colors.get(random.nextInt(colors.size()));
                        PartyUtils.setBlockInNativeChunk(Map.party, (int) (Data.firstPlatformBlock.getX() + (platformRow * 16) + rowIndex), (int) Data.firstPlatformBlock.getY() - 1, (int) (Data.firstPlatformBlock.getZ() + (platformCol * 16) + colIndex), 35, new Wool(randomColor).getData());
                    }
                }
            }
        }``` why are the players not visible?
wet breach
sterile flicker
sterile flicker
grim hound
#

bruuuh

sterile flicker
wet breach
#

o.O

#

because bufferedreader readline should be able to handle the line breaks regardless of OS

grim hound
#

probably because the file didn't change

wet breach
#

notepad always defaults to ansi

grim hound
#

cuz the error was thrown before it could

wet breach
#

just go into the notepad settings

#

and set for UTF8

grim hound
#

it

grim hound
#

"unable to open the file"

wet breach
#

o.O

#

notepad couldn't open the file?

grim hound
grim hound
wet breach
#

I can't read that

grim hound
# grim hound

this just means: "Error loading file: (...) with the usage of UTF-8. Return to 1250 ANSI."

wet breach
#

interesting

grim hound
#

to be clear

wet breach
#

probably the issue then

grim hound
#

yeah, and the messages are still being turned into gibberish

wet breach
#

I don't use winscp

#

I always use filezilla

#

mainly because you can tell filezilla to automatically fix your files

#

so, like if I am on windows it will temporarily change it for windows and then when saving back to linux it reverts it etc

grim hound
#

or rather it just refused to work

wet breach
#

you seem to have some rather bad luck

#

or just terrible at using software >>

#

anyways, you can't delete files that are in use

grim hound
#

they weren't

#

the server was off

wet breach
#

then perhaps a permissions issue? Or you thought the server was off but really it wasn't

icy beacon
#

The only reason I switched from filezilla to winscp is because filezilla burns my eyes with that light theme

grim hound
#

on seperate days

#

making sure it was always off

#

and it always just refused to work after that, so I had to restart the app

grim hound
#

now it just

#

uh

#

the plugin isn't building

#

wtf

wet breach
#

you really are unlucky

grim hound
#

cuz the error was on a catch (Exception e) { line

wet breach
#

I guess you are never short of work I suppose

grim hound
#

wtf

grim hound
wet breach
#

probably shouldn't be catching Exception

#

that is a generic type

#

it will literally catch everything

inner mulch
#

does somebody know where i can find my meta-inf in intellij?

wet breach
grim hound
#

I used to do catch Throwable

#

uh so

#

good news

#

the plugin now loads

inner mulch
wet breach
#

what cmd?

grim hound
#

bad news is that the text is still turned into gibberish

inner mulch
#

java -jar myjar.jar

grim hound
#

so the issue is most likely in writing

#

amma test

hazy parrot
grave vigil
#

Anyone know how to stop a Written_Book from displaying its generation? I tried to set it to null using BookMeta but it didn't seem to do the trick

compact haven
#

Don't think its possible to stop it from displaying its generation

#

maybe ItemFlag HIDE_ATTRIBUTES?

#

highly doubt it tho

tardy delta
#

java is weird

chrome beacon
#

a char is an int and all non-decimal numbers are ints by default

tardy delta
#

wait its overflowing its byte range

#

was optimizing a lookup table from 65k bytes to 122

#

its kinda difficult explaining complex data layouts

mighty gazelle
#

?inventory

#

?gui

#

?gui

tardy delta
inner mulch
#

guys does some1 know how i can make my own annotation that works like the @eventhandler so i can habe my own eventsystem?

chrome beacon
#

Yeah

#

Time for reflection

inner mulch
#

no :(

tardy delta
#

annotation processor 👅

inner mulch
#

NO

#

no 😔

worthy yarrow
#

Yes

lost matrix
#

@young knoll You have time for a PR which exposes getMatrix() in the bukkit Transformation?
I have to manually convert them currently and im too lazy to setup the spigot project rn 🙂

lost matrix
inner mulch
#

how do i make is so the method get blue too?

flint coyote
inner mulch
#

okay

young knoll
#

Seems like a long time to make a simple PR :p

lost matrix
#

No pressure. I got it working and im not touching any matrix transformations as soon as they work.

young knoll
#

lol

lost matrix
#

Thx copilot. Now we are both confused on what my code does...

river oracle
glacial narwhal
#

In a runTaskTimer that does something every 60 second, how can i do that it stop doing it?

river oracle
#

just cancel the task

glacial narwhal
river oracle
#

BukkitTask#cancel

#

It's returned when you make the scheduler

glacial narwhal
#

i see

#

but how can i get the ID of the task?

river oracle
#

BukkitTask#getID or something

#

BukkitTask should give you it

worthy star
#

hi

#

whats best way to make players vault plugin

river oracle
#

Code it

worthy star
#

i mean for saving the player items, do i use the persididietent (idk how to spell it) data container, or a file

#

or both

river oracle
#

pepeShrug what do you think is best I mean its your plugin.

remote swallow
#

omg no way is that the contributor of Totem

river oracle
#

I mean I'd probably use PDC but that doesn't mean a File is bad

remote swallow
river oracle
#

and enderchest

remote swallow
#

ill bookban a player with a playervault

river oracle
#

I'd store it in NBT though

worthy star
flint coyote
#

Is there a way to know whether a GUI was "forceclosed" or closed by the player (e.g. by pressing ESC)?
I know paper has it but is there a way to find out in spigot?

slender elbow
#

huh

flint coyote
#

Well if the player dies, a new inventory is opened or a plugin calls closeInventory() that's what I'd consider a forceclose.

worthy star
#

save what gui was closed, and wait for 5 seconds and if player dies within that time do stuff

river oracle
flint coyote
#

Hmm guess I'll just store the GUI session until the player either dc's or starts a new one then

charred blaze
#

is there an event for when you have mouse on the inventory slot then you click any of your hotbar's number on the keyboard and it moves the item on that slot

slender elbow
#

InventoryClickEvent

#

check the action or the clicktype or whatever it was, iirc it also gives you the tapped number

charred blaze
river oracle
#

i don't think it'll send a packet if the slot is empty could be wrong tho

#

it only does if its classified as a quick move. It'd be hard to quickmove nothing into nothing so Its probably just a nice shortcut

slender elbow
#

it should still fire in survival mode

#

if both are emlty

#

but even then, the click event is the one that fires

kind ibex
#

How can I make it when water flows and if it breaks a block (seeds for example) it won't drop the block if it can actually drops it (when u put water on wheat seeds it just drops seeds)

next iron
#

im trying to learn how to make plugins but ran into this issue, does anyone know how to fix it? https://i.imgur.com/90dccc3.png

i used this code:

        Inventory inv = Bukkit.createInventory(p, 27, Color.RED + "Benny's gui");
        ItemStack items = new ItemStack(Material.DIAMOND_BLOCK, 1);
        inv.setItem(13, items);
        p.openInventory(inv);```
but the gui title doesnt become red it becomes whats in the image instead
glad prawn
#

ChatColor*

next iron
glad prawn
twin venture
#

Hi , uhh iam getting a weird bug so i made a levels / rewards system with gui and ..

#

when user click on it , it is claimed ..

#

and that works just fine

next iron
icy beacon
twin venture
#

my problem is with the levels that user didn't get yet

#

i can still click on it , and get the reward but how is that ? user didn't get to that level just yet!

next iron
twin venture
#

sorry

next iron
#

im not sure how to help but im guessing theyll also need the part of your code thats managing this stuff

upper hazel
#

I have a question about the mechanics of minecraft why the nether armor is repelled

glad prawn
twin venture
#

it have a config for levels and i didn't have time to change the lore for every level ..

kind ibex
#

Bump

How can I make it when water flows and if it breaks a block (seeds for example) it won't drop the block if it can actually drops it (when u put water on wheat seeds it just drops seeds)

twin venture
#

just asking if my sql part is wrong?

remote swallow
#

ideally you only need the uuid to find data as the uuid should only exist once

#

and you dont need to twr the result set

twin venture
#

so how the system is working rn is :
player get exp , and he lvl up lets say from lvl 1 to lvl 2
in database it will instert :
uuid , 2 , false

which means user did get to lvl 2 , but didn't claim the rewrard ,
in the reward lvls gui , when a user click on the lvl he reached it will change false to true , so :
uuid , 2 , true
means player claimed it and can't claim it again

#

idk if its the best aproch

#

oh nvm fixed it

grim hound
#

somebody help

#

I'm going insane

#

all of my polish characters are getting

#

GIBBERISHED

#

only on linux

#

it shows this

#

instead of like this

grim hound
twin venture
#

weird

grim hound
#

it works just fine on windows

#
private static final Charset CHARSET = StandardCharsets.UTF_8;
kind hatch
#

Can you send the file? I want to test it with my setup and compare it with some polish language files I already have.

grim hound
# kind hatch Can you send the file? I want to test it with my setup and compare it with some ...
    public static void readLines(File file, Consumer<String> consumer) {
        try {
            readLines0(file, consumer);
        } catch (IOException e) {
            throw new AlixException(e);
        }
    }

    public static void readLines0(File file, Consumer<String> consumer) throws IOException {
        readLines(Files.newInputStream(file.toPath()), consumer);
    }

    public static void readLines(InputStream is, Consumer<String> consumer) throws IOException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(is, CHARSET))) {
            //Files.readAllLines(

            String line;

            while ((line = reader.readLine()) != null) if (!line.isEmpty()) consumer.accept(line);
        }
    }

    public static void write(File file, Collection<?> lines) throws IOException {
        try (BufferedWriter writer = new BufferedWriter(new FileWriter(file, CHARSET))) {
            for (Object data : lines) {
                writer.write(data.toString());
                writer.newLine();
            }
        }
    }
kind hatch
#

I meant the language file itself.

#

Unless you are generating it on the fly?

grim hound
grim hound
#

ąęłóśżź

#

pretty much all special polish chars

next iron
#

does anyone know how to avoid nullpointerexceptions? im trying to make a gui for my plugin but
if (e.getCurrentItem().getType() == Material.DIAMOND_BLOCK)
gives nullpointerexception if its an empty slot that the player is clicking
does anyone know how to avoid this?

grim hound
kind hatch
grim hound
next iron
grim hound
kind hatch
#

I am on linux.

grim hound
#

wat

kind hatch
#

Linux Mint 21.3

grim hound
#

my testing server is on fedora linux

kind hatch
#

What java distribution do you use? OpenJDK? Azul?

grim hound
grim hound
#

so prolly openjdk

kind hatch
#

What's java --version ouptut?

grim hound
kind hatch
#

Soo, slightly modified. Same results though.

grim hound
#

uhhh

#

well when I open the file

#

where the messages are stored

#

it says "ANSI 1250 Central Europe"

#

And when I change it to UTF-8 it says that

#

the file could not be loaded

grim hound
#

like in the created file on linux

#

on windows it shows utf8 tho

kind hatch
#

Geez, you're on that legacy encoding.

#

How tho?

grim hound
#

fedora linux I guess

kind hatch
#

What's the output of file -i <your-txt-file>?

lean pumice
#

how i can change the help message on aikar?

grim hound
kind hatch
#

forward slash

#

/home/user/path/to/file

grim hound
#

doesn't seem to find the file

kind hatch
#

wut?

grim hound
kind hatch
#

Is that where the file lives?

sterile flicker
#
public class CustomEntity extends EntityZombie {

    public CustomEntity(Location location) {
        super(((CraftWorld) location.getWorld()).getHandle());
        this.setPosition(location.getX(), location.getY(), location.getZ());
        Zombie craftZombie = (Zombie) this.getBukkitEntity();
        this.setBaby(true);
        ItemStack itemStack = new ItemStack(Material.WOOD_HOE);
        this.goalSelector.a(0, new Goal(this, location.add(10, 0, 0), (float) 1));
        ItemMeta itemMeta = itemStack.getItemMeta();
        itemMeta.setUnbreakable(true);
        itemStack.setItemMeta(itemMeta);
        craftZombie.getEquipment().setHelmet(itemStack);
        craftZombie.setSilent(true);
        craftZombie.setInvulnerable(true);
        craftZombie.setAI(true);
        craftZombie.setCustomName(ChatColor.translateAlternateColorCodes('&',"&4&lCustomEntity"));
        craftZombie.setCustomNameVisible(true);
        craftZombie.setRemoveWhenFarAway(false);
    }
    public void spawn() {
        this.getWorld().addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
    }
    protected void initAttributes(){
        super.initAttributes();
        this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(10.0D);
        this.getAttributeInstance(GenericAttributes.maxHealth).setValue(100.0D);
        this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(1.0D);
    }
}
 public static void registerWithoutID(String name, Class<? extends Entity> clazz) {
        MinecraftKey key = new MinecraftKey(name);
        EntityTypes.b.a(key, clazz);
        if (!EntityTypes.d.contains(key)) {
            EntityTypes.d.add(key);
        }
    }
            registerWithoutID("Custom", CustomEntity.class);```please help, my custom nms entity is not visible
grim hound
#

oh wait

sterile flicker
grim hound
#

forgot "plugins/"

grim hound
#

WHAT THE HELL

kind hatch
#

You should be able to convert it using iconv -f ISO-8859-1 -t UTF-8//TRANSLIT input.file -o out.file

grim hound
#

how do I make this stuff compatible?

lilac dagger
grim hound
#

I would like to solve it for all users that could encounter this issue

grim hound
lilac dagger
#

ye

grim hound
#

why

sterile flicker
lilac dagger
#

because this list was 1 too many

#

i am getting distracted easily

kind hatch
grim hound
kind hatch
#

Ok, so not a system issue. At least what it looks like.

lilac dagger
#

also have entity explosion

#

use an or

sterile flicker
# lilac dagger i think you need id

still not working public static void registerEntity(int id, String name, Class<? extends Entity> clazz) { MinecraftKey key = new MinecraftKey(name); EntityTypes.b.a(id, key, clazz); if (!EntityTypes.d.contains(key)) { EntityTypes.d.add(key); } }

lilac dagger
#

@Override
public void registerEntity(Class<?> entityClass, String name, int id) throws Exception {

    RegistryID<Class<? extends Entity>> registryID = regName.get(EntityTypes.b);
    Object[] idToClassMap = regID.get(registryID);

    Object oldValue = idToClassMap[id];

    registryID.a((Class<? extends Entity>) entityClass, id);

    idToClassMap[id] = oldValue;
}
#

try it like this

#

private static ReflectField<RegistryID<Class<? extends Entity>>> regName = new ReflectField<>(RegistryMaterials.class, "a");
private static ReflectField<Object[]> regID = new ReflectField<>(RegistryID.class, "d");

sterile flicker
lilac dagger
#

it's a class of my own

#

it's just a field chacher

#

the constructor input is the class and field name

quaint mantle
#

Is there a way to change the attack distance of a mob?

lilac dagger
#

modify the finder pathfindergoal

sterile flicker
# lilac dagger the constructor input is the class and field name
public void registerEntity(Class<?> entityClass, String name, int id) throws Exception {
        Field regName = RegistryMaterials.class.getDeclaredField("a");
        Field regID = RegistryID.class.getDeclaredField("d");

        RegistryID<Class<? extends Entity>> registryID = regName.get(EntityTypes.b);//how do I fix this?
        Object[] idToClassMap = regID.get(registryID);//and this

        Object oldValue = idToClassMap[id];

        registryID.a((Class<? extends Entity>) entityClass, id);

        idToClassMap[id] = oldValue;
    }```
grim hound
#

do you know perhaps

#

how I could get this output with java code?

kind hatch
#

@grim hound Maybe try using a FileOutputStream and OutputStreamWriter instead of a FileWriter?

try {
      FileOutputStream fileOutputStream = new FileOutputStream("src/main/resources/localeOLD/locale_pl.yml");
      OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, StandardCharsets.UTF_8);
      BufferedWriter writer = new BufferedWriter(outputStreamWriter);

      writer.write("ąęłóśżź");
      writer.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
kind hatch
#

FileWriter is kinda old.

kind hatch
#

Are any new files you create with java having this issue or is it just this one file?

grim hound
#

seems to also misread the characters

grim hound
sterile flicker
# lilac dagger cast

so ```java
public void registerEntity(Class<?> entityClass, String name, int id) throws Exception {
Field regName = RegistryMaterials.class.getDeclaredField("a");
regName.setAccessible(true);
Field regID = RegistryID.class.getDeclaredField("d");
regID.setAccessible(true);
RegistryID<Class<? extends Entity>> registryID = (RegistryID<Class<? extends Entity>>) regName.get(EntityTypes.b);
Object[] idToClassMap = (Object[]) regID.get(registryID);

    Object oldValue = idToClassMap[id];

    registryID.a((Class<? extends Entity>) entityClass, id);

    idToClassMap[id] = oldValue;
}```
kind hatch
grim hound
# kind hatch <@711986917658329169> Maybe try using a FileOutputStream and OutputStreamWriter ...
public static void readLines0(File file, Consumer<String> consumer) throws IOException {
        readLines(Files.newInputStream(file.toPath()), consumer);
    }

    public static void readLines(InputStream is, Consumer<String> consumer) throws IOException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(is, CHARSET))) {
            //Files.readAllLines(

            String line;

            while ((line = reader.readLine()) != null) if (!line.isEmpty()) consumer.accept(line);
        }
    }
``` how do I change the reading tho?
grim hound
sterile flicker
lilac dagger
sterile flicker
#

on CustomEntity monster = new CustomEntity(event.getPlayer().getLocation()); monster.spawn();

lilac dagger
#

it has to match the og entity's id

sterile flicker
grim hound
lilac dagger
#

is this a new entity?

grim hound
#

it just shows some squares

#

and not the polish chars

#

I made sure my terminal supports polish chars

sterile flicker
grim hound
shadow night
#

bros ł became ⬜

grim hound
#

are you polish?

shadow night
grim hound
#

no kurwa

lilac dagger
#

make sure it has zombie id

grim hound
#

nie kłam mnie

lilac dagger
#

120 sounds too high

shadow night
lilac dagger
#

for zombie

grim hound
shadow night
kind hatch
grim hound
#

sneaky bastard

sterile flicker
shadow night
#

this is how spies are born

grim hound
kind hatch
grim hound
#

you've entered me

#

wait-

#

no

kind hatch
grim hound
#

no homo

lilac dagger
#

old minecraft is weird in that aspect

kind hatch
#

It looks like you have the plain oracle java, which is weird considering most linux distros ship openjdk, but fedora does what it wants I guess. ¯_(ツ)_/¯

#

I have both OpenJDK and Azul on my system though.

sterile flicker
lilac dagger
#

set it to that and you're good to go

kind hatch
#

How did you install your current java?

grim hound
kind hatch
#

Ahhhh

#

Now it all makes sense

#

You know how to install openjdk right?

grim hound
#

still

#

amma force it with some good ol' java code

kind hatch
#

Well you'll have to search the repos for the exact package name using: sudo dnf search openjdk
Then you'll install it with sudo dnf install java-19-openjdk.x86_64 Assuming that's the package name format

#

You may also have to update your system to use that java version as the primary.
sudo alternatives --config java

grim hound
#

installing the aarch64 one

shadow night
#

aarch64? my phone uses that

grim hound
#

so does my server

#

well now it does

shadow night
#

is it that good

grim hound
#

no idea

shadow night
#

lol

sleek estuary
#

If I create an EntityArmorStand as shown in the print and then use entityArmorStand.getBukkitEntity(), will this method create an entity that will no longer be fictional in the world?

kind hatch
#

Try it and see

sleek estuary
lilac dagger
#

getbukkitentity is not registering anything

#

it just does a lazy load of it's bukkit/craftbukkit classes

sleek estuary
sterile flicker
#

how do I cancel the entity creation packet and send my own?

sleek estuary
# lilac dagger yes

I need to teleport an EntityArmorStand, but there is no teleport method. What do I do?

lilac dagger
sleek estuary
#

I can't use getbukkitentity, as it creates an entity that will no longer be fictional

lilac dagger
#

that's simply not true

#

the registration happens only if you register the entity in the nms world

sleek estuary
#

so i can use getbukkitentity?

lilac dagger
#

of course

sleek estuary
#

ok thank you

lilac dagger
#

ah i understood you wrongly then

sleek estuary
lilac dagger
sleek estuary
lost matrix
#

1.8 is highly unsupported.

sleek estuary
#

to avoid checking multiple instances?

lost matrix
#

What do you need the Bukkit Entity for?

sleek estuary
grim hound
#

@kind hatch I just noticed something

sterile flicker
# lilac dagger just look in the methods and see which one is which, or even listen on packet se...

which packet should i handle? ```java
public static void injectPlayer(Player player, NPCManager manager) {
ChannelDuplexHandler channelDuplexHandler = new ChannelDuplexHandler() {
@Override
public void channelRead(ChannelHandlerContext channelHandlerContext, Object packet) throws Exception {

            super.channelRead(channelHandlerContext, packet);
        }

        @Override
        public void write(ChannelHandlerContext channelHandlerContext, Object packet, ChannelPromise channelPromise) throws Exception {
            
            if (packet instanceof PacketPlayOutSpawnEntuty) {//this?
                 
            }

            super.write(channelHandlerContext, packet, channelPromise);
        }
    };

    ChannelPipeline pipeline = ((CraftPlayer) player).getHandle().playerConnection.networkManager.channel.pipeline();
    pipeline.addBefore("packet_handler", player.getName(), channelDuplexHandler);

}```
lilac dagger
grim hound
# grim hound

the first reply is when the characters are this weird gibberish

grim hound
# grim hound

the second is when I change them into the proper polish chars

lost matrix
lilac dagger
#

i see

warped shell
#

Im trying to store an instance of EnderChest, and then #close() it at a later time, the chunk is still loaded but its not closing?
at least from a player standing right next to it its not closing

        if(blocks.containsKey(p.getUniqueId())) {
            EnderChest echest = blocks.get(p.getUniqueId());
            if(echest == null)return;
            Bukkit.broadcastMessage("Closed");
            echest.close();
        }```

the object is org.bukkit.block.EnderChest
lilac dagger
#

if it's out write if it's in read

lilac dagger
dire blaze
#

does anyone know how to get the golden shovel with grief protect

slender elbow
#

🤔

#

just craft it?

dire blaze
#

any gold shovel can be used?

slender elbow
#

iirc the item is configurable in the plugin settings

#

it's nothing special

chrome beacon
#

Yeah any gold shovel should work by default

dire blaze
#

ah thanks for the hot tip

teal venture
#

Anyone want to start a server with me lol

half arrow
#

Can anyone suggest an updated GUI library?

river oracle
#

Well sure actually

#

My rate is 25 an hour

teal venture
river oracle
#

I'll tutor for 20 an hour

zinc moat
jagged bobcat
grim hound
#

what is this?

zinc moat
quaint mantle
#

That looks like a private ip

grim hound
zinc moat
grim hound
#

it's a proxy

zinc moat
#

Oh

#

alrigth

grim hound
#

ye

quaint mantle
#

192 is always private

grim hound
#

I'm developing my antibot

zinc moat
grim hound
#

and found this stresser

quaint mantle
#

idk abr the first one

#

It might fall into a private range too

grim hound
#

but it doesn't do anything but this

#
channel.writeAndFlush(Unpooled.buffer().writeBytes((new Handshake(XDDOS.protcolID, "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1......\u0000.\u0000f84c6a790a4e45e0879bcd49ebd4c4e2", XDDOS.port, 2)).getWrappedPacket()));
      channel.writeAndFlush(Unpooled.buffer().writeBytes((new LoginRequest(this.randomString(14))).getWrappedPacket()));
``` this is what the crasher does
grim hound
zinc moat
#

my 3 braincells are exploding

median trench
#

Hey, does anyone know which packet sends blocks to the player? I am assuming it's not the "ClientboundBlockUpdatePacket" because there would be a lot of packets at once. But can't find any with a list of blocks?

grim hound
#

but the thing is

grim hound
#

the server shouldn't care

#

yet it does

median trench
grim hound
median trench
# grim hound this

where's (or what) your question btw, I've worked with this packet a lot

grim hound
#

why does the server say that the hostname is invalid

grim hound
median trench
#

proxies are not notchian are they?

grim hound
median trench
median trench
#

Actually

twin venture
#

Is it possible to make a npc do certin job using chatGPt?
so my idea was spawn a type of npc ,
KILLING_MOBS,
FISHING,
CAVING,
LUMBERJACK

and when it spawn , it will use chatGpt , to do its job , so it will look for woods and cut it , etc is it possible?

#

i want to make it fully ai based

median trench
half arrow
grim hound
#

it's a paper server

median trench
#

maybe it has something to do with \ characters?

grim hound
median trench
grim hound
#

I only decompiled it online

median trench
grim hound
#

Like I was saying, this isn't a proxy server

median trench
median trench
#

have you really looked into it?

#

Pattern is [0-9a-f.:]{0,45}

#

idk which one is split[1] (probably not this one), but the . of the second one also matches

median trench
quaint mantle
#

How do I make other mobs agro on my invulnerable custom entity?

dawn flower
#

can nms read packets that the server sends to the players? (and cancel them if needed)

worldly ingot
#

Well yeah they have to be sent some way or another