#help-archived
1 messages Β· Page 106 of 1
check your config file format
rip atomisher
run your config.yml through https://yaml-online-parser.appspot.com/
it parses correctly
How did you get your Bungee jar file ?
I got it using Pterodactyl panel's default installation
which I believe grabs it from the official repo
and it updates all the module jars as well?
it discovers and loads all the module jars
org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack.asBukkitCopy()```
the exception happens right after it loads all of them actually
WARN java.lang.NoSuchMethodException: org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack.asBukkitCopy()
29.05 09:34:28 [Server] WARN at java.lang.Class.getMethod(Class.java:1786)
29.05 09:34:28 [Server] WARN at ```
how tho
I don't think i typod
i checked with nms it does exist
well anyway, you need to look into the config file under listeners
craftItemStackClass = NMSUtils.getOBCClass("inventory.CraftItemStack");
asBukkitCopyMethod = craftItemStackClass.getMethod("asBukkitCopy");```
just because it parses, doesn't mean it's correct
yes, in config.yml, there is a section listeners:
look in there, probably you have host: improperly formated
oh that's what you mean
Someone had the same problem AtomIsHere, he just forgot a "-" somewhere in the config
In the Listener part
or maybe it's one of your lists, priories or forces hosts, or motd
you can just paste it
?paste
I'm gonna grab the default config.yml and see if that works
same thing
if it does then all is well
default config still needs to be tailored to your server
can someone help me
thought Pterodactyl used pre-made docker images o.O
@frigid ember What's your server version, and give us your getOBC method
look at the console output
Frostalf it still grabs the jar from bungeecords official repo
the getOBC method works
but I believe there default config is a bit scuffed
ill send it anyway
Is it grabbing the right one?
Okay then, answer my first question
Yep, this is how it grabs the jar Frostalf
curl -o ${SERVER_JARFILE} https://ci.md-5.net/job/BungeeCord/${BUNGEE_VERSION}/artifact/bootstrap/target/BungeeCord.jar
Retrooper when using NMS I suggest you use MiniMappingViewer
public static Class<?> getOBCClass(String name) throws ClassNotFoundException {
return Class.forName(obcDir + "." + name);
}
//another class, its obcDir value
public static String getOBCDirectory() {
return "org.bukkit.craftbukkit." + getNmsSuffix();
}
//is getNmsSuffix() value
private static final String nmsVersionSuffix = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3];
i think this code is unnecessary
but look at console output
WARN java.lang.NoSuchMethodException: org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack.asBukkitCopy()
29.05 09:34:28 [Server] WARN at java.lang.Class.getMethod(Class.java:1786)
29.05 09:34:28 [Server] WARN at ```
Yes. my first question was: What's your server version
Be careful, it's ItemStack nms not bukkit ItemStack
ik
yea
asBukkitCopyMethod = craftItemStackClass.getMethod("asBukkitCopy",itemStackClass);```
done
Then it's all good
Hello, how can I find corners on a schematic after pasting it into the world using WorldEdit api thanks
If you have a Cuboid region or something like this, just find the Block with:
max X, max Y, max Z
max X, max Y, min Z
min X, max Y, max Z
minX, max Y, min Z
max X, min Y, max Z
max X, min Y, min Z
min X, min Y, max Z
minX, min Y, min Z
matrix
"Serious Spigot and BungeeCord Help" is the topic for this channel
k
k
after working on this NBT parser, just realizing, I should have just worked backwards on packet to determine the length of the nbt data
can someone help me listen to login packets
why
for?
why for?
in here no login packets are received
i inject players on join
and uninject on quit
just I want to listen to handshaking packets for example
not really sure what you mean by injection?
do you know how to or not
no need to be rood
sorry no offense but some people ask why, but dont know yk
so it doesn't make sense to ask why
tell me
hooking login packet
how
with netty
or in proxy in bungeecord
or you can just display the packets using the logging
never found the third to be particularly useful, but it involves writing a custom log config for log4j
how does protocollib do it
mostly sending packets
but I think there is a way to listen as well
but that might be with netty
you are confusing me
so this is not just for investigative, but actually runtime?
you do know or not
know what?
not off the top of my head
ok
I recommend you do your research
I've done packet listening by modifying bungeecord
and with the log method
but not with protocol lib as a listener
im not using protocollib
so directly with nms?
yea
not sure.
i know there are lots of NMS for packet generation, never looked much into the part on login
assume there is a netty handler somewhere in NMS
theres a video
BRuh
i already did packet listening
I said all I want is login packets
Handshaking packets
if u checked my code
.
hi @frigid ember
hi
i am abhi
ik
klugemonkey bitte
ich weiss schon wie man packets listenening tut
Einfach nur die handshaking packets
still thinking
sprichst du deutsch
Hey Can someone quickly remind me how to deactivate damage from spawning monsters from a spawner? please
check if they were spawned from a spawner when a damage event occurs?
I'm watching the video, to get context
the video does not even cover login packets
let me send u what i mean
for context
No, but it explains concepts rather than tell you specific answers
What concepts
you know, you are approaching this all wrong
write is all packets sent from server
you need to understand netty first
ok, so are you even getting login packets/
handshaking packets are sent from the client
are you even getting packets
ok, good, so sound's like the handshaking is different than the main channel
Just ask ur question @frigid ember
when are you injecting the packet listener, in onjoin?
tinyprotocol they listen to it, im still trying to look through the code
yea
I don't inject PlayerLoginEvent as some versions removed it
or renamed it idk
so that won't really work if that happens after the handshaking
ok
and you want the handshaking packets, not the join one, right?
ima test with playerloginevent
yes
like ProtocolSet
to check protocolversion
for example
ima try debugging
what packets i receive
it looks promising
to inject i need a player object so i cant inject on PrePlayerLoginEvent
or AsyncPrePlayerLoginEvent
at the bottom
?
handleLoginStart
whta do you mean
what are you talking about
PacketPlayInSettings
29.05 11:08:11 [Server] INFO PacketPlayInCustomPayload
29.05 11:08:11 [Server] INFO PacketPlayInPositionLook
29.05 11:08:11 [Server] INFO PacketPlayInPositionLook
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:11 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
29.05 11:08:12 [Server] INFO PacketPlayInFlying
I mean, looks like they are handling the login
no player login received
only Settings
was first
wait a sec
@inland oxide
PacketPlayOutChat
29.05 11:11:20 [Server] INFO PacketPlayOutChat
29.05 11:11:20 [Server] INFO PacketPlayOutChat
29.05 11:11:20 [Server] INFO PacketPlayOutPlayerInfo
29.05 11:11:20 [Server] INFO PacketPlayOutPlayerInfo
29.05 11:11:20 [Server] INFO PacketPlayOutPosition
29.05 11:11:20 [Server] INFO PacketPlayOutUpdateTime
29.05 11:11:20 [Server] INFO PacketPlayOutEntityEffect
29.05 11:11:20 [Server] INFO PacketPlayOutEntityEffect```
these are first packets server sends
and above are first packets client sends
if you inject from PlayerPreLoginEvent or AsyncPlayerPreLoginEvent do you get more packets?
i cant inject
i can only inject a player object
give me a sec
hm
im probs injecting too late ur right
hm
i'm not an expert on this player injection stuff either
but seems like there would be no player object that that point anyway, right?
something else like a pending connection or something
so its not only the handshakings missing
its not morla for first packets to be those
So I am injecting too late
give me a sec
thats not the point
some packets are missing
but the main goal was to get protocol version
1.7 added a field for players for it, but 1.8+ removed it
funny how goals change
some other packets are missing
what version are you targeting?
all
ok
1.7.10->1.15.2
i already handled the multi support part
dw
maybe the fact that im injecting asynchronously
is the reason
people recommended me to do so
hm
ima test
xd
no
its not the fact i inject too late
protocollib also injects with same event
so its prob that its async
lets see
Hi, I want to modify the "durability" enchant values from the server. Is it possibile? Overriding it.
That cause I distributed too many over enchanted armors with durability and these are literally indestructible.
I want to rebalance the PvP on my server.
depends on how @sage kraken
if you mean modify durability for all items in player inventories and in containers on specific worlds, it can be a time consuming process
but, could be done on the fly
did you look and see if there were any plugins that already set limits?
if you mean modify durability for all items in player inventories and in containers on specific worlds, it can be a time consuming process
@inland oxide is it possibile to edit to modify consuming process of armors?
looking on spigot there are custom enchant plugins only :\
yeh, I was thinking more of a plugin that would change an items durability when held by a player if is was not within set bounds
it's not that hard to program, so wouldn't be surprised if there were plugins that did it
I made a mistake adding armor with high durability values
I searched "edit amor consuming process plugin spigot" on Google but nothing
i was thinking more of the Confiscate plugin, whether it has ability to change item durability and leave it in place
i keep getting this error
klugemonkey
idk why
i tried 5 times
i tried sync injecting
private static Object getChannelObject(final Player player) throws IllegalAccessException, InvocationTargetException {
final Object craftPlayerObj = craftPlayer.cast(player);
final Object entityPlayerObj = handleMethod.invoke(craftPlayerObj);
final Object playerConnectionObj = playerConnectionField.get(entityPlayerObj);
final Object networkManagerObj = networkManagerField.get(playerConnectionObj);
return channelField.get(networkManagerObj);
}```
line 91: final Object networkManagerObj....
there is nth wrong with it
i just made it sync
You apparently passed in null into get
does someone know why Java doesn't have any proper Pair<A,B> class?
can the player be null
dang chat bot
There is no player object at that point registered with the server
can't even paste code thats in caps
I've found several pair classes, but they all depend from the JDK
without their object in playerloginevent
so I can't use them
@sage kraken he says that in 1.5.0+ version can clone items silently without taking them away
You would basically need to hook into netty itself so you can deal with the bootstrap
Go take a look at what via or PS do π€·ββοΈ
i was thinking more of the Confiscate plugin, whether it has ability to change item durability and leave it in place
@inland oxide and by editing the durability values? From .jar for example
durability 50 = 250 hits for example
π€·ββοΈ .
@sage kraken not sure
so u want someone else to look through a massive lib for u?
sec
lol
all we need is their name
right
@inland oxide can u help me by looking at tinyprotocol
so u can help me understand it
could always look at ServerConnection and HandshakeListener to see how it's handled my mojang in NMS for the handshaking
i dont wanna look at such large stuff
and find stuff
im looking at tinyprotocol
im trying atleast
I think might start at NetworkManager
then get the ServerConnection
and a packetListener
or at least thats how it looks in ServerConnection.java
it's almost 5am and i'm out of Wheaties.
looking at the NMS code does help to understand how it's setup
I'll cycle back on this later, but do need to finish this NBT parser thingy for the new 1.16 login packet
Is there a way to optimize lavacasts with a plugin?
why shouldnt it be valid?
@sturdy oar you can have a list contain a list which is no different then having a hashmap contain a hashmap
Can I stop water/lava from floating to other blocks if the tps gets too low and resume if the tps recovers?
@sturdy oar isnt that just an abstract class which you are implementing using an anonymous class, then just getting the method .getType() on it?
abstract class just doesnt have any methods to implement, thats why the {}
there is nbt data or metadata associated with lava that you probably could manipulate to increase performance
https://minecraft.gamepedia.com/Lava
@kind crow
only other way would be to cancel the events for lava/water flow
the more blocks there are with lava/water the less performant it becomes in cancelling the events and therefore would probably need to resort to nms or manipulating nbt data anyways
for instance, you could turn the water into source blocks temporarily which makes them not flow
But the tps decreases when there are a lot of floating water/lava already. I don't think turning it in source blocks solves that
TPS shouldn't decrease because of lots of water not flowing, think you are confusing FPS with TPS
To replace a lot of water blocks you need a lot of resources I think
you wouldn't need to replace them, just change their nbt data
Would it be in a loop of some kind?
well, you would need something to determine when to do that or undo it
Or can I change general nbt tqgs on all of the blocks at once?
so there would have to be a loop of some kind, what kind I am not sure depends how you decide to implement it
well you could just listen for flowing events
and then just use those events to change those blocks
It would brobably take a lot of resources as well
not really o.O
and then just use those events to change those blocks
@keen compass this is a good idea I think
only thing you are going to have to do though is keep track of the blocks you changed and what their data was before you changed them so you can change them back
If I'm listening to flowing events already why don't I just cancel them without changing anything?
because if there is a lot of water flowing in the chunks loaded or lava, then the more there is the more events you end up cancelling and then eventually the purpose behind it becomes pointless because you start overwhelming the server with continuously cancelling the events. This is assuming you just do nothing but cancel the events. You could cancel the event after you modify the blocks so that they don't cause another event to be raised.
That means I will have to save every flowing block data each time tps goes back and do it until lavacast is ready
I don't see the problem in that
How can i check if a player had a specific name, example: if someone has the name CoolBoy then he can only execute a command, and if other people try the command it says "Only CoolBoy can do this"
Yes @frigid ember
why not use their UUID's to do your checking? o.O
Ok, I'll try that, thanks @keen compass
the way you could save the data and keep it compact is make a modified version of schematics @kind crow
could look at worldedit how they create/save/load schematics. And just make a modified version for your purposes and thus you have a compact way to temporarily store your data π
then you could leverage memory mapping which would make it save and load super fast if it was done right
Yeah name or UUID, but how can i do that?
?jd
@frigid ember just check for player name or UUID, else if it another name isnβt yet it will print the message
what you are asking is pretty basic @frigid ember
I can`t find it on google so then i dont know how i can do it
javadocs exist for a reason
Are you making a plugin ?
HI, you can help me with Startup script in Spigot 1.8?
I have shared hosting.
should probably update
and startup scripts are pretty universal for mc servers
that is, doesn't really matter what version of mc you are running
it will be the same
What's the problem StudioStussy?
https://gist.github.com/frostalf
@soft tusk
Ok
Does anyone know the answer to my question? Because there is nothing on Google about it
Luca, are you making a plugin?
@undone narwhal, I looked at the spigot, but I don't understand much
probably should google something like How to get a players UUID
You should learn how to make a plugin command
Then just create a condition with the player name
should probably learn many things since what is being asked is really basic and non-trivial
@undone narwhal we just linked him docs no need itβs all there
@soft tusk You want to start your server but it doesn't work riggr?
I linked to my gist which contains startup scripts
which can be used to create your own π
How to create startup scirpt on shared hosting?
that is a question to ask your host
does multicraft/pterodactyl or sth take care of that
usually
Btw are there any plugin hot reloading solutions for development?
but not all shared hosters limit you either from SSH
PlugMan, but it's not great to use it lol
a proper shared host would give you a VM with proper ssh access because why not?
PlugMan, but it's not great to use it lol
@undone narwhal I just need it for development. Can it hotreload on save or on build?
what do you mean hot reload?
are you talking about replacing the jar while the server is running?
something like JRebel can do that fyi
Best to restart servers at all time, any restart solution can result in memory loss
but that costs money last I recalled
Live reload, yes. IDE is not important, I can switch
Other way you could probably do it, is launching the server with a debugger I think
Thanks Ceezy, i fixed the problem while reading the javadocs!
No problem, always recall back to docs they help
I will, thanks!
How do you develop plugins? Just restarting the server on each update?
I think that IDEA offer this possibility
I compile it send it auto through SFTP and reload the plugin
I try to make my plugins reload compatible so I can just do /reload lol
Starting up on 1.13+ is so long
Why are you using sftp for development?
For sure
Depends on the plugin Iβm doing plus update
I write for 1.12
But if your programming in local server, just make the buildoutput in your plugins folder
MAke it /reload friendly
Do you have dev server or you testing straight up in production?
and do /reload
I have a Janky way of debugging plugins. I use IntelliJ to run the server jar in debug mode and use breakpoints that way
This is a dev server
Virtualbox?
I have a Janky way of debugging plugins. I use IntelliJ to run the server jar in debug nice and use breakpoints that way
@jaunty night thats actually nice tho
@jaunty night Sounds amazing, you just compile it and the code is changed?
Yeah
@kind crow VPS
I just create a folder called debug
Grab a spigot jar
Setup a jar application
Put the compiled jar in plugins folder
Run it in debug mode
And boom
Sounds perfect, thanks!
I can hot swap classes and use breakpoints
I need to modify the durability enchant >___________>
I don't find a plugin that permits to edit the durability consume of the armors.
For example: DURABILITY 10 = 100 hits
You can actually do it on other servers: https://www.youtube.com/watch?v=1B4JGzs0BCc
hey guys, is there somewhere a good async mongodb tutorial? or the class, I kinda get the way how to use this but I don't find a proper class. Just saw that MongoClient for example is deprecated, so I'm kinda curious
Have you already used async with minecraft?
MongoDB is not that hard, just search how to connect on google, the harder part is when you want to get data async and connect it with your player or the server
MongoDB not that hard - lol
yeah, I did. I also get the way, some years ago a friend hooked me up on how to use async with minecraft & provided me some classes/showed me how to work on it. MongoDB seems to be easy, but I saw that the MongoClient class is deprecated
that is my only concern, it is not on how to use it
so is there an updated way or is using the deprecated class fine?
What's your Mongo API?
I'm not sure but I think you also have to add the mongo-java-driver dependency
Hi there, any stuff online? I purchased a premium resource just now, but I still could not download it, why?
And the resource wasn't shown in purchased resources.
You'll need a Forum / Resource Staff
seems to work, thanks
no it's not
postgreSQL the best
@warm carbon feel free to ask questions if you need it!
I will, thanks mate, appreciate it a lot to have you!
is it fine then to ask in a privat chat, so there is no need to spam this chat?
Yep for sure
@vast jungle Hi there, is this your plugin? https://www.spigotmc.org/resources/showitem.10133/
I purchased your plugin just now but did not receive it, I've privately send you a message with my payment information, please check that, thank you!
@warm carbon be cautious in who you decide to private chat. Not everyone wants to private chat. So make sure it is ok with the person first.
thats why I asked him @keen compass, but thanks
^^
Hey i need a little help how can we unload a chunk but i want to keep bedrock lyre
nono i have this method that returns a string from a list
but if the string isn't found, i should return null i guess
you should return empty string
because there is a method to check if a string is empty
@vast jungle Hi there, is this your plugin? https://www.spigotmc.org/resources/showitem.10133/
I purchased your plugin just now but did not receive it, I've privately send you a message with my payment information, please check that, thank you!
It works fine now, maybe it takes some time. Thank you, feel sorry to bother you.
Throw exception
that could be an option
you shouldn't throw exceptions if there is no reason to
you shouldn't throw exceptions if there is no reason to
@keen compass this haha, some ppl overthrow them
Returning null is prob the best
no returning empty string is best
when you check it, just do String.isEmpty();
or String.isBlank();
like this?
Everybody uses null if it does not exists
But thats not intuitive behavior no?
null means nothing
it forces people to do a null check then
So it makes sens to return null
when you can simply just do isEmpty()
Cause null check is almost everywhere
only because people don't know how to use null properly
ok! π
I mean its up to the context, if you always want something that wont behave unexpected go with ββ, if you want devs to think about their impl use null
well I'll make sure to write documentation for that method
But in bukkit its kinda a standard to do nullβs
null is certainly easier, but then you force more work on your users however when there are better methods. Nulls cause exceptions to be thrown sometimes if they are not checked
Yes give me a link as soon as its out
so why do all that when it isn't necessary to begin with
I want to make a nice bible
@tropic nacelle wanna collaborate?
if (method == null) || if (method.isEmpty())
Choose your team lol
one is an object check, while the other is just a length check
Ok great, now explain me how you return an empty string?
Make it so we can click a death message and it'll send a "Thoughts and Prayers" msg
return "";
not sure what you mean
Don't you have to check if the returned item is null?
no
so you do a exists method right?
I am not entirely sure what you are asking
if the method returns "";
its never null
I mean, your telling me == null is bad cause it's object check
What
But as the list returns null if the items doesn't exist, you first have to check if the return stuff is null
Its mem comparison
I am saying returning null in methods is bad design if you have better alternatives
For null thats how you should check
if you have no reason to force someone to check for null, then don't force them to check for null
You're doing a double check...
it causes a lot less problems
There also exists Optional
Yes exactly
no?
8?
is it in Java 8?
Yeh
interesting, well there is that
That way you can indeed do isPresent and you notify the developer intuitively that it might not be present
anyways many people will recommend returning null, but it is bad design and causes problems in the long run when you simply could have just returned an empty value instead
There is times where using null is appropriate. Like Player objects, because they can simply vanish, therefore it is appropriate to force the end user to check that the object is still valid.
and they changed the protocol again
ikr ffs
It won't be fun if they didn't change it
This is humor
looks like they unwrapped the TAG_List from the TAG_Compound for the NBT in the packet
Do you know any plugin that is good for Money? Like gMoney, gMoney just doesn't work on MySQL.
and on that note, going to sleep before someone starts asking me for plugin updates
@soft tusk Something local ? Or Redis / other SQL / NoSQL ?
GUI is a visual interface. In minecraft we usually use GUI to speak about Chest inventories that are interactive (you can click on items as buttons)
Oh okay!!! So let's say a config for a votecrate is a gui?
I need god money plugin for residence (economy), which I can connect to MySQL
And more plugins
Can connect to MySQL?
Probably, just search MySQL compatible economy plugins
@soft tusk you should make sure to have Vault
i don't known how to make
Is there any packet that player sends whenever he eats/drinks or pulling bow?
As I see from test that I've done, player interact event has some delay due to communication with server.
I'd like to check for just client
I think that the player sends the click packet when he starts eating. Then it's the server which tells when the eat is completed.
Cause if you're lagging, you can eat infinitely
Yeah, It's actually happen if you ever have ping.
So what should I do for checking those things with packets?
I think it's the same packet sent as when the player right click
And for eat packet from the server I'll search that
Seems to be the PacketPlayOutEntityStatus with byte 9
So firstly, if you don't know, we can check if the bow pulling has cancelled with block dig packet
Okay, I'll try with PacketPlayOutEntityStatus
Seems work.
@chrome edge Awesome, thanks for testing it
@frigid ember ? What's the error, and can you give us more details?
@undone narwhal One more thing. You can check bow pulling has finished with block dig packet but cannot control is cancelled or not
Item: Diamond sword
slot: 9
lore:
-"A good sword"``` this is a config how can i get it to item stack and add it to invetory i tried for each but i dont get it to work
hello guys can some one can sent the discord srv in here?
As I know the projectile shot event related to server due to entity spawn. It may be not possible for check bow is relased or not
can anyone help me?
@frigid ember You have to get everything and build your ItemStack (get the Material from String, get the Lore, create ItemStack with the MAterial, set the lore, and give to the player on the slot)
blackone1991 I'll go into that to check if this is possible, but Minecraft is sometimes tricky to use ^^
i tried for each it that gonnna work
Let me check some of the packets too.
pls help i really need the bot
You can get it off Spigot.
You get them to put in all the necessary values them you get them and build an ItemStack from it.
for each?
For each item in the GUI, yes. If that's how you want to do it,.
}
``` will this work?
You're looping through something that isn't a collection.
which do you think is best guys?
@Override
List<String> findVersesContainingWord(String word) {
final List<String> foundVerses = new ArrayList<>();
for (final Chapter chapter : bibleImplementation.getChapters())
for (final String s : chapter.getVerses())
if (s.contains(word))
foundVerses.add(s);
return foundVerses;
}
// or
@Override
List<String> findVersesContainingWord(String word) {
return super.bibleImplementation
.getChapters()
.stream()
.map(Chapter::getVerses)
.flatMap(List::stream)
.filter(s -> s.contains(word))
.collect(Collectors.toList());
}
For instance, I loop through all the keys in the config and I have it like:
'1':
material: STONE
amount: 2```
etc..
first
@undone narwhal I've found the way to check if player uses item. It has been added as a packet since 1.12.2.
first is more efficient
probably
research about how slow streams are
but the problem is I'm trying to make anti-cheat lol. I've to check in 1.8 too
Streams can be slow AF.
yeah bible is about 107'000 strings
Fendi the first one is friendly to make a method, steam is useful when you make an operation is a method
Thanks a lot @chrome edge !!
I'll try making a timing for both methods
k
and see how much difference for bibles
if ur looping for verses in a whole bible
it can be slow af
in such cases, looping over a whole bible, performance is important
Yeah that's why I've written both Stream and 'normal' java methods
i'll try how bad the streams make the performance drop
Here is great
for this it wont matter
i hope your not doing this piece of code 5000 times a tick. the heavy part will be the string searching
so streams vs normal won't matter
this might be a case where parallelStream() would help with expectation the string lists are large collections.
i figured
that was my point, that the ovehread of streams is irrelevant here. it's not hot code
streams by default are slower, but if its not hot, it's not a big deal, and if you are ina situation you can benefit from parallel processing, they could help
Hello, i am trying to call a command through a datapack (mcfunction) created using a spigot plugin, but the server refuses the datapack because it does not recognize the custom command
i really need the file
what the spigot community incorrectly calls async, yes
but then I'd need to remove the List and use something else
for fastest results, dispatching an async task that runs parallel computation is likely the fastest result
nope
well you're right
reading is safe
basically once the bible gets loaded it won't get modified
.getChapters().stream(). to .getChapters().parallelStream()
it wont make sense to look for verses async
yes it would, your printing result to end user
ud be waiting for an answer
let me look real quic at the data
wait
or your entire server would be waiting for the answer to compute on the main thread
make it async
π€
end user can tolerate a 5 second delay in response, main thread cant π
are you suggesting, aikar, that it is not okay to freeze main thread for 5 seconds?
some people Β―_(γ)_/Β―
you can on the last friday of the month
what about the second wednesday
isnt there some religious holiday called ash wednesday. i guess if its for religious stuff, that wednesday is ok too.
imagine religion didnt exist
no religious holidays
π
school :c
no holidays mid semester :c
no school? do you only go to school due to religion?
??
you said no school, why
we have these mid semester holidays because of religious holidays
otherwise we'd have school straight through whole semester(except weekends ofc)
Or not
replace them all with taco days
how do u know
on these holidays u can make it a taco tuesday
and do what u want
lets maybe go to #general
xd
Hi guys, does anyone have an idea on my previous post?
Basically this issue from 2 years ago https://www.spigotmc.org/threads/plugin-command-in-functions-1-13.333806/
nope sorry will of
how did you learn all this concurrency stuff aikar
any books or something you'd recommend
Or how to be able to post on spigotmc? I am registered but i dont have permission to create a post there
He made the timings, so he decides what is performance enough or not
yeah TimingsV2 are good
only you can answer that
section doesn't exist?
yeah let's ignore the IDE
man Imma regret saying this, but I haven't got a NPE in like 2 months
just install some hacky plugins. youll find some npe's.
no I mean in my code
recently dealt with some plugin setting a non null final field to null of a critical part of the mc server internals
I just have to fix some BibleExceptions π€£
LMAO bible exceptions
ma g
u are pro christian
at first i thought u werent serious when making this bible plugin
damn
fizz buzz bible edition
ok ur serious
Im mainly doing this for fun
whats is bible
you know youd prob be better off storing this in a sqlite db and then doing a TEXT search instead lol
i don't know
I mean yeah i could make a table for each bible, but i think they would be like hella long tables
row per verse, primary key compound on bookid, chapterid, verseid
Ty for suggesting it Aikar, I might switch to H2 or SQLite after having a stable version
@frigid ember listen to your IDE. getconfigurationsection null check
aikar youd need a pretty large database
no
it's about 4-5 MB
lets calculate maybe
how much space it will take in memory
if we had all verses
loaded
why its null thats i dont know
talking about MBs Retrooper
its missing in your .yaml file abh
lets The King James Authorized Bible has 783,137 words.
As for the number of letter characters in the Bible, the total count is a staggering 3,116,480
.getConfigurationSection("GUI")
not .Item
Retrooper that's not much
i said jesus in a good way
i mean modern server have like 10GBs of memory
3MB is not much, but also note each char in java is 2 bytes
then add in jvm overhead i think is 8-16 bytes per object
use UTF-8
don't UTF-8 go up to 4bytes?
I already use StandardCharsets.UTF_8
english bible with english words only needs UTF-8
I need help with resetting my accounts email to the one i signed up with as it has just been changed and it wasnt me π¦
the thing is that I won't only support english
I think UTF-8 covers any language anyway
nope
UTF-16 would
which is 2 bytes
UTF-8 uses 1-4 bytes
for example chinese(just example)
two byte
Every Chinese Character is represented by a two byte code.A
its return 0
I might have to do some reasearch on characters
It says UTF-8 uses 1-4 bytes
UTF-8 uses 1 byte for the first 128 characters, 2 bytes for the next 1,920, three bytes are used for the rest of the multilingual plane
ok
4 bytes are used for some CJK (Chinese, Japanese and Korean) characters
I may be wrong but I'm pretty sure that's how it goes
simple ascii in utf8 uses 1 byte
yea
but java represents a char as 16 bytes
err
@timid valley why its return 0
yeah meant 16 bits lol
other encodings like SJIS use 16 bit chars
Good morning all,
I meet a small problem, I went shortly under Bungeecord but it is now impossible to copy/paste commands in command blocks, I have this error, I understand that it is 256 characters maximum. But I need more, how can I increase the limit?
Thank you.
DecoderException : net.md_5.bungee.protocol.OverflowPacketException: Cannot receive string longer than 256 (got 488 characters) @ io.netty.handler.codec.MessageToMessageDecoder:98
does anyone code c# with visual studio
Have a question lmao
Aye
what's up?
me?
Aye
yo how can i revert my project to x minutes ago or sth
Because I have made a large mess π
from here:
or revert by a few minutes
or something
I don't actually know if that's possible without git
lmao
I don't want to go to my last git commit which is far behind
ok
lmao
Undo button? π
I do it from there sometimes
ew
fuc it
that's for IntelliJ Ultimate
ima rewrite it in c++
I know I've tried in the past and it doesn't have any real way to do it
ima rewrite my coding language in c++
π
there's also this
thats ij man
i dont use it for c#
how do u make a new file
wait
idk why you'd use anything other than VS or VSC for anything C lmao
ok done
seems pretty pointless when VS and VSC are free
well for me Jetbrains licenses are free as well so whatever
bruh
i like vs design more
black design is hot
and feels so pro
Even VSC looks pretty sexc
i dont see why anyone would use it for cs tho
like proper apps
not like js or python
I don't, I use it for Php mostly
ok
use standard VS for CS
yea
i remember long ago i didnt know the difference
and was like is microsoft so ass
xd
VS layout is a lot more....
how to put it....
professional?
gotta catch them all you know
well IntelliJ does all techically
Jetbrains all my life β€οΈ
VS pro tings
why did i press update vs
its so long :c
wanna build an app for tvOS?
ezpz
i believed him that the layout changed
so i updated to do what he showed
ffs π
you running 2017 or 2019?
lmao
still 2019
just new version
came out
16.6.0
SablePlugins i can do that with XCode
π€·ββοΈ idk
Isn't it also macOS only?
yes
Microsoft out here stunting
π
Pretty sure Xcode only supports macOS, IOS, iPadOS, watchOS and tvOS too right?
Hey
anyone help me
Please tell me a method to get inventory items from config
Yay i got my spigot account back π
what happen to ur account?
how hack?
Probs cuz no one knows my login stuff xD
lol
Hey everyone!
There are anyone who use BungeeCord 1.15.2 and Spigot 1.15.2 together? I have strange bug and want to be sure that is not BC problem.
1.11 instead of 1.12, what purpose I wonder
Can you check work of /effect give command? I ran it and got kick to fallback server.