#help-development
1 messages · Page 1556 of 1
file with error
then use another paste service
Send the paste
how ?
🤦
?paste
?paste
:(
copy/paste your code in, save it and drop the link
Copy link
click on the very sus link, drop it in, throw it in this chat.
do you have a link to the tutorial?
Or if paste.md-5.net does not work for you, https://gist.github.com/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
cheers
@opal juniper https://paste.md-5.net/latexekuxe.cs
your are trying to cast a fish into a player ? oO
org.bukkit.craftbukkit.v1_8_R3.entity.CraftFish cannot be cast to org.bukkit.entity.Player
:why:
isEmpty, but yes that should work
basically, use instanceof to check whether a cast is "safe"
this recoded
plugin
so idon't know
how
to fix it
well, then noone can help you
I think it will include smelting recipes
but i have the code
can you send us line 98 of your code @umbral pagoda
Player k = (Player)e.getDamager();
me.SSP.Listeners.Pvp.onDamage(Pvp.java:98) to be exactly
but, in 80% of cases prepending
if (!(ent instanceof Player)) {
continue; // or break; - depending on what you want
}
or
if (!(ent instanceof Player)) {
return;
}
would work
if that is not possible, you need to recode your entire method
okay this doesnt explain anything. send us the full method
I’m guessing EntityDamageByEntItyEvent
In this case, a fish is a damager
ok
yeah because a fish can attack
plugins make everything possible
But it could also be that a zombie is a damager, etc. so use instanceof to be 100% sure
No fish in 1.8
100000 points
Use
Entity p = e.getEntity();
Entity k = e.getDamager();
instead
don't do the casts before you are doing an instanceof
Protip: Java16 supports
if (e.getEntity() instanceof Player p) {}
it is hyperbole due to how tabs are used
Should
@quiet ice now all code give me error
new ArrayList<>(Arrays.asList(Material.values()))
Alternatively you can just make a set of unobtainable items to remove
why are you creating 2 instances of a list?
.values() returns an array
Random random = new Random(); not needed, use ThreadLocalRandom
Yes but Arrays.asList returns a list
then switch to 1.16.5+ and use Java16 and use my instanceof solution
Which they are then passing into a list
SplittableRandom tho 
Also checking recipes isn’t great for finding unobtainable items
No recipes for rotten flesh, but it’s obtainable
i think in this case its not needed
isn't it a list that backs the array?
Oh well it’s just faster than the other randoms that’s why it’s pog
nvm, forgot that .values() returns a clone
It’s an enum
yes, the new ArrayList<>() call is superflous
You can’t modify the values anyway
Lists.newArrayList(Material.values()) might be more appropriate
you can - with a bit of reflection hackery
That sounds counter intuitive
I do this all the time
well, though I do it without reflections but with ASM - but at the heart it is the same
and reflections are a bad usage
Well I mean if we have fully mutable list implementations, I see no reason why you would use reflection on a fixed size list implementation.
Hey, I did a /invsee command for my plugin but I noticed that it was a bit difficult to differentiate the hotbar and the inventory. And on top of that, you couldn't access the armor. So I'd like to make a custom GUI that separates the hotbar from the inventory and armor. Of course this GUI has to be linked with the complete inventory of the player in question. Do you have an idea how to see the armor and make a GUI that is linked to the player's inventory? (PING ME)
I'm talking about modifying the synthetic $values array in an enum btw since perhaps some might have misunderstood me
is there any plugin to protect assigned region for 1.17
that cant be destroyed by tnt or other destructive stuff
Don’t ask in multiple channels
ok sry
The synthetic field isn't in a core java class
is there a method that gets the uuid of a player by name ?
oh ok but what about just looping trough all offline players?
I am not
right
ok
isn't there a method that doesn't do IO requests?
Bukkit.getPlayer(String name) what about this
Only for online players
Ye, I need it only for online
its stuck with this? does someone know how to fix?
Im trying to get an image file from my plugin folder, a bufferedimage, but it keeps giving me an error that the “supposed to be” image is empty
Or rather, null
One sec
this is the whole thing, though only the last part is the important one
what is me.Simo.TrollMaster.Commands.Baldify.Bald line 88
that is a lot of inner classes you have there
One sec
Oh yeah that’s the part where it does somethint with the image
It overlays it on top of another one
also, please use proper package naming convetions me.Simo.TrollMaster.Commands.Baldify.Bald could be
me/Simo/TrollMaster/Commands/Baldify.Bald or
me/Simo/TrollMaster/Commands$Baldify.Bald or
me/Simo/TrollMaster$Commands$Baldify.Bald or
me/Simo$TrollMaster$Commands$Baldify.Bald
Package names should be lowercase
how can i remove my plugin form spigot web ?
I use JVM bytecode names
Report it and ask for removal
Ah
But about the image
Why is it always null?
because java non-bytecode name has the same seperator between inner classes and packages
I recommend you to set your fields before using them - I assume that this is your core issue
Seems resonable
it could also not be static
we have no idea about the nature of the field
nvm, it 100% is not a static field
because otherwise java would say "main" is null and not "this.main" is null
Ok
As long as it isn't as concern as my method of doing it, I see no issue
That requires that either they use IntelliJ or bothered to actually configure eclipse correctly
until you use the eclipse compiler
?
Pretty common one too
The image says it implements InventoryHolder
Lol
Apple and Pear is castable to Fruit aslong as apple and pear are fruits
yea i understand
I know that apple is a fruit
pear is a fruit
bu the only problem is that i have a custom gui and i want to set an item inside it after i created it
Oh k
because only inventory has the setItem method
Wdym you just did return null xd
when the method
is void
macros?
Shouldn't it be a interface then?
That was what they were called on the documentation for plugin.yml.
They are replaced with the name of the command and the permission required to use it, respectively.
oh maybe doesnt really matter for me
basically yes i'll make it an inv
usage: "Usage: /<command> <command> <argument>"
interface*
i am doing that because i am following what minecraft does for their arguments
as in
() is for arguments
[] is for optional things
There are two ways of potentially dealing with this: unicode or html escape
and <> is for things with no limit of choices, like usernames
i just do not know of whether spigot reads the plugin.yml directly or whether it simplifies it
if the latter, it would probably convert unicode to characters, right
the issue with html escapes is that it is unlikely that spigot would even try to parse them
oh
yike
well i am too stubborn to not abide by minecraft's system for this so i am going to figure out some yaml bullshit to do this
Spigot uses snake-yml I think
never heard of that but i can look it up
?
well i can not edit spigot
... or OP is a dumbfuk and there is no issue
?
What's he trying to do
Either way, snakeyaml is not the one that processes the placeholders
trying to include a literal string of <command> in a usage string
@granite stirrup
i have not tested it yet but i would think that spigot will replace both instances with <command>
try <command> or \u003Ccommand>
but it is better to see whether it even treats this like a placeholder
If you have a var that is a instance of A and it extends B if you pass it in a method that wants a B will it cast the A into B ?
does for example invA.setItem(invB.getItem()) also copies the itemmeta? (both are inventories)
it should yeah
does it even copy anything
why am i not able to use commands as the console onm spigot server
if it copies the itemstack instance, yes, otherwise no
ok
Isn’t Cloneable#clone like not too expensive tho? Apart from the mandatory try catch
Well you do call super.clone()
ItemMeta#clone can be very, very expensive though
Lol
which makes it funny that ItemStack#equals() does it not only once, but multiple times
?
to get the damage of the item the itemmeta is cloned
to compare the item meta the item meta is also cloned
let me see if paper bothered to change that
What
lol
I don't read the MC code lmao
they did not
Can't see it
it's the getItemMeta() call that clones it
Material comparisonType = (this.type.isLegacy()) ? Bukkit.getUnsafe().fromLegacy(this.getData(), true) : this.type; // This may be called from legacy item stacks, try to get the right material
return comparisonType == stack.getType() && getDurability() == stack.getDurability() && hasItemMeta() == stack.hasItemMeta() && (hasItemMeta() ? Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta()) : true);
yikes
it would be funny if hasItemMeta also cloned the item meta
luckily not
i have been very disconnected from this conversation; are we discussing bad performance in spigot code
most likely
The issue is as old as bukkit is - nothing spigot specific
I wonder if paper fixed it
as I said, it did not
that is why i am half on-board with paper's plan to completely remake their api
The above snippet was from my paper fork
Oh f
And remember, this is a 2 - 3 line fix
because being a fork of a fork of old software has a lot of restrictions
Why don't u fix it
i have not coded for paper, but i would think that they have to use io.papermc, org.bukkit, and org.spigot, and that is probably really messy to navigate
I cannot sign the CLA, at all
?ban @wraith rapids
Done. That felt good.
F
i sort of wanted to ask about what the pr would need to change because i want to fix stuff
though, thinking again, i do not have too much experience with coding for spigot
and none for editing spigot itself
just replace all getItemMeta() calls with meta
What did he do this time lol
oh is this a regular occurrence
the same things he always does
wtf just happened
someone got banned for saying something like "i am waiting for someone in this community to do the 3 PRs required to fix it" but more crudely
✨ helping others ✨
i do not actually know what "it" was because i am disconnected from the conversation, but i would like to know
none of your business
they've been repeatedly warned about their attitude and haven't changed it
oh okay
something about the earlier "what did they do this time" made me think it was being silly or something
so yike
and, by "it", i mean the issues with the code
this "it"
i just jumped in seconds before you, but it was probably a discussion about the frequently cloning of the itemmeta
I think the spigot plugin compat mockery might be the issue there - but I think that I am interpreting too much into this
The inefficiencies of spigot code is unlikely the issue here - rather something surrounding it
i think sometimes there is no real "ideal" way to do things
just the least bad
but they are the issues that get picked up on
does instanceof also checks if a class implements an interface
?
never used something like this before
ah yes
xd
i saw that coming
?
We already talked about it
for once I am an idiot and have no idea where it is in the first place and secondly I do not feel like actually signing such a contract that is basically "here, give me my personal info"
Nny is true 7 year old
google translate goes brr today
but i wanted to ask if there's an overcoupling (idk if thats a word) class for all the eventhandler classes (like invClickEvent etc)
He said he was just older than 1.8 and t
That came out 7 years ago
Event
Oops
I accidently turned caps lock on my phone 🤣
grr stupid case label
to change the block of my tradegui
if someone clicks a specific slot the item changes
Use ifs?
mmmh
😂
how if he was a part of the WW2?
yea i accidently removed it or something 🙄
lol and now its gone
no
some stupid method to prevent me typing 5 times the same thing
Switch cases are really hard to manage lol
They like the same Fing performance as ifs
oh
Unless your running a million ifs a second you might have a difference
there's my code spaghetti again
No bigge
not really since both would just crash
Wtf
No
YandereSimulator does a million ifs every second and it doesn't crash xd
nasa pc
I would be very disappointed if this code of 300 lines wouldn't work 😂😂
Lol I written like 200 lines like yesterday and if it doesn't fucking work I'm killing myself
Jk
What happens if multiple plugins have a same command? (for example /invsee)
It would probably be possible to execute the commands independently as long as a namespace is provided for them.
But it is a bad idea to make commands with names or aliases identical to commands from popular plugins, like EssentialsX.
Usually your command will override EssentialsX command.
Ok
lmao i also made an /invsee command 😂
bruh
I wanted to make one to see how hard it is and add it to my plugin but idk now
does the other player see it real time when I change it or do I have to do anything
Real time, yes.
cool
i did it with 15 lines code 👌
If i have a file of all the enchants in minecraft and i want to have it pick a random one how would one do that.
Random
random number generator
And use the indexes?
get the lenght of the list of enchants and set it to give a rand number from 0 to lenght
lol
Pretty sure alieses don't override commands
Does that mean to command overrides the alias?
I'm pretty sure commands can override commands but alieses dont
hello i am pretty new to minecraft modding and was trying to make a custom armor set and i coundnt get it to render ( i got a black a purple texture) and i am not sure why
The commands will win over alieses
This is plugin development
Not mod development
mods or plugins?
sorry, i think it was a plugin
does inv.setExtraContents(item) with item an itemstack of existing items, copies the items meta?
You can't make custom armour sets in plugins
oh, well im not too smart am i
Well your trying to make a mod so ask another server
ok
Since this is for plugin dev
That's a fucking scam
It's not a fucking plugin
That's a fucking resource pack
idk 🙇♂️
all custom items plugins need a resourcepack
you cant make custom items yourself so
Yeah but you can use mods lmao
Then it's not really making custom items in a plugin lol
How would you pull the name of the index from a XML Doc file to a variable called enchantment
You would need something to parse XML documents
Idk if spigot has one already
So you might need to find a library
Ok does it matter what type of file it is if i have a list of all minecraft enchants
Ye ok
Is there a way to like bring back 1.8 pvp
to disable the cooldown on attacking
OCM?
wat wat now
OldCombatMachanics
where can i find that
You might have to decompile it
foud the source
Ok
Can anyone help? didn't modify quickshop jar but why showing this error
"quickshop is disabled, please fix any error and restart
-[Error /Signature verify] Security risk detected, Quickshop jar has been modified"
looks like alot of work
I think that plugin may be a virus
it was working fine but suddenly....i don't know why
Where did you get your spigot jar?
You can't download Spigot, so you didn't get it from the spigot website
i said from the website
i meant ur server jar
Can someone explain to me what is wrong in my code? My goal is to display stone at the first slot of Anvil. Spigot version is 1.17
ViaVersion usually updates before spigot does xD
i dont think that slot is 0
can I create an IDEA project with sources of spigot that buildtools built
to create my custom server jar
a fork
no
even if you did you wouldnt be able to publish it
so how can I create my own fork?
@gleaming grove If I remember correctly Anvil inventories in Spigot are a pain. I personally use AnvilGUI cause it just makes it a heck of a lot easier.
yeah
omfg
yea but there is not for version 1.17 as i have seen
you dont get spigot from fucking getshitoutdatedjar.com
I don't want to open files one by one and edit them
you get it from bt
@gleaming grove I made AnvilGUI for 1.17 and also use it, so it definitely exists.
?bt
stop saying getB*kkit
its a banned word in here because its BAD
The funny thing is that after click on this slot there is accutal item "look at log" but for some reason it is invisible
any ideas?
maybe its cuz you cant open a anvil inventory with openInventory
Yeah that was the issue why AnvilGUI exists I think. You need some extra packets and some NMS stuff.
how can I create my own fork of spigot?
you need to make patches
okey....but i think you got the answer where i got the jar file. Can you help me?
?contribute
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
I want to be able to edit nms as well
@gleaming grove I mean you can look at https://github.com/WesJD/AnvilGUI/blob/master/1_17_R1/src/main/java/net/wesjd/anvilgui/version/Wrapper1_17_R1.java if you want to, that code definitely works.
can I edit nms with patches?
oh thank you i dont know why i missed that
alr dont bother making a fork
LMAO
because idk how to either
but this 1_17_R1 is not the leatest 1_17
1_17_R1 is 1.17.x?
R1 is just revision 1
i think
What's the max inventory size?
yes it is
depends what kind of inventory
the default one is 32
uhh, a chest
1_17_R1 is 1.17
you can use InventoryType.CHEST.getDefaultSize()
This gets triggered on player respawn (delete chest + items) do i need to load chunk for safety or can it just handle location fine ?
I just wanted to know what's the max
as long as the world is loaded it should be fine
is that content array limit?
great thanks!
default chests have 27 slots tho
maybe when you remove a block from a world it might load it for you if its unloaded but probs not
you can create a custom inventory that has 7 (and maybe 8) lines
which makes 63 slots
ill run some tests just to be sure then
but it looks buggy on client side
1.17-rc2 added nothing XD
I'll test and see
I mean you can create 7 lined inventory but it doesnt look good
go ahead
the minecraft launcher is defiantly electron LOL
No it's not
I mean 7*9 = 63
lol
let me try tho
wtf is that screenshot
so now if i do
new checkKitCooldown(...)
all of the values like kitsUsed, playerID, cooldown, kitID will reset to null, right? because i create a new instance of the class
impossible
but if a mke a value static, and then request it like
new checkKitcooldown(...)
and set
static UUID id
and then request it in another class i can save the value between classes right?
can you give me the official link where i can get the jar file?
?bt download the jar from there and run it. You build your own spigot
looks like max is 54
this question is completely irrelevant to plugin development
While working with Java Servlets how do i enable these tabs on my Eclipse bar?(Markers, Properties, Servers etc)
view of what my Eclipse tab looks like
idk if you can get more but if you try i think you need to use nms lol
it probs will look bugged to
I don't need to make it bigger
should be a window tab at top
i think its in there
Yes it is but not the ones im looking for
click other?
I went one by one through each folder, and found nothing
lol, I can't join my server anymore
Not sure, will do further research
the book exploit XD?
delete your player info
right
here's a 7 lined inventory
so, it is possible
There's no point in making this since it's glitched
here's a 10 lined inventory lol
that's what told you tho
ye
I guess you may use this with custom texture packs
Sure but it would take to long to create custom textures...
why did you ask max size of inventories? just curious
I am making some kind of vault plugin and I can create different inventories with different sizes depending on player rank
yep, it was an perspective called Java EE which was not pre installed, everything's working now
This the right place to ask about eclipse issues connected to the bukkit api?
not
it is the right place for everything and nothing
you cant use more than 54 slots for the inv
you can
bukkit doesnt let you but you can do it yourself
Is there any way to block unlisted list of commands in /[tab] without ProtocolLib
but.. its illegal. you cant. the system doesnt want you to. you are against the system. THATS ILLEGAL
no
yes of course you can have more than 54 slots
my github. my portfolio its all a joke
theres no such thing as limit
it was all in my head
what
so i was to add item to someones inventory when they join, is their a plugin for that? since i looked on the spigot website but can't find anything
thanks
why do you send him to help serve rlmao
ig
??
So this is the issue. Most of the classes in eclipse have an auto-complete where you write <instancized object>. and get a list of possible methods, but some classes do NOT show up their methods.
This is the case for, including but not limited to:
-ItemMeta
-ItemStack
-Inventory
-PotionData
How do i get those classes to show me their methods?
Aside from looking it up in the class itself of course
Use IntelliJ
Eclipse is so old
Wow
Stay with Eclipse
Wait how?
I agree
neither of those answer my question. Why those classes, but not others?
I.E. the block class works just fine
Why?
its still updated lmao
have you tried pressing ctrl + space @smoky oak
i switched to intellij cuz eclipse was too buggy
'No default proposals'
um
doesnt it grab the code
from the api
how can it NOT show up
are you using maven?
make sure ur importing the libs correctly
what exactly do you mean?
like I have https://hub.spigotmc.org/javadocs/spigot/ as my javadoc
and the api in my dependencies
For eg, there are multiple options while importing Location. but only the org.bukkit one works
Does whatever I type in the config.yml save as default when I compile?
If I put this in the process builder C:\WINDOWS\system32\cmd.exe, /D, /C, C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\apache-maven-3.6.0/bin/mvn.cmd, -Dbt.name=dev, install:install-file, -Dfile="C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\TvheeAPI-1.6.0-01.jar", -DgroupId=me.tvhee, -DartifactId=TvheeAPI, -Dversion=1.6.0-01, -Dpackaging=jar
I get 'C:\Users\<part of name>' is not recognized as an internal or external command, operable program or batch file.
But if running in the cmd.exe I don't discover any problems
Where do I need to use it?
Ok
The first is a directory, a Java File where you can't do that
how can I know that my user clicked on the first item in the inventory?
correction: inside of InventoryClickEvent
'C:\Users\<part of name>' is not recognized as an internal or external command,
operable program or batch file.
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [C:\WINDOWS\system32\cmd.exe, /D, /C, "C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\apache-maven-3.6.0/bin/mvn.cmd", -Dbt.name=dev, install:install-file, -Dfile="C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\TvheeAPI-1.6.0-01.jar", -DgroupId=me.tvhee, -DartifactId=TvheeAPI, -Dversion=1.6.0-01, -Dpackaging=jar]
at me.tvhee.tvheeapi.repositoryinstaller.Builder.runProcess0(Builder.java:272)
at me.tvhee.tvheeapi.repositoryinstaller.Builder.runProcess(Builder.java:196)
at me.tvhee.tvheeapi.repositoryinstaller.Builder.runMaven(Builder.java:172)
at me.tvhee.tvheeapi.repositoryinstaller.Builder.start(Builder.java:133)
at me.tvhee.tvheeapi.repositoryinstaller.Bootstrap.main(Bootstrap.java:31)
I know that
but I don't know of any function to know which index it was
oh
event.getSlot()
nvm then
@maiden briar it's very likely your issue stems from you using backslash and forward slash in your path
replace the one type with the other and try again
The problem is that it is stored in Java's File
You can't put a string instead of a File
the other path
"C:\Users<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\apache-maven-3.6.0/bin/mvn.cmd"
were talking about that one right?
Yes
args.add("\"" + Builder.maven.getAbsolutePath() + "\\bin\\mvn.cmd\""); I can try this
yeah
No
That does not work
I am trying to do something similar than BuildTools, that works good
i mean bt downloads maven and uses it
?paste
Does not work
it doesnt use the maven you have installed
Yes, but I want to install it in the local repo so other people can build upon it
The problem is in #runMaven, because in #runProcess it just works
are these inventory slots from the player also nummered?
or is it just Inventorytype.PLAYER?
yes, all those slots should have an appropriate index
the last index of the highest part is 53 so would it start from 54?
No you have another InventoryView
player has it's own inventory
ah
Get the raw slot instead perhaps?
i dont know
Maybe you can get the inventory slot by using the raw slot, even the player's inventory.
I never used it tho.
no cuz that means that your inv first slot and the player inv first slot is both 0?
im pretty sure
but you shouldn't rely on this fact - better use the inventory view
you have to use getSlot()
There is the raw slot and the regular slot
Usually I get the bottom inventory instead.
and whats the difference?
big difference
they are the same for the top inventory, but very different in the bottom inventory
(impl specific btw, it may change in the future)
Does whatever I type in the config.yml save as default when I compile?
The raw slot is used in packets iirc, and is translated by bukkit into the correct slot and inventory
ah get raw slot would start from 54 in the lowest inv
yes
Depends on the size of the top inventory, but in your case, yes
But best use the inventory view to convert between these representation types, otherwise you might do mistakes in your logic a bit easier
yeah, they are pretty mean from time to time
its stupid that you have to create different scores for everything
guys, im using gradle and I just found out that eventhough I use the following snippet, my dependencies still get compiled to class files version 60.
tasks.compileJava {
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
}
🤔
why is performance worse on paper 1.17
its slower on paper 1.17
could be a lot of factors. Porting to Java 16 is probably one of em
I doubt it - paper was the first to prepare for Java 11, Java 16 is only a mild issue
for (Entity e1 : e.getNearbyEntities(level, level, level)) {
if (e1.getLocation().getWorld().equals(e.getLocation().getWorld())) {
The second line is useless, right? (currently cleaning up someone else's code)
I meant for what
As in what is it slower for
If these are great mappings consistently given by mojang themself
I don't expect to be using chunkMap.G
That is because spigot reobfuscates them
which version did u test on
???????
Why? Don't ask, but they do. Plugin authors can use them however without too much issues
This seems very incorrect.
Most of the mappings are fine
But there's random G's here and everything
a's, b's.
Loads of var1, var2 but that's expected
I just want some consistency
Then classes are mojmap and the rest is spigot mappings
And so far all this has brought is the same shit slightly better
and whole lot of work to convert
I don't think this is correct.
You seem to be guessing
I'm using -remapped
Then why the hell would it be so incomplete?
It has to be spigot mappings as this is the only mappings that is incomplete
Afaik paper uses full mojmap though (in dev though)
mojmap has 100% coverage on class & method & field names
Yes
On a natural minecraft jar.
It makes sense the mappings are harder to apply on a modified source though
The natural minecraft jar has full obfuscation
But as I said
Using mojmap before
It wasn't complete
Not even close.
With no spigot or paper
What did you use to apply the mappings?
Can't remember, some open source tool I think.
Maybe fabric's tool
Was a while ago
Back with 1.16
enigma?
I know that paperweight uses quilt's tiny-remapper and I have yet so see any issues (outside of the LVT being not remapped), though I know that it isn't without some.
This would mean that mojmap at it's core is not an issue, but whatever that applies those mappings is not great
can anyone point me to some load balancing help resources? i am having a hrad time understanding it
Anyone know what ChunkStatus.FULL would be on 1.17
Using mapped or not?
no.... i dont think so
Or is this API?
nms
Cross reference it with the -remapped jars
i think so
And you'll have an easier time with this
ok
and with future nms conversions 🙂
once i make a remapped jar do i have to decompile it or something
ok
Quiltflower is good at decompiling minecraft from what I heard
Basically a beefed up version of Forgeflower which is a beefed up version of fernflower/intelliJ decompiler
How do I set the config.yml file back to default?
overwrite it
saveResource(true, "config.yml") or something like that
PrivateVaults.getInstance().saveDefaultConfig();Like this?
Read the docs of that method but if anything, new File("pluginName/config.yml").delete(); should do the trick
Our plugin wont start unless we do /reload after we restart the server. We know /reload is bad so we want to know if there is a fix..
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
CTeam redTeam = TeamManager.getInstance().registerNewTeam("redTeam", "[RED] ", ChatColor.RED);
CTeam blueTeam = TeamManager.getInstance().registerNewTeam("blueTeam", "[BLUE] ", ChatColor.BLUE);
redTeam.getBukkitTeam().setAllowFriendlyFire(false);
blueTeam.getBukkitTeam().setAllowFriendlyFire(false);
lobbybar = new GameBar(this);
lobbybar.createBar();
if (Bukkit.getOnlinePlayers().size() > 0) {
for(Player on : Bukkit.getOnlinePlayers()) {
lobbybar.addPlayer(on);
System.out.println("The plugin is launching");
}
}
}
```
This is our onEnable if that could help
Ok
define "wont start". Are there errors in the console or anything like that?
No errors
onEnable is executed when the plugin is enabled (on server start or reload)
It just doesnt do anything with the plugin until we type /reload
Does it even make sense to develop with mojmap when we can't even talk about how to use mojmap?
so commanddispatch?
The usecase specifically states it is for development purposes
Obviously not a lawyer tho
Spigot is thankfully very open on mojmap, other than Quilt and Fabric
if i restart the server, scoreboards, boss bars, teams, etc dont load in until i reload the plugin in game
what happens if noone is online and you reload via console?
because its a minigame, we cant reload everytime
the game ends
I just want to know if you accidentally have a reliance on online players
reloading while noone is online would debug that to the fullest
shouldn't the class be trashed afterwards so it shouldn't matter?
unless of course you have static fields, at which point is may be a bit different
would i have to dispatch command for this?
the console can dispatch commands while noone is online
Im working with Aditya on this... the problem is that I want my server to restart when the game is over... the problem Im facing is that the onEnable isn't really doing anything even though I am telling it multiple things to load up (bossbar, teams, etc.)
I'm confused. what is the issue here
running a reload on enable would just make a reload loop where it diables the plugins, reenables, runs the reload command again, over and over again
when I restart my server, the plugin doesnt launch correctly
kinda hard to explain
so you want to invoke the reload command or what
restart as in hard reboot
yessir
You can't post mojmap code anywhere
why that
Um, the law?
You can't distribute it at all
In any capacity
Hence why you need to remap
Before using your plugins
And you can't use it on the server remapped
Yes, but you don't want to mirror the mojmap itself
Plus, you can consider anything using the mojmap a derivative work
good, so we did not misunderstand each other
correct, the problem comes where when I restart and join, nothing shows up that is supposed to without reloading
I have no idea how you managed that in the first place
Usually it is the reverse
make sure you have no semi-depends on online players or anything like that (such as Plugin messages)
yeah there are no online player dependants
then I guess that the only way of solving it is to put sysout everywhere - the onEnable method looks good to me (though Bukkit.getOnlinePlayers().size() > 0 is less fast than !Bukkit.getOnlinePlayers().isEmpty() - but that is only a nitpick that won't do anything)
Could it be that you do not invoke lobbybar.addPlayer(on) on player join?
@quiet ice I'll dm you a gif of the problem if thats ok with you
it would be nice if a guide existed for converting existing NMS code to be spigot api code
I do
if(!lobbybar.getbar().getPlayers().contains(event.getPlayer())) {
lobbybar.addPlayer(event.getPlayer());
at PlayerJoinEvent
Why would you want to do that?
https://paste.md-5.net/ecevocomen.coffeescript why am i getting this
converting code in spigot plugins, i mean
what is your plugin.yml?
i mean taking code in plugins which uses nms and converting it so it uses spigot api instead, because nms usage is discouraged
myeah, it is complicated
The reasons there is no guide on that is that noone wants to do that
also because it would probably double as a guide on how to get around mojang obfuscation
which may encourage using more nms
Lol the world in which mojang obfuscations encourage more nms usage is an imaginary one
it is, most often worse for performance and the spectrum of NMS is so large that you cannot possibly do a PR here
yeah, mojmap did kill quite a lot of plugins
Your plugin descriptor (also known as plugin.yml) is invalid
version: 1.0
api-version: 1.13
author: GStudiosX
description: TestPlugin
you are missing the name entry
oh
i meant that a guide on how to convert nms code to spigot api code could enable plugin developers to do the opposite more easily
didnt realise i forgot it
it is strange that bukkit does not provide a more specific error, but eh
Say I want to send a message about a new rank being created via redis pub/sub, would it be a good idea to cache the rank object on every single server under the ntwork?
it is specific enough that at least some will know what the issue is at first glance
you can't cache java objects across several java instances (without hacks)
yeah i wont be doing it directly but i was thiking of sending over the data and creating a new Rank object on every single server
redis pubsub sounds like a better idea than constantly connecting to the database but eh
maybe im not thinking of pubsub the right way?
I have no experience with this, so I cannot say anything
?ban @leaden wolf
User with ID 861731031153770546 is already banned.
Thanks lol
a
Imagine pinging everyone, kinda CRINGE
Third day in a row.
who did the ping
Again?

This guy.
Discord needs to add a max member ping rate
what happened?
Since youll just get people botting servers now with spam pinging individual members

wow, third day in a row
I do love getting pinged for no reason
who pinged me
mass ping
Gaain
who tf
ah
good thing I do not get pinged
I've been athome like a good citizen
bad thing you are not important enough
well, you need to see everything from the good side
why would someone have the motivation to mass ping a development server anyways
not like in IRC where ghost pings are not possible
ads most likely
861731031153770546
how did you know my bank balance?
https://hastebin.com/usebitunur.properties Any of you SQL buffs know why this is failing? The SQL runs perfectly fine on the actual database...? (MySQL)
error in your SQL syntax; check the manual that corresponds to your MySQL server version
Yeah but there's not though
my man rich
unrelated to your problem, but why are you throwing an ArithmeticException, and why are you not storing UUIDs in a BINARY(16)?
they ping a tonne of people
its a mass attack
although it seems they target the coloured roles (not blue)
I assume that they target everything that is around the top of the user lsit
yeah
how do interfaces work , and how can i do something without any real code
take this for example
it has no code
yet it works?
it's an API
yea
yes
You need to download it from the releases and then use the jitpack repo
Right
So it doesn’t
That code there
Is just for you to look at
The dev removed all logic
just like when you look at Bukkit repository, most of it are interfaces. The Craft classes like CraftServer are not part of the API
Lucas google how java interface works
Asking what
How it works
what you are seeing is abstract methods
was there another mass ping?
yes
Yeah
jesus
idk im kinda lost, whats an abstract class and how can it be abstract, how can something work without any code, whats the logic behind it,
this example :https://paste.md-5.net/upekinoqaz.cs
is the one in w2schools
abstract methods NEED to be overridden by any classes that extend/implement the interface/abstract class or need to be abstract themselves
Abstract classes and interfaces can declare abstract methods which have to be implemented of any concrete class that derived from them
its more of an organizational thing, if you need a bunch of different classes with similar functionality
It’s more than just organizational
It is basically required for stuff like bukkit
oh

