#help-development
1 messages · Page 1290 of 1
^
Yeah but u can still view the source, although you cant redistribute.
They also do allow contributions as well, but you need to sign a CLA
honestly all those ARR license minimap mods wants me to say: f*ck it i'll do it myself by licensing mine under GPL
?
i have src code for 1.16
im useing minecraft paper 1.12.2 java 11
I guess I just didn't know how to compile to another version
cz this version Supports 70% of the plugins I need.
paper
?whereami
This isnt.
lol
in my host i dont use just paper
it says paperapigot 1.12.2
Thats Paper.
I mean 1.12 should probably be pretty similar
But still, paper
in my host A writer craftbukkit/spigot/paperspigot 1.12.2
No idea what that sentence means
anyway
1.13, PaperSpigot rebranded to "Paper", but you're still using paper.
and also... This isnt Paper.
?howold 1.12
0 days old? fucking wonderful.
Minecraft 1.12.2 is 7 years, 9 months old.
?howold 1.12.1
Minecraft 1.12.1 is 7 years, 11 months old.
anyyyywayyyyyyyy What does this have to do with compile the plugin
this kid
???
it sometimes easy to compile it to another version of minecraft, sometimes its not
Porting to another server version requires knowledge of plugin's codebase and overall features it uses because minecraft codebase sometimes changes a lot across versions and that could break compatibility in a way that's incompatible to do without refactoring of the plugin's code
wb now
alr
I don't have much knowledge in code.
looking around at plugin's code seems like there's not that much logic that might interfere with backwards compatibility, so i guess you can try to build the project by creating maven project and following this guide: https://www.spigotmc.org/wiki/creating-a-plugin-with-maven-using-intellij-idea/ and copying the provided source code in to that project
iv the plugin with meaven
ill send it
1min
the main problem probably would be with blockstates and item ids that were completely obliterated since release of minecraft 1.13
so why don't you just compile the plugin then?
you have everything you need probs
you just need to invoke maven package task to generate plugin .jar file for you
i tried but idk i just change 2 things and not work
im noob at minecraft development
i tried idk the plugin won't work
evreything and commands is good without any eros but Its main feature is not applied
well i cant help you with that one im afraid
why?
you need to know the specific of the plugin to really understand what's going on
you need to debug what's not working
?learnjava!
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
I was contacting another developer and this is what he told me: it was actual code that was incorrectu were using concrete instead of redstone lamps and a couple bugs
new output?!?
OHH LOL
and this message was never changed
so used to the long wall of text
https://www.youtube.com/watch?v=E0YHZXz5hEE
Me when looking at xaero's world map decompiled source code:
no really there's methods which are implemented but not used anywhere, inner non static classes everywhere, softdepend mod support code scattered everywhere, even if it has dedicated mods package for it. its really bad
immutability is thrown out of window, with POJO getters/setter everywhere
its like im looking at java 5-6 code
How do I make a all void world thats snowy taiga lol...
@Override
public boolean shouldCache() {
return this.shouldCache;
}
@Override
public File getCacheFile() {
return this.cacheFile;
}
@Override
public void setShouldCache(final boolean shouldCache, final String author) {
this.shouldCache = shouldCache;
}
@Override
public void setCacheFile(final File cacheFile) {
this.cacheFile = cacheFile;
}
why have boolean value for knowing whether should cache? is checking for cache file existence not enough?
also setShouldCache requires to set an author message for some odd reason (which only one implementation actually uses it lol), and either way its not like its for modders to log, mod's author value is hardcoded to the initialization as a constant, like why TF do you even need it in the first placew
i just dont get it
Every software has methods that are not used
If I'm not mistaken, that mod was written by one person and released in 2019. Developers evolve if I saw my code from 5y ago I'd probably wanna end myself
as for inner classes go, they don't need to be static
nor should all inner classes be static
but the main difference of a static or non-static inner class is that a static inner does not need the parent instance created first where as the latter does
as for what you were asking here in regards to caching. While a cache file may exist it doesn't necessarily mean you would want to cache? It could be an old cache file that wasn't cleaned up or an expired one. I have to say, you are picking some odds things to nit pick about though
removing some unused methods will just get you a smaller file size really
most unused methods get compiled out anyways
I don't understand why he attacking the dude tho
inner class memory leak go brr
lol
all fun and games until you {{}}
inner classes are neat
i especially like the syntax
Foo foo = new Foo();
Foo.Bar bar = foo.new Bar();
or if you make all classes and constructors generic new <Byte> Foo<Short>().new <Integer> Bar<Long>()
I love generic type hell
and all the associated bullshit
like having to make a class for adding Bytes and Integers together
what
this is real
eh
difficult
this is for an attribute system :)
like having a uh
"durability" attribute with a +20% modifier
i just make all inner classes static since that decouples the implementation from the parent class if i would expose this in the future somewhere
its just good practice overall
half the inner classes I make end up becoming their own thing
to inject what you need through constructor
unless it's inner interfaces or some shit
non-static classes is just syntax sugar
I feel like you should spend more time writing code and less time thinking about it
realistically it's fine
just use like 3 different decompilers
im just saying that what i see is lasagna/spaghetti code with many unused abstractions
and cross-reference them
i've rarely been in situations where i've used inner classes, but in the cases i've used them, they are never public, rather internal implementations of the enclosing class, think of Map#values() or Map#keySet(), inner classes are perfectly fine to use
eh I've used inner classes for optimization stuff
the problem is that the mod itself references classes from another mod, and that another mod references the mod im decompiling, when compiling it causes circular references in terms of compilation
package A requires Package B and package B requires A
if it was referencing only api interfaces i wouldnt have such problem but it references whole concrete classes from another mod
overall its shadowed mod
i just to either make class stubs and inject real deal at runtime classpath
or decompile everything and untangle the shadowed mod to its proper structure prior to shadowing, but that takes time so stubbing is alot easier and does its job
Yes you can.
Also, how does the end product look like?
?
The ICanTooltip reminded me of "Can we do it". But that was a too abstract joke, so nvm
oh
😄
ok
yea i already fixed most of the problems
all the problems are due to external dependencies mostly
all fun and games until you look it up and find an obscure bitbucket repo
And I thought you were rendering on a minecraft map; But it's the modded maps. I was wondering how you handle clicks/widgets on vanilla maps
its a weird codebase
im pretty sure c# dude wrote it
who tf uses I prefix in java
i proposed it like couple months ago to use the prefix on this discord server but after a while of thinking for the sake of consistency dropped that thinking
What is the proxy in that context? The interface, right?
are enums in java ABI wise syntax sugar around public final class with public final static fields or they have its own class? iirc there's Enum<> type at runtime right?
it's a pfc Foo extends Enum<Foo> with psf fields yes
so if i declare pfs class with psf field without extending enum, its essentially not ABI compliant if some class expect an enum inherited class?
what about abstract classes which do not implement any methods at all (abstract for every method declaration) and interfaces?
wdym "it's not abi compliant if some class expects an enum"
it's simply going to fail compilation
if i expect <E extends Enum<E>> and you pass an E that isn't an enum it isn't going to compile
and changing from a class to an interface is an abi break yes
whats wrong with using I prefix?
Hi, can someone help me there.i want to make minecraft plugins using ai.iam beginner, i even dont know J of Java, when i get the code from ai, i dont get what to do next. Like how to make the code into a plugin jar file? In skript it was easy just copy and paste. Can someone help me in there?
nothing i just dont use for consistency with existing java codebase (which doesnt prefix interfaces)
despite that, suffixing exceptions with Exception is accepted
least hypocritical java code style
ideas other than docker xD?
that's class semantic role not syntax token type name
anyways,
is it normal that mappings.dev misses some native minecraft client/server method mappings? i havent found some method mappings there....
there's no RenderType$method_23516() and RenderType$method_23518 (intermediary mappings) methods there, but from my intuition i can probably tell that those methods in mojang mappings are: RenderType$setupRenderState() and RenderType$clearRenderState()
i'm looking at 1.21.5 mappings and i cant find such methods there
how is I prefix not semantic lol
RenderType is a completely different class than the one you're mentioning
the class holding those methods is in mojang names RenderStateShard
oh that's a subclass
it does not show inherited methods
unless they are overridden of course
Certain plugins such as Spigot or Bukkit support Lua scripting implementation into servers, however these plugins are not created by nor affiliated with Mojang Studios and thus are not an official means in which to implement Lua scripting.
??
since when spigot/bukkit is a plugin and since when it supports lua?
nvm probs wanted to say that certain spigot or bukkit plugins supports the use of lua for minecraft
That's either AI, or really poorly phrased
Because Spigot does support Lua scripting implementation, as in it provides the libraries necessary to implement Lua plugins, but does not natively provide such a plugin loader. Lukkit is one such plugin that extends the loader to support Lua plugin loading
if i #callEvent a sync event from an off-thread will it fire sync?
because i feel like it isnt doing that 😅
no, it will throw an exception
Exception might be Paper-exclusive? But there's a boolean in the Event constructor that marks an event as async
And if the event you're trying to call is a Bukkit event and it doesn't expose that async boolean, you're SOL
why is that holdsLock check even there lmao
who's gonna do synchronized (pluginManager) ???
You never know!
the commit that did it didn't really explain their reasoning and the issue it references has no archive whatsoever so we'll never know
how can i detect if a player is tryna grow grass and shi using a bonemeal
Is it just me, or is this class terrible
must be PlayerInteractEvent
is there a way i can detect what block is the player looking at?
it might an xy problem
if this refers to bonemeal to grow grass it's event.getClickedBlock()
keep in mind it's null if you click air
Define in which scenario it’s needed?
Is it when they’re rightclicking or leftclicking an entity?
it is
that's not my class
its decompiled class from xaero's minimap which im trying to make recompileable without proper source code
so i can patch it
it a mess tbh from codebase standpoint
but the mod is old so ig that's more like tech debt than incompetency
Also what kind of entities
Right clicking but the entity doesnt have to be clicked, they have to look at it
Listen for the interact event and do a rayTraceEntities
Do note the interact event won’t fire if you right click air with an empty hand
declaration: package: org.bukkit, interface: World
Do read the javadoc notes though
is there a way to check if an offline player has a permission?
other than storing that yourself
query the api of your permission plugin
bukkit does not have a notion of permission persistence, they're ephemeral
Stop using big words 
why should they adjourn their usage of such vernacular
do shields use item components for their blocking animation or do I get to fuck myself
don't be so down on yourself, you can get to go fuck yourself either way if you really want to
There is a component. minecraft:blocks_attacks
The use animation is client-sided though, like with other useable items like bows and spyglasses
how much you wanna bet it's a 1.21.5 thing
Oh nevermind the use animation does actually work lol
Yeah the component is relatively new
minecraft keeps disappearing behind my task bar every time I minimize it fml
The shiled thing is from before though no?
I mean, yeah, shields have existed since 1.9
WELL, make a vague statement, I give a vague answer!
unsafe::allocateNewInstance and unsafe::putX to set the fields (since the ctor won't run) 🤡
what's the constructor have to do with anything
are we not trying to construct an event with the async ctor parameter set to true so it can be fired off the main thread?
i kind of just skimmed through the conversation so maybe i misread
sure but what does avoiding the ctor achieve here lol
you can just use normal everyday reflection
oh yeah i guess the exception isn't thrown in the ctor but the event bus
is this normal that mc mod in order to be compiled need to have more stubs than the mods exported codebase itself
like all the classes that are in this screenshot's project tree are stub classes
and its not even halfway done
i like how for some off reason xaero's world map uses xaero's minimap classes just because it can
and i cant just decompile the xaero's minimap because it depends on xaero's worldmap code too!
ugh
in order to decompile xaero's world map you need decompiled xaero's minimap and in order to decompile xaero's minimap you need to decompile xaero's world map
or make 50+ class stubs to compile one of them and them swap the impl with class loader runtime
reminds me
I stubbed the fuck out of husksync to make it work as a standalone REST API
had to makem y own itemstack codecs
Is this the Channel for Qpestions? When yes here is my qpestion: I use Multiverse-core and Multiverse portal , I like they plugins but I have a Problem with them, when i don't have Op then i don't can use the portals and I don't can toset that of aloww because there isn't a setting vor permissions, neither in the files, still a command in game. Does anyone know how this workt or why that doesn't work? I need informations. Can anyone help me or answer me, please.
🙏
Do not post in every channel
#help-server is the only correct one for you now
you need a permissions plugin
well, need is a strong word but i'd advise using a perms plugin over the builtin bukkit perms management
what is that: bukkit perms management
I don' have that
is this only vor bukitt?
ok but which? :you need a permissions plugin
any
and we can I connect
luckperms is the "industry standard" but idk how simple it is to pick up from scratch
i would recommend pex but the people here would probably mob me
there's groupmanager i guess
Why would they lynch you?
mayby, i don't know
@thorn isle what is pex
?
Sorry, kind of out of place
I am confused, one after the other.
GroupManager is the original perms plugin. Oldest of them all.
no web interface though
not so bad
i always disliked the groupmanager command syntax
pex/lp has always seemed more coherent and intuitive
"manuaddp" 🤡
yep simple
incoherent
ok ok, slower
man prefix u for user, add for add and p for permission
i know it's a contraction of manager user add permission
but it might as well be man user add permission
command trees and tab complete exist for a reason
slower slowwer
manuaddp mangaddp is shorter
if you want to keep the shorthands, you could do man u add p
but user and permission should be kept in to show what those commands do
i can't keep up
gm has tab complete
it's just bad and unintuitive command design
I don;t agree. I love it
it's convenient but it could be convenient and intuitive
i dont understand
a command per operation rather than components
sorry becouse i have triggered this
yeah, completely different from any other command in any other plugin, or even generally applications in command line
actually as its so old is pre dates most other plugins
doesn't make it not bad
command formatting was not standardized
but yeah that is fair
i dont understand
that said we do have a standard now and i think it is the way it is with good reason
I prefer a command I can easily understand rather than multiple options and not knowing where each goes
and options which make command so verbose they take time to type
i mean i think a tree structure with commands and subcommands is probably easier to understand than stitching together 1-character shorthands for words
/manager add permission poop.fart to user Jishuna please and thank you
keep it short my typos would decimate that command 🙂
i mean if you look at the pex/lp syntax and compare it to manuaddp it's pretty much the same keyboard inputs except with a few tabcompletes for user and permission
Just make chatgpt interpret ur permissions
/managergpt add this permission to my user Jishuana, thank you
we can do better
we store the permissions on the user in natural language
"this user can use /home and set up to 7 homes"
and then every time anyone does hasPermission, we feed that ^ natural language to a llm, with the queried permission node, and ask it to output true/false
kind of like a regex permission matcher, except it takes ~200ms to parse a match rather than 200ns
so i cant detect right clicking then
?
when a player has empty hands
thats bad
i swear to god this code is making me go insane
You are walking down into the heart of a mountain. In it, you are told, is the one you've come to see. Welcome to
the hall...of the Mountain King.
(Please...Don't mention the Nightmare Before Christmas.)
Hey, i got this error but i didnt figure out how i add the repository for brigadier because its missing: ```ProxySystem:main: Could not find com.mojang:brigadier:1.2.9.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/mojang/brigadier/1.2.9/brigadier-1.2.9.pom
- https://mvnrepository.com/artifact/net.md-5/bungeecord-api/com/mojang/brigadier/1.2.9/brigadier-1.2.9.pom
Required by:
root project :
root project : > net.md-5:bungeecord-api:1.21-R0.3 > net.md-5:bungeecord-protocol:1.21-R0.3
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
i would be surprised that i would get even past mojang logo with this decomp
brigadier is not maven central repository
also if you're using spigot, you can access brigadier from NMS
its already built in into minecraft native server
yea but i wanna use bungeecord for a network-wide system
brigadier lib is headless and wouldnt you provide glue code for minecraft's chat gui's etc
i would just velocity for that but your choice ig
it has brigadier support ootb
i dont wanna use brigadier, i just get those compiling error and i want to either exclude brigadier or implement it but not using it
hey so im on mac and i cannot get it to work any ideas?
Get what to work
@mortal vortex
What’s not working
FUCK OFF
Litt the same steps as for windows if you use intellij
well i did the steps now i just got the spigot.api and when i click it and download it nothin happens an i just stupid?
well as i've expected
but i think i found the culprit
why did i made a stub class for core class of the mod??
Yes
Explain what steps
What are you doing bro
?nowork
?help
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous usernames, global display names, and server...
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
its fine i will just not bother since im on mac ill just find someone to do it for me 😓 i dont got time atm
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
I mean you should be able to use maven/gradle to handle the dependencies the same as on windows
wat r u doing with Xaeros
pressumably not manufacturing illicit substances, one can imagine.
does an event exist for when a player picks a block/entity using middle click?
Past versions 1.21.6 yes
Or it might be .7
what is the name? i cant find it
Nvm seems like it’s only a paper thing
😭👍
Whats the proper term for like when a cow follows u when ur holding a piece of wheat.
is there a name for that?
Luring
Or bait-ing
Even tempting
Oh if u mean in minecraft
It’s TemptGoal iirc
Thought this was general lol
TYY
MY MISTAKE SHOIULD'VE CLARIFIED
should i make a variable thats static and reachable from any class or call it for every class that i need the variable for.
For what
Answer is it depends if it is a general question. You usually don’t want to access a static variable directly unless it is some sort of constant, mostly because it doesn’t give you much leeway in terms of side-effects
I.e, logging, tracking or profiling are often put into consideration, so people would use a method as a level of indirection that allows side-effects
/* Unregister McMMO's listener to prevent it from modifying the damage */
for(RegisteredListener listener : EntityDamageByEntityEvent.getHandlerList().getRegisteredListeners()){
if(listener.getPlugin().getName().equals("mcMMO")){
EntityDamageByEntityEvent.getHandlerList().unregister(listener);
}
}
This would only stop the mcMMO plugin from listening to the EntityDamageByEntityEvent and not every other event that the listener listens to, right?
can u look dms for a sec
This will also remove xp gains and a bunch more mechanics from mcmmo
I don't really do helps through dms sorry
Yeah I know, I implement custom listeners which check a condition and pass it to mcMMO
This is only to add my custom checks on when mcMMO should be active
Yes
1
2
3
Hello please i need emergent help i posted a premium resource for free !!! i wanted to sell it not to post for free
please
@vagrant stratus
wtf it got already downloaded 1 time @vagrant stratus please
stop pinging resource staff
but what else can i do bro
my resource is downloaded for free instead of selling it
you have to report it and ask them to delete it in the reason
they'll handle it when they handle it, nothing much you can do about it now
you can't, spigot doesn't offer the option
at most you can change the download link to not be your resource ig
that's fckd up anyway it already got 2 downloads
so that sucks
so how to do that
pls help me
In retrospect, 2 downloads isnt much
but how can i change download
I don't have any resources to test so I wouldn't be able to tell you, but I am sure you could post an update with an invalid download link or something
3 now
that sucks
did you just go to download it, lmao
Yeah its a banger
might use it
Been needing a self hosted, responsive, voting website for my server
@vagrant stratus
again, stop pinging resource staff, it'll just get you muted or banned
if he is online.... he could help into it
I am online all the time too, because I often leave discord open on my desktop, doesn't mean I am not busy
people have lives, and while I understand your frustration for this situation, there isn't much you can do about it but waiting if you've already reported the resource to ask for removal
wtf ?
they're trolling you, I wouldn't pay mind to it
doubt they even downloaded the resource
But this whole thing was made by chatgpt
sure just reshare it if you want, it is dmca protected as well will get reported 😉
Its not DMCA protected,
as i asked you in private to don't reshare it , you're such a noob and post the conversation here
as you say
I mean, if they manage to get it accepted as a premium resource after all of this is dealt with, then I have no qualms about that
and if it made with gpt, made one by yourself ;). show me how you do that with gpt
if it is shit then resource staff won't accept it, that's just how it is. Regardless of whether you use AI or not to make it
didnt know some guy in romania could write something on a forum and it be legally binding to me
though I do wonder how resource staff evaluate non-plugin resources when it comes to quality control, I honestly never considered it
I mean, that isn't really something for me or you to judge
Thanks Javier, very philosophical as usual.
I believe you're being particularly harsh on the guy for no reason lol, they're just trying to make a premium resource
im trolling
that is what stupid people do
In all seriousness, you should recreate this in React maybe.
I cant imagine anyone who would edit HTML just to do this.. If you want to add a button you have to make a whole new div and apply its CSS lol
you don't know a s... about web developing, you don't even know what react means, and you're talking here
I do though?
go play with gpt and let me be
uhuh...
if you would be such a great developer, wouldn't troll here
you wouldn't have time for that
lol, that told you abb3v
be sure of that
hey btw buddy, the word "responsive" means it works across devices.
setting my view to anything other than a desktop view, the whole site is out of proportions lol.
uhuh, okay.
so i even posted bad link to download
xDxD
but that's also dmca protected so don't even bother to repost it or idk
im not going to repost it dude
Aight just leave them
why not ?
Yeahh isnt that a thing for BuiltByBit
Resources must be plugins.
This means that resources where the main functionality is non-plugin based, ie: "web" resources will be rejected.
ooof buddy
anyway i can't find the "premium feature" at all when posting a resource, even plugin one
like to post it for sale
Then you don’t meet the requirements
hmm
?premium
Oh yeah we have a command for it
thanks
damn you Jish, always one step ahead
Anyway me thinks you should give that a read
simple solution, "hey gpt, can you make a web-server jar for Spigot that will serve my embedded website"
That’s actually extremely easy to do
But it would still be a primarily web based resource
Chatgpt make me a minecraft website
im lonely and i gotta test something. if i code a npc would that work ?
Help with your lonelyness? Probably not
Or if you're asking if it's possible; yeah you can make NPCs
But I'd recommend just using Citizens
Hi can someone help me with the worldborderAPI? im trying to create a chunkborder plugin where if someone types /chunk it creates a per player worldborder, i store it in yml, and load it when joined. everything seems to be going fine, but the border itself isn't showing. And it gives no errors. I can provide screenshots if someone wants to help me
lol
my friends are all offline rn
ty for the help tho ❤️
it costs a whopping ten dolla dolla. my parents wouldnt allow that
Citizens is free, just search for the correct version ->https://ci.citizensnpcs.co/job/citizens2/
https://pastecode.io/s/mtwgtoqv
This is the snippet where it essentially will load. so i have a listener class which calls this method.
im a beginner, keep that in mind haha:D
this is how it is stored,
What version is the server running?
Try using the Spigot api for setting the world border
instead of using a 3rd party lib for it
declaration: package: org.bukkit.entity, interface: Player
Yes, it's on Player
oh well, than i'll refactor it that way. and it'll probably work much better. Thanks for now guys:D really helped me
How are you finding VS Code for plugin dev?
is it usable??
oh wait thats just how ur editting the config?
hahaha yeah, its my default app for opening .txt / yml etc files
ahhaha okay
is there any reason why this wouldn't work? Im on paper 1.21.1
Might want to
A) Read the message you're responding to,
B) Refer to name of this Server
C) change that hideous theme
My guess is you need to delay it in the join event
Wait a few ticks or do it on their first PlayerMove 💪🏻
does player.haspermission count for permission given by luckperms?
tried this, for some reason JanTuck's answer worked and urs didn't i have no idea why, but it works now! Thank you guys so much<3
ty
Is there any way to cancel receiving an join or leave message only for a specific player?
listen to the join and quit events, they have setters for the message which you can set to null to not send anything
Is it possible to make a boat behave as if it is driving on ice even though it is not? (e.g. on grass)
I don’t think there’s a direct property but you could get the velocity, normalize and then multiply to create a slippy effect
how do i set someones entity_interaction..range attribute to 1
u do /attribute
im coding paper rn tho
?whereami
any possible way to detect player right clicking even if they're not holding anything
player interaction event
yeah lol
interact event does not fire if you right click air without holding anything on either hand
the client does not send any packets in that case
send a video proof pls
wssnt there a right click event on paper or sum
yes but as noted it doesn't fire if the player clicks empty air without holding anything
I'm on my phone lol
sure
yay
I'm not gonna do it anyway
L
is there any way i can give attributes to a player
using the very same old attributes API, yes
i wanna set entity_interaction..range to 1
player.getAttribute, instance.addModifier
I'm sure there's a more detailed guide in the forums somewhere
so its just not possible ?
what's your goal?
what kind of arbitrary right clicks are you trying to detect? for what?
just detect right clicking in air
or at some entity but the entity can be far away too
i need to detect player clicking on another player, i wanted to do Player.getTargetEntity() but it doesnt even exist
wait player interaction event doesnt work for this ?
only if the interacted-with entity/block is within interaction range; otherwise it isn't really an interaction
declaration: package: org.bukkit.event.player, class: PlayerInteractEntityEvent
wonder if this would work
or if there's an item in the player's hand; then it's an interaction with the item
again, right clicking air completely empty handed is undetectable
but still entity doesnt have to be clicked.
ok so its just not possible
tl;dr no
ok solves half your problem possibly 😛
you either need to have something on your hand or have the right clicked entity be within interaction range
no
ok so idk
what to do
might help in why you need this?
idk I tried to ask and got hit with the "I just need to"
lol
if we know what you are doing in practice, we may be able to offer alternative ways of doing it that don't require detecting right clicking empty air without an item in hand
ultimately we don't really care, however without context though in why you are trying to do this limits how we can help.
okay, so just get the instance of clicked player and do something to him
why
what why...
you're just repeating the same thing
what are you trying to achieve
"I want to eat an apple because I want to be in a position of eating an apple, and to get there I need to eat an apple"
yeah ...
that's what you sound like
i said what i want
what does eating the apple achieve
idk
why are you eating the apple
but why
im not eating an apple though
it was an example
you little clown
yeah
I've been turned theist
just want to detect when a pleyer right clicks... so there is no other alternative cause i want to detect right click
there isn't
okay let's just say what you want to do is impossible
that's easier than going in circles
but if you explain what you are trying to achieve there might be a way of doing that that e.g. doesn't involve right clicking at all
like this is already what im tryign to acheive. thsi isnt a way to achieve something else
mkay thanks
for example if it's a shooting range where the player is in a predetermined position, you can spawn an interaction entity in front of them to detect the click
but this assumes certain things about your situation so it might not apply to your case
well so much for helping them
yeah i just wanted to ask if thats possible
and its not so i found a different solution i geuss
more of a citizens question but anyone know why now when using the api it just shows up like this when using chatcolor? (how do I implement chatcolor? this used to work in old versions)
code: CitizensAPI.getNPCRegistry().createNPC(EntityType.PLAYER, ChatColor.DARK_PURPLE + "" + ChatColor.BOLD + "Wizards" + ChatColor.YELLOW + " (beta)");
Citizens uses minimessage nowadays
should work on either platform as long as they shaded in MM/Adventure
though that said, it seems like Citizens's legacy color codes compatibility layer is broken by looking at that screenshot
they convert the legacy codes to MM format properly but it seems that they don't parse the actual string they converted into a component
can I directly put thm into a string or do I have to use MiniMessage.miniMessage().deserialize like in velocity?
like can I literally put in a string whats showing up in the name right now in the screenshot?
yes
ok
wtf
@Override
public void create(Object... args) {
this.glTexture = (GpuTexture)args[0];
this.glUnpackPbo = (GpuBuffer)args[1];
this.level = (Integer)args[2];
this.internalFormat = (TextureFormat)args[3];
this.width = (Integer)args[4];
this.height = (Integer)args[5];
this.border = (Integer)args[6];
this.pixels_buffer_offset = (Long)args[7];
}
why not just expose the parameter types
no f*cks given to compile time type constraints
what are we complaining about now?
looks like the towny permissions system
okay it didnt end up working (looks same as before)... am I doing this right?
i thought you had to decode it first using minimessage like I did when writing velocity plugin but that doesnt seem to work here either
but maybe i just need to add it to maven or something
apart from the horrid §x§r§r§g§g§b§b?
at this point just adopt adventure api with minimessage
i dont understand why spigot is so conservative in this
we had chat components in NMS since like 1.7
its not beta 1.8 anymore
we have minimessage at home (bungee components)
I mean that’s for legacy conversion
joking aside yeah i do think we probably should include adventure or something as part of the api
You can just do ChatColor.of(“#rrggbb”)
paper takes it way too far by deprecating anything that remotely looks like a string, but i think adventure components themselves are fine
LMAO literally
how do you guys load your libby dependencies
mine always take way longer than the server itself to download
i just build fat jars
iirc the libraries system is part of spigot and not paper-exclusive, and iirc it only downloads the library if it isn't found in the local cache, so the impact on startup time should be minimal
but since a lot of my jars end up on velocity as well which for aome reason still doesn't have the libraries system, i usually end up building fat jars
if I'm running a velocity network, how do I send players to a different server through spigot plugin?
ex: they click the GUI and it sends them to the other server
I have tried forcing the /server command but that doesn't seem to work
Well ask on paper discord😊
Tho the bungee plugin channels should still work on velocity iirc
Hey! question is anyone aware of a plugin that allow users to put random items in a chest or NPC at spawn and then sell for a general price of all items place in the chest or gui.
Instead of users having to find random sell shops around the map, they can just go to spawn put the items in and sell their random items in bulk?
Sorry if this isn't the channel for it...
That’d be in #help-server unless u wanna make it urself
its probably because you started with an enum. Add ""+ to the beginning to ensure its a string.
has anyone here tried running a minecraft client - not server, client - on a raspberry pi before?
managed to make decompiled xaero's worldmap rendering to work
still crashes on map switching
probs fixed it i guess, wrong cast
I think you can. Performance probably 💩
i've seen people run pi edition
but that's ancient version of pocket edition
all I would want it to do is install resource packs
so I can skim the logs
and basically run it as a validation server for resource packs
Why on a pi
Yummy
stop trying to eat my hardware
mmmm pi
Ye went fine
Not the greatest fps, but as long as u keep resolution and settings low
hm I might look into it
the only problem is that I'm not sure how useful the startup logs are
since I have no intention of having it actually see something
make it a 1x1 screen
ok I don't get what is going on here
I updated intellij and it comepletely broke git
like
it detects a file has changed but can't figure out what in it changed
I had to do a bunch of juggling to get it to be able to push
it looks like it's just corrupted
damn it yeah I have to nuke every single local project I have
how does this even happen intellij
It broke git or broke intellij’s git ui?
Hello, I have a bungeecord proxy server and 2 servers: lobby, game. I downloaded WorldGuard and created a region. I wanted so when the players will enter the region, the command for example /server lobby will execute and will move the player entering this region to the second server. But it doesn't work as you cannot execute /server lobby, you can only write it yourself and execute it and it will work. Does anybody knows how can I do, so that also for exemple when I write in the console /server lobby (username), it will teleport the player to the lobby server? For now it works only when I write the command myself, but when I insert it in command blocks for example nothing happens, it is a uknown command. Anybody can help with this?
Theres heaps of plugins out there that give a move command for proxies
Just use one of them
I have no clue of what happened to my pc but I have to retire it
the cpu can't keep up with anything
this sucks
can you give some plugin for 1.21.1?
Just google one
is md5 paste down
I get "error adding document" when clicking the add document button
How do I debug
[06:44:23] [PaperSpigot Watchdog Thread/ERROR]: PID: 17 | Suspended: false | Native: false | State: RUNNABLE```
That's a threaddump. Usually caused by a tick taking too long. You can see what each thread is doing
How do I see what the cause was
Something is freaking out my plugin and causes the join method to run multiple times
it should be a lot longer then that
It shows two errors
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: java.lang.Throwable
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at co.aikar.timings.TimingHandler.stopTiming(TimingHandler.java:114)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at org.spigotmc.AntiXray.obfuscateSync(AntiXray.java:103)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at net.minecraft.server.v1_8_R3.PacketPlayOutMapChunk.<init>(PacketPlayOutMapChunk.java:22)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at net.minecraft.server.v1_8_R3.PlayerChunkMap$PlayerChunk.b(PlayerChunkMap.java:425)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at net.minecraft.server.v1_8_R3.PlayerChunkMap.removePlayer(PlayerChunkMap.java:206)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at net.minecraft.server.v1_8_R3.PlayerList.disconnect(PlayerList.java:377)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:875)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at net.minecraft.server.v1_8_R3.PlayerConnection.disconnect(PlayerConnection.java:186)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at org.spigotmc.RestartCommand.restart(RestartCommand.java:58)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at org.spigotmc.RestartCommand.restart(RestartCommand.java:40)
[06:44:23] [PaperSpigot Watchdog Thread/WARN]: at org.spigotmc.WatchdogThread.run(WatchdogThread.java:85)```
PaperSpigot
dang it
is it your plugin doing it?
I have been using my plugin for years without issues, but yesterday and today suddenyl this happened
so its sorta hard to debug with
damn
1.8 aswell
shhh
Do you think the spigot anti xray is causing it
I updated too much at once dang it
Geyser, and ViaVersion
Should've tried one at a time
The only thing I added to my plugin
was in the AsyncPlayerPreLoginEvent I start a MySQL request to see if they are banned
1.8 in massive 25 🥀
I think I caused the problem actually
with my MySQL
I use
public void onAsyncJoinBanned(AsyncPlayerPreLoginEvent event) {
UUID uuid = event.getUniqueId();
MySQL.validateAndHandleBannedUser(uuid, event);
}```
Should my validate method be async or sync
since the event is asycn join already
sync because event is already async
hmm
so then it isnt my code causing the problem
i have it sync already
there is no issue checking each player here against the mysql table and seeing if they are marked as banned right
if not - i gotta dig into the other plugins x_x
public abstract class WorldMap {
public static final String MOD_ID = "xaeroworldmap";
public static boolean loaded = false;
public static WorldMap INSTANCE;
public static int MINIMAP_COMPATIBILITY_VERSION = 26;
public static Logger LOGGER = LogManager.getLogger();
static final String versionID_minecraft = "1.21.5";
private String versionID;
public static int newestUpdateID;
public static boolean isOutdated;
public static String latestVersion;
public static String latestVersionMD5;
public static ClientEvents events;
public static ModClientEvents modEvents;
public static ControlsRegister controlsRegister;
public static WaypointSymbolCreator waypointSymbolCreator;
public static ByteBufferDeallocator bufferDeallocator;
public static TextureUploadBenchmark textureUploadBenchmark;
public static OverlayManager overlayManager;
public static OldFormatSupport oldFormatSupport;
public static PNGExporter pngExporter;
public static TextureUploadPool.Normal normalTextureUploadPool;
public static TextureUploadPool.BranchUpdate branchUpdatePool;
public static TextureUploadPool.BranchUpdate branchUpdateAllocatePool;
public static TextureUploadPool.BranchDownload branchDownloadPool;
public static TextureUploadPool.SubsequentNormal subsequentNormalTextureUploadPool;
public static TextureDirectBufferPool textureDirectBufferPool;
public static MapTilePool tilePool;
public static MapLimiter mapLimiter;
public static UnknownBlockStateCache unknownBlockStateCache;
public static GpuObjectDeleter gpuObjectDeleter;
public static MapRunner mapRunner;
...
bruh
i swear this mod breaks every single principle there is in OOP 😄
peak code
lgtm, ship it
lgtm indeed!
Player#showDialog iirc
I saw someone on forums make a library called unidialog for that, might be worth checking out
can we all agree on standardized coordinate systems for graphics
opengl 0,0 is at the bottom left while vulkan/directx is at top left
bruh they added this??
this is so cool
you can make serverside non item guis now?
myeah
there are also text inputs
so we can finally ditch the anvil/sign gui shit for text inputs
i heard someone said they heard that someone said someone's already made it run doom
this seems sooo powerful for admin management plugins
not exactly sure how they would've rendered it though, maybe with ascii art in a text box
it's a bit rough around the edges and there's some experimentation needed but yeah it can definitely be used to improve the UX in several plugins
mojang really be cooking for the past couple of years
first thing i'll do personally once i update to .7 is probably a dialog based conversation UI for betonquest npcs
trying to do multiple-choice in chat is kind of ass
i dont care about content updates, mojang is literally making minecraft as a game engine for the past couple of years and i love it
that was the plan ever since they rebranded texture packs to resource packs
which was like a million years ago
it's just that they've been slacking off about it for years
yea but since like 1.12 resource packs become more useful
since the custom model data was added etc
i want my fucking synchronized block registry
before it was like at its infancy
remodeling noteblocks for custom blocks is 🤡 and we've been stuck with it for years
but yeah they've definitely been better at it in recent times
more and more things are becoming data driven and synchronized each update
synchronized as in sent to the client from the server as a registry
opengl is an old old api derived from older ones where 3d gaming was not even a thing. OpenGL was for graphing/cad applications as that was really used 3d of anything at the time. So to make things easy with graphing it used the traditional Cartesian coordinate system used in mathematics. DirectX and Vulkan came significantly later and they put their's in the top left because one this is what monitor manufacturers set the native origin to and two in terms of placing graphics like text, most of the world reads left to right top to bottom thus positioning something like text is really easy if origin is in the top left.
if anything the standard is top left and openGL is the outlier here
however in the grand scheme of things origin can be anywhere though and its not hard to flip the matrices to match
i feel like data packs is like becoming more and more like a promised plugin api that they've announced back in like 2013 or smth
maaaybe, i kind of doubt it will ever be as powerful as actual serverside mods, i.e. craftbukkit + plugins
yea, but datapacks are more backwards compatible and less powerful versions of bukkit plugins
well
it has its place; you don't really want to auto-download and install arbitrary source code/binaries on the client when it joins the server
datapacks are nowhere close to plugins
a datapack on the other hand is very limited in its scope and can be safely synchronized to the client
i would say they replace skript plugin's role here
that is a better comparison
datapacks are similar to what you might do with lua but lua is still a bit more powerful then datapacks
what I feel they need to do is standardize datapacks and stop arbitrarily changing stuff up without notice
i find them to be very difficult to get into
especially for new things that the mc wiki people haven't gotten around to documenting yet
right, and that is what I mean about standardizing them. Where Mojang creates a page that documents the stuff etc
not exactly a datapack thing but for the new custom model thing in resource packs i had to go off of some russian reddit post as my only primary source for any useful information
and then not deviate from it unless necessary
for sure
basically one of the only reasons I don't even mess with datapacks XD
its too much for me to go scour the internet to find resources on it
yeah it's just not worth it when compared to the well-documented bukkit api that has been more or less unchanged for a decade and has as many year's worth of forum posts on common questions and pitfalls built up over time
only reason i ever would use datapacks is things the api can't do
and with paper plugins, the number of those things is going down by the year
documentation wise, i think yeah, it could have a better job at it
there's no proper info apart from minecraft.wiki and changelogs
day 5 of recaptcha asking me to click motorcycles and showing me mopeds
simple world generation adjustments are probably the only thing datapacks are uniquely useful currently
the amount of nms hacks the tallnether plugin has to do is insane to achieve what takes probably like 5 lines with a datapack
but if i wanted any large changes to the generator, like wanting something more coherent than just noise biomes, it'd probably still be easier to use an established terrain gen plugin like terra
this is only because its difficult to just hook into the generator that mojang made
that's probably due 50/50 to mojank vs having to have it data-driven from datapacks
the codec spaghetti doesn't really help either
can you actually apply the trident spin animation to mobs or is that a resource pack thing ppl do
it reminds me of modding gta V where if you change a value for fuel, it suddenly changed the gravity values too
gotta adjust it to the added fuel weight 🤷♂️
damn 😂 💀
but that was an example, not sure if actually does that
but like its weird how everything is connected together where changing a value of something changes another thing not even remotely related
which is why modding GTA V is so difficult
drm by obscurity
lol
btw quick question about anti-dupe
There are so many anti-dupe plugins that prevent specific dupes in MC, but what's stopping someone from just assigning a random unoccupied number to each created item (if there's a stack of items store it in a list for each item in the stack so it works when dividing items) that is used as the key to a hash-map containing a struct with which container (player, chest, echest, etc.) the item's in and then stopping the creation of an item if it has the same key in order to stop duping even for unknown exploits.
Is it just the storage & performance cost and the fact that all known regular dupes are already patched and have a much smaller cost to both?
It would definitely have a significant cost, but should also still be handleable.
It's already done by Hypixel for more rare, high worth items, but I haven't really seen its implementation in public plugins beyond item currency plugins.
anti-dupe plugins track specific things that cause the dupe. The reason your method won't necessarily work is because its the server generating the item
which if the server does it, it is basically a legit item and thus you have to at times track what caused it before that happened, not just detecting a new item appeared
just because an item has a specific number attached does not necessarily mean the new item will have the same thing
IE, it isn't necessarily an exact copy per-say at least not all the time, but the base item gets duplicated
but your method does work for about half the dupes though
Yes, ik those cases wouldn't be handled, but typically the items that you want to duplicate are typically ones where you want them to keep their data working anyways
so its better then nothing 😛
the reason hypixel can do what they do is because their server implementation is custom
IE, they don't really need to use reflection to make things happen
where as plugins for spigot, paper or any other would need to
Ones that only dupe the base item should largely be patched and are less common no? Since most modern unpatched exploits work specifically because they're generating 2 exact copies rather than generating another copy of the base
also some dupes which the ones I know of can happen at two completely separate times to make it work
IE, the mule/horse dupe and merchant one. And the teleporting one
Yes, ik I mentioned Hypixel and similar servers doing it
I was just asking why it isn't more common or in more publicly available plugins
Yes, but in that case you'd reference the hashmap and see that it came from a different inventory
Because it's unpractical
with the number of items on a well populated minecraft server it isn't necessarily feasible to assign ids to and track them all
what I meant is you could wait for a server restart
in which case you now have a new hashmap
and attaching unique ids to each item means they won't stack, of course
how do you determine that the hashmap isn't wrong at this point?
You'd probably want to store it and reinitialize the hashmap
2 years later you'll OOM just trying to fit it in memory
lmao
Yeah, you'd have to develop a custom solution for that so that each id gets stored in NBT as part of a list
There are a million ways items can stack
Or fold ids
also the majority of servers don't necessarily have just 1 unique item to ever exist in the server. That is, they allow duplicates of the item.
And track that in a db somewhere
doing this with a plugin is very finicky, error prone (and liable to create rather than stop dupes) and only possible to a certain extent
doing it properly would require patching the server
You're not storing the entire hashmap
Most items just disappear in some random storage somewhere
You'd store them in a database with a cache
Makes sense
you idea is basically just track all items in the server? If that is the case you would need t he plugin to be on there for the creation of the server
yup
you wouldn't be able to introduce the plugin in the middle of a server existing which is problematic in terms of plugins
i do actually do a subset of this on my server, except it's only limited to high-value and naturally unstackable items, like weapons and armor
it's not really to prevent dupes however, but rather to prevent item loss
i can track where each item was last seen
Yeah, best you would be able to do is assign a new UUID as soon as an item without one is interacted with
Which means that already done dupes would still have their full consequences
How exactly would it create dupes? It never creates any items. It only stops the creation or destroys items.
any kind of finicky inventory interaction manipulation is liable to create dupes
getItem() creates an item
also, your idea doesn't stop plugins from making dupes either
Yeah, I mentioned Hypixel being an example of a server that does this for valuable items
Plugins that do it for specific items seem rare though (or at least I haven't found them) which is part of what I'm asking
Yeah, if they duplicated the base item, it'd still work, it'd only stop dupes where NBT is preserved
it's kind of a chore to implement, and like you just mentioned it doesn't cover nearly all the cases, and especially on paper servers, most if not all dupes arise from plugins fumbling shit
in which case there is zero guarantee anything you do will un-fumble it
I always hate trying to stop plugins from making the dupes
most of your inventory plugins or plugins that do stuff with inventories are notorious to cause them
Especially if you delay by a tick
tl;dr it's doable and somewhat useful but not worthwhile for most servers
Aka unpractical
Yeah, but this would at least handle cases where the nbt is duplicated which are most important
ic so it's mostly just the cost to performance, storage, and manpower then
thanks for the info
*and where they don't pull some dumb shit that skips event handlers since that's how we'd be performantly checking things
one super nice thing about it is that i can grab any tracked item from a gui which lists them all, and it'll just disappear from where it was originally and appear on me
but that's kind of a fringe thing to need to do and i can maybe remember doing it maybe thrice
Wait what
yea since everything has an unique id and i can track where it is, i can just joink it from anywhere; even an unloaded chunk
not sure how you are doing it from an unloaded chunk
unless you are loading it and then doing so, otherwise it still exists in the unloaded chunk?
i experimented with loading it and then removing it, but after fiddling around with it some, it didn't really turn out to be necessary; i have it set up so it gets deleted when interacted with
e.g. if it's in a chest and someone opens the chest, it disappears before you even see it
if it's on the ground it despawns when the chunk loads
you can still kind of cheat around it by like equipping it on a zombie, but tackling those edge cases while doable wasn't really worth the effort
well if its a server you are running I suppose its not all that difficult to read from chunks not loaded
personally I have employed external scripts/applications to scan unloaded chunks periodically for issues
not that hard
as I have always said, not everything needs to be done within the server itself
eh, it's not really worth the effort, loading a chunk and taking a look at it is decently cheap in isolation
especially with paper's async chunk loading
for a survival server that has many players this isn't usually ideal
well, let's think about the scale
if you have many, say 30 players, and your view distance is 4
that's very very many chunks, and many chunks being loaded all the time
in comparison, one chunk load is negligible
my maps are usually 10k x 10k minimum
as I said, typically I only scanned the unloaded ones for issues not that it was searching for items in particular
just that if you wanted to use something like that for items in particular not that hard is all
i mean i'm only loading the one specific chunk i know the item to be in already
but yeah if we're scanning the entire world, reading the region file directly makes sense
sigh, one of these days I will complete my mc implementation that truely does load balancing and makes it easier to start up servers for such things
reading the region file directly is something one should strive away from, it makes for brittle code
not sure what you mean
you have to maintain and upkeep it as mojang changes the format and parsing
you'll have to keep track of encoding changes as they happen, it isn't really optimal even if mojang doesn't do it that often
and i think it's still possible to fuck it up in such a way that in-memory changes on the server get lost, at least if you're incompetent
it isn't that hard really. It was to detect issues not fix them right then and there. It would mark chunks that had an issue, assign a severity level. I had a plugin that used this data that depending on severity level if it was high enough would not load the chunk
i vaguely remember having my entire spawn region disappear after installing a chinese view distance extender plugin which read the region files directly...
and then, whenever there was time I employed a different script to fix the bad chunks
even if you're competent, there's no saying as to something you've done being within "specification" yet something mojang decides to change for the in-memory representation and fucking up the world, it is just brittle
thanks
it isn't about it being hard but rather, it being brittle, nobody wants to deal with brittle code
to be fair there are region parsing libraries out there i'm fairly sure
so you could reasonably toss the maintenance responsibility to someone else
the only data I was looking for is certain things that would cause a chunk to not load
which there is only certain specific data that would stop this
last time I checked there weren't any that were actively maintained, but since the format hasn't changed all that much in a while you can make-do with what exists
but I would hardly call it brittle though. Also, I am not in the habit of just arbitrarily updating servers on a whim that are production
if you have a production server then you just have to update in order to not lose players nowadays, that is just how it is
for sure not but every piece of code i need to vet and test for every new version is a piece of code i want someone else to maintain
ok, well I don't operate servers like everyone else
most are kids who rely on the players because they are on a shoe string budget