#help-development
1 messages · Page 1668 of 1
And it can do contains in O(1)
that
Meaning it takes the same amount of time no matter how much stuff is in there
dumb question: how do i fix this?
} else if (arguments[1] == null) {
srjlfgbflgfsbflbjgfbljgfsbl
guys but 8/2 not equals 0
Are you trying to check if the first argument exists
LMFAO
So what is your point
numb % == 0
% is not division
remainder
And I said num & 1 == 0
@SuppressWarnings("unchecked")
List<Location> locs = (List<Location>) getConfig().getList("test");```
alright
before that i have a thingie that checks if it's "create"
so no?
.-.
what does that annotation do ?
fix error
Oh great
remember from like a few hours ago?
That really clarifies it
the bound thing
Yeah you need to check that the array has enough elements
lmao
🧱
what array
if (arguments.length >= 2)
?learnjava @everyone
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
Can anyone asking for help please have more than 5 brain cells
i got 2
wait so what do i do im confusion
its the fsct you didnt know how to call #contains
You were iterating over an entire list to check if it contained something
Learn how to use java
Then come back to plugins
anyone help? anybody?
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
anybody?

Is there an emoji for banging your head against a wall

Oh this one's perfect
Nevermind
i gotchu
wait how do i
how to take user input
😩 🔫
@lean gull java if (args.length != 2) { if (args.length < 2) player.sendMessage("Too few"); if (args.length > 2) player.sendMessage("Too many"); return; } //rest of code for two args here.
Try running System.exit(100); before running System.out.println
Wait what does dat do
System.out.print("Hi");
System.out.print("Bye");
Why it on same line.
You forgot to System.exit(100);
public boolean alreadyAdded(Location location) {
@SuppressWarnings("unchecked")
List<Location> locs = (List<Location>) SpawnPoints.getFile().getList("test");
return locs.contains(location);
}
```better !?!?!?!?!!?
No
ok
You should load it in as a HashSet
not using a set
And then check contains using that
thats what elgar sent me
Actually for HashSet you wouldn't even need to check contains
ok
It just can't contain duplicates
one moment i will google
That code I sent is to load the List from config. You should be keeping the list in memory and not loading it every time
Config should keep it loaded in memory
But you should still keep it loaded as a HashSet
yep
when an event happens it goes through the plugin code first before the game right?
chatroom
If the event is cancellable usually yes. If not it may come after
hmm, then how can i get the bee to not lose it's stinger in the EntityAttackedByEntity event since it is cancellable but i still want the bee to do damage
apply the damage yourself and cancel the event
hmm, ok, i'll try that, ty
Hello is there any way to check if number is usable
example:
when i type number 1 in chat i can't type it again i can use other numbers 2 , 3 ,4 etc..
the same thing when i type other number so i can't type it anymore again
is there anyway to do that
I’d say use a set to track numbers used, sets don’t allow duplicates
^
thank you for the lesson on HashSets, I was previously using ArrayLists and creating methods to check if locations we're in that list, as previously seen
it has been converted
Good
class PlayerNumberChatHandler implements Listener {
private final Map<UUID, Set<Integer>> playerData = new HashMap<>();
@EventHandler
// if the player is registered, handle it
}
computeIfAbsent is OP here
Instead of doing playerData.get(uuid) you can do playerData.computeIfAbsent(uuid, k -> new HashSet<>())
if they dont want to register them manually
Yeah
Is there a way to move the passenger above the player head? At this point my Amorstand is in my head xD [ImageLink:] https://ibb.co/0JxjX32
If I make the armorstand big, the name is too high up, the name of the armorstand should be a little above the head
Multimap is crying rn
^
Multimap<UUID, Integer> playerData = MultimapBuilder.hashKeys().hashSetValues().build();
how do i save data in an entity? like an nbt tag or something
pdc?
hmm, i think i'd rather do tags
Mmk
addTag
getTags
Or is it addScoreboardTag
I forget
Yeah it's addScoreboardTag
And getScoreboardTags
👍
Player#setPlayerListHeaderFooter(String, String)
if I do one it gives an error...
"Illegal escape character in string literal" is what it says when I have 1
Tried that...
In theory, that should work fine. Do you have a chat plugin by chance? Possible that it's replacing the escape character and treating it as its own escape character
(in which case you can do \\\\ to prevent that but still sloppy)
If you were to print the result of your replaceAll("(?i):shrug:", "¯\\_(ツ)_/¯") it would print out properly
For instance,
This worked. ty
👍
do display names show up in death messages by default
@worldly ingot sorry for ping
do u know
does anyone kno how to remove the item stats
on generated items in inventories
i.e the +4 attack etc
Actually don't know, lach
Are you opening it at the bottom of all that
i'm scared bc i already have a few made without thinking about it but, is there a way to get a player head model with a plugin without the player having the same skin on? Since the designs still stay even when i change my skin is it saved somewhere where i can access them?
there's one extremely hacky way of doing it
but breaks creative mode
probably
which is removing the data when sending it to the client
does hypixel and stuff do it
but that's last case
or is it just one of those things u live with
no one knows what happens behind the scenes at hypixel
but I believe they mess with client-side lore
just because lore stuff updates when you go across lobbies
and also because adding lore to all items is pain
so they might do that too
it's quite simple to do with protocollib
anyone know a way how to do this or is it not possible?
mojang texture data
use gameprofiles and whatever
and services like mineskin.org if you want to upload permanent skins
basically there's a texture id (uuid), data and signature (base64 strings)
toss them on a gameprofile and you have a skin
you can then use some hacky reflections or nms to apply it to an itemstack
oh man, i don't think i understand these terms 😓 😅
it's like 5:15AM I can't bother explaining them either
oh, well thanks for giving me an idea of where to start
just look into how npcs store skin or something
and then look at custom textures for skulls
should be enough
alrighty, will do
How do I remove the block placed in BlockPlaceEvent? Setting the block to air wouldn't work cause I am checking if the block is a bed and then deleting it. since the bed is 2 blocks and I don't know the direction on which it is facing, setting 1 block to air wouldn't. work
Why not cancel the event
will that remove the block
public void onBlockPlace(BlockPlaceEvent event) {
if (event.getPlayer().getWorld().getEnvironment() == World.Environment.THE_END) {
if (String.valueOf(event.getBlock().getType()).contains("_BED")) {
event.setCancelled(true);
}
}
}
would this work?
Yes
i now have the url, but i can't use it in Skull.getCustomSkull() since it's deprecated, and i think i have to use the Material class but i only see enums there and i'm not sure where to use the url
how memory intensive are Spigot AI methods?
that is, let's say I switch off mob AI and use spigot methods to "simulate" AI independent of server version, as well as implement additional functionality (skill use, behavior statemachine, etc.)
setTarget is the only one I can think of offhand, yeah
damn, wish Spigot had more support for AI manipulation. using NMS is a pain.
You could open a feature request
I think the main thing with this is that I don't want to go requesting something I wouldn't contribute to lmao
and it's complex
at the same time, I do think it'd get a fair bit of use
Then open a feature request
are you tying to get an itemstack of dyed wool or something?
basically i have 8 teams, but i want to make it abstract
if a teams color is red i want their wool to turn red
i want to set the itemstack when they purchase wool
you're using the standard ChatColor for the team, right?
i don't think chatcolor maps directly to dye color but you could write something to map to it
ye was hoping tehre was a cheekier way but thats probs it
i mean if you REALLY wanted to
you could do something silly with names, but ChatColor only has some overlap with DyeColor
it'd be more consistent to just set it manually I think
once you've got your dye color, just java new Wool(dyeColor).toItemStack();
ye ofc
I think you can also do Materials
I might be a bit behind on the version
okay so I searched through the Jira to see if anyone had made similar suggestions and came to 3531
You would have to map ChatColor to Material
That's something you can map manually yourself in an immutable Map and reference as necessary
that's pretty much what I said, albeit with DyeColor rather than Material
Yeah, whatever you want
but yeah, good clarification
There are ImmutableMaps from Guava, unmodifiable Maps from RT Collections,
Make a constant
ez pz
Or just use a regular HashMap and set it to private
Well, yeah, private static and final, but as far as best practice is concerned it should also be an immutable Map
Also, the Wool class you mentioned above is pre-1.13 MaterialData which is all deprecated now
So if they're working in 1.7 - 1.12 or whatever, that's the right approach
just curious why this particularly matters if the end result is effectively immutable (or, I should say, unmodifiable) and only accessed through methods
unless you mean immutable keys
in which case yeah
Not necessarily true. If you expect to have a map that doesn’t change it should be declared as immutable
Can use an EnumMap if you want but you can still change it privately
should probably clarify that I despise Java, most of the work I do is in C# for game dev and the idea of having to import some library just to meet basic general best practices (not even company-specific) is infuriating
like, .NET has that shit built in
but that's entirely a personal gripe
Guava is provided by Bukkit already so it’s available at runtime
oh, is it? that's not so bad then
Or Java’s SDK has an umodifiable collection/map wrapper as well
I know a guy who shades the entirety of Hikari SQL into his plugin and uses it exactly once
It's that kind of thing that has me tearing my hair out over Java culture lmao
yeah Java has Unmodifiable versions of some of the collection classes
Yeah, depends on how frequently connections are required
using an unmodifiable collection for something that should absolutely never be modified at runtime is preferable ofc
That actually brings me to something that's been nagging at me - so with the plugin I'm writing, I want to be able to modify certain collections at runtime but return immutable copies of them for other classes to read
but the only solution i've got offhand is:
- set a flag whenever the original collection is modified (done through methods)
- when the collection is requested, regenerate the unmodifiable version if that flag is set, and return the unmodifiable version regardless
this is probably just the remainder of college brain doing microoptimizations though
the issue i was thinking of was that I didn't want to create a new immutable collection every single access lmao
Nah you're fine. The GC will toss away the instances once the caller's done with them
It's not like you're allocating any more memory at all. Just a new pointer to the underlying collection is all and those get cleaned up quickly
Obviously make it immutable/unmodifiable if you can on instantiation but if you intend on changing it and just returning a copy, you're fine. No harm in that
This is what I was wondering; I wasn't sure how unmodifiables actually worked beneath the surface
if it's just a new pointer that should be good then, nice
thanks, now I can stop worrying I've written something horrific LOL
Java’s inbuilt ones literally just wrap whatever collection you pass to it and delegate it’s calls
(Excluding the remove/add calls or whatever in which they throw an exception, obviously)
alright that makes a lot more sense
Does...does Spigot only have the one developer, or is the staff page outdated lmao
Just the one maintainer yes. Though lots of independent contributors
Alright, looking into the stash rn
Wait you hate java cause you thought it didn't have immutable collections?
no, I hate java because of the culture around it
What's that
"how do I [perform single task]"
"import [8 libraries]"
enterprise java is the single worst thing in software engineering
really? most java developers I meet outside of Spigot have been like that
I tend to use very few libraries except my own
I'm also like that, unless it's something integral to whatever I'm writing, like I'd rather use an SQL library for something heavily focused on SQL
I have my own sql wrapper
and like I use my own library for plugin development because it streamlines a lot of the annoying boilerplate stuff
I love writing my own libraries
Same
i'm very glad I wrote mine lmao
it's open source but sort of bad so I don't expect anyone else to use it
Same
Especially commands can be super verbose and awful
recently went and did something to build commands into a tree
Mine is also FOSS if you want to check it out
I have a feeling we've had a similar convo in the past considering we're friends on discord
I don't recognize you
yes, this is the same library I remember
you were the guy with the command annotations
Hm
unless my admittedly terrible memory is failing me again
I wouldn't describe it as annotation driven
It does use annotations though
There are command frameworks built entirely on annotations
Mine is done primarily through a file in a custom format
I took a bit of a different approach and just went through this https://github.com/Dewynion/EmberCore/blob/master/src/main/java/com/github/Dewynion/embercore/command/CommandNode.java
Separates command structure from implementation
Ah yes. github embeds. hang on.
That's the most basic type of command framework I tend to see
Delegation, basically
elaborate a bit?
You still have to handle the args as a String[]
only thing I did was write a node for a tree structure
Yeah
With mine, you essentially just write and annotate a regular method taking the actual types you need
and the sole reason for that was so I could write 800 subcommands without having to manually go and parse which argument goes where in the parent node
It supports optional arguments, automatic sender and permission checks, context assertions and arguments, flags
Advanced command frameworks save a lot of time
Mine is not the only one with these features
It's mostly the way you use them that is different
I see 3 main styles
The first is yours
Simple format where you extend a command class
The second is annotation based
The third is builder based
personal opinion is that none of those are objectively better than the others
It's preference
pretty much depends entirely on preference, yeah
The first is the most limiting though
As you can't really convert arguments
I haven't seen another that works like mine, which is using a command file to determine the structure and hooking into annotated methods
But that's preference too
I just like it
I honestly wouldn't use something like that, and that's because the plugin I'm working on has a module system where people can write their own commands
among other things
Builder style is probably best suited to that
mind explaining builder style a bit?
You know the builder pattern?
probably not, refresh my memory
Cloud command framework is builder based
It's like
new SomethingBuilder().property(value).property(value)...build()
to be fair I did sit down and hammer this out in like an hour because I needed the functionality quickly LOL
oh that
so how do people commonly extend that to commands?
Not sure exactly how it works
builder pattern is great for vectors, messaging, etc. but
Take a look at cloud if you wanna know
the only thing I'm particularly interested in is that I can specify the parent command and it automatically builds the command tree on launch
I just don't like builder and annotation because they're inefficient
In terms of code I mean
Much of what you're expressing is effectively metadata
Expressing it in your code can be very verbose
Expressing it in a custom format designed for it, much less so
that's pretty much it, yeah, and that's why pretty much everything I write is designed to cut down on the amount of code I have to write
If you're ever interested in trying out my framework let me know
As far as minimizing code to implement commands goes I don't think there is a better framework
I most likely won't, since I've already built a large plugin using mine lmao
but I may have a look to see where I can improve things
Want the wiki link?
not gonna bother explaining what mine does, there's a readme for it
already got it, dw
Mmk
If you want to use your own I would recommend stepping it up
Make it convert arguments
That's the single biggest step that saves you the most grief
And it's fairly easy to add tab completion once you get there
convert arguments as in...player names to Player instances?
Tab completion is something I would never bother with when I was doing commands the old way
Exactly
ah alright
And custom conversions too
yeah I've already got something like that for config
And from there you can easily let it supply a tab completer for that type
Do what reflectively?
fetch the conversion to/from ConfigurationSections
My command framework is reflective, same with my config manager
Has to be when working with annotations
y'know how you can feed in lambda functions into streams?
My command manager lets you provide lambdas
Yeah
My config manager reflectively instantiates objects and populates their fields from config
My command manager only uses reflection to fetch and invoke methods
basically when writing a converter, you either write some explicit converter bs or you just use reflection
Ah yeah
With my config library you either provide a lambda to convert to and from string
and frankly the former is a pain in the ass and nobody can read it at the end of the day unless they have their head so far into the streams API that they make lambda functions in alphabet soup
Or you use a class annotated with @ConfigMappable whose fields are annotated with @ConfigValue if they have to be saved/loaded from config
Huh
Lambdas and streams are amazing
They're one of my favorite java features
I enjoy them, but some of the patterns that have sprung up as a result are...irritating lmao
if you use them like a normal human being, they're great
Like what
Okay yeah that's ugly
factory pattern in general is one of the worst things I've ever seen
But streams are really powerful and great for reducing code
Same
Like. What benefit does it offer over just writing your code like a normal person?
Every example I see is like "you can use the factory pattern to generate shapes from a string!" or something
AbstractIntegerFactoryControllerObserverStrategy
👍
You might get a kick out of https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
i love that they've continued to work on it and implemented spring and gradle for no reason whatsoever
@quaint mantle i see you typing smh
i'm stuck with maven for spigot, but I use gradle when I can
oh wait sry i just pasted smt so i can send it when the chat's clearer
ooh ok, soo in the EntitySpawnEvent how can i check if it was spawned with a named spawn egg?
github publish
if it's possible
SpawnReason maybe?
What's that
Hmm but that'd be an enum wouldn't it?
basically I just push my library to a maven repo and the other plugin i'm working on automatically pulls it
You could see if it was spawned by a spawn egg
Then check if it is named
and I don't have to pay for a repo or anything, github gives you some limited hosting options
Oh interesting
I just use jitpack
jitpack WOULD NOT work for me. not sure why
okay so
Are you using spigot or spigot-api
spigot server and plugin*
you can certainly get the spawn reason
And then check if it's named
but I think rather than using entityspawnevent
Anh are you using spigot or spigot-api
what you should do is check for the event where the spawn egg is used instead, since there's no real way to tell from the fields in entityspawnevent
me? spigot
wait
what context?
OH
but then this would be like getting the itemDisplayName from a different object not from the spawn Reaon?
Alright, yeah, that's why.
There any significant difference between the two?
Check if the entity is named
try checking for when a spawn egg is used rather than when an entity spawns
Spigot has nms
Spigot-api does not
that's gonna be it then
Spigot is the entire server jar
that's good to know actually
But it only comes from your m2 cache
It's added when you run buildtools
But jitpack doesn't have that cached
So you have to use spigot-api
Either that or somehow run buildtools as part of your build
mmm okay, i'll try and see if i can check with the spawn egg used and see if it's easier
speaking of NMS, I want to absolutely gut mob AI
it's hands down the worst design i've ever seen
are you vaguely familiar with PathfinderGoals?
vaguely is all you need
basically, when writing entity AI in the game I'm working on, I used a finite state machine
which also worked for movement
oops, all jumping
if someone knows how to find the bitmap for the rendered image created by Unity's SpriteShapeRenderer please tell me because i have no idea where that's stored and it's giving me a headache
also if you're here from my resume, welcome, i am a real person
top left corner - whole thing is managed by a state machine
very clean and nice, lets you handle behavior in specific situations
ironically one of the few times inheritance is rock-solid as well
I actually use inheritance pretty regularly but i'm old fashioned
without going on a tangent, though, pathfindergoals are basically just setting a list of goals/priorities for an entity, and they're phenomenally stupid, because they rely so heavily on inheritance that trying to use them outside of the entities they're "supposed" to be used on just flat out doesn't work
"PathfinderGoalFollowOwner" won't work if it's not an instance of EntityTameable
Not follow owner
Spigot uses interfaces to an extent (Ageable, etc.) but it can't compensate for how Minecraft itself was written lmao
I should probably sleep as well, mb
Gnight
night lmao
Hey, quick question: If you apply different patterns to a banner, the respective patterns are displayed in the item list of the banner. Is it possible to remove this itemlore and replace it with another one?
What packet do i have to send, to make my npc hittable?
have been searching the wiki for some time now
packets
so i tried with the itemstack itself and with the banner meta (respectively the variables i saved it in) and it doesn't seem to exist there
Ok too bad but thanks anyway
can anyone help?
errpr: Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.Player.getWorld()" because "this.player1" is null
field: private Player player1;
method for getting player:
public void gamerulesGetPlayer(Player player2) {
player1 = player2;
}```
and finally, where the error comes from (there's another line simillar to this in this class):
`else if (player1.getWorld().getGameRuleValue(GameRule.ANNOUNCE_ADVANCEMENTS).equals(false)) {`
no i have
it's after the method
and the method is after the field
what is the error then
I also have a error, I updated my Java to a new headless JRE for Java 16. I also updated spigot to 1.7.1 and BuildTools. My error is it doesnt start.
the error is, like golden stack said, you are calling methods in the wrong order most likely so it has not been defined
what do i do then?
ubuntu@ubuntu:~/minecraft$ java -jar -Xms4096M -Xmx4096M spigot-1.17.1.jar
Loading libraries, please wait...
[08:12:10] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[08:12:13] [main/INFO]: Reloading ResourceManager: Default, bukkit
[08:12:19] [Worker-Main-4/INFO]: Loaded 7 recipes
-SKIP LINES-
[08:12:28] [main/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:311)
[08:12:28] [main/INFO]: [STDERR]: at net.minecraft.server.Main.main(Main.java:222)
[08:12:28] [main/INFO]: [STDERR]: at org.bukkit.craftbukkit.Main.main(Main.java:206)
[08:12:28] [Thread-2/INFO]: Stopping server
[08:12:28] [Thread-2/INFO]: Saving worlds
[08:12:28] [Thread-2/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
doesn’t start at all?
ah
I posted a snipped from my terminal. It seems to start as usual but 'crashes' within seconds
there is an error there, MinecraftServer:311
maybe try rebuilding with buildtools?
can anyone help with my issue too please?
you need to do what @sinful egret said
ill try it, do you know the command off the top of your noggin?
he said to print it out when i see it
yep
I completely look over the STDERR
thanks for the help btw, appreciated.
ouch
java -jar BuildTools.jar —rev 1.17.1
np
i put the get player thing before it and it still dunt work
Oh perfect thank you. Your correct, source: https://www.spigotmc.org/wiki/buildtools/
@ me if you still have issues
can you paste the whole class
?paste
Will do, running rebuild now. <3
no thanks, i like my code not stolen
this took me like an hour to make and it's a gamerules gui so people might actually want it
whatever
no one wants your broken code LMAO
LMAO
xD
no one wants to be your friend LMAO
real funny
soo can anybody be helpful here or like nah
we want to help you
clearly
and have been trying
buenny
what
when it says that something isn’t defined
it means that you haven’t set it to anything
eg
i have, in gamerulesGetPlayer()
When in doubt print it out, just debug your code by printing player 1
yes but you may be calling that after the other method meaning that it errors - the jvm don’t lie
this is the thing in the command
GamerulesGUI gui = new GamerulesGUI();
gui.gamerulesGetPlayer(player);
player.openInventory(gui.getInventory());```
ok…
what do i print
just scroll up man
[INFO] Reactor Summary:
[INFO]
[INFO] Spigot-API 1.17.1-R0.1-SNAPSHOT .................... SUCCESS [ 35.410 s]
[INFO] Spigot-Parent dev-SNAPSHOT ......................... SUCCESS [ 0.037 s]
[INFO] Spigot 1.17.1-R0.1-SNAPSHOT ........................ SUCCESS [02:57 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:33 min
[INFO] Finished at: 2021-08-29T08:22:27Z
[INFO] ------------------------------------------------------------------------
getting closer :)
gonna try re-launching
ubuntu@ubuntu:~/minecraft$ java -jar -Xms4096M -Xmx4096M spigot-1.17.1.jar
Loading libraries, please wait...
[08:24:12] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[08:24:15] [main/INFO]: Reloading ResourceManager: Default, bukkit
[08:24:20] [Worker-Main-4/INFO]: Loaded 7 recipes
[08:24:28] [main/INFO]: [STDERR]: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-16-openjdk-arm64/lib/libawt_xawt.so
[08:24:28] [main/INFO]: [STDERR]: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2387)
[08:24:28] [main/INFO]: [STDERR]: at java.base/java.lang.Runtime.load0(Runtime.java:746)
[08:24:28] [main/INFO]: [STDERR]: at java.base/java.lang.System.load(System.java:1857)
[08:24:28] [main/INFO]: [STDERR]: at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
[08:24:28] [main/INFO]: [STDERR]: at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
[08:24:28] [main/INFO]: [STDERR]: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
[08:24:28] [main/INFO]: [STDERR]: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
[08:24:28] [main/INFO]: [STDERR]: at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:310)
[08:24:28] [main/INFO]: [STDERR]: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:280)
[08:24:28] [main/INFO]: [STDERR]: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:280)
[08:24:28] [main/INFO]: [STDERR]: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2392)
[08:24:28] [main/INFO]: [STDERR]: at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:808)
[08:24:28] [main/INFO]: [STDERR]: at java.base/java.lang.System.loadLibrary(System.java:1893)
[08:24:28] [main/INFO]: [STDERR]: at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1389)
[08:24:28] [main/INFO]: [STDERR]: at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1387)
[08:24:28] [main/INFO]: [STDERR]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
[08:24:28] [main/INFO]: [STDERR]: at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1386)
[08:24:28] [main/INFO]: [STDERR]: at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1419)
[08:24:28] [main/INFO]: [STDERR]: at java.desktop/java.awt.Component.<clinit>(Component.java:622)
[08:24:28] [main/INFO]: [STDERR]: at net.minecraft.server.dedicated.DedicatedServer.bh(DedicatedServer.java:524)
[08:24:28] [main/INFO]: [STDERR]: at net.minecraft.server.Main.lambda$1(Main.java:234)
[08:24:28] [main/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:311)
[08:24:28] [main/INFO]: [STDERR]: at net.minecraft.server.Main.main(Main.java:222)
[08:24:28] [main/INFO]: [STDERR]: at org.bukkit.craftbukkit.Main.main(Main.java:206)
[08:24:28] [Thread-2/INFO]: Stopping server
[08:24:28] [Thread-2/INFO]: Saving worlds
[08:24:28] [Thread-2/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
ubuntu@ubuntu:~/minecraft$
yeah i don't think i'll be getting help anytime soon, i'll skeddadle for now
without more context buenny it is hard to know what the issue is
idk where you are calling getWorld to cause that error
bro it's in the first message what do you mean
what version of java do you folks use? Im getting the error with java-16-openjdk-arm64

i have never seen this error
hello
i need help
idk which is better
spigot or bungeecord
i want to make multiple servers
Background: I didnt update any of my plugins or my world
they are both totally sperate things
would that matter?
u need spigot and bungeecord for a server with multiple servers to work
bungeecord is the "link" between it
so how do i add spigot to bungeecord?
meh try the jar as a completely new server
too holy, i cant understand it
lemme find smth more
like just a text tutorial, im too lazy to watch and my eyes are burning like hell
ohgay
will do
@chrome wagon don’t bother
i asked the paper dudes
they said it’s ur java install
did you install headless?
so you're saying that Bungeecord is already a Spigot?
you need the normal one
apparently
im on a PI without screen so i figured headless I can do another one
do you know the name of the working one?
so I have to add Spigot to bungeecord?
read my links please
"manually"
i gave enough examples
where?
UwU
no - you need to find it urself probably
too much
i don’t use linux xd
so what i was trying to say is like can i Add Spigot to Bungeecord? yes or no?
its so confusing
Its a standalone communication server
try adding —nogui to your start file
like a bridge
as the command to start the server
between the two servers
okay after I change java I will do that :)
ty
so i cant add spigot to a bungeecord?
just say YES OR NO
its simple as that 🤣
It´s useless when u dont understand that those things do
No
thank you suspicious shoe, now i understand
now...one more question
how to make multiple server using spigot?
oh lord he comin
wtf i thought bungeecord is not a spigot
It's not
ITS A STANDALONE SERVER
why do you not read the links?
FOR CUMMUNICATION
im confused
caps lock hittin different
cuz im LAZY
have you clicked any?
neither
if u want to understand yea true
ubuntu@ubuntu:~$ java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 16.0.1+9-Ubuntu-120.04, mixed mode, sharing)
ubuntu@ubuntu:~$
ok gonna try again to launch
dont forget the -nogui arg
so bungeecord.... is just like a server? not a plugin?
shut up
will do, why does removing the UI help?
maybe smth is broken with that
its worth a try
👍
oh nvm, i wont shut up. I will keep talking
well but no one will help 😂
At least read the pages they sent and move to #help-server
Is starting :)
well thank you kind man.
will it auto convert the world to 1.17 or how does that work?
nop
the world will convert, but not good
will probably breack a 1.16 world to 1.17
I plan to just world edit remove my house and put it in a empty 1.17 world
that should fix the fuckery?!
shouldnt this also be in #help-server
?
probably
to be fair yes, but its kinda same thing cuz im the dev for my server and this will help me dev
lol
he is the server
👀
so one more question
@narrow furnace by the way
Ask in #help-server
Bungeecord or Spigot, which is better?
im so confused
Do you have any java questions for me?
no
Go to #help-server and I can explain
not atm but im sure leetcode.com will
or hackerrank
thank you all by the way. Seems to be working great. -nogui didnt seem to affect it either.
Def was the Java
good thing
oh I just meant like it didnt need to be added
I didnt actually add it
my b for confusion
Can someone help me real quick: I use this method do decode my PacketPlayInUseEntity, works fine for the Interact, but when i try do it it for the attack, i fail mesarably, for like 2 hours now, can someone help? Method: https://pastebin.com/hVt2q0n6
Yeah I know what you meant was just correcting it so it would work if you wanted it to later
Ya i feel that, thanks for pointing that out
You making NPCs?
yop
there are apis for that iirc
^
well - read how they do it ig
i just need help with the attack
Saves you a lot of time with code you don't have to maintain
u know an example
Citizens
^
Aight now back to speed running my Java course from school...
it is paid on their spigot but you can download from the jenkins
lmao
what are you learning, imports?
Basics
I almost finished entire book in 1 day
but java is better
Second day now
oh XD
is understanding the whole oracle java tutorial still beginner level?
hmmm kinda
I'm at the end of the book now
It's teaching Swing before classes and instances...
how do i check if args[0] is a valid Material?
So yeah...
Material.of()
check it’s not null
Everything is static atm
example pls 👉 👈
uh
then yes
mb
Material material = Material.valueOf(args[0]);
if (material == null) return
http://prntscr.com/1qqbph8 bruhhh

@quasi flint i need help again its not about the like bungeecord or spigot. dm me
absolute chad
well an old man once said, if u help someone, he helps you too
idk
I cant think when i am getting pinged every 2 minutes
U cant fucking help with packets
bruh just send the question
@eager valley what do you need help with
dm
ok dm it
there is no "fallback_server:" and "default_server:" in config.yml
So I try
main: pw.main.PluginWork
main: pw.main.PluginWork.PluginWork
main: PluginWork
main: pw.main
main: src.pw.main.PluginWork
main: src.pw.main.PluginWork.PluginWork
main: .pw.main.PluginWork
I'm trying to run a plugin
No one will help you with that, google it
I google it, but I don't search a answer
I do all like tutorial, but it don't works
if anyone could help with this issue that would be nice, thanks
It literally says what's wrong
yes but idk how to fix it
gamerulesGetPlayer this is a setter method, not a getter method
Either way, are you sure that you invoked that method?
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
gamerulesGetPlayer has get in it's name, which would usually indicate that it is a getter method (i. e. it should return a field), however in this case it sets a field to a value
he means this is a mutator method not a accessor
And are you sure that you called gamerulesGetPlayer
^^^
Now that is something I haven't heard about
you can google it ^^
mutator = setter
I'm not dum dum
Mutate = modify the state of somethin
hebrew
Which is why you should use get and set as those are the most abstract words in the english language
what do i do doe
learn java
hush
Are you sure that the player is not null here?
This isn't a java comprehension issue
tis not, it's the sender of the command parsed as a player
it is, he doesn't even know why an npe is thrown
what's an npe
ye idk what that is
Programmer jargon, we like shortening all exceptions
if(playerthatsupposedtobenull == null) return;
NullPointerException = you used the null pointer at a place where you shouldn't use it.
that will prob solve it
that's a geolykt fix, not something you should use
if it stops working it means you have a logic issue
oh then that means it's not set
Correct, or that you set it to a null value
my theory was that i'm not using it in the same line
so it forgets it after one line
would that be correct?
Nah, where you set the field is irrelevant, as long as you do it before you use the field
lemme test my theory 1 sec
Your theory is 100% wrong
And if it is right, then there is something wrong with your code
we'll see (you're probably right)
wdym we will see
bro
as geol said
you're 100.00% wrong
;-;
yeah i was wrong, as expected
fix your logic theres nothing you can do about it
unless someone goes by all your code
and checks whats wrong
how nice and motivitional of you :p
just send ur code ig
please stop helping, thank you
you're neither helping or being nice
hello, is there a quick way to change absolutely all the Material in my plugin to itemStack 🙂
I fucked up
ok so i souted the player variable and it sent this CraftPlayer{name=Buenny} and now i am confused cause it should work
i mean the player variable in the command, not in the gui class
lemme try to sout it in the gui class
What??
told you
well I need to change literally all my Material shit to itemStack cuz in 1.8 u cant have ENCHANTED_GOLDEN_APPLE as material....
just do it manually
and I've never used itemStack 🙂
wtf
new ItemStack(Material)
lol
But I don't know how to fix it and don't search anything at Internet
so uh
i have a few suggestions for you
first
learn english
its hard to learn anything from the internet if you don't know english
second, learn java
third, watch tutorials
can anyone help? this is not sending anything to console
public void gamerulesOpenInvAndSetPlayerVariable(Player player2) {
player1 = player2;
player2.openInventory(this.getInventory());
System.out.println("banana " + player1);
System.out.println("banana2 " + player2);
}```
Sheesh lol
you just told me not to help you 
did i ask you spesifically?
Yes, you said 'anyone'
so...?
I am infact considered 'one'
that anyone clearly doesn't include you though
says the guy with the sh*t of an attitude
except if it's elgar which you blocked, no one will help you without toxicity
lmao
well atleast i think i unblocked everyone
ok