#help-development

1 messages · Page 298 of 1

wet breach
#

well you would have to specify the variable at the top of the class or outside of a method

#

easier if its at the top to keep track of class variables

ionic thicket
#

oke now i dont have errors

#

how do I access that in the other class now? do i need to create an instance?

undone axleBOT
undone spindle
#

?

#

is there a command for custom configuration?

#

?c

remote swallow
chrome beacon
#

?configs

undone axleBOT
remote swallow
#

fuck

undone spindle
#

pog

wet breach
remote swallow
#

ive looked at the cc list so many times idk how i never noticed that

dry yacht
#

I read about how booleans are encoded to integers (shouldn't it be bytes tho?) and how they store true as 1 and false as 0. But thats encoding, when decoding, == 0 is false should still hold, as I've read in OpenJDK's source. Am I missing the catch there?

#

What equals returns is completely up to the implementation of the object you're calling it on. The default implementation is a memory address comparison (==), so no, this cannot be said that generically.

wet breach
quiet ice
#

ints, shorts, chars, bytes and booleans are ints

wet breach
#

where it does both

quiet ice
#

But for boolean arrays != 1 should also hold according to the JVMS - but I strongly doubt so

dry yacht
quiet ice
dry yacht
quiet ice
quiet ice
dry yacht
dry yacht
quiet ice
#

There is definitely one implementation out there that does it

#

However it isn't being freely advertised as you can't really sell non-hotspot JVMs if you want to work with Oracle

#

Eclipse OpenJ9 is a perfect example for that

undone spindle
#

?tab-complete

#

to bad lol

dry yacht
# dry yacht Oh, others actually do that? I thought java never packs booleans. Now I get what...

But I guess that the average programmer won't have control on such a low level anyways. The original question for me was more of a "what happens if you cast an integer to a boolean". In that case, the only sensible thing to do is to accept everything non-zero as true. Of course, if you pack bits, you have no more space for any other values besides zero and one. But you're not going to reinterpret an integer as a byte[], 99% of the time.

quiet ice
#

In java world you cannot cast ints to booleans in any way I believe

#

It's only something in JVM world, at which point true and false does not exist (hell boolean only exists in descriptors but not anywhere else)

remote swallow
# undone spindle ?tab-complete

create an on tab complete method and extend TabExecutor, switch the args.length and then return a StringUtil.copyPartialMatches with the results you want to show

#

ill paste an example rq

#

something like that

#

args.length starts at 1, args[] starts at 0

dry yacht
wet breach
#

and therefore that caveat is only for custom objects

#

which is what should be noted

quiet ice
dry yacht
# wet breach and therefore that caveat is only for custom objects

Not really, I have had countless "professional codebases" which either didn't override that method on some classes at all, or did a bad job at doing to. To just tell people that .equals() checks contents is plain wrong and may cause a lot of headaches, as it's completely depending on what the person who wrote the class decided to implement.

wet breach
dry yacht
dry yacht
quiet ice
#

Whatever JDI even is

wet breach
#

IE, openJDK won't have it

quiet ice
#

Ah, debugging

quiet ice
wet breach
#

OpenJDK does not contain proprietary code

#

which is basically the sun packages

wet breach
#

its not my opinion

#

OpenJDK contains no proprietary code

quiet ice
#

Well yeah, but as it turns out there is no proprietary code in OpenJDK

wet breach
#

there may be some things in the sun packages that were deemed allowed

quiet ice
#

Or any JDK for that purpose

dry yacht
wet breach
#

but a lot of stuff under the sun package though is proprietary

quiet ice
#

Perhaps IBM J9 is propriatary, but it's since been open-sourced

wet breach
#

possible maybe, but its also possible for a JDK implementation to just implement something anyways. I just know openJDK is from oracle just open source version

rotund ravine
#

?jdk

quiet ice
#

The stock JVM is licened under the GPL, so the only thing that can be propriatry is outside it

#

So the java mission control center (or whatever it is called) is proprietary for example

#

And thus not present in OpenJDK

wet breach
#

nvm

#

JDK is free again

#

ever since 17

#

seems oracle didn't have any luck with that change they did some time ago lmao

quiet ice
#

That was to be expected

wet breach
#

yes, but it took them a while to realize that

fervent prawn
#

What should the Main class look like in the plugins of version spigot 1.18 and higher?

remote swallow
#
public class PluginName extends JavaPlugin {
    @Override
    public void onEnable() { 
        // Startup code
    }
    @Override
    public void onDisable() {
        // Disable Code
    }
}
fervent prawn
remote swallow
#

if you mean intellij saying that its onEnable and onDisable

fervent prawn
rotund ravine
#

?google Decimal formatter

undone axleBOT
remote swallow
#

do you have spigot-api in your maven/gradle?

rotund ravine
remote swallow
#

?main

remote swallow
#

do you have spigot/spigot-api in your build file

#

what version?

#

?bootstrap

undone axleBOT
#

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

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

remote swallow
#

also use maven or gradle

#

its a lot easier

fervent prawn
#

Okay, thanks!

quaint mantle
#

How would i make my scoreboard dynamic with my custom enconomies essence and tokens? Would I use a runnnable or hashmap or something? hmm

storm scaffold
#

import org.bukkit.entity.Zombie;

import static org.bukkit.Bukkit.getLogger;

public class Herobrine extends Zombie {
    public void spawn() {
        getLogger().info("Herobrine has spawned");
    }
}```

What am I doing wrong here? Shouldn't the isBaby() method (and all other methods this says are abstract) already be defined in the Zombie class?
worldly ingot
#

No. Your code won't even compile

#

You're extending a Bukkit interface, which isn't valid

storm scaffold
#

I basically want to make it so I spawn the zombie, and can run my own methods on it as well as usual zombie ones

chrome beacon
#

You can't extend an interface

#

You implement it

#

You should be extending the vanilla zombie to get the behavior you want

storm scaffold
#

Oh ok, how do I do that?

north cipher
#

why do we haveorg.bukkit.util.Consumer if java.util.function.Consumer exists

chrome beacon
#

Bukkit is old

slender kiln
#

does anyone know a tab completer plugin for 1.8?

chrome beacon
#

Older than the java consumer

north cipher
#

alright il just use the java one, thanks

storm scaffold
chrome beacon
river oracle
remote swallow
#

packets probably

#

just use protocol lib

#

it'll bef ien

river oracle
#

Legit how I feel every time I hear scoreboard or teams

remote swallow
#

i simply dont deal with scoreboard or teams

#

my life is great

#

i also havent dealt with nms or packets yet

river oracle
#

I rather deal with packets than scoreboards

eternal oxide
#

nms and packets are fun to play with. I'd hate to make a plugin that depends on them though

remote swallow
#

if you dont do paid work you cant be forced to do stuff with them

#

problem solved

storm scaffold
lapis swan
#

does the bungee.yml has the same syntax as the plugin.yml ?

remote swallow
river oracle
#

Just use screaming sandals

lapis swan
#

But i Could add them ? what about permissions ?

#

okay so its only for name, version and main ?

chrome beacon
orchid gazelle
#

Its EntityZombie I think

undone spindle
#

im trying to use worldedit and worldguard but for some reason worldedit does not want to work as dependency in code

#

it does work as dependency in the pom.xml

tender shard
undone spindle
#

i don't know

#

let me try

#

i mean if it autocompletes i think so right?

tender shard
#

then you are simply using the wrong import

#

Vector is probably in another package

#

or it's called Vec3 or something, idk

undone spindle
#

or it was something in an older version

#

or a fabric version

#

im using the bukkit version

#

but that shouldnt be it

remote swallow
#

i think wordedit use vec3

tender shard
undone spindle
#

i can look trough all tabs

#

or try making a variable

remote swallow
#

type Vector3 then just see if you get an import option

undone spindle
#

lmao ur right

undone spindle
#

that helps thx

lapis swan
#

BungeCord
Should I use:
ProxyServer.getInstance().getConfigurationAdapter().getServers()
or
ProxyServer.getInstance().getServers()

First option seems to be more accurate as it should show the join able server but has this method a bigger impact on the Server ?
Is it better to get all and check when sending a Player ?

#

Is there a better way to send a message to all player on a server than iterating over the proxy player list in the Server info ?

twilit garden
#

Help is there a way to make a function that automatically separate lines if I input a string?
I’m trying to make making lore for items easier

remote swallow
chrome beacon
lapis swan
final monolith
chrome beacon
#

Thread sleep 💀

final monolith
#

Whats your recommendation? Im open for tips.

chrome beacon
#

Use run task timer

final monolith
chrome beacon
#

or create your own thread

quiet ice
#

?jd-s It's async-safe?

undone axleBOT
quiet ice
#

Doesn't say so, but I'll assume so

spring pike
#

hey man, I go remotivated to try to fix my issue. I hope you remember. I activated NMS for my project, how can I have a look at the hit logic? I only know java enough to make minecraft plugins, not much more sadly

dry yacht
final monolith
#

It's kind of funny how people start nitpicking on some completely irrelevant implementation decisions rather than helping with the logic problem at hand, xD.

Hahahah, thats true.

I create that simple example: https://paste.md-5.net/okobazubiq.cpp

#

Thats suppose to create a line from location to target, but its generates a weird infinite line 🤔

#

im not too good with vectors xD

ocean hollow
#

how can I read this? Should I need to "plugin.getConfig().getString("books.green[0]")"? Or how?)

final monolith
#

something in that way

ocean hollow
#

thanks

final monolith
# ocean hollow thanks
for (Map.Entry<String, Object> key : getConfig().getConfigurationSection("books").getConfigurationSection("green").getValues(true).entrySet()) {
    Bukkit.broadcastMessage(key.toString());
}
dry yacht
# spring pike hey man, I go remotivated to try to fix my issue. I hope you remember. I activat...

Of course I remember! Well, I don't really know what to tell you, other than that it does require quite a lot of foundational knowledge to jump around in a massive codebase like the minecraft-server and keep a mental model of it's flow of data. It's sad how I myself haven't yet set up a proper environment to navigate through it, because I procrastinate all the time.

I usually use build-tools to build a version, then navigate into it's CraftBukkit folder and use grep -rni '...' src, where ... is what I'm searching for. I searched for new EntityDamageByEntityEvent, to check who creates these events. Then, I saw that it's inside of the src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java, where many events originate. After a bit more digging around, the EntityLiving has a method called damageEntity0(final DamageSource damagesource, float f), which craftbukkit patched to spawn a new event through the event factory when that living entity took damage. I guess this would be the main place to put some "probes into", where one would start tracing this weird behaviour your server produces.

But again, this will take a pretty long time. Have you checked if the event gets fired twice if you get damaged twice already? If it doesn't (like it didn't ever for me), I think that we at least have somewhat of a startingpoint by knowing that. But make sure, really check that.

spring pike
dry yacht
# final monolith > It's kind of funny how people start nitpicking on some completely irrelevant i...

Thanks, I'll take another look at it. I just often times get headaches when looking at other peoples' code and my mind kind of starts closing up, which is why I have a hard time with little excerpts like these, xD. In general, if you want to ask a question in here, try to isolate the logic beforehand into a simple little unit with as little side-effects as possible, so that others can get a hold of what you were thinking when you wrote it. Gonna get back to you in a sec!

storm scaffold
#

For making a custom entity, would it be better to make an extension of a vanilla entity, or to make an entirely new class where it has an entity attached to it in an instance variable?

ivory sleet
#

I like the second design

#

where you delegate

#

since inheritance is harder to work with as it strongly couples your logic with the already existing base logic

#

yk

#

composition over inheritance :3

dry yacht
# final monolith Thanks for the tips!!

I really cannot seem to find any issues with the logic you use in your code... You keep track of the distance travelled by covered, and as long as that's smaller than distance, you add space to it every time you add vector to p1, where vector is the directional unit-vector of length space.

Don't quite get what you're trying to do with the outer row loop, but that shouldn't affect anything...

dry yacht
dry yacht
spring pike
#

but if it works, it works i guess

dry yacht
lapis swan
#

is there a difference between getProxy.foo and ProxyServer.getInstance.foo ?

spring pike
wet breach
#

and there we go

dry yacht
ivory sleet
#

like its the same instance

spring pike
ivory sleet
#

but one is through the singleton, and one through the Plugin base class you derive

wet breach
#

one is a static the other isn't

wet breach
#

Generally you should go with the normal method and only use the static way when you need it

ivory sleet
#

For unit testing, Plugin::getProxy

#

but idm really I suppose

wet breach
#

it doesn't matter ultimately, but for consistency though best to stick with the standards 🙂

lapis swan
#

so which is the standard ?

wet breach
#

As I said, only use static when you need it, like anonymous classes for instance

#

where to pass something to the class it would need to be static anyways

ivory sleet
#

but singletons are usually avoided in the modern world

#

since they cause more issues than they solve

#

(proven in the industry especially)

wet breach
#

well when used incorrectly certainly XD

tardy delta
#

my programming teacher uses singletons 💀

ivory sleet
#

ye

lapis swan
#

I'm not java enough to understand which is the singleton 😄

remote swallow
#

on pdc if i were to get an int, if that wasnt set would it return null or 0?

#

just checked jds, it says null

lapis swan
eternal night
remote swallow
#

ah, so it would just be 0 if not set?

dry yacht
remote swallow
#

ah mk

kind hatch
#

That’s the point. If you didn’t know, primitives cannot be null, so they will always return something. The wrapper objects have that third state so by default, they are null.

dry yacht
# ocean hollow

You're accessing books.green, where it seems like books is an actual section, but green is not and returned null, which is why you cannot call getValues(true) on it.

ocean hollow
#

Just remove true?

remote swallow
#

you dont really need the getValues part

#

also use camelCase for var names

ocean hollow
#

okey

dry yacht
# ocean hollow Just remove true?

You don't have the section green in the section books, so you cannot access it. Try having a look at your actual YAML file first, and check if you really write to that section before trying to read from it.

ocean hollow
dry yacht
#

green is not a configuration section, but a list of objects

fallow violet
#

you can sign 2 objects to a list?

#

is it a hashmap?

dry yacht
# fallow violet you can sign 2 objects to a list?

This is just an unusual format of notating a list. It's JSON equivalent is basically:

green: [{name: ..., cmd: ...}, {name: ..., cmd: ...}, ...]

Usually, you would have a newline right after the - and start at the indent of cmd.

dry yacht
wet breach
#

you can use json in yaml

#

if that is what you prefer

dry yacht
# wet breach you can use json in yaml

Yes, this is a known fact. I was not at all talking about preference tho, I was just trying to provide a more familiar notation to @fallow violet, because they thought that green's value was a map, mapping objects to objects, which is also possible in YAML. It's a list tho, which is formatted in a very unreadable way - but still a list.

lapis swan
#

do I need to run the ServerInfo.ping() function in a Scheduler for example runAsync or could I just use it directly ?

wet breach
#

I am surprised their yaml isn't giving them errors on that indentation

#

for their list objects

#

since it should be indented 2 in

dry yacht
dry yacht
lapis swan
#
                        proxy.getScheduler().runAsync(JoinMeBungee.instance, new Runnable(){
                            @Override
                            public void run(){
                                si.ping(new Callback<ServerPing>() {

                                    @Override
                                    public void done(ServerPing result, Throwable error) {
                                        //my code
                                        
                                    }
                                });
                            }
                        });

I wrote this but it feels a bit strange

#

I don't understand it but I like it 😄

#

Lambda stuff I guess ?

quaint mantle
#

so I know in client side mods there's the Minecraft class, is there any way to do like EntityPlayer.getMinecraft() just like in forge? but on server side

dry yacht
# lapis swan Lambda stuff I guess ?

Every interface which has just a single method can be replaced by an equivalent lambda. This saves time by you not having to create a new anonymous class instance with new.

tender shard
quaint mantle
#

kk

#

so I'm just browsing through NMS and found some .class files, is it possible to edit those if I wanted to?

eternal oxide
#

?contribute

eternal oxide
#

follow the instructions on compiling your own spigot build

austere cove
tardy delta
#

a single abstract method :}

#

smh is that java formatting, those colors and fonts are weird

#

linux moment

austere cove
#

doesnt that match github colors?

tardy delta
#

ye

austere cove
#

looks better than this tho

tardy delta
#

nahh

#

that one looks fancier

river oracle
#

I'm on linux this is what mine looks like

tardy delta
#

linux fonts are weird

#

and idk what normal ones are

river oracle
#

debian prob has weird defaults

tardy delta
#

i still dont have nvidia drivers lol

austere cove
#

vomit colors

austere cove
#

still works as a lamba but has >1 methods

tardy delta
#

Conceptually, a functional interface has exactly one abstract method. Since default methods have an implementation, they are not abstract. If an interface declares an abstract method overriding one of the public methods of java.lang.Object, that also does not count toward the interface's abstract method count since any implementation of the interface will have an implementation from java.lang.Object or elsewhere.

remote swallow
quaint mantle
river oracle
remote swallow
#

i dont believe you

river oracle
#

its just custom css

remote swallow
#

you would still need something to parse that

river oracle
#

thats not how css works but!

#

don't need a css parser its read by the application

remote swallow
#

open asar be like

river oracle
#

all you have to do is edit the current values within that app you don't have to inject new values

dry yacht
somber berry
#

I am trying to protect the blocks from a list from being destroyed by explosions but it seems it does not work.

#

what am I doing wrong? 🙂

quiet ice
spice shoal
#

Hi guys , i have a problem.
When I restart the server , spawn resets ...
How do I get it to save in config?

rough drift
spice shoal
#

o i have missed it , thanks

dry yacht
# quiet ice To be fair, there can never be an object with a single method

That's why I talked about an interface specifically in my first answer on this, as the Object base class of course brings it's whole API with it. These interfaces act like a function type, as often times indicated by the FunctionalInterface annotation. Kind of like a function pointer in C. Lambda functions are just syntax sugar, as they are in cpp (I'd assume).

quiet ice
#

All interfaces are objects

tender shard
#

obviously, what else would they be lol

#

interfaces are classes and classes are objects, yeah

dry yacht
tender shard
#
Class<Player> playerClazz = Player.class;
#

interfaces, in bytecode, are just classes that have the "interface" flag set

dry yacht
#

.class is internal representation in my mind. But the interface itself is just a contract, and when used with a lambda, it only defines a single method. I think that we're basically talking about different levels of abstraction.

tender shard
#

at least I think so. geol knows more about bytecode than I do, so maybe he can confirm it, or complain if I am mistaken

tender shard
#

otherwise reflection wuoldn't work

dry yacht
# tender shard every class is an object in java

Yeah, of course, everything's an object in JS too, but I would never think about that when explaining to somebody how lambdas work with interfaces. This is an implementation detail which is not of interest when ig comes to this limited view I was getting at.

tender shard
#

well not everyhting is an object in java

#

for example primitives

#

that's why you cannot return "null" from an "int" method e.g. lol

dry yacht
tender shard
#

fair enough

#

SQL be like

SELECT name FROM dictators LIMIT 1;

result:
Hitler

round crag
#

Hey sorry I don't know if I can ask this question here but you know a BungeeCord 1.19.3 npc plugin ? Please

round crag
#

Ok thx

dry yacht
#

Maybe my views on things just need a little update. I always imagined interfaces as this inert type which have no functionality, where .class is kind of "auto-generated" code and just tells implementers what their function tables have to at least contain. Well.

naive bolt
#

what does this mean in my plugin

sullen marlin
#

Sir this is spigot

naive bolt
#

i mean its a plugin issue not paper i would think

orchid gazelle
#

Yes it is

#

Can you show us your code?

eternal oxide
#

recreate the issue on Spigot

naive bolt
#

idk how it originated in the first place

quiet ice
naive bolt
#

non of that

quiet ice
#

Or while (true)?

orchid gazelle
#

We need the code probably

jagged monolith
#

Either way, see if you can reproduce the issue in spigot. Otherwise, paper isn't really supported here.

orchid gazelle
#

Does not sound like a paper issue

naive bolt
#

its on a paper server but not using paper api

quiet ice
#

Or actually, MinecraftServer#stop is getting invoked

naive bolt
eternal oxide
#

doesn't matter

quiet ice
#

So did you shut down the server?

orchid gazelle
#

We need the code

eternal oxide
#

If you can produce the error on Spigot we can help

#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

naive bolt
#

ill see what paper support say

quiet ice
orchid gazelle
#

Imma try to help you on paper lmao

quiet ice
naive bolt
orchid gazelle
#

We need the C - o - d - e

naive bolt
#

I cannot give you that

quiet ice
#

Nah, stacktrace is enough here

#

The "Supressed:" thing is already a good enough clue of the cause

orchid gazelle
dry yacht
quiet ice
#

Invoking a command while stopping the server

orchid gazelle
#

Good idea

dry yacht
#

Oh

quiet ice
#

Or likely invoking /stop itself

tardy delta
#

why am i even in the paper server

dry yacht
#

Well, I would have been way off then.

orchid gazelle
tardy delta
#

why would i

orchid gazelle
#

Because they are helpful if you have a problem

quiet ice
#

You also see above that the server is experiencing significant problems with watchdog

tardy delta
#

im not using their api either

quiet ice
#

So it is also possible that watchdog killed the server

naive bolt
#

alright that seems to be all of it

tardy delta
#

im only using their fast reload command

quiet ice
#

Yep watchdog

dry yacht
sullen marlin
#

Again, this is spigot

#

Last warning

naive bolt
#

I was told to post that

jagged monolith
dusk flicker
#

?whereami

quiet ice
#

How many threads do you have ... Jesus

dry yacht
jagged monolith
naive bolt
#

I said i would go paper but was told no

orchid gazelle
#

Reproduce the error on a spigot server or ask on paper

#

So people here won't cry about it ;)

quiet ice
#
[23:17:21] [Paper Watchdog Thread/ERROR]:         AndyisBlocks-1.0.jar//me.justacat.andyisblocks.structure.Structure.<init>(Structure.java:38)
[23:17:21] [Paper Watchdog Thread/ERROR]:         AndyisBlocks-1.0.jar//me.justacat.andyisblocks.structure.commands.CopyBuild.onCommand(CopyBuild.java:54)

These two lines of code deadlock

naive bolt
#

i was told to be here. not of choice

eternal oxide
naive bolt
#

I did go to paper

dry yacht
#

Is it that hard to substitute paper.jar for spigot.jar and retry? You're likely gonna get the same issue...

tender shard
orchid gazelle
quiet ice
#

Try running it with -Xmx1G -Xms1G - don't run it with more ram

tardy delta
#

i once crashed the jvm with worldedit 💀

#

all threads decided to throw an out of memory after a while

quiet ice
#

If it crashes the fault is in onCommand, otherwise it is in your constructor

naive bolt
#

I will not post here anymore of this issue as md is mad

quiet ice
#

This channel is full of idiots anyways

#

Stacktraces? What are those? Never heard of em?

dry yacht
tender shard
eternal oxide
orchid gazelle
tender shard
#

we dont talk about that here

#

hmu in DMs if you wanna know

orchid gazelle
tender shard
#

the issue clearly is their "Structure" clas in line 82

remote swallow
#

whats the player equivalent on bungee

tender shard
#

has nothing to do with paper vs spigot

quiet ice
#

You can't bring senses to the senseless

naive bolt
#

Look i don't want to talk more abt the issue here as i will get banned. and I kinda need this server

remote swallow
tender shard
dry yacht
orchid gazelle
#

Yes but he is gonna get yelled at when coming here with "paper-issues", so this is just for the future

eternal oxide
tender shard
naive bolt
#

What have i caused

remote swallow
#

a certain canadian doesnt like advertisers

sullen marlin
#

Funny how you all seem to have no problem refusing to help offline mode servers

tender shard
quiet ice
sullen marlin
#

The rule is if you want support from this server, you use Spigot

tender shard
#

erm all big servers are offline mode bc of bungee

eternal oxide
#

I help with offline, if they have a reason to be offline other than piracy

sullen marlin
#

You have been warned, that should be the end of it

jagged monolith
dry yacht
naive bolt
tender shard
sullen marlin
#

You (plural)

tender shard
#

I am not sure what md5 is talking about, did I say sth wrong or anything?

jagged monolith
remote swallow
tender shard
#

ah ok

dry yacht
tender shard
remote swallow
#

am i correct in saying ProxiedPlayer player = ProxyServer.getInstance().getPlayer(vote.getUsername()); would get me a player if they are online on any of the servers registered on bungee

orchid gazelle
#

Dear md5, why is there a problem with it when its clearly a plugin logic issue, not paper issue?

naive bolt
#

We use the correct security measures to lock the backend servers to only allow traffic through the proxy

tender shard
#

@naive bolt show "Structure" line 38 pls

naive bolt
#

||blocks.put(new Vector(x, y, z), block.getBlockData());||

sullen marlin
eternal oxide
quiet ice
orchid gazelle
tender shard
sullen marlin
#

💪🔨

remote swallow
#

paper is a fork that changes a lot of stuff internal

orchid gazelle
#

Bruh

jagged monolith
tender shard
#

if person A forks my stuff, and calls it B, then person C comes and has an issue with A's work, why would I have to answer?

#

I also use paper, but whenever I encounter an issue, I always see whether spigot has this problem too - if yes, I mock people here, otherwise I don't

remote swallow
#

what could i call a method that gets, something in a database then raises that by one and saves it back to the db

naive bolt
#

imma go to paper and they will start crying that im using 1.19.2 and not .3 like they always do

orchid gazelle
# tender shard what did you expect

I expect people to help with literal spigot issues without crying that the word "paper" appears in a log. But lets just leave that, or else im gonna get banned probably

remote swallow
#

thats smart

orchid gazelle
#

Please leave that now

remote swallow
#

do you want a gregg

tender shard
sullen marlin
#

Mmm grilled egg

tender shard
#

md simping for greggs again lol

remote swallow
#

nugget what about nuggets

tender shard
#

anyway, paper often has serious buggs. e.g. in paper 323 you couldn't use Player#chat(String) without it throwing exceptions, while it worked on spigot the whole time

#

so yeah, we cannot help people who use paper

remote swallow
sullen marlin
#

Continue this conversation at your own peril

orchid gazelle
sullen marlin
#

The position is clear

remote swallow
tender shard
jagged monolith
orchid gazelle
#

In other words: the next thing about that topic gets a 🔨

tardy delta
#

a hammer

remote swallow
#

a banham more like

tender shard
#

I mean, you also wouldn't email the debian mail list when you have issues with ubuntu, right?

orchid gazelle
#

So next time im asking for help here, I should run the same thing on a spigot server first and then come here?

remote swallow
#

alex you probably want to stop before md smacs you

orchid gazelle
#

Thats an issue because some things need another software to work

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

jagged monolith
remote swallow
#

thats happened to me while wide awake

tender shard
orchid gazelle
#

Damn I'd love to continue this discussion but 🔨

remote swallow
#

whats the sql thing to insert or update

#

does that even exist

kind hatch
eternal oxide
tender shard
orchid gazelle
naive bolt
#

i got a real question what processing charges do you get on the donations for their to be a $10 minimum?

remote swallow
remote swallow
eternal oxide
#

yes

remote swallow
#

mysql

tender shard
orchid gazelle
remote swallow
#

paper lib

eternal oxide
remote swallow
#

thanks

dry yacht
orchid gazelle
#

So basicly if I fork spigot and change 1 line of code, im not welcomed here

sullen marlin
#

How is this still a point of contention

naive bolt
#

add a comment to the code

sullen marlin
#

If you want support from the Spigot community use Spigot

#

End of story

tardy delta
#

people are a little slow of understanding

sullen marlin
#

No if's, no buts, clear as crystal

tender shard
sullen marlin
#

/thread

tender shard
#

?thread

#

hm

dry yacht
orchid gazelle
orchid gazelle
tender shard
#

no

orchid gazelle
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

eternal oxide
quaint mantle
#

I found a file located at C:\Users\USERNAME\.m2\repository\org\spigotmc\minecraft-server\1.8.8-SNAPSHOT\minecraft-server-1.8.8-SNAPSHOT.jar, is this the deobfuscated server jar? I noticed that it has more files than the BuildTools output, including the com.mojang libraries, for example

tender shard
tender shard
tender shard
#

deobfuscated?

#

in 1.8?

sullen marlin
#

Well spigot deobfuscated

orchid gazelle
jagged monolith
tender shard
dry yacht
mighty aurora
#

Does anyone here know any reasons to use something like packetevents over protocolLib?(I just want to know like what benefits and cons their are to both. Not asking for opinions that X is better than Y just wanting to see what they can do so I can decide what to use).

quaint mantle
kind hatch
# orchid gazelle In my opinion, thats an unlogical thing but aight

I fail to see how that is illogical. Just because two things have similarities does not mean they are the same. Spigot has its own set of changes, paper has their set of changes. The only line of similarity is that paper forked off of spigot. Meaning that they changed things. Just because they stated compatibility does not mean they didn’t change things under the hood.

jagged monolith
sullen marlin
orchid gazelle
sullen marlin
#

Next person to say a word on the topic gets 🔨

quaint mantle
mighty aurora
sullen marlin
eternal oxide
tender shard
# orchid gazelle This is not an actual thing, just an imagination what happens if I fork and chan...

then it's no problem ofc. You just have to understand the following: forks like paper change like thousands of lines of code. If now you encounter a bug, this might or might not be caused by those changes. You are supposed to check whether this bug is also present in the "original" spigot .jar. If it is, feel free to report it. If it's not, report it to the fork's devs you are using.

I e.g. have encountered a ton of bugs that were only present in paper, but not in spigot. And I always reported them to Spigot, because I thought "if it's in paper, it's in spigot too", although that's not true. So I accidentally made many people spend their free time to check out something that wasn't their fault. And that's not good

jagged monolith
orchid gazelle
mighty aurora
kind hatch
#

Make a thread. I ain’t trying to get banned.

naive bolt
#

Continued Discussion

quaint mantle
sullen marlin
#

Packets aren't going to allow them to be damaged because the other players client won't hit them

mighty aurora
#

When I'm merely making it appear that they don't have armor using it?

sullen marlin
#

I suppose you could raytrace server side, but that still doesn't need packets

remote swallow
#

am i correct in saying statement.setInt(1, newInt) and statement.setString(2, uuid.toString) on "REPLACE INTO `simp_votes` (`votes`) VALUES (?) WHERE `uuid` = ?;"

mighty aurora
#

I am using packets only to hide the armor. I use regular invis to make the body invis

sullen marlin
#

If the body is invis the armor won't show

naive bolt
#

nice the thread was deleted

mighty aurora
#

Not anytime I've tested it even in latest version

mighty aurora
#

or at least not while using invisiblity potion

dusk flicker
remote swallow
#

thankos

sullen marlin
#

Oh you mean potion not full invisible

mighty aurora
#

How else would I make them invisible?

sullen marlin
#

hidePlayer

jagged monolith
#

It would be nice if you could hide armour. Like a getarmor.hide so you can wear amour but have it hide if you only want to show player skins an not cover it. Or only show specific parts or amour

mighty aurora
#

That would prevent the player from taking damage

#

which is a problem for me.

kind hatch
#

What about hideEntity?

sullen marlin
#

What about sendEquipmentUpdate to remove the armor

tardy delta
#

hideEntity doesnt hide them from tab iirc

mighty aurora
#

Is that API?

kind hatch
sullen marlin
#

That's the API replacement for those packets

#

?jd-s

undone axleBOT
kind hatch
#

When was that added? That’s a really nice addition.

sullen marlin
#

At least a few years

jagged monolith
#

Pretty sure it's been in there for ages

kind hatch
#

Tf. Guess I never noticed it.

jagged monolith
#

Check the docs more often :p

naive bolt
#

md how come donation limit is minimum $10

sullen marlin
#

Because there's overhead and also if you can't spare $10 you probably need the money more

naive bolt
#

paypal overhead isnt that bad is it

jagged monolith
#

Donating does have its benefits. I've done it. Years ago though haha

sullen marlin
#

Overhead isn't just paypal

#

It's administration, risk

naive bolt
#

i ended up donating to mcm just to change my username

sullen marlin
#

Good for you?

mighty aurora
#

md_5 does sendEquipmentChange persist across server restarts and/or player disconnect/reconnect?

sullen marlin
#

No, it's basically just packets

kind hatch
#

Hey md. Is there a way to better link the javadocs to the discord commands? Smth like ?jd-s Player#updateInventory() and it return an embed with the description of the method? Also a direct link to the page.

sullen marlin
#

You could make one

remote swallow
#

is there a mysql thing to check if a string is already set?

#

or would i have to query all and check each

sullen marlin
#

Someone did do one but it was very intense

#

Like it required parsing the javadocs into a mongo database and all sorts

tardy delta
#

cafebabe is python based right?

remote swallow
#

?info

undone axleBOT
remote swallow
#

yes

sullen marlin
#

And java

tardy delta
#

i know red is python

#

hmm

sullen marlin
#

You can put lots of things behind a single bot

remote swallow
#

cafebabe is java?

kind hatch
#

I know there are some bots that do it for certain apps, but surely it doesn’t need to be that complicated. Web requests aren’t that hard.

naive bolt
remote swallow
tardy delta
#

parsing the whole javadocs in a cache 🤡

#

shouldnt be that difficult

sullen marlin
#

Yeah the javadocs already has an index it uses for the search bar

quiet ice
#

Pft, just create those javadocs on the fly

smoky oak
quiet ice
#

Eclipse does it (and probably any other IDE), so why couldn't we?

hazy parrot
#

you can basically search method from javadocs with this bot

remote swallow
#

@eternal oxide would i be correct in saying if i wanted to check if a mysql collumn already contains an exact string wouldi use SELECT * FROM table WHERE column SOUNDS LIKE MySTring ;

quaint mantle
#

Any dev's down to work with us at beyondpvp?

quiet ice
undone axleBOT
quiet ice
#

We're getting enough mistreatment around here already

smoky oak
#

wdym

hazy parrot
#

like have different purpose

tardy delta
#

like without % and i forget the other is like useless iirc

remote swallow
#

so SELECT * FROM table WHERE column = MySTring;?

sullen marlin
remote swallow
#

gradle is love

#

gradle isnt scary

#

you could also convert it to maven

smoky oak
#

eh i only use maven cuz im too lazy to learn gradle

naive bolt
#

gradle>maven

#

what is their to learn about gradle. simple stuffs

sullen marlin
#

I mean it has like a gradle command and stuff

remote swallow
#

the best advice ill give you md is dont use kotlin

smoky oak
#

which

#

i wont change since it works

jagged monolith
sullen marlin
jagged monolith
#

I know a couple other discords use it, doesn't look bad. very useful haha

sullen marlin
#

Or MySQL apparently

#

Looks to have developed since I first saw it

naive bolt
#

maybe should just write a github wiki on the whole api 🧑‍🍳 👌

jagged monolith
sullen marlin
#

delete: Deletes collections from mongo then stops the app. This is used by the updater subproject, once again, you won't need to use this command.

#

Docs still reference mongo

remote swallow
#

anyone that mysql's would "SELECT * FROM my_table WHERE categories LIKE ?"; check if it contains value that i would set ? to

remote swallow
hazy parrot
#

here is example of jda butler, looks really cool imo

tardy delta
#

isnt like used like %something else%

remote swallow
#

no clue

tardy delta
#

like a kind of regex

hazy parrot
tardy delta
#

i used to learn that stuff in highschool

remote swallow
#

i just need to check if my collumn contains a string already

tardy delta
#

i think theres also _

remote swallow
#

i dont mysql

mighty aurora
#

Does anyone know how to get all online players? I'm trying to use getOnlinePlayers() but can't seem to figure out how to call it.

hazy parrot
remote swallow
#

Bukkit.getONlinePLayers

jagged monolith
remote swallow
#

can i use = ? to specify the string elsewhere

jagged monolith
#

So it would match anything similar to what you add it

tardy delta
#

theres also WHERE categories regex "some regex"

remote swallow
#

how would i specify this ```
"SLECT * FROM simp_votes WHERE uuid = ?;"

tardy delta
#

that would select all records where the uuid is the exact same as the param

remote swallow
#

ah

#

perfect

jagged monolith
remote swallow
#

yeah just noticed that lol

#

that would be executeQuery right?

tardy delta
#

ye

remote swallow
#

also how would i get if it matches

#

im guessing resultset something

tardy delta
#

execute would work too but it doesnt returns a resultset iirc

tender shard
#

test

#

yay my timeout has ended

tardy delta
#

ResultSet rs = statement.exexQuery()

remote swallow
#

yeah ive got that

tardy delta
#

if (rs.next()) // found a record

tender shard
#

execQuery() is for UPDATE and INSERT etc

#

wait no

#

it's execStatement(), isnt it?

#

tbh no clue

remote swallow
#

exec update for update/insert

#

exec query for select im guessing

remote swallow
tardy delta
#

it acts like a cursor that stands before the first record found

#

next() moves it down and returns if theres something there

#

if theres a next you can call rs::getString and that stuff

remote swallow
#

so if it doesnt exist it (rs.next) would return false

tardy delta
#

yes

remote swallow
#

ternary operator party

tardy delta
#

i can just tell you to read the docs

remote swallow
#

no clue which i would read tbh

mighty aurora
#

How do I use sendEquipmentChange to make the armor appear as air? More specifically what value do I use for the 3rd parameter?

remote swallow
#

you send the entity, so player, the slot eg chestplate, andt he itemstack you want to display

#

so air

mighty aurora
#

According to that you can only use obtainable items which air is not

remote swallow
#

do it anyway

kind hatch
#

So new ItemStack(Material.AIR) doesn’t work?

mighty aurora
#

It was complaining that a method call was required

tardy delta
#

ItemStack.AIR when

remote swallow
#

never probably

tardy delta
#

still doesnt say what kind of air 🥺 cave air

tender shard
#

.isAir()

mighty aurora
#

nvm I tried it again and it works just fine...

remote swallow
#

does bungee have a join event?

#

found it

tardy delta
#

fuck its already 1 am

remote swallow
#

its not midnight yet

#

stop lying

tardy delta
#

you better stop lying

glossy wren
#

quiiiick question I'm a newer developer, why is player health represented as a double? Can't it only be a whole number?

smoky oak
#

u can take more precise amounts of damage than half hearts

smoky oak
#

most things just dont do finer than half hearts

#

example

#

protection enchantments usually result in non-half-heart numbers

#

since they're percentages

glossy wren
#

got it

smoky oak
#

not flat decreasess

glossy wren
#

kinda stupid imo, but ty

remote swallow
#

anyone know of decent bungeecord tab complete examples?

smoky oak
#

eh just keep in mind 1 heart = 2 hp

mighty aurora
#

Anyone know how to reset whats done by sendEquipmentChange?

smoky oak
#

(guessing here) call an inventory reset, iirc theres a method for that

mighty aurora
#

sendEquipmentChange fakes a players gear changing

worldly ingot
#

player.sendEquipmentChange(EquipmentSlot.CHEST, player.getInventory().getItem(EquipmentSlot.CHEST));

#

or whatever the method sig is. Close to that

#

Because remember, the server still has the real item

mighty aurora
#

Yeah I'm trying that. I had thought it would either be more complicated or their would be a different way of doing it.

#

Is their a way for me to create an iron golem that acts like a wolf would?(As in protects the player from things that attack it and attacks what the players attack?)

#

And if so how?

smoky oak
#

uh

#

probably just copy the wolf ai onto the iron golem ai

mighty aurora
#

uhhh

smoky oak
#

if u do that u need nms tho i believe

zealous scroll
#

you can just check for nearby blocks at a given radius and delete them if they're lava

#

it looks like it's 6

#

the diameter would be 12 i suppose

#

i went in game

#

the air blocks inside the clay seem to be the shape of the blocks the sponge takes

#

it also behaves very inconsistently for some reason

last sleet
#

I can't find the interface Enemy, even though the docs say it exists. I'm trying to find a way to know if a mob is hostile (aka a monster) but some mobs don't extend Monster, like Phantom, even though they should...

worldly ingot
#

It was added in like the last commit or two

#

It's very very recent. 1.19.3 only

#

If you're on .3, update your server

last sleet
#

oh darn

#

well I don't wanna update for now, is there another way or do I have to manually check ?

worldly ingot
#

I mean Enemy consists of Monster + a few other interfaces, so you could instanceof check them all if you'd like

#
public static boolean isEnemy(Entity entity) {
    return entity instanceof Monster || entity instanceof EnderDragon
        || entity instanceof Ghast || entity instanceof Hoglin
        || entity instanceof Phantom || entity instanceof Shulker
        || entity instanceof Slime;
}```
#

A little ugly, but that's in essence all that Enemy covers

last sleet
#

alright

#

thanks ;)

worldly ingot
#

It's very very recent. 1.19.3 only

well I don't wanna update for now, is there another way

mighty aurora
#

If I have created a custom ability and want a way of deactivating it prior to it finishing if an event happens what would the best method of marking the player as having the ability active(To then check for active players). The ability basically is just potion effects and currently I check for them having the permission to run it and the potion effects. I realized that this is a bad method of checking as it can activate at the wrong time. My first thought was to just add a tag to the player but I don't know if that is a good method or not.

orchid gazelle
orchid gazelle
dry yacht
orchid gazelle
#

Yeah thats what I thought

#

So that will not work for custom mobs

#

If another plugin is using custom monsters, this will be a problem

#

If its the same plugin with custom monsters, you can just have a master method and then register all your mobs to it

remote swallow
#

i read custom monsters as something very different to start with

orchid gazelle
#

Ehh not that unrealistic that any other plugin uses them

dry yacht
orchid gazelle
#

Sheeesh IMonster

dry yacht
#

No idea at which versions this is available tho, as I never used it, xD.

orchid gazelle
#

Same

dry yacht
orchid gazelle
#

Custom monsters = nms

mighty aurora
orchid gazelle
#

Then you got to use some data storage like PDC

#

Or if you are planning to code a complex PRIVATE system anyways, you can use a database

dry yacht
# orchid gazelle Custom monsters = nms

NMS is the whole foundation, so that's not going against what I said. If you have Plugin A which creates a custom NMS entity and adds it to the world and Plugin B queries the world's entities through bukkit, it will get a bukkit Entity wrapper with it's handle pointing at that custom NMS entity. Bukkit interfaces will work on that wrapper.

orchid gazelle
#

Wow I did not know that it would work with that

#

So if I use getHandle I just get the custom nms entity again

dry yacht
orchid gazelle
#

Thats insane

dry yacht
#

I also didn't know about all of it's inner workings for like the first two years I developed plugins. The basics are the following: You can download an obfuscated server.jar by using mojang's version manifest JSON for each available version there's a client for. In the early days, the team had to manually deobfuscate and create their own mappings, nowadays mojang kindly enough provides them for us. Then, they would go into this codebase and add their custom code (event calls, wrappers, injections, ...) until the whole bukkit API was supported and working. Then they basically run diff and create difference files, which later again can be applied by the user locally, which avoids having to share modified mojang code (illegal, due to licensing).

Bukkit is an API, CraftBukkit is it's patch-style implementation. But at the end of the day, NMS is and always will be the server, as it's immensely complex, huge and cannot be open-sourced due to trademark bs.

#

It's crazy if you think about what this community is actually pulling off, lol.

orchid gazelle
#

Its crazy how much is behind a quite "simple" minecraft plugin

quaint mantle
#

is there any way to modify the code of the minecraft server.jar or even spigot server.jar, but with full access to every .java file

remote swallow
#

?stash

undone axleBOT
remote swallow
#

?contribute you dont need the cla or pr stuff but this tells you waht to do

dry yacht
quaint mantle
#

and which of those 4 links XD

remote swallow
#

pr = pull request

#

cla is required to contribute to spigot

#

the 3rd is what you need

#

might need 4th

orchid gazelle
#

CLA is basicly a legal thing so the copyright allows spigot to hold your code or something I think when PRing

#

(Correct me if im wrong)

remote swallow
#

?cla

undone axleBOT
remote swallow
#

that explains it

quaint mantle
#

so the contributing thing will straightup let me compile a server jar. will that require me to actually give the jar to spigot?

dry yacht
remote swallow
#

no

#

you can edit your code and use it

#

i just send the contribute link because it has the docs you need

undone axleBOT
dry yacht
# undone axle https://www.spigotmc.org/wiki/cla/

Yeaaaaah, these links are a good start, but oh boy, if you can actually understand the whole chain which pulls this compilation off from only reading that, then I have to take my hat off to you.

Looking into the source of BuildTools is a great hands-on start, but heads up: It's spaghetti-code... lol.

quaint mantle
#

do I need to do these

remote swallow
#

?dmca is the entire reason the cla & stash exist

undone axleBOT
remote swallow
quaint mantle
#

or is that just if i want to send the final jar to spigot

#

kk

#

good cus i dont want to wait 24h

remote swallow
#

thats just if you want to contribute the code you change to the project

mighty aurora
#

Whats the best way to learn NMS?

river oracle
#

?tas

undone axleBOT
remote swallow
#

thats pretty much it

river oracle
#

legit try and see

remote swallow
#

just try and make something

#

it works or doesnt

#

?nms is a help for getting setup

river oracle
#

@echo basalt has a forums post about it that has some useful info, but that does by no means cover most of it

mighty aurora
#

I don't even know how to setup NMS...

quaint mantle
remote swallow
#

you would get remapped mojang from that

#

and importing spigot gives you every class you need

#

unless you want to use obsfucated nms stuff

quaint mantle
dry yacht
remote swallow
#

why would you want obsfucated nms

#

mojang released there obfuscation map, there is no reason to use obfuscated

quaint mantle
#

except im dumb and need every step drawn out for me

#

or maybe because i should go to sleep soon and im tired

remote swallow
#

theres that too

quaint mantle
#

is there any way i can straightup download a zip folder with full deobfuscated decompiled code with a build.bat file (or an equivalent build file)

dry yacht
# quaint mantle is there any way i can straightup download a zip folder with full deobfuscated d...

If you just want to understand the process of obfuscation first of all, you could try the following: download the latest server.jar from https://minecraft.fandom.com/wiki/Java_Edition_1.19.3, as well as it's obfuscation map (for the !server!). Then download enigma deobfuscator, build it and run the swing build (easiest to use). I think that recent versions of server.jar are a bootstrapping type of wrapper which have the real deal inside of META_INF, so you have to unzip the outer jar and extract the inner jar. Open enigma, load the jar as well as the obfuscation map as type proguard, let it run and save the jar. Now you can view deobfuscated NMS code without any other additions and play around with that.

quaint mantle
#

is it possible to get that?

#

with multiple steps

dry yacht
#

Yep, it is, if you basically mimic BuildTools behavior on your local machine and skip the final compilation step.

quaint mantle
#

like i want all the nms and mojang classes

dry yacht
#

I don't know enough about BuildTools, maybe it caches that result somewhere and you could actually get your hands on within the next few minutes. I find it so immensely unstructured and unclear that I avoided thinking about it for the most part.

quaint mantle
#

am i allowed to ping md 5 they were talking earlier to me about this

#

they happened to bein this channel

#

idk if we can ping

eternal oxide
#

no

quaint mantle
#

sad

dry yacht
#

To be completely honest, I think you have to go through this yourself. It takes discipline and time, but you'll learn a ton.

quaint mantle
#

i really want a way to change all the NMS and com.mojang classes to my liking

#

ill figure it out tmrw

#

rn im tired

#

lol

dry yacht
#

Since I also need a solution soon, I can maybe provide you with some of the utility scripts I'll come up with.

quaint mantle
#

but one big problem is that intellij cant find uses for some of the classes in com.mojang

#

but obviously theyre used

#

like duh

dry yacht
dry yacht
quaint mantle
#

i decompiled a jar file i found at C:\Users\USERNAME\.m2\repository\org\spigotmc\minecraft-server\1.8.8-SNAPSHOT

#

and buildtools didnt show all those classes

#

but now it cant find the uses

#

cus theres no like pom.xml

#

and proper project set up

#

its just a decompiled jar

dry yacht
#

Yeah, all of this is pretty confusing. I also don't feel like going into the rabbit hole today, but as soon as I understood how to properly work with that myself, I'll let you know.

I still got a huge idea ahead where i need decompiled and at least partially remapped code from 1.8-present, so I need to automate generating patched source anyways.

remote swallow
#

the code is all on stash, running bt with remapped/mojang profile would add that jar to your maven local

#

i dont think you can get decompiled & deobsfucated code pre 1.14

river oracle
#

You won't recieve much support for 1.8 here

dry yacht
river oracle
#

It's legacy as fuck

dry yacht
river oracle
#

9.9/10 people don't care about nostalgia

dry yacht
river oracle
#

You can simulate it using plugins

dry yacht
#

Not just about pvp, you can easily get the same style of pvp on latest.

#

But all that clusterfuck of so called "new features".

river oracle
#

If you don't like how current plugins do it make your own

dry yacht
river oracle
#

Lol

#

My bad

#

Musta gotten distracted

remote swallow
#

does bungee not have a way for me to create items?

slate coral
#

Hey Hey Quick question as the PlayerPickupItemEvent doesn't get fired when trying to pickup items but with
an actual full inv. What would be the most efficient way to check when players try to pickup items?

Do I have really to compare the current location of the player and the item which is laying on the ground?

Thanks in advance!

remote swallow
#

if there inventory is full pretty much, because the item cant even be attempted to be added to their inventory

dry yacht
slate coral
remote swallow
#

idk if this is possible but you could see if theres a packet to send inventory change, you could have a fake empty slot that could pick items up, except that would only work if 1 type of item was on the floor. or you just listen to move event and check if theres any itemstack entities on the floor where player is

pseudo hazel
remote swallow
#

i couldnt create ItemStacks, then i realised i couldnt create inventories without packets so i just made it have a spigot half

dry yacht
# slate coral Goal is if the inventory is full and he is trying to pick it up its getting stor...

Going through all items and calculating the distance squared to a player while having to compare against known pickup suction values would just be a nightmare and pretty wasteful, in my opinion.

Seems like NMS already has a method on EntityItem, which checks if it's being touched by a player. We would only need to instrument that to fire some hook. But well, it's starting to get complicated again, ^-^

slate coral
dry yacht
# slate coral Anyways a big thanks for that! 🙂

I'd love to solve that issue tho, it's just that I don't know if I still have the mental capacity left today (pretty late already, xD). There has to be an elegant solution, I'm quite confident about that.

slate coral
#

Kinda bulling me rn haha

dry yacht
# slate coral Kinda bulling me rn haha

I feel you, it sucks to see the solution right ahead but not being able to hold it in your hands because of stupid limitations due to legal bs and the ego of humans. Well, I'm sure we'll be able to hook into this somehow.

robust zenith
#

Somebody wants to help me doing a call with a fantastic BlockBreakEvent plugin?

dry yacht
humble tulip
#

PlayerPrePickupItemEvent

#

PrePlayerPickupItemEvent

dusky saddle
#

hey guys, i want to create a world with only one pillar per chunk but there is a problem. the structures and the trees are generated after my custom generateNoise function. how can i fix this?

humble tulip
dusky saddle
#

Yup

humble tulip
#

override shpuld generate structures

#

And return false

dusky saddle
#

But I want Structures but just part which is in the Pillar

#

@humble tulip

humble tulip
#

Well how do you know where pillars are?

#

Actually this isn't my forte

#

Sooo

dusky saddle
slow arrow
#

what does Bukkit.getOfflinePlayer(String name) return if there is no minecraft player with the username?

remote swallow
#

null i would guess

slow arrow
#

apparently its never null

#

its annotated with @ NotNull

remote swallow
#

guess it wont

slow arrow
#

is there some way to tell if the player is an actual player?

remote swallow
#

you could probably attempt to get their uuid

humble tulip
#

Wdym?

#

An actual player?

remote swallow
#

because if a name doesnt associate with an mc account it shouldnt have a uuid

slow arrow
#

true

#

thanks.
The plugin isn't ready to test yet but that sounds like it should work

ivory sleet
dark karma
#

hi, i'm just messing around and i created a listener that listens for a player join or a chat and sends a message. before all the messages sent by the plugin there's this weird little character. does anyone know what this is or how to get rid of it?

#

i don't think i have image perms but here's a better screenshot to show the issue

remote swallow
#

thats the 1.19.1 chat reporting thing

#

it says if the message is secure ornot

dark karma
#

ahhhh okay thank you

dark karma
remote swallow
#

np lol

spring pike
#

@dry yacht I found a solution that works for me. My server is a soup pvp server, and it is usual to reduce the damage by 25% on these types of servers, to make the players able to survive stone sword damage without their fingers falling apart. My method of doing this was by only reducing the damage if it is above 2, which didn't count in these annoying crit-double hits, which happened to interestingly always be 1 heart, and then instantly the normal attack damage after.
I compared it to a fight I did on another soup server, and realized that this also happens there, I just didn't notice before. Instead, the "pre-damage" is only .5 hearts (or .75, if you will). So, I changed my method to only apply *.75 damage when the player has an item that deals above 1 damage in their hand, and when the event Cause is ENTITY_ATTACK. Sure, not a real fix, but my desired behavior anyways.
Some things turn out to be simpler than they appear to be lol

quaint mantle
#

hi

#

is there a way to cancel all lighting updates when adding or removing blocks with plugins?

tardy delta
#

Nms

#

Check the forum, im sure there is a post

ocean hollow
#

hi guys, what can this error say?

tardy delta
#

that is empty check isnt needed

tardy delta
ocean hollow
zealous osprey
somber berry
#

All explosions, the blockbreakevent is working but I cannot figure out how to make those blocks from the list invincible to explosions

zealous osprey
#

Also a handy thing is, to make early escapes from loops. You can use continue; to skip the step in the foor-loop or break; to just stop the for-loop