#help-development
1 messages Β· Page 680 of 1
oh
classic epic moment
still returns null with uppercase uuid
is the island id a uuid?
getId returns uuid
nothing is screaming at me but i would just attach a debugger or test with sql playground
auto incrememnt is missing an underscore?
no, what you have is correct for sqlite
the issue is very basic though
your semicolon should be after the parenthesis not inside the string
that's not an issue lol
thats what ive put it there for
is {} no longer standing for 'empty constructor'?
oh we just not going to terminate variables now?
because last I recalled java requires this
and also in prepared statement auto terminates queries
so its not needed
in the string
and typically causes issues
still returns sql null without the semi colon after ?
again- debugger and step through
semicolon is not required for the last resource in a try-with-resources declaration
lolno
okay wtf
i just ran this manually in db browser
and it returns correct
does it not like my apostrohpes
apostrophes not the issue
am i need getter for this or i can do make public and do something ?
private static final Configuration configuration;
static {
try {
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(file);
} catch (IOException e) {
throw new RuntimeException(e);
}
}```
you will need a getter for it
why
and it shouldnt be static
oh btw once you fix this I recommend not using autoincrement for what you are doing
because its private
if i do public and do not make getter ?
i mean
can i do this ?
yeah, except it screams that you dont know java properly
just setting it as primary does what you want but also lets sqlite use lower id values if they are available IE if you have 10 columns of ids numbered 1-10 and lets say you remove id 4. Instead of making an id 11 it will go ahead and use id 4 since it is now available
can you tell me to learn
?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.
however using autoincrement will never let it use lower id numbers again and once it hits the largest int value it will error out
which one ? tells me
all of it
all of them
if you have to ask you should start from the beginning
what does that have to do with anything?
everything
its called learning java, you cant use java to make stuff properly withoutknowing it
What does learning Java have to do with learning Java
as verano would say "You cant bake a cake if you dont learn the recipe"
so how exactly are you testing this?
if i don't know java
I wonder if its a caching issue with compiling
how can i do this ?
compiling, restarting, running the create command i have
i'm not bragging
have you tried doing a clean before compiling? I wonder if its a caching issue with the compiling and it not actually including your updated code
cleaned and built again and same issue
its not null in db browser but is null in java
Learn basics first, then get your hands dirty, try making your own small plugins, then head onto mini-game plugins, search for best practices & always read docs.
why i need do this private and getter method for get?
is it okay if I make it public directly?
private static final Configuration configuration;
because that shouldnt be static, it has no reason to be static
move to the first row
that isn't what its doing
π idk
if i don't static and get methods like this
doesnt return my config file
im getting nullpointer ex
its moving after the first row
alex lied to me
you want hasNext()
if you want to check if more then one result
but if you are sure it should only return a single result, then checkt that ResultSet isn't null
if not null start plucking your values
the first next call moves to the first result
when first returned, the RS is positioned before the first entry
do u know hikaricp ?
using or more..
?
and the resultset is never null, you should check the return of next
There are few topics about this problem:
- People using object oriented languages like java don't like to use static in unusual manners, another words you have to search for a cleaner way and better understandation of what situtaion is, try asking yourself "why i need static?", which in this case is the lack of knowledge about object oriented programming, where instances come into play.
- Using getter is best-practice to make your field secure and not access it directly (in some cases, you cannot assign final keyword and you don't want that field to be modified, which getters come to play)
- You can use lombok library for much cleaner code to make getters with only an annotation "@Getter" in this case.
Its all in your liking at the end, but keep your code simple and neat
wait why isn't it safe enough to use public final instead of private final + getter for it?
if you don't want to communicate with me, start java over to people you don't know, etc. don't say things
Ah nvm, it took me a few words to teach my friend combos in 1.8 (he didn't ever pvp before)
ok male
Lol
That's a best-practice, not safe code (as i mentioned)
currently your the cringe one here
There's no problem with it, you can do it.
Oh and btw, no need to discriminate people because of their sex/gender
protecting females
not really about safety per se, but you can do logic in a getter (record stuffs, logging, lazy-loading, wrapping, etc), something you can't do when a field is being accessed
cringe
We live in a world where everybody is equal and has equal rights
And surely enough, don't disrespect people by their gender
no
or sex
she didnt ask my question
she says learn java to a person she doesn't know
yeah many say that here
Uhh but that's what we all would tell ya?
so many in fact there's a shortcut
if someone doesnt respond, you either ask again or take it as they dont know the answer
don't feel like you are special just because you came here asking for help
no one is obligated to help nor is anyone entitled to help
or if she wanna say
Can we like, mute this guy or something?
reply my question first
you can block them π
so you wont get help if me or frostalf arent here
seems like a great way to get help
Still too much trash on my screen
unfortunately
okay please stop arguing about that
I have a few people blocked and its just a spam of notifying me that the blocked people have sent messages that I don't care about lmao
Telling someone to learn java is not disrespectful in where people have to ask only about questions of spigot and minecraft-server topic.
Is there bukkit or craftbukkit for beta 1.7.3?
Me and my friends wanna play b1.7.3 and I wanna attempt developing something for those ancient versions
not for the beta builds no
:(
at least not ones before 1.0
So, I made a system where you can add a system book with nbt in a slot in an anvil and a item in the other to make it so it "stat traks" the item, the system works fine producing the item, but when I go to retract the item from the inventory it doesn't move. I don't have any code cancelling any event in the entirety of my code, what's happening?
well i got my reply from chatgpt
i saw this when i learned java
but people forget even after a 1 month break, sorry for not being einstein like you
Data Privacy and Access Control: Declaring variables as private within a class indicates that these variables can only be accessed from within the same class. This prevents accidental modification or direct access to the data. Getter and setter methods provide a secure way to access and manipulate these private variables from outside the class.
variable modifiers are one of the most basic things in java, if you cant remember that after a month off you didnt learn it properly
ok I was wrong
im not einstein
there is some beta builds of CB
NO WAY???
^^
They got plugins?
have no idea, but I have all the CB builds lmao
Yoooo dats really cool
its about 3 differnt keywords, you should atleast be able to remember them
the first 2 are super easy to remember
I wonder where I can download plugins for those ancient versions
Was there creative there?
only problem is, beta builds are not named the same way though
so I have no idea which one would be for what you want XD
Wait, b1.7.3 isn't long before 1.0, right?
not 1 month
I saw it in the videos I watched when I first learned Java.
since i started in java 6 months ago...
if you had been doing it for 5 months, i would hope you manage to remember atleast public and private
i thought getters and setters existed to put conditions on variables
the more stuff you say just makes it more obvious you need to go and learn java before making spigot plugins
and stop copy pasting code without understanding how it works
That's how I learnt programming tho
I was copy-pasting code, reading it, looking at how it behaves to understand where and what it does and so until I understood and remembered stuff
I don't remember, but CB didn't use the same versioning scheme everyone is accustomed to for the beta builds
its literally build numbers
Like 173?
yeah
Bruh
thats fine then, you actually understood how it worked instead of copy pasting it instead of "it works, moving on"
ur right mb
I have 705 to 1828 for beta builds
you remember when you said 6 months coding java, its been over a year
oh
Lol
I am not so stupid as to lie and show myself superior with such statements.
And I thought you'd write them
o.O
The build number might be 1092 according to the random reddit post I just found titled Project Poseidon β A fork of Craftbukkit CB1092 (Beta 1.7.3) designed for 2021
15 months making spigot plugins, and you still havent remembered public or private? you are either insanely slow at learning and should probably get some help or you havent ever actually learnt java and have just been copy pasting stuff
i said
i started java for learn this year
friend request sent since you don't accept messages from non-friendly people
At first I didn't understand how variables were constant in java so I just assumbed naming the in UPPERCASE with _ instead of spaces would make them constant lol
i used to write code without knowing java
or i was learning and doing variables without going oop
you still dont know java properly
I kinda don't either!
i didn't say i knew
i didnt even know java much untill the start of this year and i started making plugins may last year
We all don't know a bit of the java basic stuff
I always forget that for generic methods I gotta do public <T> instead of public T lmao
welp 1092 launched your way
Lol
How do I remove an item from a player's inventory?
I tried to set it to a new item stack with null as the Material and it didn't work and also tried with air as Material and it didn't work
inventory(slot, null)
Inventory#remove()??
or that
I am actually suprised I have the beta builds and that I forgot about them
yeah but like there isn't very many people who have these though
Soo, how do I get support for those?... lol
there isn't lmao
I tried this and it didn't remove the elytra.
player.getWorld().dropItemNaturally(player.getLocation(), elytra);
player.getInventory().remove(elytra);```
well i check my old projects and i saw this
i've been trying to do something neat in java for 3 months
I think md might have the beta builds
static final
I am very clever
Don't have to be static lol
PlayerInventory#setChestplate(null)
well you would probably want that if it's a static value
Wow
constant*
java.lang.IllegalArgumentException: ItemStack cannot be null
Set it to Air then.
I just get the same exception
Don't know how considering Material.AIR != null
I once forgot to recompile my plugin and thought why it ain't working
the longer you come here with basic java issues the less likely you are to get spoonfed
Also, AI is bad at coding
i humiliate myself as I stand here
i will come back when i learned the best java (never)
time to leave paper and spigot
lmfao
How am I supposed to remove an item from a player's inventory?
they join back in like a week or 2 asking for help again
player.getInventory().setItem(slot, null)
.setAmount(0) ?
sorry, try new ItemStack(Material.AIR)
I already tried all 3 of these methods
They all make this java.lang.IllegalArgumentException: ItemStack cannot be null happen
can you send the full stacktrace?
public void noElytra(EntityToggleGlideEvent event){
if (!plugin.getConfig().getBoolean("elytra-toggle")){
Player player = (Player) event.getEntity();
player.sendMessage(ChatColor.RED + "You can't use elytras!");
ItemStack elytra = player.getEquipment().getChestplate();
player.getWorld().dropItemNaturally(player.getLocation(), elytra);
elytra.setAmount(0);
player.updateInventory();
}
}```
sounds like getChestplate is returning null
How is that returning null if I am wearing an elytra
Does the event have a getElytra event or something
It printed ItemStack{ELYTRA x 1}
I'm pretty sure it should be player.getInventory().getChestplate() instead of getEquipment
U should use pastebin or something
both return the same thing for a player
An it also didn't produce an exception when I removed the line that's supposed to remove the elytra
did it drop the item into the world?
What's at like 27
Line
yes
maybe your compiled jar wasn't updated then
player.getWorld().dropItemNaturally(player.getLocation(), elytra);
Ok yea it's that
I recompiled it more than 5 times
.
yes
you mean the setAmount(0)? does it throw the exception again when you reintroduce that line?
yes
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityToggleGlideEvent.html
I think better workaround is to cancel the event, instead of dropping the item manually (which could lead to duplications glitch, and more than that, if you are not experienced with events and when they are called in server).
Or if you unsure about it, then you can verify the compiled files by their checksum.
declaration: package: org.bukkit.event.entity, class: EntityToggleGlideEvent
It might cause an error when the object is spawned in
that's odd because that line is after dropItem
In which case you try set it empty and world object has a reference to original object for some reason
maybe it's because the players lands on the floor after the elytra is removed so the event is called and the elytra is null?
Apparently it's the serAmount call that's the problem
I'm gonna try to drop a clone
Well, Im not expert at this, try logging things out and see.
What if you access player inventory and remove the item in that slit
Minecraft version?
I think I understand now.
I dropped the item on the floor and then I set it to null and the item entity can't be null so it produced an exception.
I dropped a clone of the item and then removed the elytra and it works now without producing exceptions
So was it this? @harsh totem
Oop
Why minecraft music is lil too intense
java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.clone()" because the return value of "org.bukkit.inventory.EntityEquipment.getChestplate()" is null
public void noElytra(EntityToggleGlideEvent event){
if (!plugin.getConfig().getBoolean("elytra-toggle")){
Player player = (Player) event.getEntity();
player.sendMessage(ChatColor.RED + "You can't use elytras!");
ItemStack elytra = player.getEquipment().getChestplate().clone();
player.getWorld().dropItemNaturally(player.getLocation(), elytra);
player.getEquipment().setChestplate(null);
}
}```
That way it would be null
No cuz he clones it
You can't clone null
After yi clone before you drop
didnt fix it
oh, idk
The exception says that the getChestplate returns null and it can't be cloned
Im sure player.getEquipment().getChestplate() is null, that's a java error
ItemStack{ELYTRA x 1}
bruh
I think that the event is executed when the player stops using the elytra and by then it is null
Hmmm yes
Is there a way to check what the original vs end state is?
Ie toggle to flying or toggle to not
Yea there is
You should check e.isgliding
And if yes you should e.cancel
I think in that case you have to do a simple null check:
@EventHandler
public void noElytra(EntityToggleGlideEvent event){
if (!plugin.getConfig().getBoolean("elytra-toggle")){
Player player = (Player) event.getEntity();
ItemStack elytra = player.getEquipment().getChestplate();
if (elytra != null && elytra.getType() != Material.AIR) {
player.getWorld().dropItemNaturally(player.getLocation(), elytra);
player.getEquipment().setChestplate(null);
player.sendMessage(ChatColor.RED + "You can't use elytras!");
}
}
}
I feel like adding
if(event.isGliding()) evet.setCancel(true)
else return
Could also work
That works
Thank you
Thanks to you too ofc
how do i use git lol
Add your repository as a remote, then push your branch
elytra.getType() != Material.AIR``` should probably use `!elytra.getType().isAir()` here
why not push into master
ncm
nvm
lol
Because only psychopaths do that
i do that
i have a branch called msater in a project
and i use it regularly
Thatβsβ¦ interesting
i just use github as backup drive
well, it does seem to be correct, lemme just get my b1.7.3 optfine
it seems to have issues with online mode I think?
oh gosh this looks exactly like modern bukkit ._.
yoo it works, thanks frostalf
has anyone here ever used tabbed tablist api from github ?
?ask
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!
well im using tabbed tablist api from github https://github.com/thekeenant/tabbed and everything is displayed properly just .update() doesnt work i mean tablist is not updated so i wanted to ask for any help at all
How can I create a new loot table for something in my plugin?
Do I need to put it in a datapack or something?
?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.
well what code do you want me to give you
like just my tablist class
where i write everything or
?paste
wdym new loot table? do you need to change the mob drops or something
for chest generation or mobs/blocks?
Hi asking something because im so confused i made on my texture (1.12) on custom fonts this
{
"ascent":8,
"chars":[
"\ue26b"
],
"file":"chatfeatures/ranks/builder.png",
"height":8,
"type":"bitmap"
},
But using /tellraw "\ue26b" doesn't show but with other character made inside the unicode_page they show up normaly
No, for my own loot table
Do you need it for blocks/mobs or chests?
so to generate your own loot in a chest for something like for eg survival games?
yes
i would use a random picker from a weighted list
i think you have to create an instance of tabbed and register the tab thru there
read the github readme
I'm asking how I actually make the loot table
an array?
In a datapack or do I add it with the plugin somehow?
a set
yes i did that in onEnable
In a plugin
and this is the straight up logic
Okay
you arent doing anything with it
literally first line in newTablist method is gahtering instance of tabbed from main class and then registering new table tablist
getTabbbed is from lomboks getter annotation and it returns Tabbed tabbed which was initialized in onEnable tabbed = new Tabbed(this);
yeah i was just confused with you naming it instance
it is automatically choosed by lombok
thats not what i meant
can i load loot table from json file or i have to make a datapack?
then ?
Hello guys who can help me :0
I have custom armor stand with passenger i need change yaw without eject player from stand:
I have this code:
public static void setPosition (ArmorStand armorstand, Location location, double yaw) {
try {
CraftArmorStand craftArmorStand = (CraftArmorStand) armorstand;
craftArmorStand.getHandle().setPos(location.getX(), location.getY(), location.getZ());
craftArmorStand.getHandle().setYRot((float) yaw); // yaw
craftArmorStand.getHandle().setXRot(location.getPitch());
}
catch (Exception exception) {
exception.printStackTrace();
}
}
But i got error:
[00:59:46 ERROR]: Invalid entity rotation: NaN, discarding
uh can I ask beta 1.7.3 questions here?
can you send where did you use setPosition()
?paste
use EntityDismountEvent to cancel the event if its not cancellable reset the passenger
do you lose infinite potion effects when dying or drinking milk?
sry i have no idea
ah ok
What are some keybinds I could use to add a custom blocking mechanic? and also some punishments for a poorly timed block
swap hands
360
anyone have to solution to be able to send titles to players in any version? like is there an external library?
player.sendTitle should work
not in 1.8 which is the thing he wants it for
i want the ability to supply the fade in and fade out aswell
My IDE thinks that @EventHandler methods are never used and should be deleted. Is there a per-project way around that?
you can add all methods annotated by event handler as an entry point
click the name of a not used variable and a lightbulb would appear
there you have multiple choices on how to handle this
looks like a 60 watt one
u sure its not bc you have an electric car in ur basement you dont know about
Hello!
How/Can I download the (org.mariadb.jdbc.Driver Dependency) into the Spigot library to use it from multiple plugins? Is there already a Interface for it in the Spigot API?
use the libraries feature in plugin.yml
This is the word that I needed. Thank you very much. I will read into it!
how do i send a title in 1.8.8 with fade / stayIn / stayOut?
and does it change in later versions?
in later versions you do player#sendTitle
in ancient versions you have to send a packet
this is CB code for 1.20.1
you'll need ClientboundSetTitlesAnimationPacket and ClientboundSetTitleTextPacket packet
(or however that is called in 1.8)
probably PacketPlayOutTitle
Does spigot have an API to spawn NPCs or do I still have to use some library or whatever
either NMS or use Citizens API
aight, ty
even though there is an interface for NPCS (HumanEntity), there's no way of spawning any in spigot
i was thinking something more immediate than that
You'd think I would only have to support with NMS for versions that don't have Player#setTitle(title, subtitle, fadein, stay, fadeout)?
yes
it was added in 1.9
if you're using multi module maven project, you can do it like this:
- Have an implementation for that in your 1.8 NMS handler implementation (e.g. like sendActionBar here): https://github.com/JEFF-Media-GbR/Spigot-Maven-Modules-Example/blob/master/spigot-1.8.8/src/main/java/com/jeff_media/mymultiversionplugin/nms_1_8_8/NMSHandlerImpl.java
- Use a default method in the NMS handler interface that's used on all other versions https://github.com/JEFF-Media-GbR/Spigot-Maven-Modules-Example/blob/master/core/src/main/java/com/jeff_media/mymultiversionplugin/NMSHandler.java#L13
You can use Biome colors
Just register a custom biome with the water color you want
how do i store data in an item and retain even if the item is placed and broken?
i am using PDCs to store data, what would be the general approach for this?
i was going to listen on blockPlace and blockBreak events and check if the item or block had any PDCs why being placed and copy them over, but is there a different way to do this?
PDCs and stuff like NBTs don't usually get saved across block placements and item drops, do they?
Where is ServerInfo#getName taken from?
https://ci.md-5.net/job/BungeeCord/ws/api/target/apidocs/net/md_5/bungee/api/config/ServerInfo.html#getName()
Bungee config
oh hello md_5.
Is it possible to have multiple servers sharing the same getName?
I am creating an algorithm into which I am looking for an identifier, so if this is the case I'm done with it π
If you are talking about placing things like blocks, I believe the block needs to be instanceof TileState
servers
Code (Text):
address: localhost:25565
restricted: false
motd: '&1Just another BungeeCord - Forced Host'```
lobby would be getName?
Iβm getting a null point exception when loading my plugin, it depends on protocollib
Itβs listed as a dependency
what is null
The dependency is listed as provided
Iβll show
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
public ProtocolManager getManager() {
return manager;
}
@Override
public void onEnable() {
robots = this;
getServer().getPluginManager().registerEvents(this,this);
manager = ProtocolLibrary.getProtocolManager();
manager.addPacketListener(
new PacketAdapter(this, ListenerPriority.NORMAL,
PacketType.Play.Client.BLOCK_DIG) {
@Override
public void onPacketSending(PacketEvent event) {
// Item packets (id: 0x29)
if (event.getPacketType() ==
PacketType.Play.Client.BLOCK_DIG) {
Bukkit.broadcastMessage( event.getPacketType().toString());
}
}
});
}
manager is bull
Null
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
ur initializing it on runtime
Itβs initialising it on enable
public ProtocolManager getManager() {
if(manager == null) {
manager = ProtocolLibrary.getProtocolManager();
}
return manager;
}
@Override
public void onEnable() {
robots = this;
getServer().getPluginManager().registerEvents(this,this);
manager.addPacketListener(
new PacketAdapter(this, ListenerPriority.NORMAL,
PacketType.Play.Client.BLOCK_DIG) {
@Override
public void onPacketSending(PacketEvent event) {
// Item packets (id: 0x29)
if (event.getPacketType() ==
PacketType.Play.Client.BLOCK_DIG) {
Bukkit.broadcastMessage( event.getPacketType().toString());
}
}
});
}```
it's not
you're initializing it in the field as well as onenable
um, can you elaborate a bit more please?
i have not really used PDCs before for any spigot projects, sort of learning them right now.
Your a legend mate, some of the best devs I know couldnβt even tell me that
Proper
Nah mate
No one else noticed but you
This thing has been a pain in my rear end for 3 hours
I was ready to go buy a new pc
haha lol
you'd buy a new pc because your minecraft server does not run?
Yep
ok.
getProtocolManager is a plain getter, doesn't initialize anything
No I mean
If I recall, if you want a placed block to retain data once placed and even after a server restart, you need to give it a PDC, usually a String and Key. Once given, check if that block has that said Key, String. The block has to be intanceof Tilespace
are all blocks not instances of Tilespace?
No
now i just get this ```java
java.lang.NoClassDefFoundError: com/comphenix/protocol/events/PacketListener
TileState I meant
?blockpdc
Learn about CustomBlockData here:
https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
^
Any block that stores data like chests are considered instanceof TileState
did you shade plib?
Is plib in the server
yes it is
Did you add a depend
so like tileEntities?
like pistons and chests.
unless 1.19.3 paper has a different way of using depend:
Fun fact: an anvil is not a tile entity
it does not store any data, it justs loads a temporary gui that is used to rename items or enchant items.
pistons would store state like being powered or not powered with redstone.
again, i am not an expert.
i just know some stuff.
are TileEntities not primarily for storing state or perhaps one of the reasons they are used?
how else would one store states if not TileEntities though?
Kinda, its more repesents the block state at the given location. I believe in the Spigot Doc its refered to as a block state that also hosts a tile entity at the given location
this library looks cool, does it work with blocks that span more than one block? Like a door or something?
Blocks have states
hey pule would this be correct for 1.19.3 paper
name: Robots
version: '${project.version}'
main: org.deserialize.robots.Robots
depend: [ProtocolLib]
api-version: '1.19'
Look at a log in F3 and youβll see the states
one block = one PDC
e.g. for doors you should decide to always use the bottom part or sth
so like if the top part gets broken, it wont invalidate the state or perhaps it is not access from the top part?
[08:34:51 ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'Robots.jar' in folder 'plugins'
java.lang.NoClassDefFoundError: com/comphenix/protocol/events/PacketListener
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:467) ~[?:?]
what would cause this
you're not using ProtocolLib
but its installed on the server
then you didn't depend on it in plugin.yml
but i noticed my plugin loads before it
so your plugin gets enabled before PLib
show your plugin.yml
name: Robots
version: '${project.version}'
main: org.deserialize.robots.Robots
depend: [ProtocolLib]
api-version: '1.19'
if the top part gets broken, the bottom also breaks and hence it should work fine
make sure to decompile your jar and make sure things match
?paste your whole latest.log pls
and make sure you're yeeting it on the right folder
"CraftBukkit" on normal spigot
"Paper" on paper
ok that is one problem solved, storing data within blocks, but how about moving it across blockPlacements, blockBreaks and itemDrops?
should i use event listeners to move data?
or what is the standard way for doing this?
CustomBlockData has a method registerListeners(), then it automatically moves data if blocks get moved / destroyed etc
are you actually using plugin.yml or this weird paper-plugin.yml?
its paper-plugin.yml
so re name it?
yes
i am using paper spigot
that seems rather nifty.
paper is able to load normal bukkit plugins just fine
if you're usign their api and their server ask on their discord server
use a plugin.yml
their new "modern plugin loading strategy" is pretty bugged and doesn't even have all the features that bukkit has
e.g. the library loader
and apparently the depends thing also doesn't work, or works differently
yeah I know. you should only ever use paper-plugin.yml if you do plugins for paper only. and in that case, you should ask on their discord π
yeah but if you use paper-plugin.yml, your plugin won't run on spigot
the paper-plugin.yml doesn't really add any benefits, it only causes trouble
?paste
@quaint mantle you can update maven-shade-plugin to 3.5.0
looks fine but you should replace "your.package.name"
and as said, you can update maven shade plugin from 3.2.4 to 3.5.0
i just used the intellij minecraft development module thing to create the project.
seems to work fine but i will update it.
yeah the minecraft-dev plugin is pretty shitty tbh
it causes many problems and doesn't really add any benefit
but there is another thing that uses shade plugin, should i change that too?
you must only declare the shade plugin once
its for Inventory Framework.
show your whole pom
?paste
preferrably not in this chat lol
you can just merge both
how would i do that?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>com.jeff_media.customblockdata</pattern>
<shadedPattern>me.pulsesapphire.mainscript.customblockdata</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.stefvanschie.inventoryframework</pattern>
<shadedPattern>me.pulsesapphire.mainscript.inventoryframework</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
so just replace the two with that?
exactly
np
π
btw alex, do you know this per chance
that's what this channel is for lol
You can silence those warnings
you can tell IJ to use that annotation as entry point
something something project settings?
uh wheres that settings window again
add EventHandler as annotation there
it wasnt ctrl shift alt s
im on win10
then File -> Settings
quick q because I've never tried to spoof mc enchantments: do plugins that spoof mc enchantments leave residual keys in the jar file as a norm such that even if the plugin is gone the things the plugin registered into the server remain saved in the jar or something?
should look like this @smoky oak
and I don't mean leaving custom pdc data, I mean they registered enchantments as mc enchantments and now they're just there forever
"saved in the .jar"?
the enchantments stays in the itemstack even without that plugin
ah
no, I mean actual enchantments, they get kept
yea that did it thanks
even if the plugin that added this enchantment isn't loaded
because I am getting the list of enchantment keys from a server and a user of mine is getting enchantment keys from a plugin that supposedly is no longer on the server
that a project or global thing now?
but that would only be local to the itemstack, no?
because it gets stored in the pdc
It gets stored in NBT
would that affect the enchantment keys registered to the server under normal conditions?
No
The registry is created at startup before plugins even load
And you need to do some jank to modify it with a plugin
ok so if someone somehow managed to make a plugin that registers enchantments, spoofs these enchantments as mc enchantments and then somehow managed to store them in mc beyond the lifetime of their plugin (i.e. the keys persist despite the plugin no longer being in the server) that's atypical behavior, right?
Yes
It's malware, yeah
what kind of keys?
I'll double check
dont PDC keys stay no matter if the plugin is active or not?
They do
Residual data is fine
keeping functionality regardless of whether it's allowed or not is.. not
fair
oh actually how much data is fine to write to player PDC?
iirc theres some limit where it crashes
Ideally you just store an id and use the data elsewhere
pdc doesn't matter
well, as long as my keys are longer than my data i should be fine lol
if the plugin is out the data is inert
the problem is when you're fucking up the keys and removing the plugin doesn't fix it
only reason im not making separate config files is coz its so little data
So I'm trying to do a malware cleaner, which on its own isn't really a difficult task. The problem I'm facing is trying to support multiple different malware at once
https://paste.md-5.net/ememubinet.cs
The issue is code changes require the following to be able to save to a new jar:
ZipEntry newEntry = new ZipEntry(entry.getName());
out.putNextEntry(newEntry);
System.out.println("Writing '" + entry.getName() + "' to cracked jar");
writeToFile(out, new ByteArrayInputStream(classWriter.toByteArray()));
where as zip entries just need
ZipEntry entry;
// skip if malicious, otherwise output to ZipOutputStream
out.putNextEntry(entry);
writeToFile(out, zipFile.getInputStream(entry));
Not entirely sure how I'd go about supporting both π€
uhh
writeInt(amount)
and then for each
writeInt(byte array length)
and store the entire array
so when the block gets destroyed, i might find the data in the item drop's item meta, i am guessing?
actually, is there a documentation of the malware scanner anywhere? Or a way to run it to test it? If anyone know it its you, I wanted to look into it
is it maybe AdvancedEnchantments π₯²
no - that is specifically NOT supposed to happen
you would have to listen to BlockBreakEvent manually and add the data to the dropped item
okay.
to be specific if i could bypass it
Malware Cleaner
it wasn't, it's nothing, got the reporter to test it more thoroughly and it was a mistake on their end
Β―_(γ)_/Β―
well the mc spoofing part is right, the persistence isn't so it's just your average annoying enchant plugin
there's 3 types of enchantment plugins:
- Those using minecraft keys (bad)
- Those using their own keys but still extend Enchantment (bad)
- The proper ones that don't use any actual MC enchantments but only PDC data, but I don't think any of those exist
pretty sure it's not that difficult?
my enchants are like the last one
yeah that is good
but they're just a small part of EM
only thing where extending Enchantment is ok imho is to create the glow effect
yeah never cared that much about that in the first place
wait
can't you apply an enchantment that doesnt do anything and tell it to hide itself
yes but it'd also hide other enchantments
im pretty sure you can set an enchantment to not display itself to get the glow
wouldn't lore solve that issue?
maybe someone would have unbreaking AND your custom enchantment
yes but then you'd have to deal with changing the lore, what if another plugin also already changes the lore
also it wouldnt be translated then to their locale
ah
because ItemMeta does only support Strings, no translatable components
my brain is 'english is the only language that is a thing' so i tend to forget that
Yeah Choco
:p
yeah I also play MC in english but e.g. every chinese person can't properly speak english lol
lol this guy doesn't even have a custom lore format that is also partially a scripting language
they always use google translate "If I eat the machine then the item is not produced, what is the problem"
i fuckin hate fortnite
we love fortnite we love fortnite

fortnite is a very boring game
I love fornite and roblox, it keeps all the kids out of the games I actually want to play
god bless them
never played them
but they're great
you're reading plugin documentation in your free time?
documentation, unfortunately, is not ficional
yo magma you usually order shit from our country's tech stores?
deal of the day is miserable
they selling this laptop they claim costs 1.7k because it has a 12th gen intel cpu and ddr5 ram
integrated graphics
sucks to be you I got a lenovo yoga 7 for 900 because it was prime day, msrp 1500-1600
euro
yea no
but hey it's a 2560x1800 screen !!
fnac wanted to sell it to me for 1800
fps > resolution
I bought an identical lg gram for like 1k
you don't need 144hz for work
I don't think he's buying a laptop for the fps
bit hypocritical coming from me
or else he wouldn't even be looking at integrated graphics
whose discord monitor runs at 165hz
I got rid of all my high framerate monitors
i mean, i use this monitor for everything so im seeing discord in 144 hz
they're all 60hz now
but yea minecraft at 60 fps feels slower than at 144
i know it runs at 20ups but still
me lmao
wait you made me agree with illusion
it's work
i opened it for work but it's still bad on the eyes
you suck moterius
I play heavily modded MC though lmao
:P
the fuck is a web summit dev ticket
lisbon? I would rather have my toes eaten by rats than be caught going to lisbon, especially to be in your proximity
oh so you're a charity case
ah so the good people get kicked out coz it looks like the data ai is trained on and spits back out
yes
gotcha
i stg if i have more than 1 star
I think I got maybe 45 across all my projects
alright good i have 0
I had no clue but looks like I have over 100 on em
which is decent for someone who has never released an actual decent plugin
do you mean yourself or magma
huff my shorts illusion
I don't see your free open source gplv3 in-game model displaying software
I don't see clean code
also by the way i dont believe you saying youre broke, youre paying to have a purple name
how is it possible to make deault enchants using pdc like fortune and stuff?
yeah I know, I am aware of how you program
cant you apply the enchantment normally?
it's 10 bucks a month
yea thats like 3 meals
so?
alright you broke me
discord actually does accept exposure as payment
yea
also how are you broke, weren't you the one asking me how to dodge taxes just a few months back
well
did they catch you and you're paying it back
Let's just say I did have quite a few expenses
wdym?
write your computer off as work expenses
so fuckin annoying you cant do that with food
he can't write off any expenses since he's dodging taxes
you can even tax write off drugs if you really need them to be able to work lol
not here
sad
or are u talking about fully custom enchants?
in germany it works
im about 99% sure i a) need food to wok and b) cant write food off as work expenses
that is true, but that's because everyone needs food
you can write off food as work expenses
it just has to be in the right context
explain
if you take your team out for lunch the business can pay for that
if you have a cafeteria for your staff the business can pay for that
if you have a lounge area with snacks the business can pay for that
yea heres the thing, no matter how much i puff myself up im not a business lol
are you saying to make a GMBH or whatever?
welp time to send an invoice
I have one
what do you use for that?
but that's because I'm a baller
Stripe?
paypal
ah
yea i dont trust paypal
they closed my dad's account twice without apparent reason
illusion probably does
paypal is my homie, I have no clue why but they always take my side
even when I said on chargebacks that I was fine with refunding the person
don't have that, don't want it
better than transfering all my money to the bank and having them ask questions
and thus we reveal the tax dodging troubles of illusion
im keeping a stack of cash at home cuz its not traceable
or would
if i had any money
also illusion you think you have expenses? I'm doing two elective surgeries and putting on braces
as I said, had expenses
and money in wasn't that good either because everything's coming at once
I got 10k outgoing right now for the surgeries
what surgeries
got new glasses, paid off all my debts n shit
elective surgeries
I broke my keyboard a couple weeks back
why do you have debt
paid like 180 on a new one
they are not covered by anyone
loser behavior
i have my late uncle's phone
why did that cost 10k
let your teeth rot and pay for the phone, cash, in full
rhinoplasty, spacer for my teeth and then invisilign braces
imagine being self conscious about your nose
5k for the rhinoplasty, 4.5k for the teeth
just be naturally cute smh
Just be a girl
ive got nothing to be self conscious about my body coz depending on my clothes i morph from a teenager girl into a 30 year old dead inside business man
you don't leave the house anyways so who cares
that is true
somehow im still underweight
like i dont move my ass except to buy food
wtf
I also had those "invisible braces", they were still visible lol
hm should I go to the beach tomorrow
yes
the inside of my nose looks like a halfpipe
looks like a low quality CAT scan slice
you seem to have a blocked nose
yeah no shit sherlock
looks like a sad dude with a mohawk
did somebody mention macgyver
neo-angin
really helps with that sore throat feeling after not drinking anything for 10 hours
so yeah that's why I'm getting a rhinoplasty, I actually already had one surgery that took some flesh out so I could breathe at all
but I'm just going to rebuild this thing once and for all
better
stronger
less like a tony hawk pro skaters 2 map
actually i just got an idea
why dont we take a cat scan, take a random slice out of it, and make some video game map from it
gonna look organic but if its angled right u cant tell why
knowing japan someone over there already did it
japan is ...preoccupied with other projects in that sector
is this one of those pictures you give a psycho
welcome to medicine
yeah, a butcher that will put you to sleep and then mutilate you with a saw, a chisel and a hammer and then charge you 5k for that
hey its not about the size
its about the technique
back to pink name babyyy
I fundamentally don't understand online vanity
rainbow flags are fancy
by that logic the fanciest avatar pfp imaginable is just a color wheel
Now weβre talkin
i dont need to color my pfp to be unidentifiable lol
imma be surprised if any of yall can guess where it is from
This is all the error tells me, how tf am I supposed to tell what pattern does this
I I think I know which one it is, but the error doesn't specify it
I'm gonna assume the java regex engine is not built for large strings
Testing essentially this, but larger
can I like stop 9minecraft from doing a little identity theft on the side?
email them?
yeah I guess
at least they give credit lol
they liek posted my plugin on their site with like a changed descritption and tehn claim I am the author
I hear they listen to ICBMs