#help-archived
1 messages ยท Page 50 of 1
bruhh
you're asking, in a discord server of premium plugin creators, about cracked plugins
that's dangerous lmao
plus if someone has operative systems knowledge can he write me dm?
Iโd not to use those ones as they can be malicious
operative systems knowledge?
Yup
Like what for example?
I mean I have OS knowledge but I mean, depends what exactly you need to know lol
Process execution, memory management, process management
Anyone know a plugin to give colored name for voters after a certain number of votes? Mainly looking for best voting plugin
If anyone knows how to run at system level like that new valorant anti cheat, dm me (this is a joke, for the record)
which OS
Anyone familiar with the Factions UUID API and can give me a hand?
@trail dust learn java
I had the question about what would happen if I try to access an invalid memory position, and no exception is thrown (the process execution keeps live).
the OS does matter in this case, since you need to know those things. But most of that is taken care of by the kernel though
An exception is always thrown for that
would this os explode?
no
@bitter kernel you're not very nice are you
Is it possible to add glowing effects to a player skull?
Imagine that it is not. I'm talking about a totally native os, built without that exception. (but it is handled and the access denied)
Looking into it I don't think you can
In windows, depending which memory position it was, it gets logged. If it was a protected area it will throw a security exception and the OS will kill your application or contain it.
@trail dust pretty sure there's github documentation
Aye but I get an error when compiling the code
error in opening zip file C:\Users.m2\repository\com\mojang\brigadier\1.0.14\brigadier-1.0.14.jar
it is a zip file
I have winrar
yes, but not a zip file that windows recognizes
@keen compass interesting, that's for that.
But I never changed anything to do with the brigadier.jar
the java unzipper should recognize the file
@keen compass I'd presume that his Java IDE would be capable of opening Jars
I never touched it
You can tell windows that it's a zip
Never had the error before trying to implement the Factions UUID API
Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project Quarry: Error creating shaded jar: error in opening zip file C:\Users\.m2\repository\com\mojang\brigadier\1.0.14\brigadier-1.0.14.jar
Thats the whole error
From trying to run through Maven
^
Yeah, looks like a corrupted file or a permissions error, you running as admin?
Always gotta check
Shouldn't run build scripts as admin....
That's how you create perm issues
Not solve them
@hoary parcel yeah, but it'd bypass a perms issue in the given location, telling us if it's perms or if it's corruption
Still getting the same issue
Please forgive the disturbance, but I would like to inquire which deobfuscation mappings you are using.
Well, deleting will solve the problem no matter what ^^
You will get the same answer as on paper @frigid ember
The worst mappings there are, spigot mappings
Plugin works perfectly fine in game so cant be anything todo with the jar?
Well, but are Spigotโs deobfuscation mappings publicly available?
@trail dust looks like you're gonna have to reinstall the repo
@frigid ember ^
@frigid ember do I just get rid of the repo, compile, then reimplement it?
Done some digging and only found 2 known causes, one of which is to do with HTML files with 301 codes in the repo, the other is corrupted data and idk about you but I doubt it's html lmao
301 are fine
yeah we will see
MVN doesn't handle the as expected all the time @hoary parcel
Still throws back the same error lmao
My repo uses 301ers
hm
if on windows, running as admin will bypass the majority of permission problems lol
Have you ever used the Factions UUID API or is it just as unknown to you as me?
Never used it tbh
The only real reasons I can see that error occurring like that are corrupted data or permissions and if you're running as admin it's probably not permissions, where did you get the repo?
So the error only occurs with the FactionsUUID repo present? Take it away and it's fine? What java version are you using?
have you checked that C:\Users.m2\repository\com\mojang\brigadier\1.0.14\brigadier-1.0.14.jar actually exists?
Ill go check now
https://github.com/Mojang/brigadier straight from mojang
Cannot find that jar I aint gonna lie
Looks like you need to include that repo
It's a corrupt file :/
Nah I got rid of the Brigadier error
ah
screenshot?
Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project Quarry: Cannot create resource output directory: C:\Users\Manic\IdeaProjects\Quarry\target\classes
I aint got a clue what any of that is
banging ty give me a second
Hello, I'm having a problem. Tab complete is not working for anyone on my server until after they have died at least once after logging on, with the only exception being OPs. I have made sure the tab complete in spigot.yml is set properly. What else could be causing the problem?
@uncut whale you've not been loading plugins while the server's up have you?
if ops are not affected it sounds like maybe a permissions problem o.O
or what @frigid ember said
no
Can you screen shot a plugin list? See if we can pinpoint where the issue is coming from?
Yeah
Advanced Region Market: https://www.spigotmc.org/resources/advancedregionmarket.58732/
bstats: This is part of another plugin, ignore this.
CoreProtect 2.18.2: https://www.spigotmc.org/resources/coreprotect.8631/
EssentialsX 2.17.2: https://www.spigotmc.org/resources/essentialsx.9089/
GroupManager v0.3.1 (MC 1.15.2): https://www.spigotmc.org/resources/groupmanager.38875/
Plugin Metrics: Another underlying plugin, ingore.
SalaryManager 0.2.2: https://www.spigotmc.org/resources/salarymanager.60803/
Taxes 4.3: https://www.spigotmc.org/resources/taxes.21695/
Ultimate_Economy 1.2.5f: https://www.spigotmc.org/resources/ultimate_economy.59235/
Vault 1.7.2: https://www.spigotmc.org/resources/vault.34315/
World Edit: https://dev.bukkit.org/projects/worldedit
World Guard: https://dev.bukkit.org/projects/worldguard
off of our discord
any idea what i can do to fix it?
@frigid ember This Factions UUID API is corrupting literally every jar file, that last error was fixed but another error followed ffs
What's this one? RIP
Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project Quarry: Error creating shaded jar: error in opening zip file C:\Users\Manic.m2\repository\org\spongepowered\configurate-hocon\3.6.1\configurate-hocon-3.6.1.jar
I'd get in contact with the dev to be honest
I aint even sure its worth all this effort
ok, ill have a look at luck perms, thanks
You're probably not developing for sponge right?
Cause that'll be why that repo is missing
Nah not for sponge
Just tryna implement APIs to prevent people griefing with my plugin
But its being nothing but a pain
I'd get in contact with @jagged wolf (hope he doesn't mind me tagging him)
Alright I'll give it a try
We allowed to try and dm on here? Cause I'll try dming him? Or wait?
what plugin you have that allows griefing o.O
It aint out yet but its a quarry plugin and Im tryna stop griefing in protected areas
The fundamentals of the quarry are done, just tryna stop griefing
I've hooked into worldguard already so Imma just spend my time working with that
There's nothing on his profile saying he does or doesn't mind ๐คทโโ๏ธ I'd see if there's a factionsUUID discord first though
may be better to ask through that
no need to implement factions api for what is trying to be accomplished
Thanks for trying to help tho @frigid ember ๐ It was a good try
@keen compass what do you recommend?
hook into worldguard, factions uses it
Just hooking into worldguard and using that
If you do want to contact him still, there's a discord linked on the plugin website @trail dust
@frigid ember Shoot, I'll go look into that and join, cheers man]
@keen compass is it worth hooking into the townyAPI while I'm at it, or does that use WorldGuard too?
Towny does its own thing
Aight, I'll use its API then
i need help with the website
Thanks for all the help guys
in what order should these appear in my gui
friends, party, clan, recent players
its telling me that i need to either try again or contact an administrator, it tells me no matter what i put in any of the boxes that its wrong
ah the millionaire is back with more questions
you act like millions is a lot of money its really not
I know its not
anyways please suggest the order
However though, millions is a lot depending on who you ask though ๐
my mentor is a multi billionaire
if you live a frivolous life style then sure its not a lot
hence why i say millions is nothing
well billions is 100 times more then millions where as if you compare thousands to millions it isn't as great of a leap XD
Depends on the currency you're talking, if we're talking Iranian Rial, I earn 2616527031.34 / year lmao
jef bezoz has like 120 billion lol
um can i please get help
@civic mica none of us are forum staff, you'd have to tag one most likely
Most people with money have it all tied up in shares lmao
more correctly termed assets
because you can have it tied to other things like real estate or other such things
um @atomic rapids could i get help? i cant create an account on the website and its telling me to contact an administrator
not necessarily stocks
when you make your first million everything is just a breeze
Most people don't care enough to want to make a million lmao
yeah members of the society im a member are many who come from poor backgrounds
henry ford even grew up poor
easiest way is leveraging savings accounts
https://pastebin.com/eLbbaRBr why don't work
but anyways give me suggestions please
if i execute sql in sql manager this is work
most people don't realize they make enough to make a million just using a savings account in just 2-5 years
um please help?
im 25,000 in the queue...
@frigid ember if i execute sql in sql manager it's work
stop nagging @civic mica
queue?
on hypixel
ah
to join lol
@prisma basin looks like you've not given it a name for the table
well spamming wont get help
im not spamming
got another question for you guys now that im doing the migration from groupmanager to luckperms. as part of the process, it says to double check that the old setup is working properly first. anyway, gm seems to be working fine and players still have their perms, however the chat prefixes have disapeared. should i be worried about this or can i go along with the migration?
@frigid ember table name is table_name
@prisma basin what SQL server you using?
mysql
Linux?
yes
Using root?
not
You've given the account permission to create tables on that DB?
yes this is can create tabele
should probably note, the account being referred to isn't the same user that the application is running under
mysql has its own user stuff
latest
You've also not selected the DB by the looks of it
ok
Though you may not need to, haven't used the driver tbh
new sql ```"SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";USE chat;CREATE TABLE IF NOT EXISTS table_name (id int(4) UNSIGNED NOT NULL AUTO_INCREMENT,player_namevarchar(255) NOT NULL, player_displayname varchar(255) NOT NULL, player_chatprefixvarchar(255) NOT NULL, player_chatsay varchar(255) NOT NULL, PRIMARY KEY (id) ) ENGINE = InnoDB DEFAULT CHARSET =latin1;"
It'd be SELECT chat;
your query is correct, however because you running the query from java, you have to do it differently. You need to have your query as a string
currently as it is, it isn't recognized as a string, the whole thing needs to be encapsulated within quotes
all was encapsulated within quotes
Does the query also need quotes, even though the statement is a string?
i don't now
;USE chat;
remove that
you should be using the correct DB given your connection URL
ok
SQL_MODE should be set using the driver options
shouldn't need to send that in a query o.O
anyways, other then the USE chat part, it should run fine, unless your string is being escaped somewhere
but remove SQL_MODE?
@frigid ember luck perms wants me to specify flags before it does the migration... migrate as global> -> if world permissions should be ignored, and just migrated as global
i want to migrate everything, but im not sure what to add
i removed sqlmode and work thx
can someone help me create the workspace for plugins? i already installed eclipse, jdk, but im having trouble with buildtools
i used git bash to create the files, but i dont have the same as in this tutorial (i saw it on the bukkit wiki)
https://youtu.be/-LPBsw5qM-I
@uncut whale it deals with that on a per plugin bases, can you share exactly what it says in chat?
im doing it to try and migrate from GroupManager to luckperms, hold on ill copy exactly what it says
@frigid ember 28.04 20:15:18 [Server] pool-12-thread-1/INFO Command Usage - groupmanager
28.04 20:15:18 [Server] pool-12-thread-1/INFO > Migration command
28.04 20:15:18 [Server] pool-12-thread-1/INFO Arguments:
28.04 20:15:18 [Server] pool-12-thread-1/INFO - <migrate as global> -> if world permissions should be ignored, and just migrated as global
how to use ssl cret?
this is after i enter lp migration GroupManager into the console
Ah, 1 second
you would need to create an SSL cert and then tell MySQL to use that to get that error to go away @prisma basin
@uncut whale it probably wants you to use "lp migration GroupManage true"
just use letsencrypt
Not ever migrated from it myself
they have documentation on creating certs
ok, ill try that
@hallow urchin there is quite a few of those if you look between bukkit and spigot resource pages
ok
@flint palm so, you've got build tools sorted? Just not got a workspace set up for eclipse?
ive tried one but no luck on updated ones
@frigid ember ok its going
Excellent
Don't forget to remove group manager after (keep the config, just remove the jar)
^
yeah, I do that too, a lot of the time it's just easier to tell end users to delete them though lmao
lol
especially if on windows
since you know, that doesn't work unless you have special options enabled
on my windows, I keep extensions visible
instead of hidden
@frigid ember in the tutorial the guy adds a bukkit and spigot server jar to referenced libraries, i only have a spigot jar, also he has a buildtools exe, idk where to get that
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
you only need the SpigotAPI reference
don't need both
oh wait, what are you doing?
@frigid ember worked perfectly, everything moved, and now the commands are tab completing. Thanks for the help.
Ok well that saved me from scrolling
ok, but the exe? im blind or that guide only explain the git bash part
the link above for buildtools will guide you on how to use it
or is using a third party one
probably using a third party one which I don't recommend since it isn't official
never know what it might contain
Yeah, better off creating a .bat
is anybody well versed in 1.12.2 GUI creation willing to help me?
buildtoolsgui, thats not necessary then?
"java -jar BuildTools.jar --rev latest" is the command to get the latest spigot
I literally just cant get it to work at all
or you could just post it here
^please not
yeah, but it isn't as nice to look at
Pasting in chat isn't ideal, kinda blocks it up especially when there's multiple people being helped
just use the paste site, place link here after saving it
much better that way please ๐
I wonder if at some point I could get like a helper tag eventually >>
@flint palm BuildToolsGui is third party, I'd advise against it
or maybe spend another couple years helping people in spigot XD
Is that an actual tag? lmao
Yeah, there is IRC staff, then there is Discord Staff which I assume are the same ones on IRC
There is Resource staff who are the primary ones for reviewing resource related stuff
then the Forum staff etc
there are also loads of tutorials
I have used alot of tutorials and when they dont work I just delete the code from them and move on to the next one
Fair enough, haven't been too active in the community for a while, but I'm back now lmao
lol
so what isnt working
I am currently on this one
https://indiewatch.net/2020/03/19/minecraft-plugins-development-how-to-create-use-guis/
your name does seem familiar @frigid ember
just can't pin it at the moment
not that I have bothered looking
God knows, use to work with a lot of youtubers
had a few of my plugins duplicated
lmao
same
that was back in 2016-2017 though
Let me see how far I can undo so I can get to the closest to working version
you mean as far back as 2015
I got one and it just returned one error that was along the lines of owner cannot equal null for the title
I joined bukkit in like 2014
looks like you have an announce plugin you abandoned >>
so you have used bukkit.createInvenotry()
yeah, give me one second to get to where I was and then I will share the code
at least according to bukkit
I sorted dropped the public stuff when I got into doing private stuff
I was still in school in 2015 so
Yeah so did I, it paid more ๐
Got curse premium or whatever it was free though ๐
Yep had that for a long time
think it was 10k downloads and you get it provided your projects stay active lmao
all because of like 2 plugins
HoloAPI and ServerTutorial
it was every 100 downloads
Never paid too much attention tbh
They could have changed it since then though
But I didn't care since I didn't use curse anyways
still don't XD
I think that should be it
shouldn't use statics
bad habit/practice
and bad things tend to happen when used improperly
so whats the error
@karmic pulsar what's the error?
Owner cannot equal null
my recommendation would be to create your inventory and hold a reference to it so that you are not creating a bunch of inventories
And owner can be null
Owner in this case should be null so that everyone can see it
the number needs to be a duplicate of 9 last time i checked
I have to recreate some things really quickly so I can grab that for you
and wheres the code where it is implemented
InventoryHolder is nullable
that is what I said o.O
You set it to null if you want everyone to be able to see the inventory
otherwise set some kind of name for it
don't set it to a player, that isn't going to work
at least not in the way you think
So its supposed to be a GUI that you pick your race on, then after you pick your race it starts a conversation so you can set your characters name, age, gender, etc
The conversation works without the gui atm
that is fine, just telling you the more optimal way to do the gui thing. That is create your inventory separate from your method that requires the player. Hold a reference to that inventory in your main class. This prevents having to create objects for the inventory every single time.
Inventory isn't changing, just there so players can select stuff
try changing the 7 to a 9
Nah, you can have a 7 slot inv
oh
or at least you use to be able to
Also don't abuse the statics either
il be back
only use them if you know what they are for
otherwise you end up using them improperly and just hurt the overall performance or end up with confusing errors
Hi, is this the place to ask dumb questions about Spigot/BungeeCord ? I don't see anyone in here asking dumb questions...
Fire away
yes ask any dumb question you like ๐
cool
It appears this is going to be an essay question o.o
Redoing my GCSE computer science here
I don't do college lol
@keen compass
OI u want dumb questions? I sure can deliver those
I am pretty sure you can
We all could
Here is a random question, what kind of motor should I buy for my Semi?
did you use openMain() or openMain(Player)
a steam powered
Depends on what you mean by semi @keen compass
where player is the player var
I hope you're talking about a truck ๐
it is a type of truck, I take it you are not from the US?
GTA 5 has servers, but in reality most of the stuff is hostet by the players themselves and the server just gives feedback on your actions as far as I know.
Is something like this asynchronous server setup possible with spiggot
though it'd be hard to use a motor on that one
lol
@devout sierra even if it were, never do it
Pretty sure the answer is no but I'm curious anyways
No
short answer no
@devout sierra complicated answer is yes though
@frigid ember
Probably the worst that could happen is that players find a way to trick servers so they can cheat
you'd have to rework the client too
^
@devout sierra exactly, which is why GTA is such a mess
well GTA uses P2P which is easily manipulated
which is why cheating is so prevalent for it
You can't offload the work load to clients without risking manipulation, it's an awful way to make a game server
I know but the server I'm running shouldn't have anything you could mess up in-game
you would be surprised
Where there's a will, there's a way
for instance, if you are in creative the server stops checking certain things. For instance in creative you can spawn infinite items with just a few packets which the server would normally check or restrict
There's no such thing such as OPs, we don't have them ourselves and there are no plugins installed that can be used with commands
Oh yeah creative might be a problem
well, if you combine a client and a server the client hosting has control over the server so they can manipulate basically everything
Yeah, but he wants to use a server as a handler
but no more than a handler
so you could offload to multiple clients in theory
probably be better off modifying the proxy for that though
I'm an IT guy by trade, but I've never really been into the minecraft gaming thing. I just got a new home lab set up.. sortof. My roommate convinced me to set up a Minecraft server for him and his siblings to play. So I set up a VM in Hyper-V on Server 2019. I gave it a 8cores, a 250GB vhd, and 32GB of Ram. I keep getting this error "[13:41:32] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2071ms or 41 ticks behind" a google search sent me to Spigot, and then to Bungee Cord.
But the thing is, this should theoretically give them an option to play without laags and maybe higher render distance
And I'm digging that
you need to optimize the JVM flags @static pecan
@static pecan ^
also not recommended to give the server more then 10GB of ram
its counter intuitive to the GC
Hello guys, when i zoom out on my dynmap the map dont load, can anyone test it for tell me if it work so i know if the problem come from me ? Thx http://116.202.225.157:26442
you could use parallelGC as you won't loose frames on a server
@frigid ember only just installed?
@keen compass
https://mcflags.emc.gs
@static pecan
It's currently using 8.6G of ram with no users logged in @keen compass and I have no idea what a JVM flag is.
@frigid ember WUT ?
This is something I did by re-texturing snow.. looks good on a massive render distance but kinda lame close up, a better render distance without server cost would be great
https://cdn.discordapp.com/attachments/695357554959712366/704196166090227812/2020-04-27_07.01.09.png
Even with parallelGC there is always the stop the world GC if it hits a certain limit @vale slate
the goal is to prevent it from hitting that limit very often
but if you set a large ram allocation to the MC server without tuning the GC
then the GC is going to have problems keeping up once GC needs to be done
@frigid ember eu i have a lot of plugin if its your question.
it is possible to go above 10GB just requires a lot more in tuning is all
yeah, the GC system of Mc is very discouraged
brb
I posted a link for you for flags to use in your startup @static pecan those should be sufficient for your needs
Is this behaviour normal? I know I shouldn't set damage above max durability, but shouldn't at least exception be thrown?
I saw it, just went there.... I'll be back when I get an understanding of those flag....
Is this behaviour normal? I know I shouldn't set damage above max durability, but shouldn't at least exception be thrown?
@sacred wave no the tool will get this fancy red line
indicating the "negative" durability
in other words yes it is normal
acronyms!! ๐ LOL
GC = Garbage Collection JVM = Java Virtual Machine
ok, going to research before I ask more ignorant questions.
Java takes care of the garbage collecting instead of the programmer having to code in that stuff, however because of that it leaves it to the end users to tune the GC though for the application they are running
INSERT INTO chat (player_name,player_displayname,player_chatprefix,player_chatsay) VALUES (`cc2`,`cc2`,`&agracz`,`&a`) why this is don't create new record in tabele
@vale slate , @keen compass ok ๐ I was hoping when the durability is set to max or above max it will be destroyed... ๐
thank you
if you want it to be destroyed set it to 0
or just use the break method
think there is one for item tools
yes
Someone german?
@keen compass and where is the break method? it is not under ItemMeta or Stack... :/
I Want to make a grappling hook with script
ok maybe there might not be one
I wish you fun, use a fishing rod
guess it would be a nice PR for someone if someone wants to implement that ๐
@sacred wave don't think there is one, just replace it with nothing?
or I guess just set the durability to 0 or remove it yourself
Can someone help me with the Script or can send me a script
skript I believe has its own support areas if I am not mistaken
^
@frigid ember i guess it will be the only solution...
@keen compass Well the item did not break when the damage was equal to the MaxDurability...
what is the one eyed fish like thing that shoots beams and destroys my wooden fences?
so I will have to do that manually.
mucking around skyblock and it keeps spawning them
@rugged void elder guardian?
^
ah yeh how the heck do i kill the damn thing
There's also just the Guardian
even a diamond sword didn't kill it
they do
yep, pretty sure
Thank you all anyway! ๐
I thought it was only the Elder Guardians that shoot beams o.O
Both does
Yeah they do, looking at the wiki
they both do
The EG is more powerful but still not categorized as a boss I think
interesting you are having it spawn out of the water
Not sure what skyblock has to do with them spawning out of the water o.O
the single block spawn stuff
the block is shooting beams? o.O
ah right, but still though. Spawning a guardian in skyblock XD
on rotation it spawns mobs too
Seems like a bit of a random mob lmao
think it goes up in stages
i need help
Fire away @soft pecan
Everyone needs help
i can't seem to kill the damn thing though
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
please anyone can help me please
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
but then again they kept jumping around shooting beams almost killing me then they fall off the edge
I guess just create shield areas
i hosting the server mc and know i cant fix permission
and wait till they suicide
brumen what host?
vanilla?
spigot
They give you mining fatigue too right? @rugged void
^
um no clue about the fatigue
i use luckperms but i dont know fix that thing i got problems with that
Right, well what's the issue?
i dont know i create luck perms permission but doesnt work
You have vault?
You using the editor?
if you change to player you cant use shop money and everything you cant use it
i have vault
And be sure to not have any other permission plugin. It might mess it up
yes i use notepad++
Uh
less syntax issues
So i have this weird bug, i hope anyone can help me
I am saving chestscontents to my chestloot.yml
using:
chestloot.set("loot." + args[0].toString(), chestinv);
where chestinv is chestinventory.getContents()
But when i load it i got some errors, after changing the load line to:
ItemStack[] contents = (ItemStack[])(chestloot.get("loot." + args[0].toString() ));
``` it worked
But when i restart the server and load the same chest it gives a null
I found out that this line worked too
```java
ItemStack[] contents = chestloot.getList("loot." + args[0].toString()).toArray(new ItemStack[0]);
so the problem is that the first loadline works without restarting and the second one with restarting, currently im just doing: try method1 catch exception and do method 2 but i prefer 1 method
Anyone an idea
i use lp editor
Good
@narrow crypt what's the issue if it only works on restart?
and then i get link
Reloading isn't advised anyway
what do you mean sableplugins?
you are not saving the file @narrow crypt
and save and put link on game and its load but still dont work
need to call the save method before stopping the server
otherwise all your changes you did to the file are just in memory
i do de save method
that wasn't for you brumen
blic void saveChestloot() {
try {
getChestloot().save(chestlootFile);
} catch (IOException e) {
e.printStackTrace();
im calling this onDisable()
then its not saving if you are getting a null when it tries to load it
followed https://www.spigotmc.org/wiki/config-files/ this guide
@soft pecan run the save as console
When writing in a file you should always save it afterwards
im also calling it when a user saves a chest
are you creating the file at all ?
yea im doing that conclure
yes
the file is there, it also adds the itemstacks
and the loading does work
It doesnโt load the array correctly?
but only on 1 of the 2 methods depending on when it was saved
let me give you the error
Error codes are key
Yeah give us the stacktrace
conclure can you come on private please
that error gives it if i use ItemStack[] contents = (ItemStack[])(chestloot.get("loot." + args[0].toString() ));
ArrayList can't be cast to ItemStack
java.util.ArrayList cannot be cast to [Lorg.bukkit.inventory.ItemStack;
at me.rik.Airdrop.Main.onCommand(Main.java:264)
if you want to save inventories serialize them first
then save it
then when loading deserialize it
264 is the itemstack[] contents = blablbalba
Yeah, you can't just straight save an itemstack
i just put under the error
but using ItemStack[] contents = chestloot.getList("loot." + args[0].toString()).toArray(new ItemStack[0]); does work
if you make a list of ItemStack how is it saved?
because the first one you are trying to cast a list to ItemStack
W/o serialize
my chestloot.yml
https://paste.gg/p/anonymous/0617c49e24564dcdbda2901500ad4c9f
Anyways, the best way to do this is to serialize the inventory contents
and then save it. There is API methods for it
when you load it, you deserialize it
is everyone using that to save inventories @keen compass
Ah yeah serialize it. You could use per config section item
hmm i wonder if spider web would work on the elder guardians
Serialization is the best method to do it regardless
Mhm
Some people have their own ways they like to do it
but if you don't have a set way, serialize it
Serializing allows you to save the entire object as it is
and then get said object back
Idk if FileConfiguration(path, value) allows array. It has to be Iteratable right?
List is allowed
I mean Object[]
that is a type of List.
And a List is Iteratable?
Well, List on its own isn't but ArrayList is
ArrayList is fine, since yaml supports string lists or arrays
List supers Collection and Iterable
inventory:
- Item1
- Item2
- Item3
That is an array in Yaml
I was asking if FileConfiguration#set was capable of taking normal arrays
Not talking about strings or wrapper classes
I mean like Player[] or ItemStack[] it seems to be handled badly
IllegalArgumentExcepetion: Unkown meta type 111 @ net.md_5.bungee.entitymap.entitymap:281
Well that is why you need to serialize for those things
anyone know how to fix that?
Or make lots and lots of trees
i have a weird bug with fonts in some java programs, i see the file names like this in eclipse, it also happened in "chunky" launcher, for mc renders, does anyone know why this could happen?
https://i.ibb.co/TBQfrfQ/eclipse.png
lol that is the slow way of doing it but sure @naive goblet
Yeah I hate yaml for the reason that you canโt make it compact
hm
seems like its fixed
may be a world
I deleted all of the worlds
and it worked
@naive goblet if spigot ever implements the recent yaml spec it can be
Have they done it?
recent yaml spec allows for saving JSON objects natively ๐
Spigot got some
@flint palm which eclipse version you using?
Me and MD already looked into it. SnakeYaml has an updated version for the recent yaml spec, but it would require completely changing how everything is done with yaml files currently that it would literally break every single plugin in existence
Literally google Spigot Serialize or something
cause i tried 3 different methods over the last week and everytime i get told to do "..." and again
Ah yeah Frostalf thatโs a rip
Just like BukkitRunnable
Exists for no reason other than people use it
probably good bukkitrunnable exists
instead of having people who are new trying to do bad things with threads
@flint palm looks like it's probably a memory error though, check task manager, see what it's using
At the very least BukkitRunnable curbs some of that lol
Conclude could u just fucking reply to Rik?
Just don't be a dick
if you want to know how to serialize lookup Playervaults on github
<3 chinese cat guy
so cool spider web works great on guardian
Well, I mean there exists better choices than BukkitRunnable in my opinion but yeah I guess it kinda have itโs own usage
@narrow crypt posted link for you
@frigid ember Version: 2020-03 (4.15.0), Build id: 20200313-1211
@flint palm graphics drivers up to date?
Also the nice thing about BukkitRunnable @naive goblet is if you want to time your code to the same tick as the server
@naive goblet actually annoying Jesus Christ.
and not by execution
@tough axle What have I done lol
There's a few potential causes for the issue, so we'll work through them slowly and find it ๐ @flint palm
Also the nice thing about BukkitRunnable @naive goblet is if you want to time your code to the same tick as the server
True
@tough axle Can you come with something serious and more factual other than you think Iโm a dick?
@tough axle For the record, we're all just members of the community and are not obliged to respond to anyone, so please, don't act like we have to help everyone that comes here, we do it out of generosity
@flint palm make sure your region settings are correct on the system.
is that a zombie villager?
@keen compass doesn't look like a region issue, I'm thinking more graphics driver or memory
Drowned?
isn't that a drowned?
Maybe
๐
@rugged void that looks like a Drowned entity
I suppose I should start working on a documentation site for the plugins I support >>
interesting
coming back to taunt us with all the money he made by selling
But Frost, don't do document page, nobody reads that shit
I keep getting asked for one though o.o
Fucking useless when all the kids come to ur Discord to ask help that is covered in the docs already
I even put the Discord invite link to THE BOTTOM OF THE FUCKING PAGE
GIVE ME A BREAK
I don't have a discord for that stuff XD
surprised no one has asked me to create one either
The amount of people asking here about server issues says a lot
lol
half the time we're providing support for other people's plugins that people have failed at configuring lmao
@flint palm graphics drivers up to date?
@frigid ember yes
I suppose I could just create a discord for it XD
Although, I didn't know that GM broke tab complete until that guy came in earlier
that's a bit mad
Actually I just realized the forum page is full of people asking for help
But I have my notifactions turned off
LMAO
mmm, didn't catch that message
well, the bot keeps deleting it
Well its all over the same question thats covered in the page...
specifically where?
Windows region settings, make sure it's set to your location
yeah, it seems to be all right
maybe i have to specify the region in java? i never used java
so idk
Shouldn't do
I use an older version of eclipse tbh
How much memory is it using while running? @flint palm
there is also another option to hide fonts by language as well if I recall
How do i fix this? Random people keep getting kicked ๐ https://pastebin.com/raw/XkYJ53cZ
but people are still gonna get kicked
it's fallingback to a server it can't reach
when they shouldn't
the server is fine, It's just kicking random people under this for no reason
the error is a scoreboard
"Team uHKlfBuwD9wfYMNZ already exists in this scoreboard"
yea ik, but no info is given
eclipse is using 500mb, i have tried chunky alone, chunky with minecraft and a server running, memory was always ok i think
hmmm
Is there anyway to see what plugins are using the scoreboard?
Did you restart post installation? @flint palm (I know it's not really required, but never hurts)
could always try a different IDE @flint palm netbeans and IntelliJ are decent alternatives
๐ฆ
i dont reboot too much, but since installing java and chunky i restarted several times, reinstall java, chunky, everything, and it keeps happening
but i dont think its a ide problem
Letโs be real whitescale themed eclipse is superior
because it also happened to me in chunky, a totally different program
Then it sounds more like a driver, memory or setting problem
I'd "SFC /SCANNOW" from a elevated command prompt first
if that's no luck, re-install graphics drivers
I had it happen in my web browser before, it was graphics drivers that time
the drivers are updated, all of them, 32gb ram, its probably some setting, but which one, thats the question
sure its a simple thing
I would probably do the sfc scan
if nothing else fixed it
sfc scan will fix things that are wrong with the system sometimes
who knows, it could just be a stupid registry entry missing
XD
ok, ill try that later, thanks for the help
im trying to make a plugin that removes a specific item from any inventory, chest, whatever, i tried to use InventoryOpenEvent event, but idk what to do next, this is literally the first thing i do in java
mmm well, something like that, a youtube video, but i guess im overestimating myself just for having made plugins for other games
but never in java
It's not too bad, if you've got experience with any C derived languages you'll catch on pretty quick
yeah, but the thruth is that i dont understand very well the bukkit wiki, it doesnt explain much
If you need to know how to do anything just give us a shout, in quarantine with very little to do lmao
?jd
hmmm, I wonder if cafebabe is invitable to other discord servers o.O
cool
YAGPDB.xyz is the site
just have to figure out how to invite it
It's linked, top left of the website
im not very familiar with oop, and afaik java is all classes, so i definitely have to see a guide or something about java, but for now the truth is that i want this very simple plugin to fix a problem in my server, the ill learn correctly in the near future
i dont understand what getInventory() returns
It returns an Inventory type
so, for example, Inventory inv = e.getInventory();?
Inventory inv = e.getInventory();
would allow you to do things like inv.Contains(ItemStack), inv.RemoveItem(ItemStack)
Yeah
If you then type "inv." on a new line it'll give you all available operations
if you worked in other languages, then you might like some of the things in NIO package of java. Like memory mapped files or one that isn't used a lot or known, you can do bitshifting too ๐
mmm interesting
also there is JNI as well
so you can call things from outside of Java that are part of other programs etc
so you could call C code in Java, although its an expensive operation
usually more handy in pushing things off to have something else process the input and then read the output later in java
but because of JNI that means you can push stuff to the GPU too
thats really interesting, but i guess thats more useful in mods, not much in serverside plugins, right?
depends, sometimes the GPU is better in calculating stuff ๐
That's most likely lag chuyangel
@fiery jasper should be an option in your spigot.yml
what is the difference between ItemStack and Material? it must be a string? the literal name as it is in minecraft? like minecraft:iron_block for example, or i think bukkit has its own names, i think it would be IRON_BLOCK or something like that
"moved-too-quickly-threshold:"
btw it is a 1.8
O
wait wat?
Should be there in 1.8
itemstack includes the entire stack of items and contains the material in it
"moved-too-quickly-threshold:"
@frigid ember in my server.propeties or spigot.yml
can't remember when the option was added but pretty sure it was before 1.8
Material is for blocks, ItemStack is for items in an inventory
spigot.yml it should be, unless they've removed it
Aye
so blocks and items are handled differently in the inventory
just increase it
ok
blocks in an inventory are Items. But when you place them, they will have a material
lemem try it
Handy to get the material of a block when you want to compare one block to another
or do something if a block is of a certain type
An ItemStack is anything in an inventory, it tells you the item type, it tells you the amount of items in the stack and item meta
to simplify it lmao
restarted?
yes
Got an anti-cheat installed?
no
hmm
i set it to 300
how would this be done correctly? i know that surely everything is wrong, even the if statement is unnecessary i think, but you understand what i want to do, basically remove all feathers in the server
public class FeatherListeners implements Listener {
@EventHandler
public void onOpenInv(InventoryOpenEvent e) {
Inventory inv = e.getInventory();
if (inv.contains(FEATHER)) {
inv.remove(FEATHER);
}
}```
@keen compass haven't done inventories in a while, do we still need to update inventories post altering when open?
On my bungeecord server the console ends with ```Listening on /0.0.0.0:25357
public class FeatherListeners implements Listener {
@EventHandler
public void onOpenInv(InventoryOpenEvent event) {
event.getInventory().remove(Material.FEATHER);
}
}```
Its important to note that the add / contains / remove methods in Inventory use getStorageContents
i increased, moved-too-quickly-threshold: 1000.0
moved-wrongly-threshold: 1000.0
and restarted the server
hmmmm
so what do you think is the problem
going from 0, to 100 blocks away? o.O
Only way you could do it is probably disabling movement checks on a player by player basis lmao
Is there a plugin to change the MOTD without having to edit server.properties and restarting?
wdym?
what are you doing, using speed potion with insane speed on it?
Gotta check something hold on
modifier on speed potion = 200
thank you so much
great, i thought i would have to do a for loop and iterate through every slot or something like that, its easier than i expected
how can i make a cmd to enable and disable this?
You'll need an onCommand first
public class <classname> implements CommandExecutor{
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
}
You doing it all in 1 class or using multiple?
๐ O ๐ V ๐ E ๐ R ๐ I ๐ D ๐ E ๐
ty
I remember watching a BCBroz video back in the day and he was writing an onCommand() method. Manually.
I remember him saying "I know it looks confusing at first, but eventually you'll remember it"
I just tell my IDE to implement it
I'm like... dude, use your IDE
a lot easier to have the IDE put it in there, especially when you get one of them classes you need to implement
and it has like 50 methods
XD
Is there a plugin to change the MOTD without having to edit server.properties and restarting?
yes
You doing it all in 1 class or using multiple?
@frigid ember i have a class for the event and another for the command
need to register the listener and command in the main class in the onEnable then
yeah ^
how do i do that?
make sure your listener methods have @EventHandler above them too
yes
Anyone know how to use essentialsx
public void onEnable() {
Bukkit.getPluginManager().registerEvents(new PlayerLogin(), this);
Bukkit.getPluginManager().registerEvents(new BalanceChangeEvent(), this);
}
that's events
in your main class
I also remember being silly back in the day and making everything implement Listener
because i thought that's how that worked
it had to be a listener to be a part of my plugin
I'm basic and call my main classes main so for me it looks like:
public class Main extends JavaPlugin{
public void onEnable() {
Bukkit.getPluginManager().registerEvents(new PlayerLogin(), this);
Bukkit.getPluginManager().registerEvents(new BalanceChangeEvent(), this);
}
}
what do i put in "this"?
Haven't got into the habit lmao
its not required to override
@flint palm your main class, aka, the class you're going to point to using your plugin.yml
pretty basic structuring
oh and yes I'm doing a class per command because I can ๐
it isn't required to put Override, however it does help when looking at the code if the method overrides from a super class
i need to import org.bukkit.event.Listener; and all that in main too?
No
You should put override so you don't mistype a method signature and wonder why it's not working
Override things
It was added for a reason
it tells me to do it
