#help-development
1 messages · Page 821 of 1
100% sure? open it with any zip tool
But actually it cannot be generated in the folder of the server
yes but thsi is ancient code he's decompiled and is updating
?paste your Configuration class
I created proxy and when i connect player to the server i put inside LoginRequest these data
Kazaruma:fd516454-89e9-435d-a163-2a8cbea8f145
Server respond me with this data in LoginSucess packet
Kazaruma:b164e9fa-de12-391f-91e9-24ce1ecfc512
Any ideas why that happen? UUID that starts with "fd" is my online-mode UUID
ok, scrap that whole class
Oh fuck 🥲
@Override
public void onEnable() {
saveDefaultConfig();
...```
then anywhere that accesses the config you use Plugin#getConfig()...
hey elgar do u know how to design software?
yes
ye so issue
@eternal oxide So, ```@Override
public void onEnable() {
saveDefaultConfig();
...
map = new LeafMap();
getCommand("leavesreload").setExecutor(new CommandExecutor());``` ?
if you need to access the config in LeafMap you do java map = new LeafMap(this);and add a constructor to the LeafMap class to pass JavaPlugin
delete the ...
it just means continues, more etc
im trying to write a library to make the event passthrough easier -I need that for some plugins im working on
what i basically need is a starting point on how to design it
My idea is to have some sort of interface in the library that other plugins extend and register with the library
but i absolutely do not know how to structure it
mojang is going to drive me crazy
public MapColor getMapColor(BlockGetter level, BlockPos pos) {
return this.mapColor;
}
``` behold the method with two parameters that uses exactly 0! of them
lol
this leaves making the API interestingly annoying. I feel obligated to use a Location paramater in the method, but it does fucking nothing!!!
getMapColor(null, null)
😮💨 the issue with that is what is mojang does something down the line with those two weird ass params
then the API breaks
if you are doing a pure Lib then events shoudl be upto the plugin to handle, unless you go the route more like Vault
Sure it's not overriden
idk feels weird to me, but if ur okay with just going null, null on it I'll go for it
Are you sure there aren't blocks that override it
line 38 of LeafTypesjava ConfigurationSection section = Leaves.getInstance().getConfig().getConfigurationSection("colors");
the problem im having is that the passthrough is basically an interface with empty methods on all events
I opened my project that's just raw NMS and IntelliJ couldn't find anything overriding it. Though weirdly enough every reference inputs a non null value for the BlockGetter and BlockPos which makes me nervous for the future
seems like they may have plans or something?
events then call that empty method
Cannot resolve ConfigurationSection
Need import ?
I'd like to handle it in a way that's more like actual event handlers
yes
if that makes sense
if I were you I'd just plug in to the Bukkit event bus
simplest and all plugins already implement it
I don't know about it.
u mean me or him
server running a remapped jar
as you are not remapping you can;t run against a remapped jar
thats what maven and specialsource does
all teh translations for you
I can't use a spigot basic server?
not unless you remap
Ahh so I need Maven to remap?
?nms maven+specialsource
maven will be included with your ide
Oh fuck 😢
I wanted to avoid Meaven lol
I need to delete all librairi on the project two no?
Which IDE, I'm guessing InteliJ as you decompiled into it
Yes InteliJ
I don;t know InteliJ enough to tell you have to auto convert
Weird way to call it lol why do you want to avoid maven?
I don't know, I like the basic artifac build
Ah ant build system
I came from Eclipse at the time aha. Maven is very useful for using open source projects
Maven is useful for many kinds of projects including non open source ones
But as a result I have never converted a project to Maven. Where can we find this?
I use Eclipse due to light memory footprint and personal preference.
probably somewhere in teh File menu
You can just look at some open source projects to see how the directories are setup and the pom
I've already seen several
You will have to slightly alter your src directory as ant and maven dont quite use the same
elgar, my question?
that was to you
your lib shoudl be as simple to use for everyone
so don;t go making your own event system
you could have yoru own event registry if you want
but fire it all through the bukkit event bus
I don'y have framework on the list
right click project name
there shoudl be an option in the menu to add a framework
that opens a window and should have maven and gradle
unless it is already mavenized and you just don;t use it
does your project have a pom.xml in its root?
Yeah that tells me a few more things, but no trace in the right click
No Pom.xml
It's very strange
I see video and he have add framework
I remember seeing somewhere ages ago that INteliJ may not offer the maven framework if it's never had a maven project before
create an empty new maven project
you can throw it away after
see if you then can add the framework to your plugin
just change version info for the correct one
implementation group: 'net.sf.jopt-simple', name: 'jopt-simple', version: '4.7'
Ok get it
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.pom
- https://oss.sonatype.org/content/repositories/central/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.pom
- https://repo.codemc.io/repository/nms/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
how do i fix this?
what repo do i need to link for it?
central
How could I go about using a new line? I tried using \n a while ago and it kept printing stacktraces
Specifically: discord webhook
Or maybe this isnt the right place to ask
wdym
hello
hi
who has experience with anti-cheat?
not me
same
ask your question
ahh
i don't know which anticheat should i buy
there's two
Adavnced AntiCheat (AAC)
or
Verus
hm, brute force might work here. how expensive are event/method calls?
like just the call itself
now i get this error
mojang has these at their libraries.minecraft.net repo pretty sure
whats that's url?
://
:/
:@
uhh
you need to fix any access to the config
Leaves.getInstance().getConfig()...
Hum, but where 🫣
LeafTypes.java:69
The plugin already used Leaves.getInstance().getLogger() or getConfig
not quite, it used to use Leaves.getInstance().getConfiguration()...
LeafTypes 69 is not config
oh elgar u still here
found a way to describe my issue better
ohg
net.minecraft.world.level.block.Block block = CraftMagicNumbers.getBlock(material);
MapColor mc = block.defaultMapColor();
return Color.fromRGB(mc.col);
} <- 69
}```
:/
did you remove all libs from teh project, like spigot jar?
and depend on spigot in your pom?
Normally yes
?paste your pom
looks good
the problem im having is that i want to tie specific things to specific players, and most of those things trigger off events
as a result of that the different 'interactions' need different evenets
if i were to do the events normally, i would have to register the event classes every time i instantiate the interactions, per player, which sounds... bad, and de-registering is probably similarly annoying
thats why i originally did the passthrough in the first place, to not have to do so much event stuff. I can just collect all instances in one large arraylist and every time an event happens tell each interaction instance 'hey this event happened'
are you running maven package in teh maven window?
Yes
Maven window -> lifecycles -> ...
Afterwards, he gave me 4 plugins, which one can I use?
the one with the shortest name
I have
Leaves-1.0-SNAPSHOT-remapped-obf
Leaves-1.0-SNAPSHOT-remapped
original-Leaves-1.0-SNAPSHOT
Leaves-1.0-SNAPSHOT
I use the last
yep
try {
getSource().save(getFile());
} catch (IOException e) {
e.printStackTrace();
}
}```
He say problem here
i need to write getConfig().save?
yes, no getSource
no fiel or anything
just Leaves.getInstance().getConfig().save();
cannot methode save
is this chat english only? I might be able to help since we're both french
(also hello ElgarL)
if language is being a barrier ofc
Leaves.getInstance().saveConfig()
huh?
dms are fine, but i believe english is enforced here
alright
Je veux bien x)
Viens mp
Anyone got an idea why I keep getting yeeted off the resources publication page whenever spigot decides to save my draft?
Whenever I stop typing I get yeeted off and lose my progress
If its working now you still have to set the particle color
u recon this'd work @eternal oxide ?
you can just make each listener track progress of each player?
Reminds me of my quests system
wym
You can for example have each listener with a Collection<UUID> availablePlayers
and do stuff
And given you just standardize it, will work
hm thats a good point, it'd get rid of the 'one instance per player' part
theres like a nagging part in my mind thats like 'isnt there an issue with this' tho
Seems fine to me
whats O of collection.contains again
What collection
Depends
HashSet is O(1)
Shouldn't be that big of a worry if you're only storing 0-200 values
true that
it causes worries when you're storing like 10 billion
We love Hashsets
HasSets only trash if u got lots of collisions
do you has set
Which shouldn't happen given you use a good hashing algo
i didnt do anything yet
im trying to figure out how to structure it so its less shit than usual
i def cant use enums here
Not with that attitude!
When do we get 64 bit hashcode
Neverrrrr
That'd be fucking crazy though
You'd need what 2 billion element array xD
No 9 quadrillion element array lmao
Imagine
Muh ram
I thought it was like 5 quintillion
It was either 9 quadrillion or 9 quintillion
can i get that in petabytes
9 quintillion
Ig it'd be unsigned for a hash set tho :<
18 quintillion it is
9 quintillion petabytes
Epic make us a 64 bit hashset
Okay how about a 32bit hashset
next year too
8 bit hashset
oh i just remembered i wanted to ask this
is there a way to force the JVM to compile? to not have JIT nonsense while profiling?
Why 💀 wtf cursed shit are you doing
testing if hashset really is O(1) if i put 50M values in it
eh, i was mostly joking anyway. I'm not looking for it for a speciffic purpose
In which case it's O(n) n being the size of the linked list
just to actually know how to do it
I mean, it's amortized O(1), not "always" O(1), and it depends on the quality of your hashing function
and you can't test it by just having 50M elements
i only have so much memory lol
I always use
'1' as my hash function
HashSets are just glorified LinkedLists 💪🏻
I just assign every instance an incrementing hash value
Pray theirs not to many objects created
@eternal oxide We managed to resolve all the console bugs at startup but there is a problem
There is this error when reloading the plugin.
Hey if it overflows that just means we see collisions then
It’s the perfect algorithm for minimal collisions
if(this.players == null || this.players.length == 0)
return;
final Random r = ThreadLocalRandom.current();
for(LeafSpot s : this.spots) {
if(r.nextInt(100) > plantChance)
continue;
this.world.spawnParticle(Particle.FALLING_DUST, s.getX() + r.nextFloat(), s.getY(), s.getZ() + r.nextFloat(), 1); <- This Line (Line 93)
}
}``` Error is this line
my professor taught us another way to do HashSets it was kinda fucking cursed. What you do essentially is if theirs a collission just go to the next spot 💀
I think I'd only ever need to use that if I was working on a computer with like 2KB of ram
what is the error
where can i find comissions?
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
what's better: Storing a hashset of player UUID or storing the currrent player object itself? Reference gets null'd/cleard on leave
i specifically need to access the player object in my code for the rest
iirc thats how IdentityHashMap deals with it
afaik it starts keeping a sort of linked list of elements whose hashes collide
oh and if it implements Comparable it will actually be a binary tree
which is pretty nice tbh
How can I get the meta of the item attached to the fishing hook?
You can't directly, but you can use FishHook#getShooter() to get the ProjectileSource that cast the line, check if it's a LivingEntity, get the item in its main hand
If the main hand is empty or not a fishing rod, the item in the off hand
@worldly ingot do you think MD would accept a PR around the new Tick stuff. I know he has always been cautious about exposing that stuff in the past and I don't want to waste my time wrapping this stuff if it'll be denied
I mean if it's a server feature then it's a server feature
Seems reasonable to expose some tick management stuff. No ticking events still though imo
Can you write an example? I've tried so many times and I'm almost giving up now...pls
I wouldn't agree with that either tbh
but that's not really something in scope of this PR anyways
just kinda exposing the stuff the tick command can do
I mean I wrote it in English how exactly you'd go about doing it, but sure :p
public static ItemStack getFishingRod(FishHook hook) {
if (!(hook.getShooter() instanceof LivingEntity entity)) {
return null;
}
EquipmentSlot hand = EquipmentSlot.HAND;
EntityEquipment equipment = entity.getEquipment();
ItemStack itemStack = equipment.getItem(hand);
if (itemStack.getType() != Material.FISHING_ROD) {
itemStack = equipment.getItem(hand = EquipmentSlot.OFF_HAND);
}
return (itemStack.getType() == Material.FISHING_ROD) ? itemStack : null;
}```
Does it need to be static?
I wrote it kind of in a weird way here but this way gives you access to the EquipmentSlot hand if you wanted to return it in some POJO object
No :p It could be private and non-static if you really wanted. I have zero context so I wrote it as a utility function
Ah
i got a question, why people use Interfaces to represent like players and stuff like that?
Bukkit Player is an interface
LuckPerms is an interface
my question is
how tf they create an instance of that?
bukkit is to seperate api v impl, for luckperms its probably so they have the methods that are on all platforms while having the seperate impl classes that make it work with the platform
eg bukkit has Player in bukkit and CraftPlayer in craftbukkit and craftbukkit contains the impl
hmm
yeah i dont understand to be honest
i think i'll still use normal Classes for players
You don't always need an interface but if you find yourself copy/pasting similar methods between two classes that are somewhat related, perfect opportunity for an interface
Most common example is List which is an interface. You never create instances of it, but you use it all the time
You create instances of ArrayList
oh
so
lemme think
i can do like
EnderchestPlusPlayer implements Player cause
well
its a player
or is a bad idea
public List<String> getAList() {
return new ArrayList<>();
}```
Now apply that same concept to Bukkit
```java
public Player getPlayer() {
return new CraftPlayer();
}```
ITS A TERRIBLE IDEA
i would avoid implementing any bukkit classes
Yeah, if it's a Bukkit interface, unless explicitly stated otherwise, don't implement it :p
yea
the only class that should should ever really extended is bukkit runnable
and it didnt even finish impelment methods
i understand
but for that i'll need an interface and a class and well, i just need UUID and a Enderchest
so i guess its not the appropiate
Yeah you're probably fine with just a regular ole class
thanks
how do i shade a dep?
Maven or Gradle?
nvm figured i all out
I mean you could implement the player interface and proxy method calls to an underlying player object (which stems from Bukkit.getPlayer), you would need to ensure if the player is still valid
But that's a lot of work for when you could just do yourEnderchestPlayer.getPlayer(). ...
?tas
Depends on java security
also any1 know what I did wrong for it to not work?
Did you register it?
I forgor
No usages in class
bro do "§c" not ChatColor
that works?
yes
That is nty
hi , iam working on new system which is favorites maps :
in mysql should be :
- uuid : map1
- uuid: map2
but its weird .. its only saving 1 map only
show code
Problems with math, what's wrong?
Shouldn't it be Math.sin(Math.toDegrees(cannonPitch))
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
and this is the gui :
https://pastebin.com/8JWtRZN5
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Cannon Pitch - angle, why convert them to degrees again
Fair enough
why u have two try except in createNewUser?
u can do one
that didn't change anything , i change it few minutes ago
yk how intellij idea can be sometimes
i think its because u use insert statement, not update
wait, what value should be passed to sin()? radians or angles?
u should use update statement if u already have data in db
so what iw ant it to looks like is :
:
uuid : map-1
uuid : map-2
another uuid: map3
alr thanks let me try it out
well i use update iam not using insert ?
where are you talking about exactly?
u need to check if this any info in db
if yes than use update statement
if db is empty than use insert statement
it sasve only 1 string in database , it should save them one after another
like : uuid , map1 , uuid , map2 etc etc
How do I handle the command logic and tab completer in an organised way for a large command like this? Will the brigadier/lamp api make this easy?
claim
- permissions
- create
- <newConfigName>
- delete
- [configName]
- edit
- [configName]
- name
- <newConfigName>
- icon
- scope
- everyone
- [permission]
- <player | nation | nation_rank>
- add
- <newTargetName>
- remove
- [targetName]
- permission
- [targetName]
- <permission>
- <true | false | unset>
How is inventory.first(ItemStack item) implemented? Does it have some optimized searth algorythm or it just iterates over all slots as usual? I mean, maybe it has some cache or smth like that
Seems like api doesn't contain the implementation
Is it possible to rename a horse's gui?
so it should be adding a second line :
uuid : sw [the other map name i added to the favorite Set<String>
if a user goes from the overworld to the nether, will his pdc be different?
show code
If I give two items of the same type different lore, will they be unstackable?
yes
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
yes
you can only stack items with the exact same nbt data iirc
That's good for me
which means you could probably give each unique item some own nbt tag and make the max stack size for all things 1
why u send this code if this part not contains sql?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
this one .
send class where u use this methods
for loading / saving :
for example :
so it works just fine if i just in the server and select them , they works just fine in the gui they show
but if i leave [ which will result in saving them into database ] , it will only save one..
at first i recommend u use try except for automatically close statement
ur function createNewUser should add new unique uuid?
or it can be two equal uuid but with different maps?
as i understand swUser.favorites() return list or array with different maps for one player
the last thing you said
and it should be a set , so it won't duplicate maps name
when u creating table u set uuid to primary key
this is before i log out , after i clicked on the maps i want to add as favorite
so it cannot be only one unique uuid in table
oh that's why!
yeah
can't i have something like this :
uuid : map1,map2,map3,map4
1 2 3 4 ... 100111...
and then deserlize it ?
and make this new column id primary
alright thanks
That would be slower
because u will have many tables, dont think it good idea
what is faster in your opinon?
Databases are specifically made to handle large amounts of data
You don't have to worry about storing multiple rows for favorites
If you only need to store this data, you can use yml
Well I this seems like some minigame thing
So it might need to be synced between servers
yes indded , its for my custom skywars gamemode plugin
how would I make my code not have the return statement without it giving an error?
like I want it to void
oh thanks
that indicates what that function returns
hahahaha
?
you are fun
how
use lombook
is more simple
- code = + readable
lombok literally makes your code incomprehensible to anyone that doesn't use it
emmm... nope
that's a fact
what if I've never used or seen lombok, but used java, how am I gonna read your code then
not to mention it's an awful compiler hack
your IDE can already generate getters and setters for you
You see the annotations and then maybe put 1 and 1 together what it does
I mean, your IDE will literally not work unless you install a fucking plugin 
there is also ✨ records ✨
All my homies hate lombok
or not, because it's taught that annotation processors are not able to change existing code
I hate lombok
just wanted to be sure I was part of that list 

annotation processors are capable of changing code
I be teaching my uni classmates that barely know what an enum is how to use lombok
THEY DONT KNOW ME SON
it really depends at what part of the process your processor acts on
A smart move for sure 
We love the "I have 0 idea what the fuck is going on" developers
not directly
there is no rules in what annotation processors can or can't do
the api doesn't provide means to touch the ast
this is why annotation processors can act before, during and after compile time as well as at runtime
take lombok for example. It acts at compile time and adds code
I dont understand from docs what IronGolem.setLeashHolder(Entity e) does
Could any1 explain what that does in-game
as I said, there is no rules really in regards to annotation processors. If you want to base an annotation processor on what the JDK API provides the sure, however processors are not required to use the JDK api nor are they limited to said api exception being if its a processor that acts at runtime but even then it still depends as you could technically use native code. It really depends on what exactly the processor is for or what it is suppose to do
i presume the same as any other entity ?
if you put a leash on an iron golem, you are its leash holder
why when I create an error in the config (for example, I delete a value from a key) the log does not display this but shows the default value of the key after a reboot, although the key is empty in the config
deleting a value from a key doesn't necessarily create an error
Oh I get it now, didn't know leashes were in 1.8.9
as for showing default value, have to keep in mind that it depends at what time. The config stored is not necessarily the same as what is in memory
I have a special handler for empty values, but for some reason the value is not empty, judging by the logs, but has a default value
well we have no code to look at, but not sure how your handler works either because yaml spec says anything null should be removed
logs are not going to help with this either all that much especially if you are trying to change the behavior in how snakeyaml works
you will need to provide your own output or debug messages as most like to call it
to understand where and what everything is doing or not doing
here handler - https://paste.md-5.net/zuyapodobe.rb
defMaterial = null
not much to really look at here
When I load a value from a key in the config, the value should be null, but when I display the value, it shows the default value as if I hadn't touched the config.
values in plugin and config do not match plugin lives its own life lol
value empty but in plugion not
well again not much code to look at
are you caching anything?
are you using statics?
if you use statics you may encounter some issues
no use
how to apply model data to an item?
itemStack.getItemMeta.setCustomModelData();
Don't forget that get item meta returns a copy
i think plugin regen value to the default value when accessing its key if it is empty
Is there an event for when an item is destroyed by fire/lava? If not how would I go about detecting it
I only know that the damage entity event fires when items get hurt
item or block
Besides when void moment
yea void doesnt fire ANY events
Void being ass
EntityDamageEvent i gess
Items are technically entities 🙂
Why "technically"
because they are not normal entities
they are entities
Well, entities are anything that is an entity
Items are too, and they behave like entities, almost
they inherit the entity interface so they entity
You mean implement?
one of few entities that can merge with another
yea
Well, that's just entity-specific mechanics
anyways, as I said they are not a normal entity like other things classed as an entity lol
like zombi or skelet
All entities have their own mechanics, their own AI, etc.
By the way, has anyone thought about adding AI to mobs to make it very hardcore?
normal AI
self-learning
You mean making mobs extra smart?
yea
if that is how you want to look at it. Items are unique is all.
i was try but this but it's harder than I thought
Making AIs work is hard
Can you give items zombie AI?
no
Why no
they don't have pathfinding, goals or ai
i gess you not can "create new entity"
while you can make your own custom stuff, it doesn't mean the server implements it
Who told you I'll use spigot/bukkit
the server has a certain set of data that cannot be changed
modify the kernel?
I guess but I was going by mc/spigot code related things. Like yes they are an entity but they are also not treated as an entity
Kernel? Do you want me to go modify the memory state of my computer to change minecraft or what 💀
server kernel
translate error dem
You mean the core/software
yes
Time to run buildtools, make a patch and get AI'd items
I was wondering if it is possible to add something new via bukkit api if you hack the client during the game and modify the client and server. 🤣
frostalf Do you know mc code or bukkit code
both
Changing the game that is loaded into ram at runtume
Cool
bukkit api has nothing to do with the client
How would I go about doing this https://pastebin.com/M0PRDJiX
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I think he wants to inject some block into the registry and then hack into the computer of the client and change the client to have that block too
So how's that beautiful code in minecraft?
I looked through mc code before, fucky shit
extrime code yee
But everything besides rendering is simple
I've been writing plugins for a long time, but I haven't read other people's code to the fullest extent Who knows how not to faint in the process of learning the code?
but yeah items are weird since they justt don't behave like most of the other entities in the game. For example, items can't suffocate. They don't collide with other entities except for boats for some reason. If an item gets trapped in blocks they just fly out of them. Items have health but you can't attack them directly and neither can mobs. With the exception of Nether Stars, items despawn. Items that merge together the timer gets reset to which ever item had the highest time left. Also, items merging doesn't cause a death event or despawn either when technically this is what happens when an item merges with another.
arrow can't suffocate either too
Projectiles behave similarly to items, more similar to items than to other entities atleast
Hi, any idea why this doesn't work?
public void LaunchProjectile (ProjectileLaunchEvent e){
ProjectileSource Shooter = e.getEntity().getShooter();
Projectile p = e.getEntity();
if(p instanceof Fireball){
if(Shooter instanceof Ghast){
Ghast g = (Ghast) Shooter;
LargeFireball ball = (LargeFireball) p;
if(g.getName().contains("Distorted")){
ItemStack fb = ball.getDisplayItem();
ItemMeta meta = fb.getItemMeta();
meta.setCustomModelData(1);
p.setGlowing(true);
fb.setItemMeta(meta);
}
}
}
}
@worldly ingot spam (check logs)
Hope he goes to the shadow realm
I see you like to ignore the rules
?services also
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
@ancient plank
Man how dumb are people
@tender forge we have a rule breaker 😦
Can't even discuss minecrafts core mechanics with frostalf without a spammer
@ancient plank
Ah, how beautiful
@worldly ingot
Came to discuss some stuff and figured I'd take a laugh first
My guy
What if we report him
Done. That felt good.
L
Some fucking people, man
thanks choco
thanks
Thanks
?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 saw his messages getting deleted earlier and I was like "Oh okay, sure, someone's giving him a chance. That's fine". Then he doubled down -,-
xD
he was deleting his own messages
Ah
sup nerds
i think cafebabe was doing something too
Well I saw them 
Sup
He also had his dms closed lmao
or discord
Currently trying to figure out xenforo 2 stuff lol
Is that some web dev stuff that I'm too backend to understand?
personally i dont delete messages, i just remove them
Fair
technically XF is all back end if you self-host since it's php 😆
No, the item don't change its meta.
It still looks the same
Still webdev haha
Best of luck 🙂
it's fucking pain
currently trying to figure out how tf they handle upload attachments & shit
Why? Are you rewriting xenforo to make Spigot more customizable?
trying to make an addon, which scans attachments on upload 😆
ahem-ahem everybody here please take a pitstop at this thread ahem-ahem https://www.spigotmc.org/threads/how-do-you-approach-updating-configurations.628552/
Oooooooooo
Going a step further with your antimalware
can't do that if you can't hijack the upload code lmfao
xD
there is already php addons that help with this
xf2 is made with php, so really not much to the mod
the actual brunt of the work would be the php lib/addon
yea but the code is all over the place, so I can't find what's needed kek
so if I can just modify a premade addon that's even better
well if you can find the right addon with php you wouldn't need a xf2 mod
as it would be built into php
actually, I think there is even an apache mod that does this too
so no php stuff needed
I need to send the attachment to a web server, and then either delete the resource shove it to the moderation queue, or approve the resource which means XF2 addon
uh....by the time xf2 gets it, its been sent to the webserver
given it's purely xenforo interactions
like webserver gets the info before php ever does
okay and? it can still not be saved, or pushed to the queue, or approved and made public
still gotta do it through the XF2 api so it doesn't get messed up
you don't need php if the webserver can handle it automatically
I'm not looking to outright block or delete files lol
I would
why waste resources when you can just delete from the start if its not wanted
I'm not. Not every logged file is malicious, so it has to be shoved into the queue to be looked at and I'd prefer it be the XF queue to keep things organized
and it also means I don't have to fuck with things more than I have too, especially if a logged file is a false-positive. All I'd have to do is accept it within the resource queue and call it a day
a question. I created files with snakeyaml, how can i make a command like "/bb reload" and the files will be reloaded on the game?
what I also wish for @wet breach is a job that would let me just burn enough money to purchase everything like that one person lmao
I'd easily be able to find everything I need, probably
oh wait. I think I found one I can modify lol
@wet breach Found this https://xenforo.com/community/resources/jazzaaf-xenantivirus.7341/
I'll just base my own addon of that
Description:
This add-on will check new attachments for viruses and malware code using Virustotal.com's api.
Features:
Disable new attachments until marked clean. (on/off)
Exclude File Types.
Exclude User Groups.
Use in Private Conversations...
nice
Yea. I'd use it as is, but fuck virus total KEK
not sure if it'll work on the latest version either 😆
not pushed to queue though. That's annoying
hmm, how tf do I make patches for spigot
spigot or cb/bukkit?
Just modify the vanilla classes and then run makepatches
?
uses cron. not ideal since I want it to be on resource upload, but it's better than nothing atm
I might sound stupid (because I am) but how do I get the classes
what do you mean?
o.O
from the work/decompile-xxxxx for the versions bt
hmmm
someone know a good world preloading plugin 1.8?
the vanilla classes already added are in src/main/java/net/minecraft
just so you know, not all vanilla classes are used, so depending on what you are trying to do you may need to include the vanilla class you need
ones not used are left in the minecraft.jar
and that gets shaded into spigot
so if there is something you need from there, you need to move it to spigot
or CB
ApplyPatches will get you all the nms files we already modify
If you want a new one then yeah, grab it from that folder
well, maybe I should've choosen mcp or mixins for what I'm doing lol
well what are you doing
modifying... minecraft
what modifications
you can change the despawn timer with api iirc
if you need to modify item stuff you would need mixins bc adding new items to spigot wouldnt work because of registry sync
What exactly do you want to do
if (armorStand.getEquipment().getHelmet().getType().equals(Material.AIR)){
player.sendMessage("as");
armorStand.remove();
}```
why its not working
I don’t need this anymore
It’s 1 or close to it
Anyone know a good algorithm for modeling the movement of a block through 3d space in a parabola and tracking whether it has collided with something yet?
which of those is possible, and if both are, which should i use?
- Using reflection to see if a class has a specific annotation, then call the method with that annotation if possible
- Use reflection to see if a method is 'not empty', with the intent of making a placeholder interface with all the methods, then calling the methods, if overwritten
The idea is to, when the object is instantiated, register it to a handler which scans the class for which methods in it should be called and when
I'd prefer option 2
maybe a combination of both
(I'd like to avoid doing reflection method calls)
you trying to do the same thing as bukkit event api
What do you mean by checking if method is "not empty"?
1 is basically the event api
abstract superclass placeholder methods
why i can't kill a baby invisible armorstand on dismount
should I make this async or does it not really matter
Always make IO operations async
In my opinion
If you can do an I/O operation async, do it
Writing to disk is always x100 times slower than anything else
Regardless of the processor you have, how many cores, clock speed
The disk is always slow, even if its SSD, for the processor, the disk speed is as slow as a snail
Damn dude wtf did the disk do to you calm down
No reason to be such an asshole about it though like what if the disk sees
How do you think it'll feel
100% of depressed disks go untreated and eventually can't take it anymore and experience data loss
That's not my fault, is the process, the process of life
My disk is faster than my ram
Impossible (literally)
You somehow are using your disk as RAM, or you live in a future in where the disks are as fasts a RAM (which again, it's impossible)
Everything is possible if you believe
Nah
Yes it is
A disk will never be faster than RAM
Mostly because the disk have more much space
I made my own ram sticks
rate my wallpaper guys
10/10
It's bad
It points to the keyboard distribution
(i made it)
i will make one for you
that looks like a really bad way to handle saving
how
Looks like a basic setup anybody inexperienced in such things would do
It's not flexible, it's static, you can also use a print writer instead
That's because the lambda, which is the actual method that is ran doesn't throw IOException like your parent method
pls try (Writer writer = new FileWriter(...)) {}
Also, call me crazy, but I always use FileInput/OutputStreams
10/10
i rate 9/11
NIc


im going to post the windows 12 wallpaper on general
Let's say that you have two platforms, one in top of other
-
[main]
-
[platform 1]
Let's call them "main platform" and "platform 1"
Now, you put a person on the "platform 1"
-
[main]
-
[platform 1]
Now, the platform 1 is under the main platform, meaning if the main platform dissapears, the platform 1 dissappears too, but there's still a person on platform 1.
What I'm trying to say is that, your method throws the IOException, which does it on the main thread, meanwile the rest of your code is in another thread, so it don't really reaches the main thread.
What asynchronous do is just executes code from a different thread, this obviously means that you can't for example, expect an asynchronous code called from a function, return a value on that function, because they are on sepparate platforms, the same applies for exceptions
Sorry for pasting again, I notice I didn't replied to the message
Completely not spam
🗿
DON'T
¯_(ツ)_/¯
i guess if it only saves every 10 minutes and the json isnt too big having it on the main thread wont be too bad
Trust me
Do not do I/O operations synchronous
Even if it's a file of 1 byte
It's better to do it asynchronous
k so I do it async but I put try and catch
Yes
Unless your whole program literally only does one thing and that is one single I/O operation
Why would you make a program that only does I/O operations? ☠️
why? Good question
You can wrap the try/catch with multiple exceptions
try {
//Your amazing code
} catch (Exception1 | Exception2 | Exception3 allExceptions) {
}
oh by the way, not doing io operations async is fine if it's on onDisable
i dont even think you're allowed to schedule tasks on plugin disable
its every 10 mins
then yeah its fine
I would also put the whole code inside the try, instead of trying for each part of the code that requires it
You aren't
I tried
You can create a Thread btw 💀
Create a silent process that slowly eats the server RAM
Lol
Unless GC arrives
ok its still asking for the trycatch for some reason
Just pretend it's doing useful things
i haves teeny question, if you retexture a snowball or egg and throw it does it keep its texture while thrown
You forgot to do the catch (IOException) thing
You just put catch
Oh yeah, please gc, do not remove my integer which I am incrementing each second, I swear I will need it in the future
Just write a condition that will happen in 7 quintillion years
And use the integer
The JVM be like "Oh, this task is scheduled for 7 quintillions years, better I be on and ready for when that happens"
Lol
also what will we do in 2038 when we run out of integers?
use longs
Then we will create longlong
Then intlonglong
Then longintlonglong
100b years
What you could do is make a class that can store itself and make like 50 instances which points to an instance which points to an instance and like at some point make it point back to the first one, clone it and push it into a list of lists of lists that will be used in 7.4 quintillion years
lmao
public class Clazz {
private final Clazz clazz;
public Clazz(Clazz clazz) {
this.clazz = clazz
}
}
Completely not Overflow exception
Btw. anyone knows how I'm supposed to specify the result in a SmithingTrimRecipe? As it lets you specify the armor trim (template), the base item and the addition but not the result
I think it's because that is handled by the game (maybe)? Or you will have to use NMS
whats the difference between Clazz and Class<? extends something> ?
Clazz does not exists, and is isually a variable name used to refference a class
Class<?> clazz = Class.class
that'd be it
Because you cannot use class as a variable name
ye point
is <? extends class> a good hashMap key?
Because keyword moment
Depends
could be, but I don't understand why they would then have this recipe in the first place
Developers when trying to name things
Maybe if they add a new pattern in the future, it will be easier
If there's a recipe object other than implementing code for each pattern
u dont want to know lol
maybe
I didn't know what to name the variable. a
I mean, if you are doing something like
Map<String, Class<? extends Something>> jarClassesWichExtendsMyImplementation = new HashMap<>();
Then you are good
Obviously a number
key, not value
Then it's not a map
str1 and str2
It's a set
Its often preferred to sometimes use Type instead of Class when having it in a Map
and then you go back and forth casting
why would <? extends class> as key turn a map into a set
what?
You said keys no values
that AS KEY
huh
A set of Legos
awdawdj
im still trying to figure out how to do my event passthrough
A Set<E> is just a Map<E,Boolean>
Just do Class<?> or as Conclube said Type
wholeheartedly agree
I got nervous
someone help my intellij project is broke
Cannot load settings from file 'C:\Users\Vasir\Desktop\Intellij projects\mana-core-bukkit\.idea\modules.xml': Illegal character (NULL, unicode 0) encountered: not valid in any content at [row,col {unknown-source}]: [1,2] File content will be recreated
where is .idea folder ?
what do they mean by "the holder"?
Or did u yeet that with the invalidation of caches?
this is createInventory btw
no
looks like you have a file full of null bytes
Usually refers to if a block entity (or some other inventory holder subtype) is the owner of said inventory or not
U got the code on git? Else rip I think :|
actually i open my java file in folder (without intellij)
also does the 1st slot of an inventory have ID 0 or 1?
Thats… interesting
yep
(Stole it from paper just… dont tell them :>)
35 to 103 that's quite the jump they made
Yeah in chest it starts from 0 also iirc
where is 36-99?
btw i got this warning last times
Call to 'printStackTrace()' should probably be replaced with more robust logging
pST is bad ?
despawned
Ehm well… its not inherently bad
but the warning just encourages you to use a logger framework or to properly recover from the exception in some other way
hi, how to fix this problem?
I started getting this error for no reason when I upgraded my system to win 11. Code remained the same. Someone know how to fix?
de.tr7zw:item-nbt-api:jar:2.12.1 was not found in https://jitpack.io during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of jitpack.io has elapsed or updates are forced
stop being null
I don't even use item-nbt-api
where are the other like 50 numbers lmao
can i assume Class<? extends Event> would be fine too?
How can I teleport a boat with a player inside?
also can I still use the Player object after the player disconnects?
for example player.getName()
or na
OfflinePlayer should be safer
No, the object becomes null once the player leaves.
Rip
Use OfflinePlayer ^^
Bukkit.getOfflinePlayer(player.uuid)
ok what do I do here then
I want it to still work after they disconnect, but also get the location
save the location of the player beforehand
^
ok something like this then
yea
I'm a little surprised there isn't a #getLastLocation() for OfflinePlayer by now. Maybe a PR for another day.
yeah i had to double-check too
coll was working on something but never got around to polishing it
couldnt someone make an API to go into the player.dat file and grab it?
why not just use PlayerDisconnectEvent and get the logout location from there
Hmm, might pick it up if he doesn't update it. Just have to find his original one though.
Also still have to find a place to live first, but you know.
nah cus I want the location from when the command was run, what im making is a reports system for staff and they can see the report description and location where the command was run
yeah you should probably work on that one first
yeah then just pass in the location as an arg
is there an updated full event list?
declaration: package: org.bukkit.event
When I create a SmithingTransformRecipe it works, but for some reason the item meta isn't being applied on the result item. But the item itself has all the meta, ut just not if it's the recipe result. Anyone knows how to fix this?
does a \n specifically need to be encased in " " or no?
For an item lore in this case
well, if you type it in your ide without "" you'll see if it errors or no
Depends on where it's being used.
item lore
ItemLore is a list
Itemlore does not work with \n
rip
this, lines are different entries
Config structure for item lore isn't all that bad either. Makes it easier to read in most cases too.
so if you want to have multiple lines, do it like this: kt val lines: MutableList<String> = mutableListOf() lines.add("hello world") lines.add("this is line 2")
item_lore:
- "Line 1"
- "Line 2"
- "Line 3"
don't confuse the java beginners with kotlang
theres no big diff in this code
literally impossible to read
i literally dont care
klingon language
uh I made this now how do I use it? ReportMenu.openChestMenu or openChestMenu seem to not exist
specifically: different class
you need to do it on an instance of the enclosing class
Technically no because records are immutable (although they never use setName(), so moot point)
you need to learn more java like atleast do a non spigot project and learn some basic things about classes