#help-archived
1 messages · Page 125 of 1
🤦
Give. More. DRAM
You sure can boot a server with 1024Megabytes of heap, but good luck keeping it on with even 1 player
first i need to be able to connect to the port
With .getTotalExperience, does that convert levels into experience points too?
I am executing the command shift+right clicking then opening a powershell window and then executing the command "java -Xmx1024M -Xms1024M -jar spigot.jar" should i use another way to execute the command?
i already tried that also and doesn't work
i mean the port thing
ok
Well i have no experience with Windows 10 firewall because it's just trash
can't help sorry.
Whats the best way to check if a inventotry is the same as another?
i'll try deactivating the firewall
ok
it was the firewall ._.
What does this mean? java.lang.NoClassDefFoundError: Could not initialize class me.alexprogrammerde.petsplus.config.LanguageManager
The class was found during compile time but was missing during runtime.
It depends on your setup
the library the class is referenced from isn’t on the classpath
That /\
you might want to consider shading it if it is a standalone plugin
hm
e.g include it within the jar itself
I got this at reloading the config: [17:44:42 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'pets' in plugin PetsPlus v1.0
What's the full error
obviously there are deeper issues than a npe if its not on the classpath
please send a pastebim
anyone know what these commands are from what plugin?
nvm
It worked fine before i restructured the code.
wait
are you using reflective access?
There was a Null pointer exception at ConfigHandler.reloadConfig() line 32
Whats that?
okay, i need more context
What can cause this?
are you accessing an external library
or is this all one project
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository>
Or what do you mean?
Is there a way to easily remove a specific amount of a players exp but only if they have enough?
What does this mean? java.lang.NoClassDefFoundError: Could not initialize class me.alexprogrammerde.petsplus.config.LanguageManager
@frigid ember
No its all in one package
me.alexprogrammerde.petsplus
public static FileManager config;
public static FileManager language;
public static void loadConfig() {
config = new FileManager().createConfig(Main.getPlugin(Main.class), "config.yml");
language = new FileManager().createConfig(Main.getPlugin(Main.class), "language.yml");
}
public static FileConfiguration getConfigFileConfiguration() {
return config.getConfig();
}
public static FileConfiguration getLanguageFileConfiguration() {
return language.getConfig();
}
public static FileManager getConfigFileManager() {
return config;
}
public static FileManager getLanguageFileManager() {
return language;
}
public static void reloadConfig() {
config.reloadConfig();
language.reloadConfig();
}
@barren yarrow You can get the players exp, check if it's enough and remove it. Just a simple if statement.
where is languagemanager being referenced
package me.alexprogrammerde.petsplus.config;
import org.bukkit.configuration.file.FileConfiguration;
public class LanguageManager {
public static FileConfiguration language = ConfigHandler.getLanguageFileConfiguration();
public static String getText(String section) {
String text = language.getString(section);
return text;
}
}
@strange echo Ive tried if (player.getTotalExperience > requiredXP) and it doesnt work and Im not sure why
jumpMeta.setDisplayName(LanguageManager.getText("items.jump"));
' if(playerExp > amount_to_be_taken)
Then remove it
Pastebin the class
Hello i need to ask I have purchased a resource and haven't recieved it its been 2weeks the author for said plugin hasn't been on spigot for a year...
So this is the only place I can turn to
I am not sure where to go for this or if I should do a paypal dispute or
Found out he didn't claim the payment cause he is inactive so I have just cancelled with paypal
@strange echo https://hastebin.com/wigapareti.java
Even when the player doesnt have enough exp it still executes
Ok so it runs when the player doesn't even have the required exp.
Before the if statement output to the console the players exp and the required exp
Just to check the values of each
and my mum just called me, great
Lol

i am having a problem with the world edit plugin
it does not generate a config file
but is detected by /plugins
hello
i was gonna send an image showing the scoreboard and the file but no. i cant use %vault_eco_balance_fixed% on my scoreboard or it breaks. i cant use any of the others, i just cant use balance on my scoreboard. basically when i use it 90% of the scoreboard unrenders idk y it happens but thats y im here so i can get help
i do have placeholder API
I have questions about between spigot and paper. Most of articles saying paper is better than spigot, but i think spigot is more better because plugins are mostly made on spigot, and plugin's performance is also better than paper's. Why articles saying and recommending to use Paper?
Paper is a fork of spigot which means that most plugins working on spigot should also work on paper. Paper is built to have faster preformance. As for better plugin preformance on spigot where did you get that from?
Paper may remove some not noticeable "vanilla behavior" to imporve its performance. However you've to really know the game deep to notice it
All spigot plugins work on paper
Paper makes additional performance enhancements on top of spigot (essential if you want any kind of larger player base), and then Tuinity actually makes even more enhancements on top of paper (plus it's much more stable because the dev doesn't push unstable patches to master)
Thank you for good informations. I read that articles which mean paper better than spigot on spigotmc threads. After reading the article, since then, I've wondered why they say so.
tbh if you're running recent versions theres no reason to not user Paper
tbh if you're running 1.15 there's no reason to not use tuinity
🤷♂️ I have never tried SpottedLeaf's fork
does anyone here know a player counter plugin that subtracts from the player counter when someone dies, to show how many people are actually alive?
also possibly a way to add the player back to the counter?
Is this the correct function of this?
if (player.getTotalExperience() > requiedXP ) {//if yes} {//if no}
Looks so. Just use larger than or equals instead of just larger than.
Thats >= right?
ngl been at this for like a day now trying to figure out why I cant get this to work xD
getTotalExperience is not all the exp a player has
it is the exp the player has had over a lifetime
Im kinda new to this java plugin writing thingy, does all that -only- calculate the current exp and nothing else?
Hey can someone tell me why this is happening
java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
The methods are commented with what they do
I'm building a Kotlin plugin
You need to configure your project with kotlin. So in Android Studio:
click on Tools => kotlin => Configure kotlin in project
Then in dialog check : All module containing kotlin files
and select version
press ok
Done.
Still the same error
[20:36:21 ERROR]: Error occurred while enabling DungeonSurprise v1.0-SNAPSHOT (Is it up to date?) java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
Then try the next solution
https://www.spigotmc.org/wiki/how-to-use-kotlin-in-your-plugins/ and make sure you're following this
Line 6 causes the error
And Yes I used this tutorial checked like 20 times
I can't figure it out
What does .getExpToLevel do exactly?
Any reason why i cant look at the raw source code of spigot in intellij
Most definitely can. Open one of the projects generated in BuildTools as you would any other Maven project
@subtle blade
Im pretty sure i used gradle not maven
Somebody recommended me to use maven though
Ah you just want to open it from a dependency
API you should be able to open so long as sources are being downloaded alongside your dependency. Implementation (CraftBukkit) is a different story. Because it can't be hosted on the repository and it's only local installed to your Maven repository by BuildTools, source isn't really included in the typical sense
Generally you can rely either on your IDE's built-in decompiler or, if possible, attach source to your dependency to that provided by BuildTools. Not sure how that would be done in IJ, I'm sure someone more familiar with it can assist
added it to dependencies and still having the same issue
Sources not found: Sources for 'spigot-1.15.2.jar' not found]
Sources not found: Sources for 'spigot-1.15.2.jar' not found]
spigot != spigot api. API sources are available on the repository, CraftBukkit & Spigot implementation are not for legal reasons
Again, it's local installed to your Maven repository without sources. You would have to attach sources from BuildTools but I'm unsure how to do that. I use Eclipse
Could someone help me out here? So the main aim of this is to act like youre draining your exp from your levels and putting it into your mending gear but my problem is that even when the player has less than the required amount, it still completes the command, heres the pastebin;
I keep getting "Total experience points must not be negative (-772*)"
*This changes depending on tool damage
But I have -
if (player.getTotalExperience() >= requiredXP );{
player.setTotalExperience(player.getTotalExperience() -requiredXP);;
in place and it doesnt work
you have a weird ;
My Minecraft Development plugin seems to no longer be working...
The configuration next to the build UI is gone and I can't build my project anymore. Do I need to make a new project and copy the files over? Edit: made a new project and it seems to be working now
@frigid ember I do?
yup I think that stops it
Which one? Theres alot haha
now the command is just appearing in chat .-.-.
you also need only one, not two ;; below
I just rolled it back to previous version where /mend coming up in chat didnt happen but if one semi colon has caused me 8 hours of pain Im gonna jump off a bridge
Does spigot have a 1.16-pre'X' in development?
@sturdy oar I swear if this is some sht answer
I've already answered that in general
Oof
Now its saying I dont have enough exp .-.
//Current Damage On Tool
short DamageOnTool = (short) (helditem.getDurability());
//Required Exp To Mend tool
//this is a positive number
int requiredXP = ((DamageOnTool/2));
//Total exp
short TotalXP = (short) (player.getTotalExperience());
if (TotalXP > requiredXP ){
player.setTotalExperience(TotalXP - requiredXP);
bro do you know that discord formatting exists
Idk how to do it .-.-.
like this
test
gg
🤷♂️ yeah
pastebin, or pastegg they both fine
Its the line for Current Player exp > required XP to repair pick
Like if your exp points are bigger than the damage/2 (mending rate)
Now it just says not enough xp
No matter the exp level it skips it
Please can someone help, Ive literally spent a day trying to get this to work .-.
Since PlayerPickupItemEvent is depricated, whats a good replacement?
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000047b800001bb4, pid=10092, tid=0x00000000000027cc
Never seen this error in my life
Im on Windows
uhh yeah windows could prob throw it too
hmmmm
Any way around it
ive looked it up multiple forums is saying that it is a RAM isse
issue
where did you get that exception from?
seems more like a JVM issue
than a spigot one
Is it possible to use armorstands above a player’s head to show their health and not lag?
yes
for not lag part: get better processor
you could also use clientside armorstand to reduce lag
anyone can help me with hiding nametags above players heads when they drink invisibility potions, this is for a modified bedwars with scorboards, so i cant add any more scoreboard or anything like that so
and this game is in 1.8.9
Non-technical question here. Someone just asked if I do commissions and wants to pay me to alter a plugin of mine to his specifications. I wanted to ask how much do people normally charge for commissions?
Depending on the work time. Decide on an average €/hours and count your hours
Good idea. Thank you.
I've done few commissions in the past, i usually charge depending on how much time i'll plan to take for that software, and how complex it will be.
You also usually want to have some sort of legal sheet when you do commissions usually
you never know when people decide that they won't pay you 🤷♂️
Can I pay one of you guys to help me with this plugin then xD
bruh
sure pay me
Its just one line of code that needs looking at xD
Ah okay, I was thinking two?
3, I know my standards
Well for you Frank Ill see what I can do haha

This if command isnt working how I intent it to, they are if (thing) {if yes} {if no} right?
wut?
if (statement) {
//do your stuf...
return;
}
//do other stuff
or this
Do I have to put return after everything?
returns; completes a void method
Because I have if statements within if statements
Like so basically as one big and statement
nested ifs nice
if possible nested 'if' statements should be avoided
How would I go around that?
Yeah no worries
Im still on that thing where Im putting mending on a command
So if an item has mending, it drains your exp and puts it "into" the tool/armour
(1) onEnable() and onDisable(), if not used, do not need to be there. Override if you want to do something
(2) Invert and return
(3) Checking for == true is redundant. Just compare against the returned value. if (player.hasPermission("whatever")), for instance
(4) There is an ItemStack#containsEnchantment() method
(5) Please fix that indentation :(( If you're in Eclipse, Ctrl + A and Ctrl + Shift + I
(or Ctrl + I, I can never remember)
Example of invert and return:
// Before:
if (foo) {
bar();
} else {
example();
}
// After
if (!foo) {
example();
return;
}
bar();```
If you can invert and return without interrupting the flow of your code, do it. Avoid unnecessary indentation
this would make it more readable in my opinion
it's not the whole command, but you get the idea
Yeah I get you
Its my first plugin so I knew it wouldnt be the best thing ever haha
don't worry i've seen worse things
also I suggest you use the text-formatting feature of your ide
because your brackets are kinda messed up
It's not that it's inherently bad. It's at least readable. Though as you progress in learning Java, you'll find that it gets messy when 50% of your code is spaces or tabs
I've learned about this code style very late as well to be fair
i used stuff like 4 nested switches as well before lol
it did hurt my brain after all
What's the proper way to send a single message with multiple lines?
You can use \n except at the end
doesn't "\n" work
I thought it was broken on bukkit
evidently not
oh i think it only works inside components
no, it works in sendMessage
What's wrong with multiple sendMessage() calls?
thats what I usually do
why should you need multiple sendMessage calls
to send multiple messages
lol
it's a menu, thus should be sent as one message
message in minecraft terms is a single line that will wrap
thus, multiple lines is multiple messages
Isn't item lore an array of strings'
that's 2014 speak
where each string is a newline
ok then im a boomer confirmed
You're arguing the difference between
System.out.print("Hello\nWorld");
// and
System.out.println("Hello");
System.out.println("World");```
They're equivalent
public static void sendMessages(final Player player, final String... msgs) {
for (final String msg : msgs)
player.sendMessage(msg);
}
``` Nothing is wrong with something like this
Fendi, lore is a list of strings. So, yes? Technically
But with sendMessage
player.sendMessage("\n\n")
player.sendMessage("\n")
are equivalent
iirc
you can't have trailing newline
Yea but it's also good to consider that another plugin might be sending a message at the same time
Between the nanosecond of time that you're sending your message? Unlikely
not like processors can perform billions of operations / second
Latency has to be taken into consideration I think is what he's getting at
because a sendMessage() is nothing more than a packet
(logging, yeah yeah, client sees it as a packet though)
I wouldn't rely on \n anyways. There's no guarantee that it will always be supported
Especially with the rise of text components
text components work just fine with \n right
They do but they also work just fine with the section symbol. As far as I'm aware, it's a remnant of legacy chat
🤷♂️ other server softwares fully support \n
That's fine but what we're concerned with is the vanilla server
Who may at any given time decide that legacy chat may be removed
What's important here is the client which may no longer support that character
What's done on the server is irrelevant
(unless it's parsed on the server and sent as individual messages - which would be strange lol)
How do I fix cannot convert int to boolean?
what are you trying to do?
if (player.getTotalExperience());
really should learn java before you make plugins
you have to compare the int to something
Like thess than greater than kinda thing?
equals, greater than, less than, etc
@barren yarrow Not trying to criticize but i'd recommend learning at least basic syntax of java before making plugins.
I tried that and it didnt work which is why I was asking
wdym int to Boolean?
like 0 to false and 1 to True?
oh nvm
I just read above
ok then, show what you did
Can someone just give the if statement at line 37 a quick look over? No matter my exp level in the game it doesnt follow the if statement https://paste.md-5.net/asoqameced.java
Well idk but does both return an int ?
if anyone wants an easy pr for spigot, public void runTaskTimerAsynchronously(Plugin plugin, Consumer<BukkitTask> task, long delay, long period) needs a fixing. it doesnt work due to period being ignored
It doesn’t?
Wtf
Aikar, you know that you too can make PRs, right?
😅
Especially one with as trivial of a change as that
What the fuck causes that and doesn’t fire a unit test
Aikar really do be helping people's GitHub stats 💜
if only spigot was on github
Bukkit was on GitHub for some time
Then the DMCA. I believe that's the reason it's no longer there. To avoid any potential DMCA issues from GitHub
As well as https://github.com/SpigotMC/Spigot-Server
(the latter of which was included in the DMCA for obvious reasons)
BungeeCord is still on GitHub, and the Stash still hosts the projects much like GitHub would, only it's under a different domain
(and PRs are behind a CLA, but that would have been done on GitHub as well tbh)
so i have a class where if a certain block gets place it stores the blocks location in a file which works but im trying to make it so when the same block breaks it removes the location from the file and it doesnt even get to the first if statement
@EventHandler
public void onDestroy(BlockBreakEvent e) {
Player p = e.getPlayer();
Location blockLoc = e.getBlock().getLocation();
FileConfiguration config = Main.getInstance().getConfig();
if(e.getBlock().getType() == Material.getMaterial(config.getString("Summoners.Ores.Material"))) {
if(Utils.oreSummonerLocs.contains(blockLoc.toString())) {
Utils.oreSummonerLocs.remove(blockLoc.toString());
e.setDropItems(false);
blockLoc.getWorld().dropItem(blockLoc, Utils.OreSummoner());
} else {
System.out.println("Not in array");
}
}
}
actually it doesnt store it in a file, it stores it in a String list then when server restarts it saves the list to a file and loads it
Utils.oreSummonerLocs is a String list that contains the locations as a string
Try printing out the value of config.getStringetc.. and also what it then is when you do Material.getMaterial.
Also, you probably don't need to get it from the config file every time so as a general practice, it might be better to have it as a variable in the class.
i was thinking of having a class to store all config variables but i wasnt sure if it was even worth it
I mean having a utility class like that is one of the few cases of where public static and final could all be used together properly
true
The only class where I really "centre" a lot of stuff is my lang class lol.
I’m working on cleaning up my two year old code base
It’s nice learning things as you go
But it leaves you with hella tech debt
how do I shorten this up? its the vault placeholder
There's shortened versions if you take a look at the placeholder page.
I'll get it up quickly.
%vault_eco_balance_formatted%
bigint REEEEE
Love big integers.
ty
What retarded eco plugin isn’t using bigints
ctrl and arrows dont work for me anymore tf happened
Imagine not using a BigDouble 😮
Smh.
We had a bug at competitive programming where the number was too big, so the internet overflowed and went negative. So I was like “I wonder if there’s like... a big int”
And there was
And so that’s how we solved that problem
😂😂 we laughed for like half an hour cuz man was that int a BIG BOI
Integer 😭
Or like be smarter about how you handle numbers so they don’t overflow
I’ve never seen a competitive programming problem where numbers were too big for a 64 bit integer
No :(( long
Curious. Does Java actually support long int?
Never really tried it lol
Yeah it was a really weird question
No one other teams from my uni got it
Because they didn’t know how to handle the overflow
So it was literally just a question to cause an overflow
That's stupid
Wait how did NOBODY else know how to deal with that
The best competitive programming problems are difficult even with small numbers
public void loadLocs() {
dataConfig.getConfigurationSection("data.OreSummonerLocations").getKeys(false).forEach(key -> {
String loc = key.toString();
Utils.oreSummonerLocs.add(loc);
});
}
is returning null
specifically this line
dataConfig.getConfigurationSection("data.OreSummonerLocations").getKeys(false).forEach(key -> {
heres the config section in the file
data:
OreSummonerLocations:
- Location{world=CraftWorld{name=world},x=-107.0,y=92.0,z=573.0,pitch=0.0,yaw=0.0}
- Location{world=CraftWorld{name=world},x=-107.0,y=92.0,z=575.0,pitch=0.0,yaw=0.0}
Those aren't keys.
dataConfig.getStringList("data.OreSummonerLocations")
Utils.oreSummonerLocs.addAll(dataConfig.getStringList("data.OreSummonerLocations"));
I need to sleep. It's 3 AM.
Bad life decision #IDK
@gleaming helm yeah it’s fun. No one on the team knew about streams or anything my freshman year
The profs didn’t even know what they were
So that was fun teaching them
And teaching about functional interfaces 😦
streams are quite... slow... in some situations
But they can be really really cool
just don't use them for iterating every block in a chunk (MOJANG!!!)
I always do scanner.nextLine() and split it and parse the info as I need it and will sometimes stream it to map it to an int list but I’m like the only person who does that on the team 😂
I had one bad experience using .next and .nextInt so I stick with what I’ve used for years 😂
(Can blame spigot plugins for that habit)
streams are fine as long as you aren't creating a shitton of new streams and your streams don't have tons of elements
Hey, I use a plugin called crackshot to manage guns on my server, and wanted to increase the radius of a bazooka blast (fireball) to damage minecarts, I found that regular tnt blocks can destroy a minecart like 6 blocks away, but the bazooka makes the minecart shake (not even destroy) 3 blocks away... So do you think it's a minecraft thing or plugin thing? I found nothing in the crackshot documentation about this
Is there a Skyblock server with the Auto Pickup plugin? I wanna find one so I don't lose any valuable blocks
i wanna make a random thing where based on percentages in config the item will be selected
heres the config
Chances:
Coal: 30
Gold: 20
Iron: 20
Diamond: 15
Emerald: 15
I want it so 1 will be selected
how would i do it
So you want it to be 30% chance of coal to be selected?
by default yeah
depends on how you wanna do it. I usually go the Crazy Crates way where I have a List of all valid options, and I loop through all options, do a random number check, so like get a number from 0-99 (random.nextInt(100) is less than equal to 30, then I add it to the list. Do this for all values. Then check if the List of valid options is empty, if so repeat. Finally once it's not empty, pick a random value out of that list
using String value = validList.get(random.nextInt(validList.size());
sorry if that's a bit confusing @steady osprey xD
i think i got it but not really
Thing about that algorithm is it’s never guaranteed to complete.
The better way is to do an algorithm like this -
true
First take your list and divide each item by the sum of all of them (normalization, they will now all sum to 1).
Yeah you run into that issue, normally I add a sanity check and then force pick the most likely prize after x amount of iterations
I like it cuz it "double randoms" but it's not always the best
Subtract the weight for that item from the random double
If at any point the number is negative, you have your answer
If you hit the end and the number is still not negative, it’s the last one
I use EnumeratedDistribution from math3 if youre lookin for an easy way but requires libraries
Always completes after only a single random number generation
Yeah that does the exact logic I described @wanton delta
mhm
assume you're on mobile? xD
Autocorrect lmao
i am so lost rn
May not be worth the trouble to use for one thing
I usually prefer to not include deps, but if i already have a dep shaded or in my path I’ll use it
alright
mood
how would i do step 3
calculate the sum of all the weights
pick a random number that is 0 or greater and is less than the sum of the weights
go through the items one at a time, subtracting their weight from your random number until you get the item where the random number is less than that item's weight
For loop, add up all of the item weights.
Divide each of the individual weights by the sum.
This effectively normalizes everything so the sum of all of the weights is 1.
Hey guys, how many name changes do I get for a donation?
Then pick a random double between 0 and 1
Can I change my name only once?
And then do the whole subtraction thing
So
Start with your random number right
For each element, do the following:
Subtract the weight of that element from the random number (rand -= weight).
If rand < 0, return the current element.
At the END of that loop (the random number was bigger than all other weights) then just return the last element.
It’s important to note - pick a random number and save it as a double type. Then subtract using -= from that variable that you created with the single random number.
This is one of the most efficient and simplest ways to do it for small numbers of elements like you have
For large numbers of elements you will want a different approach.
(By large we’re talking >100)
how would i loop over each element
Use a for each loop or use an indexed for loop
If you don’t know how to do either of those things you need to learn more about java.
ok so i'm having a problem where my server randomly crashes for seemingly no reason, https://drive.google.com/file/d/1uPVLaWmCpVAAPbh_LXvx1DeTjeLCL0lv/view?usp=sharing here is a google drive link to the part of the log where it crashed, it would be nice to know what's causing it as it happens completely randomly sometimes, even when not a single person was online for hours. The specific log I included was when me and my friend were both online however we were both just sitting still in a house we were building. CPU: I5 2500
5G allocated
plugins:
CoreProtect
LuckPerms
Multiverse (core netherportals portals and signportals)
dynmap
essentials
worldedit
ik how to do them i just cant think today for some reason
I know the 2500 isn't the most powerful cpu but it can run it at 20 tps with a bunch of ppl on
i've only had this problem in the last few days
Paper fixes a lot of that stuff afaik
Worth a shot to switch to paper or Tuinity
And that’s not a problem with CPU availability
when I used paper for some reason we had more tps problems somehow
Try Tuinity. Some builds of paper are really terrible
i switch to spigot from paper and saw an increase in performance for some reason
aight
u think it's a spigot problem or what?
Tuinity is by far the best server fork for performance.
I’m not entire sure I’m not finished reading through the log
But it does look like it got stuck on something to do with achievements
Is this the newest spigot build?
Spigot version: git-Spigot-800b93f-8160e29 (MC: 1.15.2) honestly not 100% sure but this is straight from the logs
Maybe this is the weird tab complete crash exploit
I’m on mobile so this log looks like puke
f
Yeah this looks like a spigot bug
Odds are this is patched in paper
But definitely go with Tuinity if you have any choice whatsoever
yeah, considering it was the same exact server just ported to spigot from paper and I never had this problem before i'd agree
i'll check out tuinity but I never would've switch from spigot to paper if tps didnt seem to drop using apper
paper
hmm
Stack overflow due to a recursive call in getting achievement progress
might be a minecraft issue then
damn
Yeah. Likely is
so probably doesn't matter the fork
anyway I can fix it? cause it gets in the way quite a bit
Just do me a favor. Switch to Tuinity (your mspt will be cut in half anyways). If you still have problems then report it there
The dev there is extremely fast on this stuff
Hello. I have read online that spigot has a built in anti x-ray feature, but I can't seem to find it. Was it removed, or am i looking in the wrong place?
@ me if you know. Thank you.
i'll check it out,
thx
i'll stick with tuinity so long as performance is good lol
10x better than spigot
All the large 1.15 servers use Tuinity or a custom fork of it
sounds good, I might need more performance soon too considering I might have some new people joining the server soon
(No offense to md_5 here, he does an insane job and all the forks are really based on spigot so)
plus we're planning on building some massive stuff
sad some of the changes don't make it back downstream
Have I asked a stupid question by accident? I don't want it to get buried under the chat, but I also don't want to spam.
I think it's something called Orefuscator? I'm not sure thou
I see. From what I could tell that hasn't been updated in years (although I may have found the wrong plugin) and I can't find this integrated version of the x-ray that spigot apparently comes with.
Is it? I can't find it.
Thought so let me check
I've used ctrl+F to go through and search for the words x-ray, xray, mode, etc etc
and nothing flagged up
I'm a bit of a brainlet at this sort of thing and basically winging it so far for this server I am running. Is paper another plugin, or something else?
Paper is a higher performance fork of spigot
That also includes a number of other changes
paper is good lol
*not always the most stable thou
If you want to go a step further, Tuinity is an even higher performance fork of paper which has even more stability and performance
Ah, right. Well I'm using a remote hosting site to run my server and I'm not sure I can change over from spigot to paper now it's already set up.
What is the next best thing for anti-xray I could do?
Tuinity is more stable than paper because the dev for it actually reverts the buggy paper patches (that for some dumb reason go straight to master... what the fuck)
The best thing for anti X-ray you can do is not using a plugin
xD
And using paper’s built in anti X-ray
Go through your host’s support, if you can’t change it yourself they’ll be able to
Right, but I can't use paper as my server is already running on spigot and I don't think I can change it. What is the next best thing?
Plus I have a massive amount of plugins already and I assume they require spigot.
You can change it, it’s just a matter of swapping out the jar
Any plugin that runs on spigot will run on paper as well
Most will actually run better on paper due to async chunk loading abilities and such
Alright. While I do more research into paper, is there something in the meantime that would cover my bases regarding x-ray?
No. Don’t. For the love of god PLEASE don’t install an anti X-ray plugin.
The only good anti X-ray that exists is the one built into paper (and it’s derivative forks)
How much is paper paying you? 😆
I know. I was kidding.
It sucks that I’m pointing people away from spigot but the patches aren’t making it downstream and I have no other choice
it's sad no patches ever make it back downstream
Hey, could anyone help me? I'm trying to add a plugin where the /nosleep command toggles you on and off of the nosleep list
if (nosleep.contains(player)) {
nosleep.remove(player);
player.sendMessage(config.getString("RemovedFromNoSleep").replace("&", "§"));
} else {
nosleep.add(player);
player.sendMessage(config.getString("AddedToNoSleep").replace("&", "§"));
}
it seems to work just fine for the most part but for one player on my server, everytime they use the command, another instance of their player gets added to the nosleep list. What is happening? Would it be safer to just do nosleep.add(player.getName());?
you should a) use their UUID b) use a set
Ah yeah, thanks I hadnt thought of a set
Do both of the things he said and you’ll be fine
a set is like a list, but it can only have one of the same thing in it at a time. So you can have 50 UUID's but my UUID can only be in there once
why doesn't the list work with the player though?
A set is also unordered (and a hashset in particular can check things like contains in O(1) time)
as opposed to O(n) from a list
Yeah, thanks. I know about sets. Just havent used them in a while so I didnt think about it
and because player objects arent the same through play sessions I don't believe
I could be wrong
I think they are but
but I always use UUID's to be safe
It’s weird to store player objects around
no reason not to
I have a onquitevent method which removes them from the list when they log off
that would be why
Use a UUID
because they never get added back
well
i might be confused
idk
it's midnight
xD
well the problem is for this one user,
nosleep.remove(player);``` isn't working, even when they log off
I'd just recommend using UUID and a Set and see if the issue still happens
ok i'll try that thanks
Hey guys, for a name change before I request a new name I just wanted to ask if Poseidon or Ares would be allowed?
Why does event priority not work?
I set mine to lowest and am cancelling it in higher priority events but it says that it is not cancelled when I use #isCancelled()
lowest priority goes first, and then low, normal, high, highest, and then monitor
so Im doing it backwards? @dark shuttle ?
highest priority would be the last called?
the last, no, monitor is the last, but at least its called after lowest priority
ok
helloo
Is someone able to help me installing BungeeCord with Multicraft? I had problems alone and was not able to fix it alone. Never installed BungeeCord or anything before...
Basically, I want someone to support me through the installation of BungeeCord and everything...
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.

DM me if you think you can help me ;)
I'm being told I shouldn't use system scoped dependencies, isn't this the only option if the library I want to use doesn't have an online repo?
Someone knows why @p @a doesn't work on my server?
try running /minecraft:(whatever command) , some plugins don't support @p and @a
Most don’t. There is api for it but it’s newer and developers insist on supporting 9 versions
@subtle blade api? where?
Bukkit#selectEntities(String). Returns a Collection<Entity>
Or a List, can’t remember
That's my main gripe about essentials, it takes over too many commands like tp without adding useful features, and it removes @ selectors
interesting
Hey, If I want to run something every night at midnight (real time), should I use a BukkitRunnable that checks the time like every minute, or is there a better way ?
Sure, just make sure to keep track when it runs because it’ll never be exactly midnight
Probably not
ok 🙂
probably shouldn't check the time every minute
you could calculate the ticks until midnight pretty easily
anyone here every played with the loottable api? it seems to be kinda broken. I want to use a loottable that requires a block pos, I provide lootcontext that I created via the builder while only providing the location, but nms still throws the exception that it requires the pos
oh, looking at the code, it only passes the block pos if the context has an entity? that doesnt seem to make much sense
since bukkit requires you to provide a pos for a loot context, shouldn't craftbukkit always pass that location down to nms as block pos?
uh im trying to connect to my bungee proxy but i cant: "Connection refused: no further information"
however i always could connect before without issues.
no errors are being logged
What does come up in the console when you try to log in?
no errors are being logged
nothing is being logged actually
anyone?
Are you using the right ip and port?
How can i make nametags invisible using protocollib?
i was literally using the right info, i copy pasted my ip again anyway and it worked
that was 30 mins ago btw
the only good way to do it is to put the player in a scoareboard team and hide him from the others @slim burrow
Hello, some players have a graphic bug which appears randomly : when they drop an item, it is not dropped and it disappears from his inventory, he has to reconnect to see again the item in his inventory. Does anyone has already experienced this kind of issue? How to solve it
the server lagging maybe?
really high ping also may cause it.
if a player reports it next time ask them what their ping is.
plugins list?
hey does anyone know if the persistent data container stays for an arrow or another projectile after it has been fired
Hello, It's possible to use this as obfuscator?
https://plugins.jetbrains.com/plugin/10974-intelliguard-2
Or this one:
https://plugins.jetbrains.com/plugin/11971-proguard-unscramble
@hard crane I don't think item nbt transfers to an arrow when firing, (at least it didn't when I last tried to use that in 1.10 so it may have changed) you might be able to use the event API to detect a bow firing then get the arrow entity from that and re-add the persistent data
@languid pewter pretty sure yguard is allowed, yes
But like, just don't
It's stupid
yeah, but that's a intellij plugin
That plugin literally says "Seamless integration of yGuard in Intellij IDEA"
I bet it makes no difference
And I wouldn't use any of that
Since obfuscation is stupid
Yeah, but It's needed
I'm working on a VPNBlocker and I want to obfuscate the API access
so in that way, if you have a token you cannot like "crack them"
or something like that
Well, you still can tho
If your API requires you to hide shit in code, it's just not secure
Security by obscurity is a dum concept
Obfuscation to make something secure, basically just means in order for someone to crack it they need to sit down for 2 hours and write down a list of API functions
Not to hard, boring but not to hard
yeah, the API is secure, its blocked by IPs, so if someone buy a token, it can be used only with his IP
anyway, thanks for the help
2 hours? I bet I could find out the API in 10 minutes
Hey, I have a question about how to setup the PrivateMessages plugin. The players on our server dont have permission to use whisper commands (for example /w /msg /tell). This happened after we installed the plugin to the server, so how do we fix it?
I cant find anything about how to set up the permissions on the website. Pls help
The last plugin I properly reverse engineered (because it had a backdoor), it took me like 15 minutes to find a discord bot token. And that was heavily obfuscated with string and flow obfuscation
It's just pointless
Hello everyone 👋
Does anyone know what this is? There are 4 unknown worlds with names like UUID that were automatically generated. As far I know, it's the same map but in 4 different worlds. Latest 1.15.2 build.
o-
how do you make a custom entity?
is it happening globally? (so not in a specific world)
How do i delete my spigot account
I believe it is somewhere in the user options on spigotmc
never had to tho, so I'm not sure
@still pulsar What's inside these folders?
File structure like in a simple world.
I still try to find reason of it, but I'm sure that isn't Spigot issue
@wraith dew What do you mean by "custom entity" ?
@still pulsar Maybe from a plugin... Like a backup system or somthing like that I guess
Yes, maybe, I have easybackup, but it not include such feature.
Yep
hey guys
Hey
@manic jewel
u know how plugins have that prefix next to commands
like for example
/essentials:help
is there one of these prefixes for bungeecord?
@manic jewel could you find out where ive had a look and couldnt find it
or no
I also gave it a look and don't see it, gonna need someone who knows more than me
I don't think so GeometryPro
ah k thanks for trying through
so its just /send or /server and no prefix?
is tagging forums staff allowed
a question
?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.
You can mail
support@spigotmc.org I think
is that the olny way
why would u even want to delete it lol
@gleaming helm Hello again mate. So, funny story, I'm already running Paper. Could you give me the quick rundown on the anti x-ray stuff? I think I found the settings for it in paper.yml
Can someone tell me why when I have a RepeatingTask it doesn't change a value that it gets from a config when I edit this config?
Maybe the value is getting cached
It's fine we're discussing it in #general
Okay sorry
My bad
So, i'm working with some spigot config files, however i get a "Unhandled IOException" when using method reference, but I'm running that inside a try with resource with an IOException catch
is someone able to help me figure out why is it saying that
I can provide code if required
question, back when I was running paper on 1.14.4 I had a bug where someone would enter the end portal to go home and they would get stuck in a black dimension basically forever
and the only way to fix it would be to reset playerdata
I looked into and never found out what the cause was, do you think it's safe to re open the portal considering it's been months and im running on different software?
@sturdy oar Code appreciated and errors too 🙂
What do you mean by getting stuck in a black dimension? @quaint sinew Any plugins editing the teleporting / worlds behaviors?
@sturdy oar In this case I would prefer a for loop
at that point i dont believe we had plugins, and I guess I could've worded it a little different, it's like we were stuck on a black loading screen
but forever
luckily I had backups so it wasnt a problem but still
Never saw that :/ Maybe you should update paper
I use tuinity now, I saw a post for it on the paper forums but it seemed to be a fairly unknown issue
Okay
I just dont know if it's safe to try it tbh, i'd like to re open it but i'm a little nervous of having my top tier gear erased
if I do i'll probably backup every players playerdata first
can someone explain to me why I get 14 tps going from one house to another through the nether on tuinity with 2 ppl on, yet on spigot it never really drops much if it all
I dont really get it
What's your server hardware?
i5 2500 with 5 gb allocated, it's not great but i got it for free and it worked pretty well with spigot (forgetting the weird crash i occasionally have that i mentioned last night)
Are you using plugins that are circumventing async chunk loading?
Paste a timings report
I’ll take a look at it in a few minutes
/timings paste
Oof. Trigger the tps drop again and then run timings
im trying lol
we got it lol
https://timings.aikar.co/?id=915e10b20bb9499a973a71d6286f7c94 didnt drop quite as low as before but it is 15 lol
the server just died
neither of us were moving lmao
https://timings.aikar.co/?id=2a8a6ef37d794f9286be0dfa1977aea6 i'll just send this, this is after it crashed
Worldedit is doing a dumb thing
Looks like it's sending metrics on the main thread (???)
is that the problem?
Well ok
Here's your other issue
Use EssentialsX
Essentials has a massive sync load problem
How do i delete my spigot account
Essentials blocks the main thread while chunks are loading. If you have slow disk or CPU, then you'll end up blocking for a while because loads can take quite a bit of time.
(EssentialsX properly supports async loads so all of that heavy chunk loading logic doesn't block the main thread and drop your TPS)
You also have a large garbage collector problem
If you 1. use EssentialsX, and 2. Use the proper JVM flags, you'll have no TPS issues.
aight, i'll try it out but it might not be until later tonight until i can tell you whether it works well or not as i have to work at 4
Also the "crash" you experienced was due to the garbage collector stopping everything for 11.5 seconds to clean up.
I wonder why it wasnt having that specific problem on spigot tho
Don't use essentials (it's unmaintained anyways) use EssentialsX, and follow the guide that I linked to fix the garbage collection
tbh, i swear I used essentialsx lmao but it doesnt seem like it
I really don't know why this doesn't happen in spigot
But I mean
I know for a fact that Essentials is horribly optimized for Paper, EssentialsX doesn't have the sync load issue.
alright, i'm downloading essentialsx now and im gonna try and get it running asap
before I gotta go get ready and stuff
acutally
hold on
it seems I was in fact using essentialsx
that CPU is defo not happy
my plugins folder begs to differ ig, it says essentialsx, i'll re install everything with the newest but still
How old is that version...
Feburary
They fixed the sync chunk loading problem after that date
I always remembered EssentialsX showing as EssentialsX in the plugin list and timings...
huh
Sorry about that!
lol
anyone know what plugin these commands are from? there are also apparently commands like /event count /event revive /event start
it's fine, if it was fixed after that then it still was the problem anyways
im trying to find out where its from
would suggest that the plugin was called events, unless they're hijacking
.g whatplugin
Do we not have a... bleh
it seems fairly stable from me going at flyspeed 10 traveling from dimension to dimension, I believe alot of my problem with it rn is dynmap rendering, which is a good thing tbh
when i entered new areas not in the dynmaps range
it lagged down to 17
im gonna get rid of it and test it when i can today
Current EssentialsX builds do async teleportation but it's effectively nulled by the fact teleport safety loads chunks sync
Full async chunk loading for teleport safety should be in within the next couple weeks
Is this not loading for anyone else? https://wiki.mc-ess.net/doc/
ye might be down
are you an idiot
Well technically their sysadmin is an idiot
And clearly doesn't know how to properly set up SSL
lol
thats why you use the new wiki https://essinfo.xeya.me/index.html
not the one for Essentials back in 2014
how can i fix a blank line upon join / leave???
i want to change it to some text, but i don't want blank lines AND text.
Have any of you guys ever experienced an issue like this?
One of the players is getting this message https://prnt.sc/sritqv
They can join other servers on the bungee. And they can join the server on an alt with the same ip.
how can i fix a blank line upon join / leave???
i want to change it to some text, but i don't want blank lines AND text.
Fun fact: Discord has a chat history where you can see messages that have been sent. Copy/pasting the exact same message will not make anybody reply any quicker
Are you writing a plugin or are you a server owner?
I need some help. Recently we don't see any water animals spawn whatsoever, what could be culprit of that?
We run a very minimalistic server, so not spawning plugins or etc.
We use the default bukkit.yml as well.
Someone knows how to add tags to a item?
nbt tags?
does LivingEntity#getEyeLocation return a copy? javadocs don't specify
Someone knows how to add tags to a item?
@ripe ledge https://www.spigotmc.org/threads/tutorial-the-complete-guide-to-itemstack-nbttags-attributes.131458/
I'm having a weird issue in spigot, I setup my plugin to use mcspring-boot by Alan Gomez and replaced the spring-boot-starter-logging (which uses logback) with spring-boot-starter-log4j2, since spigot uses log4j2 (at least, spigot.jar contains a log4j2.xml file, so I assume that is the case). One reason that I had to do this, is because PaperMC only supports log4j2 (see: https://github.com/PaperMC/Paper/issues/3532).
It works fine in PaperMC now and in spigot it works fine in the logfile and logger gui, but in console every log line is printed twice. Anyone got any idea why this happens?
Using the latest 1.15.2 spigot server.
It works fine on Paper. the issue is only with spigot
I also didnt do any custom logging apart from removing the logback logger. (Not removing it causes issues in Paper with there being 2 loggingfactories for Slf4J)
does LivingEntity#getEyeLocation return a copy? javadocs don't specify
Any Location, if pulled from the server, is a "copy" so to speak
I dont even include spring-boot-starter-logging
I dont anymore either. I also tried without spring-boot-starter-log4j2 and just used slf4j loggers, but that gives the same issue.
This is mine: https://hastebin.com/jihufepeqa.xml
And I have tried without the log4j2 starter
The logging is normal, until the spring context is loaded. All logs after that are printed twice in console. Even logs that have nothing to do with my plugin.
You got any idea, @hoary parcel ?
anyone know how to make custom entities?#
ah alright thanks choco
all these mutable locations and vectors are hard to keep track of
how do i actually add the plugins into my server
put the jars in the plugins folder
there is no plugins folder
run the jar
,.,
yeah the plugins folder only gets generated after the first time you've ran the server
if that's the case
anyone know how to make a server for free where i can put plugins
You're not gonna get anything worth while for free unless you localhost and portforward. But then it's not 24/7
And you have to give people your IP for them to connect
Heya boys, i got a question about ASync tasks. But in what instances do i use these? I have read that for example, these tasks should be used for Database gathering since it can freeze the server because it's on the main thread and can take a while. So, does this basically mean, you use a ASync task when you need to have a java loop every 15 minutes that doesn't use bukkit methods? (Single thread methods)
How i can create a server with SPIGOT and add mods?
@viscid grove spigot is an API that let's you add PLUGINS, not MODS. If you want to add mods to a minecraft server, i recommend you search 'minecraft forge' on google.
@worthy lava I want to create a server, and add mods to the server
Yes, but this channel is for plugins, not mods.
Spigot and Forge mods are not compatible
There have been attempts to merge the two projects in the past but they never succeed
Nor should they, really. The Bukkit API was designed strictly with vanilla in mind
Wut, seriously? Fat ooof
Btw Choco, do you have an answer to my question about ASync BukkitRunnable tasks?
Cauldron, for instance. Only made it up to 1.6.4 iirc. There is also another one being worked on at the moment but I have no idea where it's at and I forget its name
Asynchronous tasks should be used for processes that would otherwise halt the main thread (generally, IO - file reading, database operations, http, etc.)
Or strenuous tasks. But yeah, avoid the Bukkit API in asynchronous tasks. Some will work - such as sending messages and particles which are just queued packets - though more often than not they will not work
I think you're talking about sponge
Yes, but i need to implement a loop method to remove boosters from a list. Would this be applicable for a ASync tasks? My BoosterManager and Booster class use no methods from Bukkit. Only pure Java
That could be it Kevin
No, not Sponge. Sponge doesn't use the Bukkit API. Unrelated
Gotcha
Oh ok
Wiebe, at that point it comes down to an understanding of concurrency, thread safety and data races
I'm really not familiar with the project so I really don't know
If your booster manager class is designed to be thread safe, you're probably fine
Though if you wrote it without any knowledge of such a concept, it's safe to say that it's not ;P
^
You may run into occasional issues but 9 times out of 10 it should work
Il google real quick, no more explanation needed because im clearly uneducated at ASync, thread safetly as such. So im gonna do some investagation first before i actually delve into it.
If you don't understand concurrency, locking/deadlock, and race conditions, your code is probably not thread safe.
It's just that 10th time that you can't be certain
Thread safety is very difficult to wrap your head around
I still struggle
As what issues? An excption or something?
Logical issues moreso than runtime
I still guarantee I have some race condition somewhere in my code just waiting to become an issue, and I've been doing this for many years
i.e. a collection may contain different things at any given time if two threads access the same collection at the same time
That would be unlikely in my case, but i do get your point.
99.99999% of the time, people end up using Async threads for stupidly simple tasks anyways.
As you said, 9 out of 10 cases it would work, but sometimes
99.99999% of the time, people end up using Async threads for stupidly simple tasks anyways.
This. Unless you have a specific reason (again I mention IO here), you likely don't need one
Take this example:
Two threads share a single variable, a. At the beginning we set A to 0.
Thread 1 wants to increment the value of A by 10. Thread 2 wants to increment the value by 20.
- Thread 1 reads the value of A. The value is 0.
- Thread 1 computes the new value of A to be 10.
- Thread 2 reads the value of A. The value is still 0 because Thread 1 has not yet updated A.
- Thread 1 updates the value of A. A is now 10.
- Thread 2 computes the new value of A to be 20 (0 + 20 is 20)
- Thread 2 sets the value of A to 20.
What see here is two threads each incrementing a number by a sum of 30
But at the end, the value is not 30.
Atomic integer don't work when you have two processes acting on a database
You either need to do direct database actions (which, themselves, are thread safe) or use some other locking tricks
Depends on the database
Ok, so kevin, take this scenario in mind:
My BoosterManager starts an ASync task. This ASync task checks if the System.currentTimeInMilis(); is past a certain point. If it is, then remove it from the boosterList. The ASync method is the only method that removes boosters. What issues could arrise here?
Eh, there's just better concepts with Async operations. Everyone tries to apply them to basic ideas
Like using a consumer for example, with a queue to insert into a database
Basic shit, but can be async
If you have other threads that updating that booster information, you could have some race condition problems.
Copying stuff before reading it on another thread, Once again, basic, but async
Booster information cannot be updated, it's static (In the sense of it never changes, they are not literally static).
Booster information is only retrieved, not changed
If your threads are iterating that data, and then another thread changes it. Then you get a CME and that's no fun at all to debug
If you're concerned, look into object locks
And how to PROPERLY use them while AVOIDING deadlock.
Long story short never hold 2 locks (unless you absolutely know what the fuck you're doing)
Alright kevin, thanks for answering my questions! Same goes to you choco!
np bud
A note on deadlock - If each thread only ever can hold one lock at a time, you will never deadlock.
If a thread can hold more than one lock at a time, then you could run into a deadlock scenario, whereby two threads each are trying to acquire a lock that the other thread holds.
Can someone help me? The players on our server don't have acces to the whisper command anymore and the permisions command doesn't work either.
You can prevent deadlock by 2phase lock protocol
Never lock again after u start first unlock
Spigot is sooooooooooo [NOT FREE]
Most definitely is. Free and open sourced

