#help-development
1 messages ยท Page 303 of 1
yes
if it knew the session ids what would be there to block players to make servers to steal accounts?
hi, if a plugin is not open source, i can't uncompile, but can i change jar to zip and edit plugin.yml?
so sessions ids are only obtainable through client-side mods + launchers? thats a relief
idk, try it
I would hope so
Why though?
yes, also iirc theres a file in .minecraft which contains it
sorry i don"t understand
why would you edit the plugin.yml?
u mean the crash report in latest.log?
no, juste an question with a friend we can't agree
no like a permanent place
idk but i remember like a profiles.json thing
it may be the files in .minecraft/profilekeys
that folder is empty, though i wonder what it is XD
its probably cleared when you close minecraft
@chrome beacon sorry for the ping, is there a way of using an artifact in another project without uploading it to anywhere? I'm trying to use a plugin named ModelMaker i created which creates models (without texturepacks) and i want to create a new plugin which uses the model one to make pets out of models.
or anyone else also actually
anyone who could help
you can probably just add a local dependency
sorry but i don't know about this, could you help me?
i just googled it https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-to-a-maven-project
Run maven install
and the first answer adds a dependency from systemPath
That will add it to your local maven repo
Don't depend on the jars if you have the source
okay
also note that i want to upload this to spigot so that you could use them in combo
so that has to work on other computers as well
Spigot doesn't care about your maven setup
well but if i use a path that only works on my pc ๐
Yes, but you wouldn't upload the source to spigot
You'd upload the jar which would work fine
Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project ModelMaker: The packaging for this project did not assign a file to the build artifact
ohh i see
https://paste.md-5.net/ivoqewovik.java
how would i create a method to get the rank of the player in this?
idk
players dont have your rank enum property
so you need some kind of map to store what player has what rank
How can i add WASD control to an entity that has a passenger matching the passenger movement?
How can i add comments to config?
What version are you making your plugin for? And are you planning on resaving your config?
listening to packets and all
are they stored in local files?
1.13
No resaving i think
Then just add the comments to the config that's stored in the jar
okey so i have this piece of code here
public class FishingRegion implements ConfigurationSerializable {
private List<FishingItem> items = new ArrayList<>();
private FishingStage stage;
public FishingRegion(List<FishingItem> _items, boolean _stage) {
if(_items != null){
items = _items;
stage = FishingStage.ON;
}else{
stage = FishingStage.OFF;
}
}
public FishingRegion(){
stage = FishingStage.OFF;
items.add(new FishingItem(new ItemStack(Material.STONE, 1)));
}
public FishingRegion(ConfigurationSection _section){
stage = FishingStage.valueOf(_section.getString("stage"));
System.out.println(_section.get("items"));
}
@Override
public Map<String, Object> serialize() {
Map<String, Object> map = new LinkedHashMap<>();
List<Map<String,Object>> newItems = new ArrayList<>();
for (FishingItem fi : items) {
newItems.add(fi.serialize());
System.out.println(newItems.get(0));
}
map.put("items", newItems);
map.put("stage", stage.toString());
return map;
}
i trying to serialize everything containing it
public class FishingItem implements ConfigurationSerializable {
private ItemStack item;
private List<FishingEnchantCombination> enchantCombinations = new ArrayList<>();
private float minXp = 0;
private float maxXp = 0;
private float dropchance = 0;
private float procentDropChance = 0;
@Override
public Map<String, Object> serialize() {
Map<String, Object> map = new LinkedHashMap<>();
map.put("Item", item.serialize());
map.put("minXp", minXp);
map.put("maxXp", maxXp);
map.put("dropChance", dropchance);
map.put("procentDropChance", procentDropChance);
List<Map<String, Object>> enchantcombis = new ArrayList<>();
for(FishingEnchantCombination combi : enchantCombinations){
enchantcombis.add(combi.serialize());
}
map.put("enchantCombinations", enchantcombis);
return null;
}
public FishingItem(ItemStack item){
System.out.println(item.toString());
this.item = item;
}
this is the item
Okay so for context in the console the null is the whole class after it has ben serialized into a list of map<String, Object>
but when i initialize it it is something but when i serialize it it will show this(the next screenshot i sent lol)
i used yml file with config.set and so on
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
Oh, thanks, i used it wrong
You need to return that map not null
eh it happens
thx tho!
if i may ask why do you have nitro but you have not customized your profile yet nitro has some amazing features right?

That's their customization of choice 
XD
Sorry, should i create my config.yml near plugin.yml, in resources folder?
Yes. Same folder
thanks
does that really matter tho?
Yes
Any non-compilable file you want exported with your project should be under resources, yes
is that a maven thingy?
Yes
or gradle
Both
i did not know that i thought it was just to make it better readable XD
Probably a super dumb question how would I check a players inventory and count how many of a specific item they have
return to an int
Loop the items and count?
wah
?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.
screw kotlin
Kotlins decent
lol
Saw what
decently awful
Why do you think that
he said "says you" after my it looks weird comment
I'm getting the following error in gradle, any ideas?
Error: https://paste.md-5.net/bezuvigono.http
build.gradle: https://paste.md-5.net/mepasakovo.bash
corrupted gradle
and how do I fix that? ๐
you could try to delete the caches
god i hate that format
how? gradlew clean also doesnt work
build {
dependsOn shadowJar
}
?learnscala
you on dinwos

in your explorer
macoS
?learngroovy
C:\Users\%userhome%\.gradle\caches
find the equivalent of that
rm -rf ~/.gradle/ 
the fix was to update the shadowJar plugin, thanks anyway
is it a bug that, as far as i know, all item metas are instanceof Damageable
seems inappropriate
like i justed tested this on lapis lazuli and its damageable
wat
all damageables are itemmetas not the other way around
the javadoc is lying to me then
Probably has to do with legacy support
Try with another item
try with a block item
was lapis known as dye a while ago or did it have its own id
is there a gradle equivalent to the maven exec plugin where can I just throw in a shell script that runs AFTER my build completed?
Looks like you don't need a plugin
that runs before the build completed, doesnt it?
this is intended btw
Damagable is a meme
that's why #hasDamage() exists
i basically just wana start atestserver after building
oh there's a runServer plugin for that
i just foundt hat
thanks but I'm using groovy, not kotlin lol
so no clue what to build in. the build file D:
^ Only runs Paper
was just about to send that
Would be pretty hard doing it any other way, because there would have to be a specific meta implementation for each material otherwise. I think the API for that is actually quite good.
jpenilla has made a load of gradle plguins
i found this https://github.com/jpenilla/special-gradle before
i think its special source
but no paper
for gradle
I want to debug my plugin using intellij and I am following this tutorial method 3 https://www.spigotmc.org/wiki/intellij-debug-your-plugin/, but my plugin doesnt seem to get loaded at all when I start the server
https://github.com/jpenilla/special-gradle/blob/master/test-plugin/build.gradle.kts shouldnt be hard to groovify
are you building to plugins folder
oh oof
that doesnt have bungee support lol
lets groove 
I just wana execute a shell script D:
this or something
yeah but as said, I need itto run AFTER the .jar was built, not before
task.runs/runAfter build
oki thx I'll try
one sec
Waterfall
myPrebuildTask.shouldRunAfter build
if you have a build section
which i hope you do
gradle ๐
shat ap
I need bungeecord
yeah, it's not bungeecord
paper often adds their own bugs
I wanna test it on spigot/bungeecord. e.g. in paper 323 there was a bug sending messages to players, on spigot it worked fine
gradle error: https://paste.md-5.net/edusugolev.cs
gradle file: https://paste.md-5.net/omeqodogot.bash
D:
you have runShellScript which would be the task name in the exec stuff
task runShellScript(type: Exec)
okay I changed build output to plugins folder but now it just creates a production folder with basically my code in it. I am using maven btw, idk if that matters..
and it still doesnt load my plugin even if I restart the debugger
can i disable playerData saving with plugin?
@soft viper Why?
I need the world dir not to change
any idea of how I can make this work with System.in so I can enter commands?
no idea
Just make the world dir read only
https://www.baeldung.com/gradle-command-line-arguments this might help
idk
You should be able to just use normal kotlin code so readLine or smth
he dont use kotlin
my exec thing is just a shell script that runs java -jar bungeecord.jar but it doesnt accept any input
that is infact not kotlin
Is it ok for server core?
Probably maybe
Sounds nice
if you need to pass args that arent changing just i think add it as a new thingin quotes
like commandLine 'bash', 'run.sh', 'args args args'
maybe
I dont wanna pass any args, I want to attach bash's stdin to gradle's stdin
I found the "standardInput" option but I have no clue what the werird syntax is D: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Exec.html#org.gradle.api.tasks.Exec:standardInput
you got any example?
I got silicone lube all over ffs
just opening the old project i had iton
so confused
its gone
that's about the output and I dont really get it. how can a string be an outputstream
magic
also where does "ext" come from o0
Well everything is bytes
so, I have a 1.8 server and I want to adapt it to let 1.5.2 players join. But, I don't want to use protocolLib because I basically want a different UI for 1.5.2
I'm trying to figure out how to intercept outgoing packets and then getting a player's connection and sending a different packet entirely, anyone know how to do this?
I heard on the bukkit forums that I could proxy the packets but I'm sorta dumb so
What's with the influx of weirdos tryna support 1.5.2 lately
eagerlcraft or something probably
Oh what is that some free thing?
mc in browser
I found out that this doesnt work:
but this does work
however intelliJ wants to change it back to tasks.register() which throws the above errors...
i fuckin hate cmi and them changing how commands work
i just wanted to tp to a location and i had to /minecraft:tp x y z
lol
i removing a chunk of the world, do you think removing a million blocks will crash the server
a million should be fine
dedicated ryzen 9 ๐
whats cmi
proprietary essentials
looks pretty sick
it is not
it is bull shit
they have an api but dont host it
the docs are on another staff members github
bruh
it took 13 months for alex to get a response on an issue
the discord is shit
the staff are dumb
they change so much shit that just makes it not a replacement for essx
This is not the channel to shit talk a plugin.
iirc there is no channel for that
?kick @sonic goblet trolling
Done. That felt good.
Hi, how can i get NMS name class of remmaped class ? Like Mob class How can I get the non-remmaped name ?
Screaming sandals
Forget the link I can give it out once I get on my pc but that's the website name
?nms
?nms 1.19 EntityCreature
thank you guys
Hey everyone, quick question, is my statement correct if I say that using
if(Bukkit.getPluginManager().getPlugin("MythicMobs") != null){ is no longer safe? Or never might have been at all.
so basically getPlugin != null will eveluate to true even if the plugin gets disabled for wathever reason
if its null the plugin isnt enable or doesnt exist
Well I found the alternative
Bukkit.getPluginManager().isPluginEnabled("SomePlugin")
Which made me thinking, and it seems at least for now, that != null doesn't work if the plugin gets disabled
Someone reported an error and it seemed that MM was crashing and my plugin was trying to use it's API
JavaPlugin#isEnabled
null is only if it doesn't exist
a plugin isn't null just because it is disabled, which is why the isPluginEnabled() method exists
you should use both checks
first one to see if it even exists, second to check if it does exist is it enabled
so PluginEnabled works, great thanks ๐
Can you explain me how Screaming sandals works ?
For exemple, i'm looking an old video, and the man extends EntityCreature from 1.16_R2
So i'm looking on Screaming sandals and go in 1.16, but I don't see any NMS entityCreature class
does he just mojang mappings or spigot mappings
he's not using mapping, that why i wanted to see what is NMS EntityCreature in mojang remmap
https://nms.screamingsandals.org/1.16.2/net/minecraft/world/entity/index.html doesnt look like the class exists
send the video
can i here ?
yeah
In this episode, I talk about custom mobs in a bit different way. This time we extend the EntityCreature class and not the specific entity! This way we're able to have one class for all the entity types we want to modify :) Please note: The pathfinder goal used for this video was featured in a past episode, it was made for "walking" entities and...
6:30
looks like he probably isnt using the correct stuff
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.
Its for me ?
I'm having a problem that when I call setItem() in BlockDispenseEvent and add meta to the item, the item isn't removed from the Dispenser inventory anymore
I know that but I should see this class on screaming scandal no ?
It only happens with launchable items though
Why Im getting false?
player.sendMessage("is conf?: " + RoleEngine.chars.getConfig().isConfigurationSection("chars. 0-688df4f5-1dd4-3554-bf78-7b490244c6f3.inventory") );
chars:
last-id: 3
0-688df4f5-1dd4-3554-bf78-7b490244c6f3:
name: Marek
secondName: Novรกk
bDay: 02-08-1998
gender: male
health: 20.0
foodLevel: 20
location:
==: org.bukkit.Location
world: world
x: -31.36650962958529
y: 63.0
z: -99.15901686825798
pitch: 43.949226
yaw: -84.2796
inventory:
4:
==: org.bukkit.inventory.ItemStack
v: 3120
type: OAK_PLANKS
amount: 64
probably the space
what space? ๐ Im not sure what do you mean
ou, there is no space. there is variable in my code
I just put the string there to make the code more understandable
anyone know why intellij complains about missing try-with-resources alhough it clearly is inside try-with-resources?
mby bcs Im saving hashMap to yml? ๐ค
public static void saveInventory(Player player) {
HashMap <Integer, ItemStack> inventory = new HashMap <Integer, ItemStack>();
for (int i = 0; i < 36; i++) {
ItemStack item = player.getInventory().getItem(i);
if (item == null) continue;
inventory.put(i, item);
}
RoleEngine.chars.getConfig().set("chars." + activeChar.get(player) + ".inventory", inventory);
}
lol its a side hobby i dont rly play it
i just feel like pushing an old ass version of mc to its limits by basically changing bukkit in its core
i had to screw around with nms so much more than i usually do cuz half the things people take for granted in modern spigot just doesnt exust in such an old version
Isnโt the syntax on the โtryโ line incorrect?
no?
You donโt have an opening curly brace on the end
maybe it wants datasource as another variable
it's complaining about the data source itself
cos you can close that
and you didn't put that in the try with resources
If Iโm developing a plug-in does anyone have tips for testing performance
hm weird, because it doesnt complain about the data source where I declared it
cos technically the try-with-resources is for the getConnection i think
try (var dataSource = plugin.getDataSource();
var connection = dataSource.getConnection();
var statement = connection.createStatement()) {
}``` :v
OH I FINALLY GET TO SEE THE NEW CODE BLOCK COLORS
ye
maybe its complaining about you not having a finally block
that would be the only other thing other then the datasource
is there a way to store permissions to a hashmap?
Map<String, String> first is the identifier, 2nd is the permissison
depends what you mean by this
are you wanting to store permissions that is used for your plugin
ye
even handles dynamic permissions that you don't know before hand ๐
how does the hierarchy thing work? @wet breach
It is an array list
Allows you to loop through the enums as can be seen in one of the methods named hasPerm
Anyone know of any Hologram APIs that already exist that support latest version?
api? decentholograms as a plugin is decent havent checked their api thouh
They also implement the HolographicDisplays API iirc, which is neat
Don't but the statement into a closing block, this will close all connections in the pool (and possibl prevent future ones)
Don't put the statements into a closing block, just doing it for your connections is enough. Closing that one also closes all statements that it has created
I prefer try with resources on connection and PreparedStatement
Why is Player#hidePlayer deprectated
declaration: package: org.bukkit.entity, interface: Player
It's because the normal hide(player) is deprecated. You need to use the hidePlayer(Plugin, Player) now.
this is more or less why try-with-resources even exists lol
it gets compiled into something like
Closeable yourCloseable = null;
try {
yourCloseable = getYourCloseableIdk();
} finally {
if (yourCloseable != null) {
yourCloseable.close();
}
}
Late reply, sorry. Only seeing it now.
It's complaining because HikariDataSource is AutoCloseable, but it's not the one being closed in the try with resources. The Connection is. Though this is your IDE over-warning you imo. Your data source should remain open until you're done with it. That's the whole purpose of that pool
What's Hikari
What's wrong with maintaining one connection
I suppose it clogs up nvm
Would it be worth it for something like sqlite or should you only use it with MySQL since it's not local
i used it with sqlite but frostalf says that its not needed because sqlite doesnt have connection poool
A server I did a plugin for is having data loss with my plugin using sqlite and I'm stumped tbh. I need to ask here tomorrow
Could be my cache maybe. But I doubt it
let me guess, they arent stopping the server they just kill the proccess
It's while it's running interestingly enough
I can't replicate it locally
Just the plugins data folder
I mean I combed the code over and nothing makes sense all my queries are perfect
"uh yeah i decompiled it to change something and i found on google i had to add DROP to the statements"
No the files unchanged I think it's their host personally
I don't see why else it'd fail
probably
I save under every circumstance
deffo there host
Its PebbleHost so never know
Epic you think you could double check with me tomorrow lol I'll send some stuff
I'm in bed so can't tonight
i rarely do sql but ill try
The queries are fine it's a data leak somewhere
you use hikari for it?
Whats the difference even
hikari wraps it probably
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
Yeah, that doesn't work for local files ๐ Remote databases like MySQL though are built to allow multiple connections at once
Having multiple connections at once means you can make multiple queries or execute multiple statements in different parts of your code without having to wait for a connection to be available
Same reason you'd use a thread pool, but for a database. Imagine if every time you ran a task through the BukkitScheduler you would have to wait for like 5 other tasks to complete first?
did item enchantments used to get stored on the item not the meta? im just looking at the itemstack deserialize method and its got a containsKey check for enchantments
No they're just there for convenience
so how come that it checks for enchantments on the actual item
Use ItemMeta where possible though because those methods call getItemMeta() every time which makes a clone
yeah, im just checking how this worked again and spotted it and thought it looked off
Oh I'm lying. It operates on meta directly
Enchants are just part of base item meta is all
ah
All items can be enchanted
is amount part of meta or is amount part of item
It's gotta be part of item otherwise the name ItemStack wouldn't make sense and I'd lose my shit
i just looked at the class
if it wasnt how else would there be a get amount method
Hello So i created a plugin for paper like the so will it work with spigot
like the maven import is of paper
spigot components are only in use
do you use a setMethod or just method
hey there, I am trying to hook placeholderapi but i have couple errors in my pom.xml
I want to say also this is the first time I do it, some help gently?
did you reload maven after adding it
just method
The problem is adding it
you dont use spigot components
do you have the info and need help with where to put it? or do you need the info
No, i think i just did it well, I inserted the file also in the Project Structure (intellij) and it was like you were saying... so I reloaded maven and everything is ok now, It was red before
dont do that
So now basically is possible to use every other placeholder in other plugins also?
that would only work if you use the intellij build system
yeah, but add the repositiory instead of adding the jar that you get
Ok so I have to delete the jar i added? I already pasted repository and depency
Ok bro, thank you so much this community is Epic, let you know about it
Love spigot help-development section guys thank you everybody
So now my question is (i had to create this plugin to check if a placeholder is bigger than another so do this///////)
I suppose i want to do a command it does the check, I can do something like
if (%otherpluginfirstplaceholder < %otherpluginsecondplaceholder) {
ta daaaaaaaaa;
?????
if (PlaceholderAPI.set(Player, "%myPlaceholder1%") > PlaceholderAPI.set(Player, "%myPlaceholder2%") {
do stuff;
}
might need to cast them
I want to specify again i don't have to create my own placeholders i just have to do a check between those with a command
So I'll test this stuff again thank you
just set the placeholder to what placeholder you want to check
that was just an example
perfect, thanks
I have problems with the "Player" you wrote, it says me i have provide a Boolean, not a string so i create another variable type named Player?
the player should be a player instance
if thats on a command cast sender to player
anyone know how to get 'com.github.ProtocolSupport:ProtocolSupport
Nope
mvn install it https://build.hurricanegames.org/job/ProtocolSupport/
Does that webstie work for u
cause it doesnt for me
yeah you just have to pass the safety warning
Closing it shouldnt be a problem in regards to the statements. When you send your query especially if its updating something. Mysql by default has autocommit enabled meaning once you disconnect changes are committed.
Also you should have your method setup in such a way to restablish a valid instance if one is missing
Same with your connection object
Well i mean its the IDE lol
Does Attribute persist through server restart/player leave?
GENERIC_MAX_HEALTH attribute specifically.
Tey it out
Not hard to set attrtibute and then restart
See if its still there
Pretty sure they dont but i dont remember
if i create a file where would its base location be
if its just a new File() in a lib
Where ever that lib is at
so would it just default to the plugins data folde
that makes my life easier
Thank the class loader ๐
Nice, well now you have your answer and everyone else who is reading is now informed lol
yeah, just too lazy to test it xd
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
read up
I told everyone
hello so how can i set the name of a item to be bold and red in color
by changing the displayname?
item.getItemMeta().setDisplayName(ChatColor.RED.toString() + ChatColor.BOLD + "name")
ohh okay
and this wont even work
because getItemMeta always returns a new instance of the itemmeta
so you basically just create a deadstore
also the toString() is probably redundant and/or will break it
You don't need the toString()
ยง ftw
you do
its ChatColor + ChatColor
it wouldnt work
wrong place
ChatColor.Red + (ChatColor.Bold + "name") Works fine.
toString is easier
its not spigot though
?whereami
noooooooooooooooooo
theres were you ask
just say you don't know ๐
we dont support adventure
whats audiences
This is spigot Development. Spigot does not support adventure.
waaaaaaaaaaaaaaaaaaa
adventures way to have a List<Player> pretty much
and whats adventure
have you heard of minimessages
no
its mostly used in paper
Or plugins that implement it directly.
i said it been as their api methods use components not strings so it would be most commonly used in paper plguins
?paste
How can I get the total amount of crafted items result? In the video I crafted 12 sticks but the debug says it's only 4, and this is the code: https://paste.md-5.net/suyifexavu.cs (idk what event is more suitable for it)
I use InventoryClickEvent
store the inventory on the first click, then check it a tick/a few ticks later and check whats changed
check what the craft result was and then see how many was added
on a var
Inventory preCheck = player.getInventory()
then like 5 ticks later loop over there inv again and check the count of the item they crafted
i would say theres a better way but i cant think of it
Right, I'll try your solution.
BlockBreakEvent Gets triggered when a player breaks the block, which event triggers when the block above the broken block gets removed automatically? For ex: Breaking farmland block will also break the seeds planted above it
I dont think it triggers that event
wouldnt that be gravity blocks moving event
@remote swallow works perfectly, thank you so much!
Note block updates trigger block physics event
that does not make sense

if(Bukkit.getBukkitVersion().contains("1.13")) {
// DO SOME THING
}
what about all the other versions
String serverVersionRaw = Bukkit.getBukkitVersion().substring(0, 4);
if (serverVersion >= 1.16) {
// Do something
}
Sorry, read it wrong :p
Hello guys how can i make tnt mechanics like this ? (cubecraft tnt cannon mechanic)
https://www.youtube.com/watch?v=eL0S7P6Qo0w&t=17s&ab_channel=ItsNinjaa
My Last video of 2020 !
I hope you enjoy
โญLinks And Information โญ
๐ฎ IGN : ItsNinjaa
๐ Join Our Discord Server : https://discord.gg/k2bgZQjtc5
โ๏ธ Server ip : play.cubecraft.net
๐ต Song: ETERNUM - Crazy In My Mind (feat. Marina Lin)
๐ Mod : Labymod
โก๏ธ Cubecraft Forum : https://www.cubecraft.net/members/itsninjaa.568199/
๐ Like if You...
I cant make cannons on my 1.11.2 server. I tried it on 1.16.5 still same i cant make tnt cannons.
Yes but first tnt didnt push the other one
or just listening to explode events
its an entity so it should
both would need to be lit for it to work
they might be modifying explode times
sure
they might be changing velocity then
can you show us how you spawn the primedtnt?
iirc you just need to put the tnt closer together
https://www.youtube.com/watch?v=eL0S7P6Qo0w&t=17s&ab_channel=ItsNinjaa i want to make like this
My Last video of 2020 !
I hope you enjoy
โญLinks And Information โญ
๐ฎ IGN : ItsNinjaa
๐ Join Our Discord Server : https://discord.gg/k2bgZQjtc5
โ๏ธ Server ip : play.cubecraft.net
๐ต Song: ETERNUM - Crazy In My Mind (feat. Marina Lin)
๐ Mod : Labymod
โก๏ธ Cubecraft Forum : https://www.cubecraft.net/members/itsninjaa.568199/
๐ Like if You...
hmm nvm, they probably did mess with the explosion velocity
I'm pretty lazy and had to code some explosions recently so I just spawned a big particle and damaged everyone near it lol
Probably scuffed
I think explosion damage is supposed to scale
I have a big problem staff, i buy the plugin 1.8 - 1.19.3 โญ AdvancedEnchantments โญ 450+ Custom Enchants โญCreate Custom Enchantments โ 25% SALE few mounths ago and now i dont have the plugin now on my account what i need to do now? i have a ss whith the payment.
nvm i-m so so sorry
?jd-s
oof try refreshing the page or smth
also i think u can re-download it
i know the javadocs but
@EventHandler
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String args[]) {
List<String> tabCompleteList = new ArrayList<String>();
if (args.length == 0) {
return tabCompleteList;
}
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
tabCompleteList.add("");
return tabCompleteList;
}```
how do i register this?
nvm.
New
Eventhandler what?
hehe what?
@Override
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String args[]) {
if (args.length == 0) return Collections.emptyList();
return List.of("one", "two", "three");
}```
They're learning Java. We just gave them the links
Ah okey
The system out println needs to be inside the method
Well I suppose they wanted you to write
class Someclass {
static void main(String[] args){
System.out.println("Hello Samhero!");
}
}
oh .-.
the italic is the method, and the bold is the code within the method
Hi , i have this peace of code :
https://paste.md-5.net/nodebecexa.java
and i get an error while loading the plugin
Youโll have to listen to each event
Time for some reflection or make your listeners manually
you mean for each perk add A listener right?
like playerDeathEvent .. etc etc?
One way
what is the best way?
Depends on the goal
well register perk events , without over complicting things
and make it readable + performance friendly
Then just make the listeners like normal
@EventHandler
... etc
for each event you need
i know , but would'nt i need to register events for every perk manully?
Yes
oh
it will only register first one
ok.
You can use the same listener for both perks
listens for events in skypvp and if a perk that is registered with that event is called, the perk will be triggered
this is what iam trying to do .. is it possible?
How can I update a lore in gui without closing out? I'm using remove and setting of item and it isn't updating automatically I still have to close out of said gui
You can get the itemstack in a certain slot and set it's lore
Make sure you're calling gui#update();
I suggest you to go to chatgpt to ask the ai for help.
It helps you on development problems, but ai has their downside.
The AI might give you incorrect information / incorrect version code.
It will most likely be due to a player action unless spawn chunks. Why do you ask?
It shouldn't afaik, thats the reason a lot of farms are built in spawn chunks
asked it about that , didn't get any helpful information ..
You asked the wrong question then.
Give us the code thatโs causing the fault and weโll tell you why.
I can't work out why i'm getting recursion when initialising these, the class i'm initialising in isn't initialised in each of these
We won't be able to figure it out either if you don't share your code
Or the error ^
simple stackoverflow
?paste EssenceUpgrading
and Hoe classes
Might as well just send all 3 classes
Yeah sec
might aswell put it in a gist
might as well make it OSS
oss?
Essence Upgrading -> https://paste.md-5.net/edofinulor.java
Look like chunk getting auto load. my plugin removed all loaded chunk by world.unloadChunk() but chunk get loaded again in 2 minute
Now send the UpgradingHandler
bruh
shit lol
open source software
UpgradingHandler -> https://paste.md-5.net/obufenojor.java
now send HoeMenu ๐ช
debugger best thing
HoeMenu -> https://paste.md-5.net/viwusuweqa.java
EnchantProfile
EnchantProfile -> https://paste.md-5.net/quhohoyiwi.cpp
Uh we needed the HoeMenuHandler
HoeMenuHandler? we'll find this eventually
ah
You found?
It's something to do with the 3 upgrading classes
I don't get why tho
instantiating an UpgradingHandler instantiates a HoeMenu which instantiates a HoeMenuHandler which instantiates an UpgradeHandler
ahhhh
alternatively as the stacktrace actually shows and i think we all overlooked
EssenceUpgrading -> UpgradingHandler -> HoeMenu -> HoeMenuHandler -> UpgradingHandler
Yeah I was following it but couldn't see why, thanks for clearing that up mate
np, another set of eyes always helps
Definitely
recently ive actually invested in trying out the rubber duck strategy
only instead of a rubber duck, its a toy donkey kong from a mcdonalds happy meal.
something something explain what you want to happen to a rubber duck (or even a person) and as you start explaining what youre doing, youll see the problem
idk

ahh ahha
expectation vs reality stuff
Well, I'm needing a value from a variable but it's returning 0 and I'm not sure of a working way to get this value from another class, so how could I store the value
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
That's one way of passing it
I'd need to store as primitive though right
Never done di for a int variable damn
Can't lie that ?di link just shows injecting classes not a variable with a value if that can be done?
its the same, only the interpretion is different
Is it spawn chunks?
since with objects you pass the reference
with primitives the actual value
just test a bunch of stuff idk
Do you think you could show me a small example or a link to somewhere? I'm googling but nothing of use is coming up
what do you expect to be different?
Am I overthinking it?
yes

You can even ask chatgpt
This regular expression is looking for text that is enclosed in tags called "rainbow" and has some numbers in between the opening and closing tags. The numbers can be one to three digits long.
Here are a few examples of input that would match this regular expression:
<rainbow255>This text would be colored with a rainbow</rainbow>
<rainbow100>Rainbow text</rainbow>
<rainbow50>This text would have a weaker rainbow effect</rainbow>
The input should start with the opening tag <rainbow, followed by one to three digits from 0 to 9, followed by '>', in between this opening and closing tag we can have any text, and the input should end with the closing tag </rainbow>
It's worth noting that this regular expression will not check if the number inside the opening tag is a valid RGB value or not, it only validate that the input contains the the number with one to three digits in between the rainbow tags.
then ask copilot
Hey, is there a reason why ServiceLoader loads fine in the java main method but on spigot no hope? :/
It feels like spigot is messing with the service loader somewhere or something
what kind of service are you loading
Hello how can i output remmaped file into were I want ?
here my pom, before using remapped plugin i used outputFile from maven compiler shader but now i'm using remap I can't still use it
your AbstractPerk doesn't have a handlerList
private static final HandlerList handlers = new HandlerList();
@Override
public @NotNull HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}```
i need to it there? or on the perks itself?
does it have a getter?
no
should it have one?
still getting the same problem :
?paste
Hello, im basically very new at spigot developement (very new just dont know anything about it), and i would like to know where can i start?
you also need public static void gethandlerlist()
same code without the Handlers ..
nvm
I tend to avoid using static, I only really use it if I need something to be constantly running throughout (like a player count for example) is this correct as I see a ton of people use static all the time
static is used for things that there are only one of, like a constant for example could be static
like my plugin name is a static const
so I can use it in all other classes
@fluid river the thread you pinged me in is for Eclipse? i have IntelliJ installed?
thats the other thing, you can call/get static methods/variables from everywhere
Yeah so what about with maps and array lists, different usage surely because if its static it would be using memory all the time no?
yes
well, there's no big difference
call me for free java lessons
and wb static methods? Similar to variables Im guessing?
it would use memory for the duration of the program from when the class was initialized
wb static?
yes
for jree fava lessons*
its the same thing
cool ๐
yeah by asking where to staart, i meant i know 0 about java and i want to learn coding plugins, so what i do? i already have workspaces setup and stuff
so what do you think ?
static methods are usually helper methods or stuff like singleton constructors
?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.
his is the code .
i was pasting code for my friend
ops sorry xd
hehe
still getting the error :()
because they also dont have object state, a static method is a normal method with no reference to the instance
[Already added this in the AbstarctPerk class]
acctully i added it in the Abstarct didn't work , added it in the perk that extend AbstarctPerk still didn't work ..
You don;t have a handler list nor a getter for it in that paste
that's the old one xd
you just posted it
if have the HandlerList and the getter you will not be getting that error anymore
?paste
Events -> https://paste.md-5.net/uwunobaweh.cs Handler with arraylist -> https://paste.md-5.net/boyehazoyu.cs I've tried just returning the arraylist and also use a contains method neither are working it's just getting stuck... I've literally done this loads of times am I just tired and being stupid or??
so abstractper is an Event?
why is your method starting from uppercase
no constructivity today
just code style shaming
are you talking about me?
sooo ,=,
yes
is the code compiling correctly?
like this error should go away if you have those functions and they are exactly the same as what I have so that should not be the issue
Bukkit.getPluginManager().registerEvents(perkEventHandler,SkyPvP.getInstance());
iam registering packetEventHandler
the event listener is irrelevant to making the event
you just need the methods on the class that extends Event
but i will need to register events twice
why
why don't you use one event to work different perks
whats the class map for
and could use an identityhashmap too
this is inside FireArrow
reflections moment
or an AbstractPerk
if an event gets triggered, it will get the value of the Event class that got triggered
then you can trigger all the list of perks
The list of perks will be triggered because the List of Perks share the same events in the Map.
Map<Class<? extends Event>, List<Perk>>
๐ค
silly question
iam trying to make a great system , not a spaggety system
but what does a perk do in your plugin
my plugin is skypvp plugin , so there is perks
like FireArrow , etc etc
getting double coins
,-,
okay so like powerups
yes
sounds like pay to win
lmao
I would just create a perkevent
iam almost finish it , the perks part is just complex to do the i want it
and have some kind of enum to denote the type of perk
or create a separate event class for each perk
I dont see a need for this Map of classes
hmm alright
like do you want to send multiple perks in one event?
then make the perk itself not the event
but build an event that has a list of perks
well what if 2 or more perks share the same event
well just loop through perks in the event
make event eat list of perks each time
if list is null or size 0 then no perks are involved
eat xd?
Let me fify
and you should use an identityhashmap too
you welcome (thereโs no reason not to in this case)
perk-1 give you Diamond when you kill someone [PlayerDeathEvent]
perk-2 Heal you
just an exmaple ..
oh so a perk is an eventlistener
for example :
this is perk-1
HandleEvent
yes
go back to c# you
already said that
and this is perk-2
well first of all you shouldnt just blindly cast your events
this is not the problem here ..
many things are not the problem but hurt my feelings
Yeah, listening for Event just will not work
sorry to make you see that :L
heeheehee java wtf, can i atleast get a ValueHoldingNode<T>
any other way that i can make an alternative?
You can't listen to Event. You have to listen for one that actually has a handler list
Yeah. Just listening for a PlayerDeathEvent instead ;p
registerEvents(perk-1)
registerEvents(perk-2)
registerEvents(perk-3)
Oh you're passing these through to a class
public class AbstractPerk<E extends Event> { void handle(E instance) {} }
still wondering what you even are trying to do
if it pains u that much, make a master class that just listens to every possible event in the bukkit/spigot api and then just copy/paste HandlePerk() in all of the voids
The only problem with this is that this pigeonholes you into a perk that only acts on a single event
i think i will just do @EventHandler .. inside the perk that extend AbstarctPerk ..
worked for me , but i wanted to make better system
why is that not a good system
bcz i dont want to do this :
why not having one event handler and you just pass the event to the right perk instances?
You don't have to do that either?
is there alternative?
Just use the registerEvents method
and it will detect the event listeners for you
Yeah nvm I can't read
atleast one thing we have in common
Run the register events in the constructor or make a register method
(in your perk)
I'm not sure what the problem you're having is
why plugin dont be loaded?
i do have a register / create method :
can I process a chunk snapshot async?
this is inside PerkManager class .
Yes. As long as you create the snapshot sync
Oh thanks
that's wonderful
In this case, why do I get ConcurrentModificationException, I mean this codes doesn't change the iterated list, also sometimes works, some times no
We need more info
ok
We need more info*
Do I have to paste?
