#help-archived
1 messages · Page 133 of 1
Are you tagging yourself?
smh
smh my head
Hey, what can i do if someone stealed my Plugin and uploaded it to SpigotMC ?
Did It have license?
ddos their mom
If you licensed it properly you can sue them, them.
if yours is on spigot you can request to take it down
Did It have license?
@sullen harness Its Free but he gets more Attation with my Plugin than i do
Idk if there is a way to proove ownership since is a free plugin
if he has the source sure there is
I have the Source and a Workupload link with a date
I think all you got to do is talk with him
And kick his ass
maybe you could ping a staff member here and link them the post containing the re-upload?
me?
http://prntscr.com/t2b4tv
@minor mountain do you have another run.bat oppened?
explaining they stole it etc
I dont think so
or contact them on the forums
I restarted my computer and clicked run bat
@atomic rapids Can you help me right now in Privat chat?
help, im trying to install a plugin to my server but my friends dont have perms
Is it a localhost server?
Or @jagged torrent Can you help me right now in Privat chat?
online server
@sullen harness yes
running on my pc
local host for me
@sullen harness yes
@minor mountain that's strange... Maybe try deleting server, spigot yml and txt files
so everything?
Did you try killing all java instances?
Just spigot.yml snd sever.txt files
Did you try killing all java instances?
@bold anchor try that
Hey guys,
What if you put an 1.15.2 plugin on a 1.8 server and I call the Inventory#setItemInMain(or Off)Hand() ?
big crash
eyy I was tagged
Error
You don't put a 1.15.2 plugin on 1.8 server
You can put an 1.8 plugin on a 1.15.2 server.. sometimes
....
What if you put an 1.15.2 plugin on a 1.8 server and I call the Inventory#setItemInMain(or Off)Hand() ?
it will throw a NoSuchMethodException
Thx that what I was thinking unfortunately
it will throw a NoSuchMethodException
@jagged torrent I prefee calling it big boom
Well the Material enum is different
yea it did not work
@jagged torrent Sorry for the Tag but i need help from an Supportteam Member
what's the issue
me?
No, the person who tagged him.
report it
We will do our best to remove resources when a copyright complaint is received and we believe an infringement has taken place.
hey can someone help
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.
how can i price a resource i wanna upload?
how do I fix this permissions error - I added a new plugin to my server and my friends cant use it because they don't have sufficient permissions
i checked the xml of the plugin
theres no permissions section
a plugin called gwarp
how do i put a price on a resource i want to sell on spigotmc?
Luckperms
Is it possible to get help with a server crash here if I link the crashreport in pastebin? I can't figure out how to make a forum post and I'm fairly desperate
Yes
go ham
Okay so context - I tried joining my server and it immediately crashed. I remembered I logged out in the end and after getting help from my friend he said to delete the end world files and my player data from our multiverse folder, so I did, restarted and I still couldn't join. My friend could join and I had no issue joining on an alt. I tried to regen the end world from my alt account, went through the portal and the second I hit it it immediately crashed, lo and behold I can no longer join from my alt either xD this is the pastebin https://pastebin.com/4NGaFXRi
Any help is appreciated, my much techier counterpart and co-owner is currently at work so I'm on my own
Update
Update your version
This looks like a bug that was fixed last night
np. If that happens in the future one of the first steps you should try is to check for updates.
thanks a bunch☺️
Within our bisect panel where you can flick between versions it says we're on the most up to date version, is that just a case of bisect not being up to date yet since it only dropped last night?
Alright thankyou
If you go back about 2 days you'll be in the clear
https://youtu.be/MC9NBBPTajo do you think this uses A* or is it custom coded pathfinding?
oh its an npc?
why wouldnt you just use whatever minecraft uses?
Lag plus players can easily run away
guys i have a bungeecoord server . and my settings onlinemode = true. But a guy can join us server with no have premium how ?? look https://tr.namemc.com/search?q=berdoze
onlinemode on bungee or spigot?
yes online mode on on bungeecorde
If you can't firewall, use offline mode
Sorry
Brain fart
Use BungeeGuard if you cant firewall
@gleaming helm i have bungeecord already
No, bungeeguard
@sturdy oar onlinemode=false on my servers. just onlinemode= true on bungecor
What's probably happening is people are connecting straight to your backend servers
You have 2 options
- Properly install and configure a firewall
- Install bungeeguard on your proxy and backend servers
Read this for more info
I recommend closing access until that is fixed
^
It happened to me once as well lol
They can log in as you
it didn't end in a fun way
No, it ended in a fun way for somebody that wasn't you
ooooof
they basically hosted their own external bungeecord on my backends
The number of people that don't have firewalls is scary
Somebody made an automatic scanner that finds some vulnerable servers
I don't remember the dude's name tho
Started with a K
And ended with an _
i mean you can pretty much just find out that with nmap i think
port should not be open 😐
Yeah it may or may not have done automatic scraping tho and may or may not have been left running overnight and mayyy or may nottt have found some alarmingly high profile things in the list.
(The high profile stuff was notified, there was just too much low profile stuff to notify all of it)
guys i need help
i need a plugin that let the non op player teleport between the worlds [multivers world plugin ]
!!!
.
anyone know of any plugins that add potion effects to items/armor
or any java tutorials lol
no one helps here ;-;
you waited 2 minutes
XD
i need a plugin that let the non op player teleport between the worlds [multivers world plugin ]
!!!
@dusky flare A permissions plugin? Like LuckPerms?
yp
but i dont know how to use luckperms
if i used luckperms can i let non op player use /mvtp [worldname]
You could assuming you set up your permissions properly. I'm sure there are a plenty few tutorials around on the internet on how to use LuckPerms.
And that is?
when u think that u did good at MySQL
[00:21:51 WARN]: [GraveMCLevels] Task #6 for GraveMCLevels v2.7 generated an exception
java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariDataSource
at me.joseph.levels.sql.MySQL.getConnection(MySQL.java:39) ~[?:?]
at me.joseph.levels.PlayerData.Update(PlayerData.java:294) ~[?:?]
at me.joseph.levels.PlayerData.<init>(PlayerData.java:29) ~[?:?]
at me.joseph.levels.Main.registerNewData(Main.java:1524) ~[?:?]
at me.joseph.levels.Main$5.run(Main.java:1181) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [server.jar:git-Spigot-db6de12-18fbb24]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: java.lang.ClassNotFoundException: com.zaxxer.hikari.HikariDataSource
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_241]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[server.jar:git-Spigot-db6de12-18fbb24]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241]
... 12 more
that if i use luckperms it display the world name of the player in the chat
You can edit the Multiverse configuration file to disable that feature I believe.
Believe the setting is called something along the lines of "prefix-chat"
or u can do /mvconfig prefixchat false
ok i will try ........ thx bro
that may work lol
@hollow hedge thx bro
You're welcome, let me know how it goes.
@hardy cedar you gotta shade it 😉
Or, if you want a great lib https://github.com/aikar/db
That need shaded too tho
Just lets you write less code for everything to work
Doesn’t look like an ORM @harsh anvil
you need to "shade" the hikari classes into your project or else they wont be included in the final jar
if ur using gradle take a look at the shadowjar plugin
if ur using maven look at the shade plugin
oh well
shame
Did you rename your file? @minor mountain
anyone know how to use MyCommand?
Is that the weird command in a config thing?
no its a plugin that allows a lot of custimization with comands and such but its massave and im having trouble knowing what im doing
@lunar otter what do u want from it lol
ive tied a comand to a block and when players click said block they dont have the permissions required of it
but they can run the command in chat
U can just block it
idk how to let players click on the block and run the command
Through any plugin like plugin hider or something
idk how to let players click on the block and run the command
Oh
ive given the permissions for the command and the one that mycomand says but its still not working so i thought id ask here since they dont have a discord
yeah does it need to be on?
mhmm
i figured
XD
You are probably better off contacting other users of the plugin
i didnt see any contact info anywhere on spigot. nor youtube videos or forum posts ab it
https://dev.bukkit.org/projects/blockcommand also that may help u
ok ty
Hmm, there is also this https://www.spigotmc.org/resources/commandblocks.62720/
Hi there, I'm having some trouble with command blocks on my server. If anyone can help, I'd be grateful!
Ask, your question not for help or topic experts
Sorry, basically, Command Blocks aren't working for some of my ops. I can use them and my friend can use them but the rest of my Opped staff can't.
Are they in creative?
There is levels for ops?
They can't place or interact with them. I have no permissions plugin.
Any other plugin interfering?
If you use just a vanilla server are they able to do it?
I can't really use a vanilla server to test it but there also shouldn't be any interfering plugins.
Does anybody know how I can edit a player's tag? I'm developing a disguise plugin and I've got the skin, display name, chat name, tab name, but not tags...
That's a very valid question, how are you starting your server?
Puzzle: You're sending 200,000 block changes to the client. For each chunk, do you use a full map chunk packet (for which the server first calculates a delta and creates the packet with all necessary chunk info) or a multi block change packet (which you create to only contain the positions and block states necessary) for the best performance?
Better Puzzle: is there a way to do whatever it is you’re doing without sending 200,000 block changes to the client
Try both, check performance, choose one
@frigid ember Can you pass it over?
pass what over
that shit you're smoking that's that good shit
it's true actually
chunk packets are fairly seamless, multiblock packets freeze my client
IIRC Minecraft usually sends large changes in chunk packets
"send 200k blocks to the client" my guy
Or you could just say the number, which is 200,000, and realize that it is a number
And it is in fact large
it's just two hundred thousand
remember 200k is closer to 0 than a million
that's a small number
0 is small
like your brain.
when you came up with that idea my guy.
you're just envious that I have 200,000 blocks to send and you don't
would you like to receive my packets? I'm shipping internationally
LMFAOOOOOOOO 😐
I would but I don’t think he has room for your 200,000 blocks in his house with his massive cock and balls
you spend your time looking at my cock and balls?
LOL
1
2
The amount of brain cells sniper has
2 BRAIN CELLS
Firing at random intervals
@frigid ember But for real, send the blocks in bulk at timed intervals. Make sure you have consent forms for the buttfuck their computer will receive too
so if I wait 1 tick, that's long enough for you to breathe, right?
count to 50
but in milliseconds
honestly tho
whatever you're doing there's gotta be a better way
^ sending 200k block updates does not sound like a good idea to me
is there an event in the API for detecting an entity dispensed from a dispenser (TNT, fireballs, etc)?
can you get the entity from BlockDispenseEvent? I could only find the item being dispensed
That’s because the entity hasn’t been created yet
If it's an "ItemStack"
No you can only get the item stack because the entity doesn’t yet exist
that's the itemstack
that was my understanding kevin
is there a way to get the entity itself? EntitySpawnEvent doesn't appear to include entities spawned from dispensers
What are you actually trying to do? This is a bit of an xy problem
I am trying to track where TNT came from and where it exploded
I had originally tried to use EntitySpawnEvent, but it doesn't seem to be fired for Primed TNT from a dispenser
I had a debug message for every entity being spawned and it didn't show up, I'll try again
nope, EntitySpawnEvent doesn't fire for tnt from a dispenser
There is the EntityIgnite, and EntityPrime event, don't think there is anything specific in the spigot api.l
I mean, if you want to cheat you can use the EntityAddToWorldEvent provided by the paper fork Tyler
Woah that’s the F word you can’t say that
P-P-Paper?! Zoo wee mama!
unfortunately I can't use paper (or any "modern" spigot) for this...
Then you are stuck with the legacy events, EntityIgnite and EntityPrime etc (not sure what they are called exactly)
it's a long discussion that would take us from the topic at hand
It’s also one where we could very easily recommend suggestions
He's in the spigot discord, kevin. Respect spigot's authoritah.
detecting when the tnt or fireball explode/ignite aren't the problem, I can do that fine
detecting when they spawn is the issue
or more accurately, dispense
I only care about the location and the entity itself
because I need to track where the TNT/fireball came from
Huh....
Are you trying to track it through it's entire lifespan?
yes
Your best bet is to use a scheduler, then.
Run one when a tnt is spawned. Check periodically if said tnt is still an existing entity, if not, it has exploded
Or maybe use a list of tracked entities
that's not the issue
the EntityExplodeEvent works great for removing it from my tracking of where the TNT came from
the issue is that I can't add the entity to my tracking since I can't detect when it spawns, unless I start another tracking
I was hoping I'd not have to track all TNT and fireballs in the world, and compare for which ones are new every tick
I still don’t understand why you need to track them
You realistically shouldn't, you should probably bring this to the attention of @subtle blade (hehe)
wha
because he can't tell when they spawn
I need some method to detect when Primed TNT spawns from a dispenser
and I need the entity itself
(so BlockDispenseEvent won't work)
EntitySpawnEvent isn't fired for TNT or Fireballs from a dispenser
and I don't know what other event would work
(or if there is one)
and while adding it to an event or adding a new event is great, it doesn't help me
well
as an alternative
is there a way to find the code for the initial velocity of TNT and fireballs in vanilla?
if I can't detect the tnt or fireball being spawned I could atleast detect it being dispensed, cancel the event, and run my own
nevermind, ProjectileLaunchEvent covers it
bad news, ProjectileLaunchEvent isn't fired for TNT (but is for fireballs)
TNTIgniteEvent or it might me TNTPrimeEvent?
Fairly certain the second one is paper only,
I don't use paper so 🤷♂️
ok new plan, since no apparent event is triggered when TNT is dispensed I'll do it myself
but I need to know what velocity and location to spawn the tnt at
if anyone knows ping me
Are you trying to reimplement it?
1.16?
?
I'm trying to reimplement TNT dispensing yes
anyone know why my nametag and name in tab is white but its not for someone elses screen
i use nametagedit
@slate ocean u canfig group tags in config of NTA
Anyone know of a script condition to check the offhand
Hi, I just wanted to ask if there's an option / plugin
When a server is on
Then in discord show on
And when server is down
well, shows offline in díscord
I'm using the PlayerInteractAtEntityEvent, how can I get the EntityType that the player interacted?
(if this is even possible)
Hi guys, how to make player gliding but his velocity should be like non-gliding player?
[04:58:37 WARN]: Exception in thread "ForkJoinPool.commonPool-worker-1"
[04:58:37 WARN]: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
``` what does this mean exactly?
For some reason when I set the owner of a skull in my GUI and the owning player is online, it shows their head but the moment they go offline the skull becomes an Alex / Steve head. How can I fix this?
1.15.2, I’m using .setOwningPlayer(offline player) and its an offline server on online bungeecord
I'm trying to disable fall damage in certain worlds for players but I don't know how to do it
EntityDamageEvent#getCause and check for DamageCause#FALL
ok thanks
Also posted on the forum on the same issue a few minutes, probably it was your thread (didn't check the name)
it was mine, thanks
offhand tool of player @small swift
there are no tutorial for iptables bungeecord server deny port?
There are but not for bungeecord. You should learn how to use it first and may understand how to implement to your project.
hi, when i use world.spawnEntity(loc, EntityType.PRIMED_TNT) the tnt isn't in the exact location, i know it's supposed to move a bit but it moves about a block away from the actual location
only the tnt i think
what do you guys do to automate server monitoring for if it ever overloads or unexpectedly stops?
how do you notify yourself tho?
Normally no need for that as everything is handled automatically
Self healing clusters <3
But you can setup whatever webhook
Telegram has an easy API, so has discord
^
I get a discord and tele notification, plus the thing attempts to fix itself automatically
Notification if shit fucks up, and another notification if it can't fix itself or if it does fix itself
And in the meantime the load balancers route players elsewhere, so ideally nothing is really affected
PSA: I recommend you DO NOT download this plugin that was just posted. Contains malicious code, downloading 2 other plugins. https://www.spigotmc.org/resources/unixo-co-free-anti-cheat-multi-version.80387/
Website was registered yesterday, and the GitHub account was created 6 hours ago.
Downloads a plugin called "rServer.jar", then that file downloads a plugin called "RemoteAPI.jar"
and their SpigotMC account registered today.
i love how much effort they put into making that website and listing servers that (probably don't) use it
how come lol
Yeah this is so malicious
just yesterday the server I worked on had a problem where their entire network got infected because of a plugin that injected classes to all the plugins when first run
and I told them to try to download resources from spigotmc next time and not shady ass sites
looks like even that wasn't a good idea
no i am not let me run it on my pc and see if i get hacked first
yoink
DAMN
yeet
it's gone
YEET
well done bois
ladies and gentlemen, we got him
ggs all around
Your issue has been Resolved. Please come again! @full gull
although it is concerning that wasn't checksd by resource staff
nice
free resources aren't checked
thank you staff
you can report malicious free ones though like what just happened
wait really
i downloaded the plugin so i can take a look at it on a VM
really really
if you also want it, DM me
The resource Unixo.co free Anti-Cheat (Multi-version) has been deleted. Reason: Contains backdoor
gg
Lol
The average spigotmc user won't be able to tell if a resource is malicious or not so that's a bit unfortunate
considering premium resources take about 2+weeks minimum to get confirmed, moderating free resources would drastically increase the wait time
installs plugin
Yeah just saying if you install that resource it's on you.
@zenith palm hey, i would ask you bring this up internally with the rest of the team, please make it so you can't post resources the day you register, most of the time they would be malicious
make them wait a week first
or something
idk
@gleaming helm you just have an entire toolkit to decompiling plugins huh
Make a thread in the feedback section
Why am I surprised 😠
@gleaming helm what tools do you use for decompliation?
question: does spigot have an agreement like this in place to protect themselves for these malicious plugins?? https://i.imgur.com/Inb7KsD.png
For C-related stuff I use IDA Pro, for java I have a private tool that was created by a few people on my team
Don't do much java at all tho in CTFs
Spigotmc does not represent or warrant that the platform including the services will be error-free or uninterrupted; that defects will be corrected; or that the platform or the server that makes the platform available is free from any harmful components. Spigotmc does not make any representations or warranties that the services offered are accurate, complete, or useful. Spigotmc does not warrant that your use of the platform is lawful in any particular jurisdiction, and spigotmc specifically disclaims any such warranties.
The java tool pretty much just patches jars so they can be decompiled by other tools, then it selects another tool to decompile it.
For some reason when I set the owner of a skull in my GUI and the owning player is online, it shows their head but the moment they go offline the skull becomes an Alex / Steve head. How can I fix this?
how are you setting the owner?
meta.setOwningPlayer
One sec, I’ll check
setOwningPlayer I believe is 1.9 and uses UUID
setOwner was a username iirc, deprecated
meta.setOwningPlayer(player);
Not sure why there are Alex heads when the player goes offline
well there's different types of arrows right
Correct
what exactly dya mean any use?
Arrow, SpectralArrow, TippedArrow, and Trident all extend it
| The resource Unixo.co free Anti-Cheat (Multi-version) | has been deleted. Reason: Contains backdoor
was that yours kevin?
Was it my resource? Fuck no LOL
oh
https://www.spigotmc.org/threads/dont-allow-users-to-post-resources-the-day-they-register.446180/
@full gull I wouldn't allow someone with an account that has less than 1y of age to post premium/free resources tbh
1.16 next Tuesday, perhaps we can get a Bukkit API preview?
Yes I edit
i was about to say
isn't the api still discussed?
what if by the end of the release they change it to fit better the final design
need help
got error code too
or whatever it is
some random lines
in server log
Just show it or explain it
?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.
ok
so when ever i use world edit to load this schematic file server crashes
look at this
i am no expert but i got this from log
any idea how to fix?
Try using FAWE or don’t load in big schematics
And I recommend updating to 1.15.2, or wait 1.16 release.
Pvp can be corrected in 1.15.2 with a plugin
oh ok
Man...
but is there a skywars plugin like the remastered on for 1.8
🙍♂️
You're probably fine to stay on 1.8
If you use FAWE then you should be good to go
🤦♂️
FAWE doesn't crash on large schematics
what is FAWE?
FastAsyncWorldEdit
Yea don't use FAWE in production on 1.15.2
shcematic files
Yes it's world edit after all
Yes we did
It just look like it hung because you're trying to change a very large number of blocks with a very inefficient plugin on the main thread
The error you got is exactly what I'd expect to happen
However FAWE handled it properly
Just last week I pasted a schematic with about 600 million blocks with FAWE without a problem
600 million blocks?
mhm
0_0
Yeah I replaced the whole End into glass
The schem file is like 50mb
Kevin
what
I believe on 1.8 you delete worldedit and then replace it completely, but I'm not entirely sure. Check their documentation to be sure.
Or just https://tryitands.ee/
Try this kevin
//generate wool data=((y+1)*8)*(x*x+z*z<0.2)+(x*x+z*z>0.2)*15; ((((x-(sin(y*5)/1.5))^2+(z-(cos(y*5)/1.5))^2)<0.04)) +((((x+(sin((y)*5)/1.5))^2+(z+(cos((y)*5)/1.5))^2)<0.04)) +(((y+1)%0.125<0.025) *(((((sin(y*5)*sqrt(x^2+z^2)-x)^2)+((cos(y*5)*sqrt(x^2+z^2)-z)^2))<0.005) +((((sin(y*5)*sqrt(x^2+z^2)+x)^2)+((cos(y*5)*sqrt(x^2+z^2)+z)^2))<0.005))) *((x^2 + z^2) < 0.5 )
Both of them
FastAsyncWorldEdit+FAVS
Holy fuck I cannot be bothered to understand what that mess does
I think you might have to dispatch from console
That doesn't fit into chat
Or you can always make player dispatch that with sudo from console
(the EssentialsX sudo, not the Linux one)
you want another?
No it's not that
aternos is so handy
Oh oh
best
Oh god
@oblique axle hi hatory
why lmao
doesn't aternos shut down
if you don't have a player online
every 10 minutes
or something
yep
Get a 3€ shared hosting
i cant host a server normaly
fine lmao
ok i will
what is best one
for hosting
I don't usually recommend shared hosts, but God when I ear Aternos
Apex is pretty good from what I heard
I honestly just buy Debian VPS
?
wut
//schem load [name]
i cant send photos
what should i name the file?
🤷♂️
No
why
Which is why he told you to read the documentation...
ok guys i cant find anything plus the files are all weird
its just config.yml
and other files which have different languages on em
ill just create one
now i really neeed help
:(( we have report buttons you know?
ok what
I was sleeeeeping
lol
FAWE
go back to sleep
Hello. Does someone know a good plugin that automatically allows a global chat plugin on y our bungeecord network?
public HashMap<UUID, Integer> blocksMined = new HashMap<>();
@EventHandler
public void onOreBreak(BlockBreakEvent event) {
Block block = event.getBlock();
Material material = block.getType();
Player player = event.getPlayer();
if (material.equals(Material.COAL_ORE)) {
if (material.equals(Material.IRON_ORE)) {
if (material.equals(Material.GOLD_ORE)) {
if (material.equals(Material.EMERALD_ORE)) {
if (material.equals(Material.DIAMOND_ORE)) {
/*I need to add +1 to hashmap and make it so that if the player reaches 50 for example I can add something that I want*/
}
}
} ```
probaly done in a stupid way
What im trying to do is award people if they reach x ores mined
this is how you would increment the map properly
dude come on that doesn't get executed 2000 times a second
ok i'll delete that
O(1) contains() times vs O(n)
i'll make it decent so he doesn't copy bad stuff
Wtf o(1) bad o((n-1)!) gang
Added bonus, if it’s Material constants, EnumSet
bogosort type beat
😄
Also @sturdy oar You should look into EnumMap when you get a chance. It's has the same properties as a HashMap but when your keys are enums, it's about 1 billion times faster
EnumSet = best set. Change my mind
EnumSet != best set with non enum elements
I do use EnumMap in my plugin
Doesn’t let you use non-enum elements so we good
Yes you fail at compile time
Your IDE should yell at you first :((
thanks fendi
I consider IDE fails to be compile-time fails
Fair
EnumSetttttt
^
it's pretty much micro optimization
That's just as bad as before from a time complexity standpoint
but if he wants to do it , i guess it's fine
Also, Integer::sum that lambda
map.merge(player.getUniqueId(), 1, Integer::sum)
😄
i didn't use advanced stuff so maybe he would understand
i know method reference can be used
wtf is that unreadable ass shit
yeah the map merge is weird
That's not self-documenting code
That requires me to actually recall what that whole thing actually does when it could very easily be implemented without a single method call
Let alone like 4
You don’t know what “sum” means? Lol
The compute thing is way more obvious on first glance
actually i realized, is there a convention to put 'static'?
like private static final, or private final static
The only convention you missed is
ORE_MATERIALS
And not abusing the hell out of streams, but you fixed that
What's the matter with you, eh?
private final HashMap<UUID, Integer> minedOresMap = new HashMap<>();
private final static Material[] oreMaterials = {DIAMOND_ORE, EMERALD_ORE, GOLD_ORE, IRON_ORE, COAL_ORE};
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
public void onOreBreak(BlockBreakEvent event) {
UUID uuid = event.getPlayer().getUniqueId();
Material minedBlockMaterial = event.getBlock().getType();
for (Material oreMaterial : oreMaterials)
if (minedBlockMaterial == oreMaterial)
minedOresMap.compute(playerUuid, (uuid, minedCount) -> minedCount += 1);
}
}```
doesn't get the ore names, doesn't get playerUuid im using spigot 1.8.8 as referenced library
what the fuck
use EnumSet as Kevin told you
it's a little better than an array
although both work of course
o(n)
Yeah both work that's not really the issue
Idriz in this case it's 5 elements
yeah i know that, but we talking about 5 elements in this specific case
i know but
that's not a HUGE deal
o(1) or o(5)
it's like saying 0.5 nanoseconds or 0.6
The bigger deal is
the lack of indentation in that fucking SACRILEGIOUS for loop
stfu
who
who asked
no, who asked
IT DOESN'TN'T
oh i just realized i could use EnumSet in one of my other plugins
i guess kevin now is happy
yes that's better
static imports
I don't have a problem with static imports
i like them as well
they make code shorter
and it's pretty clear to everyone those are Materials & BlockFaces
now i can flood the code with more streams
dude
you're not supposed to just copy-paste it lol
... and he deletes the message
Kevin
which one do you prefer: stream or plain Java?
plain java
You've got a nested stream
im your spokesperson shut your fucking mouth kevin
If you can write it in plain java easily, a stream is unnecessary
lol I respect a good troll
How would I go about saving and loading data about blocks? (It has to be in memory on runtime)
Some options I thought of:
- Load data on start (sync or async?) and save on disable all to one file
- Save them to separate files by chunks and loading async when the chunk loads. I am not sure about this one because what if the data is needed but is not yet in memory
how much data?
Loading async as the chunks load is the way to go
Tho how "critical" is the data
You can keep blocking the events until everything is loaded up
I would say "critical". Blocking the events could result in a weird behaviour since I am listening to place, break, interact and redstone
I would rather not get into details of the plugin rn, too much to explain..
The absence of data could be critical because some players should not be able to interact with certain blocks, if the data isn't there, they will be able to.
well, how much data are we talking about?
because saving and loading it when we're talking about like KiB of data is different to GiB of data...
theoretically it could be a whole chunk's size collection of the objects (which by themsevles aren't big)
so not much in actuality
well, idk how crazy people are
well, if you listen to non-player events like redstone, i.e. stuff that could be executed right when the chunk is loaded, not when a player enters it, then the data has to be available at that point
even if I only listened to player events, there could still be a chance that the data isn't available when the player is in the chunk
so if the data is not too big I'd probably say, cache it in memory and avoid the hassle of dealing with IO (save for save/load)
it increases you memory usage, though
@EventHandler
public void onEvent(BlockBreakEvent event) {
if (!worlds.contains(block.getType().name())) return;
if (!blocks.contains(player.getWorld().getName())) return;
//Run code here...
}
``` Hey so I am running into an issue right now. There are TPS drops for some reason when checking if a list/set contains a string. What would be a better and more efficient way of doing this?
are only block types stored in the list?
guys how can i disable player names on bungeecord server.
so if the data is not too big I'd probably say, cache it in memory and avoid the hassle of dealing with IO (save for save/load)
Their size is about 100 bytes, maybe a little less
any particular reason you store the strings, not the enums itself?
@fossil shoal and in total? Like, how many different instances do you expect?
I can't be sure, someone might fill an entire chunk.. I could limit per player or per chunk or both
(I am not running it on a server of mine, it is going to be a public plugin)
It is the way data is stored. Enums to strings
@velvet halo well, stop storing Strings and instead store the enum directly.. It's faster to compare two numbers than it is to compare two strings. Also, you might want to use a Set, more specifically an EnumSet, for better performance.
Alright thanks 👍
@fossil shoal anticipating users is always an issue 😦 And public plugins may run on weaker servers, that don't have the abundance of RAM I'm used to...
you could try to come up with some smarter caching. Like trying to predict future chunk loads (e.g. by loading stuff when nearby chunks get loaded) and keeping frequently accessed stuff in memory
Uhh, maybe in the future, I think I will keep everything in memory and have a configurable amount of instances per player and per chunk for now. That way weak severs can customize it to their needs.
Thanks for the help!
Is it possible to prevent block breaking client side like the debug stick?
Robert, if its just player intractable stuff that you can block then its fine. If its environment stuff then its gets tricky
Just remember that chunks are loaded way in advance before the player moves inside them so in theory the chunk is always loaded when player starts to interact with stuff
Use switch statement ^
Yes
save it in an enum set for the O(1) times 👀
Are its e.GetBlock.getType
Robert, if its just player intractable stuff that you can block then its fine. If its environment stuff then its gets tricky
@iron nebula I do listen redstone but the only ones I care about are when a player uses it
Fr33styler u know switch is O(1)
it is?
Yes..
It creates internal hashmap
@iron nebula I do listen redstone but the only ones I care about are when a player uses it
Then its a bit tricky
How do u even track which player used restore? Bukkit doesn't expose it?
Unless u are manually doing the racking
I mean, can a lever or a button be used by something other than a player?
Uh no? But saying "redstone" can mean anything
I meant BlockRedstoneEvent
Well unless u give more context its hard to say
Maybe.
no need for now, thanks for the help, all!
I will keep the data in memory, maybe in the future I will also need to check for redstone that is not powered by a player, and then it will get real tricky to do if I load the data on chunk load
Well I will look forward for the Italian special 🍝
What do you mean?
Can someone help pls?
@frigid ember Get all the relatives of the block, check if they're logs of the same type, if they are perform the same check for them aswell, make sure you don't go back to blocks you have already cheked
How would it?
you only do it to the relatives (the ones that are attached) of the block..
as I said, if they are logs perform the same check for them aswell
Does anyone know a good mob spawner and mob stacking plugin?
I've used lagassist on my test server before but all it did was duplicate mobs (might be an error in my configuration)
Question, since you said that there was a snapshot server to iron out any issues for a fast launch, are there any issues at the moment which is likely to break lots of plugins?
some code from / spawn and / setspawn to save the spawn in config.yml
@frigid ember are you asking for code?
I have an error and I cannot solve it
Is there any event getting triggered when an arrow falls to the void?
no
Gonna have to specify on that getName() question
And it’s gone lol
FeelsMobileMan
Yeah but which getName(). On what class
Because I can assure you that Java’s equalsIgnoreCase() works lol
public void onInventoryClick(InventoryClickEvent var1) {
if (var1.getInventory().getName().equalsIgnoreCase(MainMenu.getTitle())) {
how do I detect easily if an arrow fell to the void?
I thought titles were removed in an older version
and there's a replacement?
ok thx for the help
Hi, I just wanted to ask if there's an option / plugin
When a server is on
Then in discord show on
And when server is down
well, shows offline in díscord
I know there is a plugin called DiscordSrv which link your server with discord, but don't know the features (SpigotCraft is a DiscordSrv bot)
eh?
?he
So will Spigot work with 1.16? How will this work.
i have a problem with my server
everytime i join or using a plugin i got kicked with this error message International Expection: io.netty.handler.codec.DecoderException: Java.until.zip.DataFormatException: incorrect header check
or Internal Exception: io.netty.handler.codec.CorruptedFrameException: length wider than 21-bit
can somebody help me
Dependency 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT' not found, any ideas?
i'm using intellijidea community & ubuntu 20.04
Add the repository?
can somebody help me ?
@frigid ember What version of Minecraft are you running? Searching for those exceptions on google appears to pull a lot of 1.8 issues.
1.12.2
1.12.2
@frigid ember Take a look through https://minecraftirc.net/support-articles/known-incompatible-software/ and see if you have any incompatible software. Otherwise I'm afraid I'm at a loss.
is the error a server or client problem?
if it's a client problem it is okay if it's a server problem it would be bad
I'm almost certain it's a client issue.
do somebody know a plugin that makes that you can put potion effects on items (if you wear a farming armor you get speed)
in which case this can be null?
i can't think of why the Block Damager on a EntityDamageByBlockEvent would be null...
i want to go through all summoner objects and save them to an array, heres a yaml example
data:
Summoner@5c647e05:
Level: 1
Location: World x y z
Type: Ores
Summoner@7852e922:
Level: 3
Location: World x y z
Type: Ores
Summoner@70dea4e:
Level: 2
Location: World x y z
Type: Generator
Summoner@6ghg524:
Level: 1
Location: World x y z
Type: Ores
Summoner@546gmr6:
Level: 1
Location: World x y z
Type: Generator
Summoner@ncki78f:
Level: 2
Location: World x y z
Type: Ores
how would i loop through all the Summoner@...s and get the data from them
you load a list of objects
with yaml deserialization
oh nvm
you can probably just get the keys
this can be done in a few ways
the Summoner@...s are Configuration Sections right
Does it still have a crash report
How do I fix this error?
Switching to IJ might help ^^
Providing more info might help too
What doesn't help is posting screenshots without any info
I'm trying to validate the javadoc location
Thanks! Do you know how to show the suggestions again?
I CANT MAKE A SERVER
I DID THE TUTORIAL
but when i open the .bat it does nothing D:<
java -jar spigot.jar
I need help finding a good custom menu plugin for my server so when u join u get the item for the menu and you can click on items in the menu to tp you to other maps/worlds
I have looked on google non work
@frigid ember that's eclipse being dum, you can cycle thru suggestion typoes with control space or smth iirc
Choco might be able to help
I don't use eclipse
@frigid ember you can cycle between different proposals using Ctrl + Space
Seems your default was changed from task-focused Java proposals to template proposals
Go to Windows -> Preferences... then Java -> Editor -> Content Assist -> Advanced
Sort them how you would like but these are how I have mine
Hey guys
I've got the following method for playing sound in a world. I want to play the sound at a location, not at specific players or for all players. I want to play the sound ONLY to those players are are near this location.
Bukkit.getWorld(Statics.worldName).playSound(location, soundName, SoundCategory.MASTER, 100, 1);
}```
Yet for some reason, this sound is played for all players in the world, rather than those close to the location.
Any idea whats going on here?
You've set the volume to 100 😛
"volume" is a metric of distance
i.e., you've set it to be very, very distant
oh