#help-development
1 messages Β· Page 982 of 1
nice grammar
ty i'm not a native
π
lol how you do that
bruh all of this for just modifying 2 lines of code
nice vencord
not vencord
it is better discord
gmt-5?
why TabCompleteEvent not working ?
?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.
anybody know tutorials on how to use offline manager api
i'm going back to my geometry homework have fun coding yall
i tried to use tabcompleter and i did this not worked
@EventHandler
public void onTab(TabCompleteEvent e) {
e.getCompletions().clear();
e.setCancelled(true);
e.getSender().sendMessage("test");
}```
ok I did it, now how do I add it to the project? it doesnt specify
what is offline manager api ?
you don't. running buildtools adds a specific version of nms to your local .m2 repository, and now you can use nms for that version in your local projects
but have joined
ok
so can i get offline player heads ? without be steve with this api
yeah
uh sure
btw this guys don't support offline π
hey i have a problem, i create a world with WorldCreator but when i restart my server, the world folder exist but the server say the world didn't exist. any idea why?
what is worldcreator ?
can i create worldgen
with this ?
ye
no
thats mods
i just know you can create world
probably no
it makes another world kinda like bungeecord
so u can have multiple minigames
you'll need to hook into the bukkit world generation for that and create your own generator or modify an existing one iirc, don't ask me, i've never done it
help mee π₯²
custom blocks are just not possible altogether unless you're doing hacky shit
you provide no details
?nocode
Itβs hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
?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.
aight
create an item block and just change texture
but thats too much work
just download fabric π
first of all i don't see any worldcreator usage
second of all
?whereami
remember that Paper is not maintened by Spigot community
but really i'm sorry but i don't understand why the world folder exist and the server dont detect the world
your code is being run on paper software
we cannot guarantee that the behavior is identical
i didn't know that...
please ask this in the paper discord or run this on spigot
.
okay i'm very sorry ...
dw
noteblocks
hacky shit
eh ig
an actual custom block will not just hijack legitimate block states
why dont use custom models data?
dont exist on blocks
idrk
just use mods at thsi point
agree
minecraft limitation
right thanks kebbil
eh theres a lot of fun in swimming up the waterfall
but is it worth it
yeah
aight whatever floats ur boat
fellow speedcuber?
π u really looked at that
i don't cube much nowadays too bc exams
peak ~20
like i said I had a dogwater cube
i average 13 and pb is 7.71 and i am too lazy to even learn coll
and skills
i only know like 10-15 cases
oh dang
i learnt like 2 look at 45
anyway i'll proceed with my geometry hw so you have fun
that's decent
oh i have the same hw too
lol
not related to coding itself but what platforms do you use for personal project managing? Meaning by managing to centralize all the project documentation, tasks tables, flow or usage diagrams, screens in case it has and many other things a project can have. I seen most people use Jira, but i would like to know what alternatives have you used and your opinion if there is no problem
btw i've developed a mobile app for algorithm learning as a school project so if you want you can download it, the algorithms are updated dynamically (pulled from a db) so you won't need to update the app everytime to fetch new ones, it's inspired by speedcubedb so there's also a rating system. it's called cubinghub and it's on google play store and is also open source
Can someone help me with this? I'm trying to create a snowman but Snowman.class is giving an error in my IDE ```
package org.timothy.more_mobs.commands;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.entity.Snowman;
import java.util.Objects;
import java.util.logging.Level;
import java.util.logging.Logger;
public class SnowGolem implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player)) return false;
Player player = (Player)sender;
Logger logger = Bukkit.getLogger();
if (args.length == 1) {
if (Objects.equals(args[0], "snow_golem")) {
Snowman snowman = player.getWorld().spawnEntity(player.getLocation(), Snowman.class);
}
}
return true;
}
}
i use clickup to manage my stuff
oh dang
u used android studio ?
zbll allows to solve from any oll that has a cross
coll allows to bring any oll that has a cross to an edge-swap pll
yep
learnt a shit ton of new stuff with this project
dangg, i was just reading about Clickup and seen it really intuitive to use. What was your xp?
well i am not a superuser i just use it to manage my todos tbh lmao
in that regard it is quite intuitive yes
i mostly enjoy its tags system
th eonly thing ive been programming lately is just robots π
that is not bad either
oh right, i was planning to start using it to manage a "big project" for the momment as personal, but in future maybe has collaborators
because i find i do things better if i do all the documentation, tables of tasks, features, etc before coding it. My knowledges works better when i do that strict type of organization
How many algos it has π
a bit under 500
i'll be adding it to cubinghub next
Can anyone explain what benefit components bring, I sincerely don't get it. Literally the same thing as NBT with the only difference that it breaks everything
Performance
Also options for data driven stuffs
e.g.?
How? They are being treated exactly the same in the server code
It's not even that the parsing is any faster, it still uses NBT for some entries
Pretty sure it was before that already (maybe not on client idk). And if it wasn't, they could've just used NBT tags as well
And ya, it effectively gets transformed to NBT back and vice versa
well
think of it that way, before, whenever an item had to read something from its NBT it had to basically just go through a map-like structure. Think your YamlConfiguration.
now it parses it all at the start into nice java representations with proper methods etc.
I understand, but they could've accomplished the same with NBT. They literally use nbt for some of their tags
which means it can use these values a lot more efficiently. Which is why you can now have things like max stack size or whatever defined in there
Well, they could have stuck with SNBT format but given the entire rest changes you'd still need to adopt it
this way it at least errors nicely
the entire rest changes
You mean the values that the tags themselves represent? They are already breaking them with basically any update
I think there are like 3 different tags to display a Display Name between versions 1.8 and 1.20, lol
Yea, but that was in small increments
this would have broken everything anyway
even if they stuck to the SNBT format
which would have also been annoying for tab completion tbh
e.g. now brigadier can tell you if a component value is valid
The new tab completion is actually cool, but they probably could have accomplished the same with SNBT. I always thought that components were the new SNBT, but they are just wrapping them, and the parts where you still have to use SNBT don't get autocompleted. Ipo they create more confusion than they actually benefit
So in conclusion mojang did all this mess with different tags just because of 5mb better in cpu, ram and disk?
Well no
As Coll said, this is also terribly important for down the line data driven stuff
because now you bind features of items to components instead of their type
i mean i dont understad the why of all this mess
e.g. the food properties
the concept of "food" is now not bound to the ItemType of food
its bound to the food item component
doing the same in a NBT map would be absolutely horrible performance and data validation wise
I mean, that's just the internal part. They could have accomplished the same while sticking to the same format
Oh, yea I guess
frontent wise they could have
But like, they have been sticking to their new naming convention for a while
a good amount of stuff changed too, just in format
if there was a release to move this to a format they like more, it is now 
is it possible to make a textdisplay visible from both sides, not just 1?
That's what I mean. I'd be cool if they broke them for your given reason, but the new format that still persists of the "old" format is just confusing lol
Welllll
yea
With some of the things I 100% agree
the command syntax is a bit tricky
Anyways, I have found a way to convert the legacy NBTs over to the new components. Not sure whether it's worth contributing that as a neat helper method to Spigot
idk why plugins would care 
It's pain if you are trying to support versions starting from 1.8.8 (yes I understand you shouldn't)π I am using this so that I don't have to re-do all configurations for the newer versions
But why would a plugin be running commands o.O
It's for parsing items within config files, I support NBT there
ah
can someone help me underestand plugins?
To make the moving as fluent as possible, I am storing the original nbt string within a component (as it's not possible to encode to the legacy nbt format) and re-use it whenever the item gets serialized (e.g. when an update changes the config files). Probably more hassle than it's worth, considering that I doubt many other plugins are going to do that. But it'll at least make the debuggin for me a lot easier, as I jump between versions a lot
Pluginsin general or??
bump
plugin developement like:
working with API's
Setting up an project
since i can learn java easily
i just have problems with API's n stuff
make it follow you
thats not what you want?
then just create another text display rotated 90* On the X Axis
If you're working with Intellij Idea, theres a plugin called 'Minecraft Development', you when installed, click new Project, then select you version and fill in the rest of the stuff, then you have a project, with the api
what i mean about API is like [Citizens API]
Read there docs
their
Citizens has an extensive API for working with NPCs. Make sure you always are using an up-to-date build of the CitizensAPI to ensure that your plugin works with the latest release of Citizens.
what error
gradle is just broken
gradle is indeed better
Could not install [womp womp link]
Gradle is better
Please send the actual error
^
k lemme open up Itel
i want to add a community note to this
lol
wdym?
you know twitter x community notes
its still Twitter π€
x*
cuz its called twitter.com
fr
no embed π
ok thanks
@stoic tapir Got the error for us?
.-.
i have created a custom yaml file but i want to write to it
unless
like this
Suffix : [Template Plugin]
display.setText(message);
display.setInterpolationDelay(-1);
display.setInterpolationDuration(0);
display.setLineWidth(lineWidth);
display.setBackgroundColor(backgroundColor);```
its still visible from 1 direction, i didnt include the scale part because i use scale to modify the size of the text display
?paste
which event is called when I'm taking fall damage? I might be wrong but an EntityDamageByBlockEvent doesn't seem to trigger
EntityDamageEvent
is tehre a way to easily distinguish that from an entityDamageByEntity event though? I have that one too but they must not both execute from the same type of damage
Check the cause
I am having an issue building with Maven against the newest (1.20.5) NMS version. I downloaded Java 21 from Azul, java --version confirms that. I ran buildtools (--rev 1.20.5 --remapped) and it shows up in IntelliJ (IntelliJ IDEA 2023.2.6) just fine. I have a multi-module project (different NMS/java versions per module), and I set the Java version for the latest module to 1.20.5 in Module settings. Nonetheless, when I try to Maven build, it throws hundreds of errors, along the line of "cannot find symbol", "package does not exist" or "cannot access". I am using Apple Silicon btw. Does anyone recognise this/know how to fix this?
can I just cast it to an EntityDamageByEntity event then if I have determined that that is the case?
I need the damager
and like to avoid having two events do basically the same thing
?paste
Hey, how can i check if the server is 1.16 or above?
Is this a great way of doing it?
if (Double.parseDouble(Bukkit.getVersion()) <= 1.16) {
//code
}```
bump
I believe so, yes
https://paste.md-5.net/oyugogodov.java
im getting cannot reslove this symbol 'plugin" from line getServer().getPluginManager().registerEvents(new PaintballEventListener(plugin), this);
if you are in main class just do "this"
(there is no plugin variable)
and take away the (plugin) or replace it with this
replace
alright ill try that
Why are you even passing plugin into an event??
does this work?
afaik it isnt pure numbers
customConfig.set(Constants.YAML.SUFFIX_KEY,Constants.DEFAULT_SUFFIX); is this fine for setting up yaml file
Expected 2 arguments but found 1 i recive that error after replacing plugin with this
public static String getServerVersion() {
String version = Bukkit.getServer().getBukkitVersion();
if (version.contains("-")) {
return version.substring(0, version.indexOf('-'));
}
return version;
}
Tis what I use, not 100% sure how backwards compatible it is tho
what does this return?
a number
i mean yea
A string
ie "1.20.4"
so if the tring is that one
it will return 1.16?
I haven't used the substring method so yea
?tas
okay okay
So... How would I check if an item can actually receive damage?
if (!(itemMeta instanceof Damageable damageable))
return;
System.out.println(itemStack.getType().name() + " is damageable!");
Because this code will ouput STICK is damageable!
Testing this on 1.20.5, which has the new Component system
There's Material#getMaxDurability
Is there some documentation for this?
Looks like you just use damagable and hasDamage
This is only a check: if Damageable#getDamage > 0
Hmmmm, seems like spigot's api only has the FoodComponent so far π
What about hasMaxDamage
?paste
How did I not see that before? π€
Gonna test this, thanks ^^
im getting this error when creating a YAML file
custom configuration
i followed the page on the forums
The error does say what the issue is
Nevermind... Whatever that is for, it's not working π
nyone know hwo to fix this?
yeah
Start by reading it
and then give us more information on how you tried to include the file
Yeee, got confused and put it into the wrong method π
bump
STICK has max damage? false
WOODEN_PICKAXE has max damage? false
Hmmmm π
It might only apply to items with the custom components
Idk how the default damagable items work with it
Well, for now, I'll do this:
if (craftedItem.getType().getMaxDurability() <= 0 && !damageable.hasMaxDamage())
return;
https://paste.md-5.net/itobofodor.bash
--MY ERROR --
https://paste.md-5.net/uguqehabem.java
--MY CODE--
I need help with creating and loading config files in a folder right now it makes my folder but not the file... ive just been following the wiki in the forums as of now...
Copy pasting the same question over and over again
and then ignoring the response isn't going to help
?paste
https://paste.md-5.net/mihesonoka.java
im trying to get it where when a player gets hit by the arrow they will get teleported out of the game and have the bow and arrows cleaerd from thier inventory but non of this is working when i go and test it by shooting an arrow in the sky and letting it hit me
did u register ur listners
um
this.getServer().getPluginManager().registerEvents(new PlayerJoin(), this);
replace PlayerJoin() with ur class name
alr thanks ill try that
put it in onenable
in ur main file
PaintballEventListener(param a, param b)
its better to make getMethods instead of constructors its a whole lot easier for me
some people call it getters
hm ill have to look into that. im still training myself π
aight have a good day
bump

do they support 0 width? does an equivelant /summon work as expected in vanilla?
and name, tooltip, enchantment glint, fire resistant, max stack size, rarity, amplifier....I think everything except tool.....
how can i add a list of string in my code like this
config.set("test", <list>)
uhh wdym
im trying to make a textdisplay above a players head that can be seen from all directions
is that setBillboard or whatever?
doesnt that just anchor it where it is?
it makes it turn towards each player
oh
which sounds like what you mean by all directions
something like that
are the breaking nms changes to component, and etc also in spigot
or is it only a paper thing
do brewing stands have any API for recipes or something similar?
I doubt paper just hard forked either
NMS is not API
No they're hard coded
lol
Well, in the past spigot retained the old NMS packet class names
for whatever reason
Class names
that's the reason behind the question
and the packets that mojang then removed spigot also removed
but the class names is a different case
i am talking of class names
a class name change is a breaking change also
whatever man
yes but that wasn't a mojang change
just events. Would be a good one to add. I think it's a bit easier now, although there's a lot of "types" of recipes - base recipes, mixing recipes, recipes that produce a container (like splash potion)
this may be a dumb question, but is there any way to tell a potion has been amplified/upgraded? I see API for org.bukkit.potion.PotionType#isUpgradeable and org.bukkit.potion.PotionType#isExtendable, but I'm not seeing anything along the lines of isUpgraded/isStrong or isExtended/isLong? I know you could infer this from the name of the PotionType, but are there any other indicators? Trying to have some compatibility with older versions that are missing those PotionType entries that have the Long and Strong as part of their name
Hope this question makes sense π«‘
don't think so
it was t00thpick1, who I think was mcmmo at the time, who added this API
ask him π
what are you trying to do?
t00thpick1 took a permanent vacation from Minecraft dev last time I checked
mostly mcMMO had some logic to increase XP gained if the potion was long/strong
was trying to figure out how to do that in a way that'd be compatible with 1.20.5 and versions before it
given there's no association between the different effects aside from name, any implementation would just do startswith(long/strong)
for strong ones I think they all have a higher amplifier, but that would deem turtle master as strong
I see, so I might need to manually create a table of what their amplifiers are at "normal" levels, and consider anything above that to be strong
I'd probably go the startsWith approach tbh
Ah I'm probably misunderstanding something then, would that be a startsWith on the PotionType enum? or some other value?
oh wait couldn't I just checked the namespaced key?
yes
is it possible to add offset to a passenger entity? like have an armorstand act as a passenger but 3 blocks above the players head for example?
thanks for the help π«‘
?nms
Hello, I create an expansion for Placeholder api for create a custom placeholder to use in TAB. Idk why it doesn't work.
Here's my plugin:
public class CustomPlaceHolder extends JavaPlugin implements Listener {
private HashMap<String, Boolean> presidentiOnline = new HashMap<>();
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
new PresidentePlaceholderExpansion().register();
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
if (player.hasPermission("group.presidente")) {
presidentiOnline.put(player.getName(), true);
}
}
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
Player player = event.getPlayer();
if (player.hasPermission("group.presidente")) {
presidentiOnline.remove(player.getName());
}
}
public int getPresidentiOnlineCount() {
return (int) presidentiOnline.values().stream().filter(value -> value).count();
}
public class PresidentePlaceholderExpansion extends PlaceholderExpansion {
@Override
public boolean canRegister(){
return true;
}
@Override
public String getAuthor(){
return "mjicio";
}
@Override
public String getIdentifier(){
return "presidente_count";
}
@Override
public String getVersion(){
return "1.0.0";
}
@Override
public String onPlaceholderRequest(Player player, String identifier){
if(identifier.equals("player_presidente_count")){
return String.valueOf(getPresidentiOnlineCount());
}
return null;
}
}
}```
the placeholder request identifier doesnt hav get identifier removed
soo, how can I fix it?
Trying once more as the previous one got buried: I am having an issue building with Maven against the newest (1.20.5) NMS version. I downloaded Java 21 from Azul, java --version confirms that. I ran buildtools (--rev 1.20.5 --remapped) and it shows up in IntelliJ (IntelliJ IDEA 2023.2.6) just fine. I have a multi-module project (different NMS/java versions per module), and I set the Java version for the latest module to 1.20.5 in Module settings. Nonetheless, when I try to Maven build, it throws hundreds of errors, along the line of "cannot find symbol", "package does not exist" or "cannot access". I am using Apple Silicon btw. Does anyone recognise this/know how to fix this?
make sure you update your package lines
the package changes with every minecraft release
idk this might not be your error but
you'd have to provide more if that doesn't help
?nocode
Itβs hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
if(commandSender.isOp()){
commandSender.sendMessage(getPrefix()+"Starting reload please stand by...");
main.reloadConfiguration();
main.reloadConfig();
commandSender.sendMessage(getPrefix()+"Reload Successful!");
}else{
commandSender.sendMessage(getPrefix()+"You do not have permission to run this command!");
}
return true;
}
this.getCommand("tellme").setExecutor(new Say());
this.getCommand("reloadtp").setExecutor(new Reloadtp());
you don't use / in console commands
you can;t set two executors for the same command
theyre diffrent?
oh I see
tellme:
description: says whatever you tell it to
usage: /<command> <the thing you want the server to tell you>
reloadtp:
description: reloads this plugins configuration (PERMISSIONS --> OP)
usage: /<command>
?paste
you can not extend JavaPlugin in more than one class
only one class extends javaplugin
but I do use Main main = new Main();
im guessing thats the problem
then you can not do new YourPlugin
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
aight i did the constructer thingy
Main m;
public Reloadtp(Main main){
m=main;
}
aight should this work
i tried it
and it gave me error
it should work, so long as you passed (this)
this.getCommand("reloadtp").setExecutor(new Reloadtp(this));
yep
you can not instance Main
There will only ever be one instance of Main and thats created by Spigot
interesting
why do they call it di
Dependency Injection
just call it constructer
You are referring to the Constructor of an Object, the action of passing a dependency is DI
oh i c
Does anyone have any experience with a PDC not being "persistent". I'm setting a value in a chest's pdc and the value is correct when I check the same instant I set it, but its gone when I check it later
can we see your code
The reason I didn't give code initially is because I have a PDC manager class, fyi I know PersistentDataType.BOOLEAN exists but I was ruling that out as an issue atm
This prints true: ```java
PersistentDataManager.set("is-rpg-chest", chest, PersistentDataType.STRING, "true");
RPGFeatures.sendConsole(Component.text( PersistentDataManager.get("is-rpg-chest", chest, PersistentDataType.STRING, "false")));
Then a little bit later this prints false:
```java
RPGFeatures.sendConsole(Component.text(PersistentDataManager.get("is-rpg-chest", chest, PersistentDataType.STRING, "false")));
why arent you using NamespacedKey?
I am, its managed within the pdc manager
oh wait this is very unclear i realized mb
lemme give more context
show PersistentDataManager class
yueah
public class PersistentDataManager {
public static <T> T get(String id, PersistentDataHolder holder, PersistentDataType<T, T> dataType, T defaultVal) {
PersistentDataContainer pdc = holder.getPersistentDataContainer();
NamespacedKey key = NamespacedKeyManager.getKey(id);
if (!pdc.has(key))
pdc.set(key, dataType, defaultVal);
return pdc.get(key, dataType);
}
public static <T extends Integer> T get(String id, PersistentDataHolder holder, PersistentDataType<T, T> dataType, T defaultVal) {
PersistentDataContainer pdc = holder.getPersistentDataContainer();
NamespacedKey key = NamespacedKeyManager.getKey(id);
if (!pdc.has(key))
pdc.set(key, dataType, defaultVal);
return pdc.get(key, dataType);
}
public static <T> boolean has(String id, PersistentDataHolder holder) {
PersistentDataContainer pdc = holder.getPersistentDataContainer();
NamespacedKey key = NamespacedKeyManager.getKey(id);
return pdc.has(key);
}
public static <T> void set(String id, PersistentDataHolder holder, PersistentDataType<T, T> dataType, T val) {
PersistentDataContainer pdc = holder.getPersistentDataContainer();
NamespacedKey key = NamespacedKeyManager.getKey(id);
pdc.set(key, dataType, val);
}
}
I can put that in a pastecode thing if its easier to read
Did you update the BlockState after you applied the key to the persistent data container?
I believe you need to do that for block states
here is the NamespacedKeyManager: https://paste.md-5.net/inamuciyom.java
yeah sounds like you're not applying it after the fact
ok lemme try that ty
don't think this is a good idea either
public static void initialize(JavaPlugin javaPlugin) {
plugin = javaPlugin;
generateKey("is-rpg-chest");
generateKey("testing-key");
}
unless you are initialising after onEnable?
im doing it in onEnable
should be fine then
choco ftw
fr
ive been helped so much by them
i took like 1 year break from plugins so ig im a bit rusty
@Override
public void onPacketSending(PacketEvent packetEvent) {
if (packetEvent.getPacketType() == PacketType.Play.Server.NAMED_SOUND_EFFECT) {
PacketContainer packet = packetEvent.getPacket();
Sound soundEffectType = packet.getSoundEffects().read(0);
if (soundEffectType != null && soundEffectType.equals(Sound.ENTITY_WITHER_AMBIENT) || soundEffectType != null && soundEffectType.equals(Sound.ENTITY_WITHER_SPAWN)) {
if (SuppressorToggleCommand.getInstance().getPlayersToggledWitherSound().contains(packetEvent.getPlayer())) {
packetEvent.setCancelled(true);
}
}
}
}
I know this is incorrect, but how do I figure if the packet sound is that of sounds the wither makes
^ think thats a good starting point
not sure what version u're on, but there should be an entity sound event packet or sth
1.20.4
Anyways the issue with this code is that I'm trying to read sound effects but then console spits out a whole bunch of Field index 0 is out of bounds for length 0
So I'm not sure where to actually find the sound within the packet being sent
I lied I just had to read
π₯²
@Override
public void onPacketSending(PacketEvent packetEvent) {
if (packetEvent.getPacketType().equals(PacketType.Play.Server.ENTITY_SOUND)) {
PacketContainer packet = packetEvent.getPacket();
System.out.println("Listener test");
for (Sound sound : packet.getSoundEffects().getValues()){
switch (sound){
case ENTITY_WITHER_AMBIENT:
case ENTITY_WITHER_SPAWN:
case ENTITY_WITHER_BREAK_BLOCK:
case ENTITY_WITHER_DEATH:
case ENTITY_WITHER_HURT:
case ENTITY_WITHER_SHOOT:
if (SuppressorToggleCommand.getInstance().getPlayersToggledWitherSound().contains(packetEvent.getPlayer())){
packetEvent.setCancelled(true);
System.out.println("Wither noise cancelled");
}
break;
default:
System.out.println("Not wither sound");
break;
}
}
}
}```
Sigh I still don't get it D: (none of the debugs are printing nor are the sounds getting cancelled)
My code throws a "failed to deserialize object" error when I'm trying to print out the location: https://paste.md-5.net/wuzaqamona.cs
Here are my deserialization and serialization methods: https://paste.md-5.net/ekupejapit.js
The error points to #deserialize() line 17 where I'm reading the object. Idk what could be wrong honestly I have a similar class where I use persistentdata with the same serialization methods and it works perfectly.
do you use ConfigurationSerializable?
is your supreme spawner that ^
Yes.
Yes, I'm also serializing and deserializing SupremeSpawner objects in different classes
With pretty much the exact same code, I just don't understand why it doesn't work with SupremeSpawnerBlocks
SupremeSpawners are associated with itemstacks and SupremeSpawnerBlocks are associated with blocks so thats the difference if you are wondering.
are you using bukkit output stream to serialize?
supreme data type doesm't seem to implement configuration serializable
i'm not sure if persistent tags are serialized
plus it has to have a deserialization block
SupremeSpawner was a member of SupremeSpawnerBlock class, I removed it and now everything works
But SupremeSpawner implements ConfigurationSerializable
Does the SupremeSpawnerPersistentDataType need to implement it aswell?
yes
everything you serialize has to be serializable
and it also has to have a valid deserialization block
i think a Map constructor
that's private
i have a minecraft server on an oracle ubuntu virtual machine
i was trying to install java 22 and when it finished it said "fatal error: connection timed out" and now I cannot access using any ssh software
on oracle cloud it says the vm is running
i need help please
doesnt oracle have a "virtual screen" / online console or however it's called?
also have you tried simply rebooting? :p
I have tried rebooting
the online console asks for a login which I do not have
let me add an image
@tender shard
oh I cant
well
d
Password:
Login incorrect
minecraft-server login: ubuntu
Password:
Login incorrect
minecraft-server login:
I did never set a login
LOL I ENTERED IT
so I can access the online console but I need to access the server using an FTP tool
how can I do it?
do you not know your root password?
you cant send pics here cause you're not verified
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
Obviously I have done that.
I know it now
but I can only login to the vm using the cloud shell
not any SSH
That's not the issue. I use Mojang Mapped nms for that reason, and have obviously updated the code itself to match the 1.20.5 NMS. The issue relates to building it
What else do you need to know?
What speed is used when player is sprinting and jumping? I need to slow down that player. Im setting player movement speed but is not affecting sprinting and jumping. Its affecting only sprinting.
what's the output of systemctl status sshd?
(gotta run that as root btw)
head to File -> Project settings -> set "project JDK" to 21
root@minecraft-server:/home/satorras/server# systemctl status sshd
β ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: e>
Active: active (running) since Mon 2024-04-29 08:02:11 UTC; 24min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 804 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 846 (sshd)
Tasks: 3 (limit: 21447)
Memory: 6.7M
CPU: 1.211s
CGroup: /system.slice/ssh.service
ββ 846 "sshd: /usr/sbin/sshd -D [listener] 2 of 10-100 startups"
ββ1593 "sshd: [accepted]" "" "" "" ""
ββ1606 "sshd: [accepted]" "" "" "" ""
Apr 29 08:24:12 minecraft-server sshd[1578]: Disconnected from invalid user VM >
Apr 29 08:24:15 minecraft-server sshd[1569]: fatal: Timeout before authenticati>
Apr 29 08:24:49 minecraft-server sshd[1585]: Received disconnect from 110.40.15>
Apr 29 08:24:49 minecraft-server sshd[1585]: Disconnected from authenticating u>
Apr 29 08:25:32 minecraft-server sshd[1596]: Invalid user jenkins from 110.40.1>
Apr 29 08:25:32 minecraft-server sshd[1596]: Received disconnect from 110.40.15>
Apr 29 08:25:32 minecraft-server sshd[1596]: Disconnected from invalid user jen>
Apr 29 08:25:47 minecraft-server sshd[1576]: fatal: Timeout before authenticati>
lines 1-23
@teal spear TL;DR your project sdk has to be set to the "newest" java version that you need, so 21 in this case
looks good. Have you installed fail2ban? Do you have any firewall (iptables / nftables / ufw / oracle's online-configurable firewall) ?
well it says
fatal time out before authentication
is that good?
ufw sounds familiar
i think i installed it
obviously not. Please show the output of the following commands:
ufw status
iptables -L
oh and this please:
cat /etc/ssh/sshd_config | grep -i port
no problem bro
i really appreciate this
that's what I'm here for
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
25565 ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
25565 (v6) ALLOW Anywhere (v6)
That's for UFW
looks good - did you maybe change your SSH port?
its 22
this command should show you which port SSH is running on
never changed it afaik hahah
that looks good too
okay let me check for the port
okay please try this: try to connect locally to ssh
enter this as root:
ssh localhost
does it ask for username/password?
I have a field that's a normal class. How can I intercept it's methods' invocation?
more details please. usually, you can't, you will have to replace the actual references to that class with a proxy
#Port 22
#GatewayPorts no
Can I somehow create a Proxy class of that normal class and replace the field with reflection
yes. which class is it?
and delegate it to the actual methods if I want to invoke
looks good. try ssh localhost please
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ED25519 key fingerprint is SHA256:D/HEARsIrJWqRJdwwnoa/qSGma/HbOv+baetQlmjzYs.
This key is not known by any other names
nasty. which method do you wanna override?
that's normal - enter "y"
placeNewPlayer
but I'll handle that
this one, which invokes JoinEvent
ok
yes
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
hm okay so the easiest way (imho) is to create a class that extends NMS PlayerList, then find out where it's instance is stored, and replace that using reflection with your own class. Your own class, as it extends PlayerList, will only have to implement that one single method you wanna change
and does it ask for user/password now?
but it's an nms class
what do I input now?
oh yes
yeah you'll have to create one class per NMS version
Permission denied (publickey).
ah! looks like you disabled password auth
I've come here to avoid that
check your /etc/ssh/sshd_config file for a line that says "PasswordAuthentication" and check what it says
hmmm i don't recall doing that hahah
sorry but that's not possible I think
how do I open that file? sorry I'm really new to all of this, trying my best
can't I create a proxy class?
hm ok I don't know too, then
sure you can, but you still gotta replace the existing instance
wasnt a proxy class my first suggestion? :p
well yeah
but everywhere I see list of interfaces
and this is a normal class
and I've never used Proxy
you will still have to create one module per NMS version
because of the stupid obfuscation
I have a method that gets the class
as long as the class is an instance of PlayerList
how else would you know whether you need to override "a" or "b" or "c" or however that method is called?
I can handle the rest
well
ProxyHandler
im not sure what to do
nano /etc/ssh/sshd_config
that will open a basic text editor where you can scroll through with the normal arrow keys
anyway gtg
thank you so much
sorry that I couldn't help - maybe there is an easier way, but if so, I dont know about it
(I doubt it though)
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/us>
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
Include /etc/ssh/sshd_config.d/*.conf
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_ecdsa_key ^U Paste ^J Justify ^/ Go To Line
you gotta scroll through it (arrow keys) and find the part that says "PasswordAuthentication"
alright
alternatively, you can DM me the IP and I'll see how far I'll get in 5 minutes
(gotta smoke first kek)
it says PasswordAuthentication yes
I dmed it but idk how much u can do with that
yo
it just fixed itself
the ssh works again
thanks! Idk what it was that fixed it but I tried now and it works
do you know what could have fixed it?
Your system, probably
Why packet in 1.20.4 not work ? I'm trying send particle packet to player but it did not appear, tested in 1.19.4 and it work fine but in 1.20.4 not work
ah haha
yeah you probably got self-banned by fail2ban
default is 60 minutes IIRC
?nocode
Itβs hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
TL;DR: You NEVER need to use packets manually to send particles @azure dirge . There's API for that: Player#sendParticle (or spawnParticle), sth like that
same exists for World if you want to spawn particles for all players
ParticleParamRedstone param = new ParticleParamRedstone(
new Vector3f(color.getRed(), color.getGreen(), color.getBlue()), 0.5f);
PacketPlayOutWorldParticles particlesPacket = new PacketPlayOutWorldParticles(
param, true,
(float) location.getX(), (float) location.getY(), (float) location.getZ(),
0, 0, 0,
param.f(), 1);
((CraftPlayer) player).getHandle().c.a(particlesPacket);
here is my code
why are you using packets instead of API?
because I want it private to specific player
there's API for that
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#spawnParticle(org.bukkit.Particle,double,double,double,int) use this method
declaration: package: org.bukkit.entity, interface: Player
@azure dirge
it exists at least since 1.13 or sth
does other player see that particle ?
no
exactly
lmao
np! bonus: you won't have to adjust your code for every version if you use Player#spawnParticle
pls, can someone help me to fix this code? I don't have any errors but the placeholder doesn't work.
import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
import net.luckperms.api.model.user.User;
import net.luckperms.api.model.user.UserManager;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
public class CustomPlaceHolder extends JavaPlugin implements Listener {
private LuckPerms luckPerms;
@Override
public void onEnable() {
Bukkit.getServer().getPluginManager().registerEvents(this, this);
luckPerms = LuckPermsProvider.get();
new GroupCountPlaceholderExpansion().register();
}
public int getGroupCount(String groupName) {
UserManager userManager = luckPerms.getUserManager();
return (int) Bukkit.getOnlinePlayers().stream()
.map(Player::getUniqueId)
.map(userManager::getUser)
.filter(user -> user != null && user.getPrimaryGroup().equals(groupName))
.count();
}
public class GroupCountPlaceholderExpansion extends PlaceholderExpansion {
@Override
public boolean canRegister(){
return true;
}
@Override
public String getAuthor(){
return "mjicio";
}
@Override
public String getIdentifier(){
return "group_count";
}
@Override
public String getVersion(){
return "1.0.0";
}
@Override
public String onPlaceholderRequest(Player player, String identifier){
if(identifier.equals("group_count")) {
return String.valueOf(getGroupCount(identifier));
}
return null;
}
}
}
what placeholder? is this supposed to be a PlaceholderAPI expansion?
yes
but the placeholder doesn't work
what's the placeholder you're trying to test? It should be "group_count_group_count" according to your code
%group_count_group_count%
no, I'm trying to test "group_count_<group>"
well but your code is sth different.
a placeholder works like this:
<identifier>_<the param used in onPlaceholderRequest>
so your placeholder would be called %group_count_group_count%
getIdentifer() method is correct
but in onPlaceholderRequest, you'll have to adjust your code
check for the arg <group> and loop groups then return size due to the group name
ok, I'll try
something like this?
import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
import net.luckperms.api.model.user.User;
import net.luckperms.api.model.user.UserManager;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
public class CustomPlaceHolder extends JavaPlugin implements Listener {
private LuckPerms luckPerms;
@Override
public void onEnable() {
Bukkit.getServer().getPluginManager().registerEvents(this, this);
luckPerms = LuckPermsProvider.get();
new GroupCountPlaceholderExpansion().register();
}
public int getGroupCount(String groupName) {
UserManager userManager = luckPerms.getUserManager();
return (int) Bukkit.getOnlinePlayers().stream()
.map(Player::getUniqueId)
.map(userManager::getUser)
.filter(user -> user != null && user.getPrimaryGroup().equals(groupName))
.count();
}
public class GroupCountPlaceholderExpansion extends PlaceholderExpansion {
@Override
public boolean canRegister(){
return true;
}
@Override
public String getAuthor(){
return "mjicio";
}
@Override
public String getIdentifier(){
return "group_count";
}
@Override
public String getVersion(){
return "1.0.0";
}
@Override
public String onPlaceholderRequest(Player player, String identifier){
return String.valueOf(getGroupCount(identifier));
}
}
}
should be like this
@Override
public String onPlaceholderRequest(Player player, String identifier){
String[] split = identifier.split("_");
if(split.length == 3) {
String groupName = split[2];
return String.valueOf(getGroupCount(groupName));
}
return null;
}
group_count_group_count_owner
the same
lol
I don't understand why
Are u using some plugin for TAB? are u praising placeholder there, its suported if its not your plugin?
yes, I'm useing TAB
but I think it support placeholder
I can't do that, since that broke some of the older other modules, they gave weird missing class errors. I therefore kept it at Java 17. In the modules tab however, I set the SDK of the module which actually uses 1.20.5/Java 21 to use SDK 21 however
The placeholder have to work, the console log the placeholder register: [PlaceholderAPI] Successfully registered internal expansion: group_count
you can do that. if you encounter any issues with java 21, please send the error messages. I'm sure we can get them fixed
Okay will send them here!
however I'm afk for 10 minutes or so, I gotta upload a few 1.20.5 updates - brb!
try /papi parse <player> <string> this is if u will get correct value in chat, if not somthing is wrong lol
ok
This is fine but Player should be OfflinePlayer
the placeholder would be group_count_owner
you can do that. if you encounter any
i think my IJ is dead
Like this?
public String onPlaceholderRequest(OfflinePlayer player, String identifier){
String[] split = identifier.split("_");
if(split.length == 3) {
String groupName = split[2];
return String.valueOf(getGroupCount(groupName));
}
return null;
}```
Take it out back to end its suffering
use onRequest instead
no you shoudl not be doign any split
teh identifier that will be passed is "owner"
@Override
public String onPlaceholderRequest(OfflinePlayer player, String identifier){
return String.valueOf(getGroupCount(identifier));
}
yes
this is mine https://github.com/ElgarL/GroupManager/blob/8b313ec7b24f783a17d09931ea9dbf517fafd836/src/org/anjocaido/groupmanager/placeholder/GMPlaceholderExpansion.java#L108 placeholder would be somethign like "groupmanager_group"
only "group" gets sent as the identifier
be sure you softdepend on placeholder in your plugin.yml
depend is fine too
anyone have idea how to slowdown player when jumping while sprinting? setting movement speed will slow down only player while sprinting.
you can;t reliably detect a jumping player, other than via statistics
doesn't work again
you could slow their velocity in teh statistic event
private LuckPerms luckPerms;
@Override
public void onEnable() {
Bukkit.getServer().getPluginManager().registerEvents(this, this);
luckPerms = LuckPermsProvider.get();
new GroupCountPlaceholderExpansion().register();
}
public int getGroupCount(String groupName) {
UserManager userManager = luckPerms.getUserManager();
return (int) Bukkit.getOnlinePlayers().stream()
.map(Player::getUniqueId)
.map(userManager::getUser)
.filter(user -> user != null && user.getPrimaryGroup().equals(groupName))
.count();
}
public class GroupCountPlaceholderExpansion extends PlaceholderExpansion implements it.mjicio.rareore.GroupCountPlaceholderExpansion {
@Override
public boolean canRegister(){
return true;
}
@Override
public String getAuthor(){
return "mjicio";
}
@Override
public String getIdentifier(){
return "group_count";
}
@Override
public String getVersion(){
return "1.0.0";
}
@Override
public String onRequest(OfflinePlayer player, String identifier){
return String.valueOf(getGroupCount(identifier));
}
}
}```
you never pass a player to your getGroupCount so where are you getting the user from?
uh ig he count how many players has this group.
ok
in the last two days
Idk how to fix it
mmm'
I would still try to print placeholder in chat if its code correct or not.
um one second
show how you print it
does anyone know how I could intercept the method invocation of a certain class object?
since it's not an interface
I can't use the java Proxy class
correct import me.clip.placeholderapi.expansion.PlaceholderExpansion
your import it.mjicio.rareore.GroupCountPlaceholderExpansion
/papi parse Mjicio_ group_count_owner
thats not the placeholder
your import is wrong for your placeholder expansion
what's wrong?
How Can I import it right?
use the one I posted
me.clip.placeholderapi.expansion.PlaceholderExpansion
you are extending yrou own class
or implementing
you shoudl be extending me.clip.placeholderapi.expansion.PlaceholderExpansion
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
public class GMPlaceholderExpansion extends PlaceholderExpansion {```
anybody knows?
ok, but the placeholder still not working
you should do like /papi bcparse Mjicio %group_count_owner% to get value printed in chat and it should show the number according to wiki https://wiki.placeholderapi.com/users/commands/#papi-bcparse
How can I update my server to 1.20.5 if I'm running on an ubuntu VM?
hmm, but I still need to slow them down so... Im setting movent speed witch work for sprinting but can be abused this way.
You haven't had to time to correct yrou code, rebuild and startup a server to test
yup something is wrong with your code
Yes But I don't understand whaaaat
?paste your code in full so we can see
the code I paste before it's the entire code only without the imports
lastly paste your pom
all looks fine. you shoudl be gettign something even if it's only a console error
Don't expect anythign to work if using plugman
lastly, is the group in LP owner or is it actually Owner ?
owner
then I see no reason for the code you pasted to not work
so long as there were no startup errors with LP
nop
[09:54:47] [Server thread/INFO]: [LuckPerms] Enabling LuckPerms v5.4.122
[09:54:48] [Server thread/INFO]: __
[09:54:48] [Server thread/INFO]: | |) LuckPerms v5.4.122
[09:54:48] [Server thread/INFO]: |_ | Running on Bukkit - Paper
[09:54:48] [Server thread/INFO]:
[09:54:48] [Server thread/INFO]: [LuckPerms] Loading configuration...
[09:54:48] [Server thread/INFO]: [LuckPerms] Loading storage provider... [MARIADB]
[09:54:48] [Server thread/INFO]: [me.lucko.luckperms.lib.hikari.HikariDataSource] luckperms-hikari - Starting...
[09:54:48] [Server thread/INFO]: [me.lucko.luckperms.lib.hikari.HikariDataSource] luckperms-hikari - Start completed.
[09:54:48] [Server thread/INFO]: [LuckPerms] Loading messaging service... [SQL]
[09:54:48] [Server thread/INFO]: [LuckPerms] Loading internal permission managers...
[09:54:48] [Server thread/INFO]: [LuckPerms] Performing initial data load...
[09:54:49] [Server thread/INFO]: [LuckPerms] Successfully enabled. (took 1262ms)
then your plugin should be working
I know π₯Ή
Maybe u can come in vocal and I stream to you the complete situation
maybe u can see the error
try without static access to LP
And how can I do this?
where I have to paste it?
in your onEnable
ok
where you set your luckperms variable
ok
I'm doing a code that gives a player a rocket as a reward and the rocket should go in off hand. The problem is that setItemInOffHand() method just sets the item in the off hand :D is there an "easier" way to implement this than to loop through player's inventory, get number of existing rockets, add one to that and set them in offHand?
also delete LuckPerms api = and replace with luckPerms =
lower case L
I try to restart now?
yes
ok
?nocode
Itβs hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
doesn't wooork
I see no reason in that code
No clue then, if your startup is error free, your code should be working
add @Override annotation to all your Placeholder expansion methods
should make no difference, but who knows
also add java @Override public boolean persist() { return true; }
there's alredy an @ovveride in all the placeholder expansion
I try to add it
ok
doesn't work
oh I see why
what
/**
* The placeholder identifier should go here.
* <br>This is what tells PlaceholderAPI to call our onRequest
* method to obtain a value if a placeholder starts with our
* identifier.
* <br>The identifier has to be lowercase and can't contain _ or %
*
* @return The identifier in {@code %<identifier>_<value>%} as String.
*/
@Override
public @NotNull String getIdentifier(){
return "groupmanager";
}```
read the javadoc
last line
OH
fjwaijdoiwaijdajdi
OK
OK
I just want to trash my life
rn
it works
I love u man
thanks
np
how would you show certain players certain scoreboard values? I'm struggling to find concrete info online. I'd e.g. show some players their level and stuff like that
different scoreboards, or packets
yeah but how either of those
I have no idea how to tackle that
do you know any projects that use custom scoreboards?
thanks!
does anyone know which version added isGliding() to the player interface?
probably 1.9
1.9 doesn't have it.
so I guess I would need reflection to access it before 1.12?
Any idea how to get the name/field in nms?
//In CraftLivingEntity
public boolean isGliding() {
return this.getHandle().getFlag(7);
}
//In Entity
public boolean getFlag(int i) {
return ((Byte)this.datawatcher.get(W) & 1 << i) != 0;
}
CraftLivingEntity doesn't has isGliding in 1.9
and search for any fields with that type
yes
that's why
you're gonna invoke getHandle
and on the returned EntityPlayer class you're gonna find DataWatcher by type
how do I even get the CraftLivingEntity instance? I only have the Player interface.
not instance
class
Class.forName
Yeah but I still need the instance to get the metadata from since those are not static, right?
you don't
only need the class
and pass an instance when you get one
that literally helps him in no way
I need to support all versions.
use the nms2 method
from me
1.13+ is fine since Bukkit has a isGliding in those versions, but I'll need the impl for <=1.12
you can figure out how it works by looking at some of the examples
have my own utils for that
what's the hold up then?
decompiling NMS code
I know, I figured there would be a nicer way.
Mapping Tools or examining Bytecode
Compare different mappings with this website: https://mappings.cephx.dev
I know those exists, still not an nice way.
who pinged me
Alright, time for even more cursed reflection.
and after solving many issues I'm stuck on this one
gpt said I need to include the jar in the path
no idea how to do that
for context
return super.findClass(name);
this is line 65
md_5 do you remember the exact version so I dont have to decompile every server jar?
@sullen marlin
ah didnt know you were allowed to ping him
I need to modify one method in PlayerList
hmm
the only other way was to either use ByteBuddy (which would make my jar 6 MB) or ASM (cuz it's built-in)
are you sure you need a new classloader for this?
I'm not sure
but probably yes
if playerlist is under spigot's class loader then you have to modify that one
not sure it's easy tho
no
I need to define it with custom bytecode
oh, then yeah, you have to load it with a custom class loader
like what the fuq
worry not