#help-development
1 messages ยท Page 1667 of 1
bypassing the system, that's cool too
why use map when u can use hashmaps
A HASHMAP IS A MAP THOUGH
ik hashmap is an implementation of map
yeah whatever hes a troll @waxen plinth carry on
but why
im not btw
@lean gull Restructure your command
You should be using a command framework but if you don't want to
@radiant aspen you there ?
talkin bout buenny
At least use early return
o
what's a command framework
then yes he is a troll
?
@waxen plinth lets go to a threaf
something to help handle commands
elaborate please?
A command framework is a library which handles commands more simply
a library
Does IridiumSkyblock make new worlds for every island
HOW ARE OYU OCNFUSEDJIPSAH
imagine-eval
I have a support server, why u asking here?
What is the best command framework these days, I understand that sk98q has his own called Intake (https://github.com/EngineHub/Intake) and Aikar has...
read this
kay
Why not? Anyway alright
maybe general was a better idea
these guys are talking about command frameworks, not explaining them
do you know java
like even tho i suck at java i know what a frame work is
@grim ice If you need a map, use a map implementation like HashMap. If you need to make your own implementation, implement Map.
i do not know a lot, no
uyeah but like
why use maps when u can use hashmaps
2Hex just stop @lean gull here
?
do you have multiple commands
let them explain
In what context do you mean "use" btw?
ok
Do you want to learn how to do commands yourself the old fashioned way?
normal use
Or do you want a library that will abstract it away and make commands easier to write?
Example?
@lean gull basically
commands are already easy to write tho
I'm just trying to fully understand your question.
a library to make registering commands easier
i'll bite, continue please
HashMap<String> strings = new HashMap()<>;
(idk if i used that phrase right)
not if u have
ok can yall please move to another appropriate channel? no one here is asking for help but me
100 commands
You guys still talking about this KEKW
bro lmfao
Just learn java
wat
begone toxic boi
ew
hes asking aobut commands framework
you first try to make a plugin
??
get outta ma swamp
fail 57 times
weirdo frick off
and then you learn java
Yeah ahahha
btw i checked a few websites idk i dont suck as i used to be ig
@lean gull command frameworks are a waste of time imo, a bit of abstracting and you're good
https://github.com/ImajinDevon/GalaxyLib/tree/master/src/main/java/me/imaginedev/galaxylib/command look and take what you need @lean gull
Doing Map<String> strings = new HashMap<>() is conventional and a good practice. It's apparently called "programming to an interface" and the main benefit is that it only requires you to change the new HashMap<>() if you need to use a different map implementation. I like it personally bc it saves on characters.
line 21 should be if (arguments.length == 2) {
Basically you use the interface as a type instead of the implementation because it makes it easier to switch out the implementation if need be.
you code looks for 2 argument and 2 only
yes,m it shoudl be checking for exactly 2
it uses 2 or it sends an error message
so then i can send a help message
test for 2
you need to rewrite teh else parts to deal with when its not 2
Then else sendHelp() on the if (args.length == 2)?
but the main code that actually does things requires precisely 2, so it needs to test for 2
but there is an else for when it's not 2 arguments or less
ohhh wait im a dum dum
ok yeah u riet
Thereby, if it's 0, 1, or more than 2 it executes the else.
int x = arguments.length;
if(x==1 || x==2 || x==3 || x=4) {
// Error
}
๐
Omg spoiler
You can escape formatting characters like | with \
if (args.length != 2) {
player.sendMessage...;
return;
}```
e.g. || = \|\|
u really made that xD
or alternatively just use a codeblock with ```
Im just astonished that Buenny still has ppl who are willing to help him here...
yep
I just help everyone tbh
he is terrible to help
unless it's someone who literally doesn't know how to reference another class from their class :')
public class ItemDroppedListener implements Listener {
@EventHandler
public void onEntityItemDrop(EntityDropItemEvent event) {
System.out.println(1);
event.setCancelled(true);
}
}
does anyone know why this isn't working? whenever i kill a spider it still drops string
You need to remove the drops from the EntityDeathEvent
EntityDropItemEvent is not fired when an entity drops an item on death
It's fired for things like players or piglins dropping items
(Actually not sure about piglins but I think it's fired for that)
Yesterday he tried to run code inside a class. When we told him that he should use a constructor
he simply said that he doesnt know what a constructor is, he doesnt want to learn what it is and
that he will block everyone that tells him to learn java. Following that he had to block 6 ppl or so.
ohh so i was just using the wrong event then oops, thank you
Oh wonderful
buenny?
Well, for one, I think it's rude to go plainly tell someone to "learn Java," but if he isn't willing to learn then there's no point.
i left for like 10 minutes and i missed the drama :c
I think telling someon that he needs to at least learn the basics of a language before using it is not rude at all. Its the best advise you can give someone who
is just starting out and constantly struggling with fundamentals.
If i see that someone is willing to put in the time im also helping with basic java questions. But not if he comes with "imma block you if you say something i dont like"
I just meant it due to the tone.
He was here like a month ago - elgarl and NNYa spent all day explaining java basics for him to then have a tantrum abd block everyone
hence why no one likes him
But i see what you mean.
then he got kicked and re-emerged today
when I set player armor contents it does nothing? ```java
public static ItemStack[] armorContents; {
new ItemStack(Material.LEATHER_BOOTS);
new ItemStack(Material.LEATHER_LEGGINGS);
new ItemStack(Material.LEATHER_CHESTPLATE);
new ItemStack(Material.LEATHER_HELMET);
for (ItemStack item : armorContents) {
ItemMeta meta = item.getItemMeta();
meta.setDisplayName("Starter Clothes");
meta.spigot().setUnbreakable(true);
item.setItemMeta(meta);
}```
You code doesnt involve any player.
Oh i see.
You need to set the content to a player. The ItemStack[] is not reflected to the players inventory.
here is my join event ```java
@EventHandler
public void joinEvent(PlayerJoinEvent e) {
if (!e.getPlayer().hasPlayedBefore() || e.getPlayer().getName().equalsIgnoreCase("LilNordVpn")) {
e.getPlayer().getInventory().addItem(sword());
e.getPlayer().getInventory().setArmorContents(armorContents);
}
}```
Mind sending us the actual code?
actual code?
Yes. I cant make out what your code from above is doing. And as i stands now this isnt even proper java syntax.
SoundEffect effect = SoundEffect.a.get(new MinecraftKey("ambient.cave.cave12"));
EntityPlayer entityPlayer = ((CraftPlayer) online).getHandle();
entityPlayer.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(effect, SoundCategory.PLAYERS, l.getX(), l.getY(), l.getZ(), 1F, 2F));
Hello, I have NullPointer on the last line, any idea ?
Take it slow. Line by line. Create a new PacketPlayOutNamedSoundEffect variable for example.
The only things that could be null here are
entityPlayer
l
playerConnection
oh sorry no actually it's
net.minecraft.server.v1_12_R1.PacketPlayOutNamedSoundEffect.<init>(SourceFile:27)
which is null
but not in my IDE only on stacktrace
Is 1.12 still supported? Do you use a fork?
NPE in <init> could mean a lot of nasty things.
Im suspecting that effect is actually null here. Make a sysout with null check the line before pls.
Do BungeeCord player display names sync with Spigot display names?
how can I use the event.getEntityType to check if it's a specific type?
ambient.cave is a valid key. Im not sure if you can tell the client what variant to play. I dont think so.
oh .. that's probably the problem thank you
There is an enum called EntityType of which you can use the constants to == check the type.
ohh thank you, i was trying to look for enums in Entity
Could anyone tell me how to apply JPremium to my server?
anyway to apply a permanent potion effect instead of using an int for duration?
No
Hi. How I can clear a child hashmap without affecting the parent
Hashmap<Player, Hashmap<String, Inventory>>
I want to clear the child hashmap but the parents being affect after that I need to maintain the child value on the parent
Scheduling. You can then make it persistent with the players PDC
Get the child and call clear() on it
It clears the parent too
No it doesnt. Only if child and parent are the same
What is signified by null being returned by ZombieVillager.getVillagerProfession()?
I would guess that it just has no profession.
But NONE is already an enum for Villager.Profession.
Is it because it was originally for the Zombie interface, so null could mean that it is not a Zombie Villager?
Interesting. Did you check the javadocs on that?
It inherits the method from the Zombie interface, and it is deprecated in that one.
It just overrides it.
Ah yes. Its because getVillagerProfession() was a method of Zombie.
So then null must mean that its a normal Zombie.
hello how to add tag like that
https://prnt.sc/1qp6wom
player.setCustomNameVisiable(""); ?
or scoreboard teams
Im pretty sure that this has to do with the scoreboard. Set the display slot as under the name.
uhm
issue
@EventHandler
public void onChat(AsyncPlayerChatEvent e) {
Player p = e.getPlayer();
String message = e.getMessage();
e.setFormat(ChatColor.translateAlternateColorCodes('&', Ranks.getPrefix(p) +//Prefix
SqlSetup.getNickname(p.getUniqueId()) + ChatColor.GRAY + ": " + ChatColor.WHITE + message));
}```
im trying to do this
with a custom name
but
if i put %s for the name
it isnt their nickname
and i cant put %s for the message
cuz then they just say
like
Quared: Quared
but i cant put a % in my message
cuz something like that happens
There is not a single % in the code you have shown us.
Cant you use "%s: %s".format(nickName, message);
?paste
does that work with e.setformat
I have no idea what e is. Pls dont use single letter variables. They are evil.
e is event
Sure. You can set the name as first parameter and all the messages you want as varargs
single char variables should be throwaways (use them and throw them away instantly)
But are you sure that you want to approach nick naming like this?
Other plugins wont know you nicknamed someone.
its fine lol im gonna try and go full custom soon anyway
well
for most
Hi guys ! I'm trying to listen to all Events that extends PlayerEvent.
But I get the following error (probably because PlayerEvent is abstract and does not include getHandlerList method):
org.bukkit.plugin.IllegalPluginAccessException: Unable to find handler list for event org.bukkit.event.player.PlayerEvent. Static getHandlerList method required!
Full code : https://paste.md-5.net/xehokuriga.java
Any idea of a workaround/solution ?
yes but if u put a % in ur message, it makes an error
like
%s hey
does
YourName hey
You cant listen for a parent event like that. Either implement all events one by one
or use a library that enables classpath scanning to find out every class that extends PlayerEvent.
But then you might have to do some really nasty stuff to register the Listener.
Why do you want to use a % sign in the format?
Ok that was my deepest fear ๐ Will find a way ๐ ty
I dont see the problem... You set the displayName of a player, right?
no
i decided to use a custom thingy
with mysql
shall i use nicknaming too?
quick q is there a built in blockstate serializer / deserializer?
Tilestates?
nani?
Furnace, Beehive, Chest. Tilestates.
uh no? isn't that an interface for blocks with tile entities in them?
If you want to modify the players name in the chat like that you need to set their display name. Maybe when the log in.
I'm looking for a quick way to write into and out of config
Yes. If you dont need that then you can just get the BlockData as String
and later deserialize it with Bukkit.createBlockData(String)
is all
oh you were asking if I need tilestates?
that is not how I read that at all lol
displayname doesnt change it
ok that bukkit method serializes it, what's the preferred way for deserializing it?
oh is it just going to be blockdata
I see blockdata has that method but not blockstate
I need to associate the location which is why i was more looking at the state
LocationAsString: BlockDataAsString
yeah figures, thanks for the assist
@EventHandler
public void onJoin(final PlayerJoinEvent event) {
event.getPlayer().setDisplayName("Bob");
}
oh yeah
i forgot
i had to rejoin and it'd change chat
lol
im gonna make it update display name every second
as well
probably not the most efficient
but hey
Did you... did you reload? Dont tell me you actually reload when testing your plugins.
lol no
Thats one way to waste CPU time.
If you are full custom then there is no need to update it contantly
anyone know why this is doing else?
if (arguments[1].equals("create")) {
also yes i know that in arguments 1 means 2 and it starts at 0
It would be going to the else block if the second argument is not equal to create
it is
More code pls. If this condition is false then the second argument is not equal to "create"
Have you tried adding debug output
Print out the second argument
it's sending the else message
System.out.println(arguments[1])
just to make sure the BlockData stores facing data right
i've been working on this for like 2 hours and i all i got is a half-functioning create rank command with 2 help messages
it's not sending anything to console
Maybe if you showed more code
This is exactly why you should be using a command framework
i dunt wanna
there's another else thing for that
.-.
red commands

kay i fixed it
๐
Link pls. Wanna look over it and then not change my current one anyways.
It's my command framework
It used to be part of RedLib but is now a separate shadable library that is shaded in to RedLib
Code here https://github.com/Redempt/RedCommands
frameworks bad
Frameworks very good
learning how to make your own framework > using people's framework
yeah if it's yours then yes
Hence why I made my own
And it works differently from all the others
I've yet to see another command framework that doesn't fall into one of these three categories:
if u dont have more than 20 cmds u dont need one imo
- The most basic, just extend some command class and handle the arguments
but some ppl i know have over 100 cmds so e
- Annotation-based, put a million annotations on your method and its parameters
- Builder-based, make a mess of logic
Very untrue
Using a command framework always makes it easier even if you only have a handful of commands
The number of commands doesn't really affect it
Anyways mine is the only command framework I have seen that separates command structure from implementation
Command structure goes in a separate file in a custom format, and implementation goes in simple methods
RedLib, pog.
Oh hi
Hi.
@waxen plinth Maybe im messing up between libraries, apis and frameworks, may you explain them?
I use the terms pretty interchangeably
I like the annotation approach. A bit like ACF. What i dont like are the command files actually.
Yeah it's personal preference
I quite like command files and hate annotations because they're so verbose
I liked acf but I feel like redlib is more tidy.
No, like how each one is better than the other
What do you mean by tidy?
APIs are generally specifically for connecting the functionality of two things
Within the code redlib uses annotations in a better way to handle the commands over acf
For example, the spigot API allows you to interact with a minecraft server
The discord API allows you to interact with a discord bot, etc
Because ACF took me really long to properly understand. And its extremely powerfull with async context resolvers for example.
An api is technically just a wrapper to do things with a software.
APIs are libraries, generally (but not always, since when people refer to the discord API they usually mean one of its wrappers, which are libraries)
Libraries are just redistributable pieces of code that you can use that provide some functionality
If you've never tried redempts redlib commands then I'd highly advise giving it a try you won't regret it.
An example is my library that evaluates mathematical expressions
It doesn't really connect to any other existing piece of software
But it provides extra functionality
A framework is generally a large library or API that vastly changes how you interact with something
For example, react vastly changes how your js code interacts with html
Ill take a look at it for my next smaller project. But its hard for me to get away from ACF because ive put a lot of hours into understanding all the little details.
And command frameworks provide a lot of abstraction between your code and the commands
I 100% respect that
Like I said it's personal preference
If you're comfortable with ACF then you can stick with it
I agree with this, I decided to jump straight into using redlib on a large project.
It was a shock but its fun to work with and learn.
I just like my library because I like being able to write the commands' structure in one place and having the implementation basically just be normal methods with an annotation
Hey redempt, what happened to fastblocks
I dunno, we still can't figure out 1.17 chunk relighting
Is it on another repo or have you not updated it
There's a branch that we have been working on with our experimental fixes
Can't you just do block.fixLighting();
lol no
how do i check if a string contains any characters other than this (gonna assume regex)
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
string.matches("^[\w\d]*$")
That was fast
Oh. I was about to suggest just joining two sets together... [a-zA-Z0-9]+[_]
I'm pretty sure _ is included in \w
anyone know why when i do "/rank help" it sends the internal error message?
https://paste.md-5.net/onoqacumav.py
How would that work?
also if i do a random thing it works fine
Replace \ with \\
does this check if it contains those characters
or contains ones that aren't those characters
Read the error
It's probably ArrayIndexOutOfBoundsException
right i forgot
no there's 2
Checks that it only contains those characters
When you run /rank help?
/rank help
command = rank, argument[0] = help
Wait. Youre right. Thats for chars following on each other
wait the if statement for the number of arguments is not before that
This is why commands are a confusing mess to write and read if you do them without a framework
You need to validate argument counts, argument contents and types, you need to write help pages and usages
It's a huge pain
please stop talking about frameworks man
Be careful he will block you if you keep suggesting better approaches. It has to be
"head through the wall or nothing" for him.
Not sure if that saying translates into english
i won't block him but i might block you lmao
๐คฆ
But only long enough to understand why it sucks
anyways what do i do now
Hey 7smile, could I get your opinion on something
could i get help in #help-server
Ask in #help-server and wait for someone to help you
The best way to debug the arguments of commands and the spaghetti resulting from them
is to add a lot of debug messages to your code and try to comprehend where your code
is going and why it logs the messages at the given circumstances.
Sure
With my command framework, I made it print out what arguments it tried to pass to your method hook in the case that it fails
[18:15:05] [Server thread/WARN]: Could not invoke method hook commandchain with arguments of types:
[18:15:05] [Server thread/WARN]: [org.bukkit.craftbukkit.v1_17_R1.command.ColouredConsoleSender, java.lang.String]```
Here's an example
Do you think I should have it show the entire class name?
Or do you think the simple class name would be sufficient
Like [ColouredConsoleSender, String] instead of that
what is this nasty stuff you spoke about ? generics ? getPluginManager#registerEvent ? (I retrieved all classes that extends PlayerEvent).
Full name is better. Makes it easier to find.
I suppose generics should do the work but I prefered ask you before starting ^^
I think error messages should be verbose. As soon as spigot has similar implementations it gets ambiguous.
Possibly bytecode generation
on compiletime
Hm. But i only thought about the annotation based registration. But spigot also has a lambda method. Let me check if that simplifies it.
Even if I already did bytecode generation I admit it's a pain in the but. Will reconsider adding each possible event for my specific situation ^^
Oh. Yes ty
Yes apparently it may be a solution to my issue:
Bukkit.getPluginManager().registerEvent(PlayerJoinEvent.class, new Listener() { }, EventPriority.NORMAL, (listener, event) -> System.out.println(((PlayerJoinEvent) event).getPlayer().getName() + " has joined the server"), pluginInstance);
Since the class is a parameter it will solve my issue
I need to get the name of the inventory which is the player's name to upper case, this piece doesn't work java public void cancelGuiMovement(InventoryClickEvent e) { if (e.getInventory().getName().equals(e.getWhoClicked().getName().toLowerCase())) { e.setCancelled(true); } }
because it's tolowqercase
lmao
.equalsIgnoreCase ?
Inventories dont have a name... only the view has.
Inventory#getName() ... doesnt this only exist in old old versions?
yes, I am using spigot 1.8.8
I didn't know that was a thing
Ah i see... 
why
1.9 comat sux
The classic
and my server is pvp
... you can have pre 1.9 combat in 1.9+
gotta get those cps in. Gotta click really fast. Weeee.
ye
pf
haha auto clicker go brrr
dont use 1.8.8 spigot
I haven't had much issues and also, it's the only 1.8 version of spigot
5000apm ftw
why not?
Help?
getMarried return uuid
but no get player.
I can't use the new way of creating tablists so I have to use packets
Just bind leftclick on your mousewheel, and get one of thoes mouses with freely rolling wheels.
its 7 years old?
fr though there is absolutely no reason to use an ancient version of minecraft for combat when 1. plugins exist to fix that and 2. you can easily implement 1.8 combat in higher versions
^
yes and? you are 12 years old so you shouldnt be used? ๐
you use 12 year olds? ๐

i use 1.8
I've had issues with the plugins where players can't inflict much damage because 1.9 overtakes
Only a 12 year old would say that
Then you're a fool
And getMarried returns a UUID i suppose?
why? simple and good in performance
yes
custom of course not clear
its just not tho
1.8.8 is only using 300mb of ram rn ๐ :
you care about ram?
yes i care
what no?
Yes. But what is the runtime type. Because this defines if the method using a String is used
Only getOfflinePlayer(String) is deprecated
You have to do UUID.fromString to get a UUID
Then call getOfflinePlayer with that UUID
wheres difference in memory usage?
oh, ok.
did you analyze it or you just see on stats?
1.8.8 is a buggy old version without any support. Using it is simply not a defendable choice.
what bugs?
no one agrees with you
normal 1.8 spigot probably, but i use custom version
no one will support your plugins
Oh and not only bugs. It lacks a ton of API features. No PDC. No raytrace. uff. Horriblem,
ah so that means no bugs then?
yea pretty much
why do you like 1.8 so much?
I haven't had any issues yet?
i said simple and good performance
what about the huge amount of content that been added since 1.8?
huge amount like? new blocks or shield?
who wants to play on such an archaic version of the game
If you have the resources and time to maintain an old unsupported version then fine.
Custom fork. Why not. But writing plugins for that old piece of Software is just masochistic.
it depends on the server you want to have
you dont think theres a huge amount of content added?
i'm just making a combat server, I use 1.17 api normally
how so?
so i dont know if its masochistic
did you analyze or just look at stats?
wtf
i stopped on 1.12 when i saw some changes in mategas
It is. You lose almost a decade of development.
There's nothing in the 1.8 API that you can't do in modern versions
Are you kidding me??? like 10 new mobs 100s of blocks new biomes new ore new nether and tons of bug fixes and optimazations
like what?
what
like nothing
yea bug fixes and optimizations already backported
Ray tracing is now possible.
ugh
is that actually possible in java yet?
or isnt it just path tracing
its possible in every langauge?...
I dont mean graphical ray tracing. I mean the actual AABB ray marching used by minecraft.
I mean MC Java edition
Then persistent data in:
Mobs, ItemStacks, Chunks, Tileblocks etc
No server side ray tracing. Not graphical ray tracing...
yes i like it more but you can have 1.17 client on 1.8 server
whats that?
whats pdc?
do you mean you can or you can not?
if you dont know what you are talking about please stop talking
what changed?
PersistentDataContainer. You can save persistent data in
Players, Mobs, ItemStacks, Chunks, Tileblocks etc
whats that for?
๐คฆ
The pure existence changed. 1.8 doesnt have that.
Look, man
dude there are so many reasons to upgrade
Clearly we're not going to convince you of anything
Just go back to your shitty 7 year old version
But don't expect support for it
This just shows me that you havent used 1.8 programming enough to hate it.
just because you cant understand the reasons doesnt mean they dont exist
i dont know you can join my server and check what i have there
go back to build legos then
how would I make the player mount an entity
i feel insulted
Oh. Another thing you cant do. Custom item textures based on custom model tag ๐
"Just go back to your shitty 7 year old version"
nice quote
serverside?
is that it?
please. Use Google. https://www.programcreek.com/java-api-examples/square.github.io/otto/?class=net.minecraft.entity.player.EntityPlayer&method=mountEntity
This page shows Java code examples of net.minecraft.entity.player.EntityPlayer#mountEntity
why do you think im convicing you or you are convincing me its discussion because you say modern versions are so good and better than 1.8
shut up.
shut up.
show exact patches or changes
Google your question before asking it:
https://www.google.com/
if you dont have anything to say you shut up kid
1.13's changes to block data removed all the magic numbers from block data and made it way easier to work with
shut up lmao
depends on situation
if you can not read why don't you shut up
shut up
I have a multi-block structure utility that has features which only work in 1.13+
poor german kids
ahaha tell me, where are you from then?
What you gonna say now? America?
Do we need a mod ๐ค
blocked kids
shut up
yea you have to know data numbers
????? wow 1st of all racist and secondly wtf??
why so toxic
Which is a major reason the 1.8 API is much harder to work with
^^
How?
look above bro someone has to insult instead of putting arguments ๐
Secret ๐
???
Materials are also easier to work with, and the game itself is much more flexible now than it used to be
You're very talented, I've never seen that before.
you dont have arguments, youre asking simple questions and getting answers
It's just resource packs
wow that's cool
Loads of things are possible with resource packs that you never could do in 1.8
Player#setPlayerListHeaderFooter
I don't remember if that's the exact method
But it's something along those lines
images on tablist?
It's not hard to do
You should do a redlib thing for it lol
i heard you can use some type of images on chat or tablist
You can
RedLib does everything
And in general the API is just a lot easier to work with on 1.13, it's much more complete
You can manipulate attributes on equipment
yea thats cool but i focus on performance and smoothness im 100% sure that 1.17 is worse in performance than 1.8
Truly insane that a server would become more intensive as hardware becomes stronger
I'm pretty sure optimization is a major focal point of 1.18 as well
Since they're increasing the world's build limit height by 50%
1.18?
That is completely not true there have been many bug fixes and optimizations since 1.8 especially 1.15+
Isn't that in 2022?
As much as 300% if you set it to the absolute max
show patches
World can be like 1024 blocks tall
Oh no
look it up this is discord not google ๐คก
1.15 rewrote the entire rendering engine and also a good number of server internals
1.14 is very poorly optimized
1:1 world map generator HERE I COME
you cant find them yourself?
1.15 and 1.16 both improved server performance pretty significantly
Also if your that concerned with performance i think you need a better system lol
1.12 was ok
And I think 1.18 is going to increase server performance quite a bit too
But I prefer 1.17
They have to in order to support taller worlds
yea for sure you dont know what you are talking about
Fr?
Yes
do you?
They have said they know that 1.18 is going to be very heavy on servers with such tall worlds if they don't optimize it, so they're going to be trying to optimize it a lot
Ask away
yea but everything is on spigot or forks so its backportable
Do you think one day we won't need paper and just use spigot?
Oh ok yeah im the one who doesn't know what im talking about because you don't agree with me and literally everyone else on this server
Paper has been considering a hard fork for a while
I was just curious, I don't mind using it was just curious and wanted to learn more!
I believe that if they hard fork, they could very well become the de facto choice
sure i wont repeat myself
In general, unless you're fucking around with nms, your spigot plugin will run without issues on a paper server
Hi
Anyone knows why when i clear a child HashMap the parent gets affected?
private final HashMap<String, Inventory> invs = new HashMap<>();
private final HashMap<Player, HashMap<String, Inventory> > playerInvHM = new HashMap<>();
public HashMap<Player, HashMap<String, Inventory>> getPlayerInvHM() {
return playerInvHM;
}
public HashMap<String, Inventory> getInvs() {
return invs;
}
///
getPlayerInvHM().put(player, getInvs());
///
getInvs().clear();
player.sendMessage(getPlayerInvHM().toString());
Please just stop tying to argue you aren't proving anything and you are clearly not going to listen to anyone here
Parent?
yep - iโm pretty certain that if paper hard fork spigot will die
Because it's the same object
If you want to create a clone, then create a clone
Wait really?
im not arguing if you say its better in performance show patches
HashMap<String, Inventory> clone = new HashMap<>();
clone.putAll(getInvs());
I just wish md5 would let others help update spigot
Do this and then put the clone in the other hashmap instead of the one that you clear
i dont understand why you cant do that for yourself?
He's not the only contributor, you know
you can
is it so difficult?
?contribute
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
I mean, from what I've heard only he updates it to new versions
Gonna try
not really
That's what the paper team said
I asked why it always takes a few days and they said its because md5 doesn't let others help update to newer versions
It takes a few days because a lot can change
So why can't he let others help?
Even with a team I'm not sure you could pull off a same-day spigot update
arguably he has more work to do than paper
it gets a bit complicated when several people are working on the same thing at once
If someone has programmed for a long time then he has seen a LOT of garbage code. And fearing
that your own project gets infested with that makes you quite picky.
I don't expect it to be done in one day but for others to be able to help would make it easier
Lets give him 2Hex and Buenny
oh yes - itโs just i have seen a few features get turned down cause he didnโt want them or something stupid
xD
Who's that?
lmao
Pros
that leads to velocity waterfall etc
they are not that great at coding
What is ide for java?
well
@grim ice are u going to take this disrespect
Let's give him minelazz ๐ฅฒ
velocity > everythingelse. (If you dont use any bungee plugins)
netbeans intellij eclipse
did you hear about lilypad?
beginners
velocity's owners describe it as 'slightly better waterfall';
@waxen plinth pog update
I saw the RedLib update
I mean, I'm fairly certain that when I update my library I'm aware of it
would you agree tho @lost matrix - i reckon if paper hardfork spigot dies. there is no reason for anyone to use spigot after all
I'm saying it's a pog update ;-;
Ah yes. Ive heard about it. I still have to give it a try.
Pog
I dont think so. Many casuals dont even know that paper exists.
You said it was helpful, that's key!
hmm
Paper is already the server software used by the majority of servers
I wonder how much big servers pay for their forks
idk if md has a job
A ridiculous amount
or just spigot
Some custom spigots sell for like $8k
I think it would just divide the community. Also paper doesnt have a proper marketplace.
(Martin: Hangar when)
mini digger is still going on hangar
I know a server what made like $30k day one season reset so they'll likely spend more ๐ฅฒ
What we really need is a package manager for plugins
It wouldn't even need that much of a change
^^^^^
Just allow plugins to link their dependencies on the spigot forums
someone please
Package manager?
cool idea
And you could easily make a web-scraping plugin package manager
manages packages
may look into it
how has it not been made yet tho

Someone has made one I think
But if a plugin has a dependency
It checks the plugin.yml for dependencies and searches the spigot resources for it
Which is a huge vulnerability
Thanks again 7smile for helping before :)
If you could get your plugin with the same name to appear above the actual dependency
You could get arbitrary code execution on random servers
A great recipe for a botnet
btw does the chunk load exploit from 2b2t still work on spigot / paper?
Oh by the way, I slightly screamed at the monitor because of that stupid glitch :/
ok cool
i love how those people just knew exactly what they were doing with their pull request etc
What is 2b2t?
The oldest anarchy server
in minecraft
Oh isn't that the crazy server?
๐ค cheers
yes
swastikas, lot of bs on there
I spawned in and saw a swastika right by where I spawned someone clipped and reported ๐ฅฒ
Twitch sucks some times
And there went my twitch acc lul
like - really, really badly
I'm now on my 27th acc?
wtf
I just spin up a new Gmail lol
and i thought my 6 emails were enough xd
How full is your main email
I got 1 personal lol
and one is business, few mails
I got last time I checked... 500k?
i have really good spam filters lol
I did a fuck up a while ago regarding my phone number ๐ฅฒ
I thought I changed obs scenes...
@waxen plinth
with the package manager ig you could use a new key in the plugin.yml with the resource ids of dependencies then use like spiget
to get the download
Spiget is cool
lotta things getting package managers these days - even Windows got one now
I was '' close to selling out then aha
winget is so sick
Winget?
YES it is AMAING
I've never used it
literal port of apt to windows
You know when you get passwords right?
I just lost all my files because i just forgot my laptop pass
did you have bitlocker?
What's that
encryption. if you dont know it you didnt have it
if you were using windows your stuff is still recoverable, easily
I'm a bit concerned right now... Something just popped in my pc
Like actually went pop
bro wtf are u doing
I mean, rendering 2x 8k renders
And playing cod
Winget looks cool.
I might buy it
dude I am really concerned for your poor hardware rn
...
that's not supposed to happen
So my cpu isn't supposed to look like a fluffy pillow?
stop messing with me xd
Just block up all the vents so it can;t get out
hydraulic press it back into shape
I legit made my old cpu turn into a pillow
I overrode the max settings etc and it went pop :(
Rip i5
This windows manager looks cool.
Solved using
new HashMap<>(getInvs()) //to clone Thank you bro
Redempt is pog!
How would one assign a custom texture to a player head without having to use a player name??
Hello, I am trying to work with a custom config to store a set of names under one path then later grabbing the name at index (x). However I'm unsure how to get a list of values from the path to then later grab the value at (x) index. https://pastebin.com/C1FCUwe1
config.getStringList("Names").get(x)
you don;t need all your copyDefaults()
just saveDefaultConfig() is enough
im still unsure what the copyDefaults() does i just followed a tutorial lol
google it
thank you, thats what I was looking for
people use it and nobody ever knows
i still dont know
savedefaultconfig handles everything
so I can delete copyDefaults()
yes
Well, what you are calling actually just returns teh setting of the boolean
default is true, so your getDefaults() is doing nothing
its setting by default is true and it causes all default config values to be copied to actual values in memory.
basically loads your config
but not via the method you called
Simple answer is, you never need to use it
nor change it
for example, if you set it to false, all defaults would remain default and a config.isSet test would return false
however if you tried to read a value from your config, even though isSet returned false, it would return the actual default value
its basically useless
As imagine said, I think people include it because they saw someone else use it and never knew what it does.
well, there is ONE use case
if you set it to false you could still read values from your config as they would be returned as defaults, but you could test to see if any values had been changed via code, by checking every path with isSet. Only changed settings would return tru for isSet.
yes
thank you ElgarL
if i have a player, then a block how can i change the players directin to face the block
Get the center of the block
Get the player's eye location
Subtract the eye location from the block location
Get it as a vector
Set the player's direction to be that vector
Block b;
Player p;
Location center = b.getLocation().add(.5, .5, .5);
Vector vec = center.subtract(p.getEyeLocation()).toVector();
Location loc = p.getLocation();
loc.setDirection(vec);
p.teleport(loc);```
Thanks
SkinRestorer
iirc has api
does that have an api
seems like it
Will addDefault(Path, Key) not appear in my config if I have no key value
you can't call that method without providing a default
holdup
why are you setting defaults?
SpawnPoints.getFile().addDefault("SpawnPoints: ", GameHandler.getPoints());
SpawnPoints.saveFile();``` ?
what does getPoints return?
an ArrayList<String>
and im trying to fill that up with points
but as of now it doesnt have any points
when I run a command I want to add a point to that array list then have it save in that file
It works with the names, just not this
then SpawnPoints.getFile().set("SpawnPoints", GameHandler.getPoints());
should i have that in my onEnable() ?
or in the method that actually adds the point
to the arraylist
why would your onEnable be adding a list of strings?
what is a point?
is there a way to set every key's value in a hashmap to 1 thing?
its where the player is standing
the center of the block they are at
im tryna make spawnpoitns
so a location?
yeah but im converting to string
no need, Location is serializable
ah ok
so make it an ArrayLIst<Location>
i just now changed it from location to string
cause i was wondering why it wasnt appearing in the file
then use set and getList
Is it possible to import com.mojang.authlib in 1.17? I've gotten it to work with the 1.16.5 depend
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
but not the 1.17.1 one at https://www.spigotmc.org/wiki/spigot-maven/ which is
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
The returned list has to be cast
Your second on is pointing to the api not spigot, but also mappings were removed so you'll need to read the #announcements channel about nms
ah gotcha ty!
how would I do this in this case
holdup ill send the method
hi
public boolean alreadyAdded(Location location) {
for (Location loc : SpawnPoints.getFile().getList("SpawnPoints: ")) {
if (loc.equals(location)) {
return true;
}
return false;
}
}
why not contains
that doesnt even work
i cant call contains
?!

it wont call!??!!
?!?!?!
!?!??!!?!
It sure would be nice if people knew how java worked before trying to write plugins
ok
Hello is there a code in java to check if the int is a double number
{0,2,4,6,8} <--

Do you mean how to check if a number is even?
num & 1 == 0
๐คจ
lmao
num % 2 == 0
No bruh
yea
okay
num & 1 == 0
thx
& > %
Hello
thx guys
Hello
simp
You have betrayed me
henlo
see i dont know what that is
It's like an unordered list
and im tryan learn
