#help-development
1 messages Β· Page 53 of 1
i'm extremly new to maven stuff, how would I import it? i only ever added NMS before lmao
oh nevermind im dumb
hey @lost matrix the packet listener doesnt even seem to detect the message, i've prepended the message with ###
I've made it output something in console if anything appeared but nothing
ok so it works if i send a chat message, but not when the plugin sends it
so it's detecting that packet
bruh
never mind i'm literally braindead
eh nothings changed
Wait, does opening a workbench GUI not work anymore?
e.getPlayer().openInventory(Bukkit.createInventory(null, InventoryType.WORKBENCH, "Portable Crafter"));
It opens the inventory, but nothing can be crafted in it
π
simulating real life
realms does everything with resourcepacks
@waxen plinth does essentials still have a workbench command?
It does, I didn't want to just use that though lol
i meant it more as a hey does this still work
sadly doesn't change anything
Is there a way to disable the "Player X (formerly known as player XY) joined the game" message?
Not as far as I'm aware. That's just Minecraft stuff that happens for... I want to say 30 days?
com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0
ideas?
listen to all plugin messages
clientbound
Packet.Play.Server.CHAT
(protocollib)
Oh it's only just the once. The 30 days thing is just us on Spigot lol
Since when is it mandatory to add text transcriptions to projects?
if you really want, you can use a resource pack to change the lang of multiplayer.player.joined.renamed
At least a few years
Just premium though iirc
Possible to add the text transcrptioni in a spoiler under the image containing the text?
Usually sufficient but you're kind of screwing yourself over in terms of SEO
Plus why do it offsite when you can literally just paste it into a spoiler
Oh you said spoiler mb
My brain for some reason thought you were talking about a third party paste website lol
Yeah that's totally fine
alright then I'll do it like that
basically to give a full idea:
I'm trying to make a packet listener that will listen to all the messages in chat, specifically a /msg command
But it's not even detecting the plugin message, and gives this error when i type in chat. (i'm not even listening for serverbound messages)
What version are you on?
1.19.2
paper
build 116
i think its like almost the latest, updated yesterday
Are you filtering just that packet?
i'm just trying to edit messages sent in chat by the server not the client
and it seems to be only doing something when i send a message
nothing happens when i run a command and the server outputs stuff to my chat
Yeah but you're filtering just for outgoing chat packets?
huh?
i thought packet.play.server.chat is the server sending messages to the client
I'm using the override onPacketSending method
isn't that the server sending packets to the client or wht
I know... but are you using a whitelist to only be listening for that packet
You didn't show which packets you were listening for in your screenshot lol
from some forum thread on spigot since i couldn't find anything else
from 2017 though π¬
didnt really check the date
This for 1.19.2?
yeah
version support shouldnt be a problem right
viaversion handles it for lower versions i think
but the base server is on 1.19.2 yes
Does ProtocolLib have a release for 1.19.2? Because the chat packet underwent some changes and it doesn't have a chat component field anymore
It's a PlayerChatMessage now which contains signature information
Best way to fill an area?
hmm ok let me check the dev builds
ok so latest dev build was only 2 days ago
it says support for 1.19 on the side tho
1.19 != 1.19.2
yeah
There are major chat changes between the two
So why are you trying to replace stuff in the msg command
choco said playerchatmessage
placeholderapi
in a plugin that doesnt support it
and the devs seem to be a bit dead
so i'm making a workaround for now
Fork that plugin or use another one?
Maybe even make your own msg command
That's not hard
It's easier than messing with the packet
well yes but cross server sync with the plugin redis database and no proxy plugin
it's gonna be a lot more effort to make it compatible
which is why i've resorted to packet modification
What plugin is it?
ABOUT
Join support discord
Description:
Aqua Core is a complete add-on for any type of server. It supports the ranks system, punishments, essentials features & commands, and much more. This core has a bunch of features and will have more in the...
bit difficult to fork an obfuscated plugin xD
and i don't have 200 quid for the SRC
mc market isnt even mcmarket anymore what
built by bit
spigot price limitations moment
spartan somehow got away with that
Yeah and license systen limitation
yup
The rule doesn't apply to plugins older than the rule itself
i went with this one since no one has managed to crack it ever aha
oh ok
lol
Smh spigot not supporting bb code for tables???
judging by the awful api they provide
yes
every method is just "throw new illegalargumentexception(plugin is not registered)"
and about 5 methods for one thing
anyways back to what i was saying
Well that's how you do it when you don't want to give the code
its going to be much easier to packed modify
yeah i guess
no good documentation is s pain
is there a event detects interacting with shields?
is opening threads here allowed
instead of PlayerInteractEvent
Yall know how to copy the whole memory and storage of the server?
I wanna make a time traveling machine
No need for a memory copy. Copying the persistent data should be fine. So just some backups
so copying the world and player data and stuff? But how to refresh that
Without restarts btw
This is going to be a very complex task. You need to do quite a bit of research and then come up with
something yourself.
Hmm
yes
Orrrr
I can tp the players to another server and restart the server
then tp them back in
That kinda sux tho
your biggest issue is going to be storage
however for time traveling all you need is a DB
depends how far back you want to allow time traveling
for 7-14 days you are looking at easily 20-30GB of data
but this amount of data is dependent on the players
and the frequency in changes
how do I set the lifetime of a particle when using spawn particle?
or is it possible
judging by the discord search feature it isnt so nevermind
Hello, i try to change color of an Banner on the world but it still white
That my code
Someon have idea ?
Does your method actually get called?
To me too X)
And when i call banner.getBaseColor.name it's say LIME
SO i don't see why that didn't change
is there a lifesteal plugin tutorial that anyone knows
how craft heart?
how do you cancel certain items in inventory or just off-hand so players can't pick it out
Anyone knows how to make those updating server stats banners for signatures, etc?
modifying clientbound messages using packet interception or something else
?fork
SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.
o
wtf is airplane
paper fork
does anyone know a tutorial on how to make a lifesteal plugin
how do i test plugins that require a lot of people
like 20
i dont think my pc can handle 20 clients
nms dummy player
or get more friends
or kidnap 20 kids
what plugins are you even testing
that need 20 players
large minigame ones
they dont have any other setting?
Online mode = false
Write a 4 line Mineflayer bot and let it connect 20 times
well yes or that lmfao
what is mineflayer
google it
mmm okay
How is that supporting cracked players?
anyone know a pmine source code i can look at to try and make one myself, wanna see how they do the world edit stuff etc
Are you sure that they use we?
well whatever they do use. just want to see how they do it
the world mapping etc
all of it
pmine?
private mine
anyone know a tutorial on how to make a lifesteal plugin
Oh. For prison servers. lol. Good luck finding anything from a prison server open source
Filling a cube should be really simple with worldedit. Pretty much everything you would need is covered by the documentation.
ye i guess, need to learn all of the world map stuff and upgrading etc. base schematics yano
it was just a joke
there was some cringe guy here who hounded on a guy for that
Big shadow thing in the sky
does anyone know a lifesteal plugin tutorial
What does such a plugin do? Just transfer health if someone is killed by another player?
bro just google, there are like a billion
i've tried that
i've tried basically everything
I literally spoonfed you all of the code you needed
ur code didnt work
but your back because you've yet to figure out how to change the names of two variables
get it together
no matter what i did
?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.
Such a plugin is quite an easy task. If you cant pull that off then you should put more effort into learning the basics.
So is mineflayer designed to be a testing software for plugins?
Is it possible to control these bots? As in once I connect 20 bots, I need to be able to take control of these bots
lol then you need 20 clients
damn bruh
I made a function to break all the blocks of a chunk, does anyone have any tips on how I can make it as optimized as possible?
@lost matrix don't you have a thread on this ^
something something distribute tasks
Do it over several ticks
?workdistro
ahhh that command
I mean you could open up there client and add teh ability to send protcol to the server
but that'd require you to actually crack that client open and get coding
damn
well is it possible to at least programmaticly make these bots do something
like when i say a certain command in chat on my main account, i'll have the bot break a block or whatever
you'd have to code it into the client this can't be done with spigot
the most you could do server side is create a shit ton of npc's and code pathfinding goals
With PlayerJoinEvent do you have to delay a tik before the player gets added to the online players list like you do when its removed with player quit event
Sure. They can listen to chat and react on that.
when NPCs it wont even trigger most events though will it
depends how in depth the API you use is
NPC's technically can open and use inventories according to HumanEntity which is provided from the InventoryClickEvent
If you use mineflayer npcs then they are perceived as actual players by the server
Ah okay
Hello! Im trying to learn how to code minecraft plugins, Are there any youtube videos or websites to learn?
the spigot forums
learn java first if you don't know it already
I don't know if this is applicable as this is more so programmer etiquette, but if someone abandons a plugin are you allowed to and is it recommended if you maintain the plugin and upload a new resource if you cannot contact the author or they don't see your message about you asking to become the new maintainer?
seems fine to me as long as you obey the license they have it under
which has to be gpl3
just fork their plugin on github
yeah, I did that and did some changes but I will do one more attempt to ask the original author before doing this
Although not sure if the author wanted it to be maintained after they gave up on it given how they designed it (did things like tying basic functionality like grabbing player heads to their web server with it's own api... for some reason?)
probably why its abandoned
well given how much work they put into it, I don't think that was the intention
they might've just did it to bypass mojang's api rate limiting
in what order are the items returned by playerinventory.getcontents(), and does it include all items? (empty slots, off hand, ect.)
(just realized my question sounded like something from a quiz, I'm asking because I don't know the answer)
anyone know what event is fired when giving an allay an item?
its not the playerinteractentity event like i thought it would be
what if it isnt π
π¨
Guys any1 can help me how to start to search for this XP bug that's happening in my server? Suddently the user starts to receive almost infinit levels of XP, and nothing shows in the console as well. I literally don't know how to start thinking about how to solve this problem -> See this .gif https://i.imgur.com/EuOeUtg.gif
there is a plugin or a way to develop a plugin to find what's happening in the server?
what's your plugin list
It's not a hand coded server so lots of plugins
My bet is that is something related to advancements receiving XP. Because I was flying with elytra and all this started
I remember seeing someone else having this exact problem, let me search some discord messages
Wow! Ty so much for the attention Hyper, I'm super confused π¦
I believe I found the messages, it has something to do with advancements not being saved, and it gives you completion once you join, something like that
in your spigot.yml, what is disable-saving under advancements set to?
what causes memory leaks
1sec
I sadly do not remember what the fix was, but you MIGHT have to disable advancement saving, try to set that to true and restart?
I SWEAR, some guy had this exact problem and they fixed it some how but I cannot find it
No wayyy π¦ It happened like 3 days ago. Like suddently π¦ I'm with 300+ levels fuckin insane and takes out the vanilla SMP experience π¦
OH I FOUND IT
they changed that to true, the disable-saving thing
k
i set this
`advancements:
disable-saving: false
disabled:
- minecraft:story/disabled` to true?
also, they disabled advancements completely:
disabled:
- '*'
it sucks, but it's a fix that works
They are varied in how they are caused, but if you want to find out what plugin is causing a memory leak, you can use jmx, heapdump and analyze it using Eclipse MAT
THANK YOU SO MUCH!
I'll make like tags here to help any1 to search this topic
xp, xp bug, infinite xp, advancements bug
can anyone recommend a good book to improve my java knowledge or course
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.
Does anyone have experience listening for Particle Packets with Protocol Lib
because its giving me a hard time
try without plugins
if it also happens, report to spigot
So Funny, now I open chests and I get 1 level per open π
But I didn't restarted the server after the advancements changes so no problems let's see
144p gif quality
Any item that I open a GUI I receive 1level, let's see
Disabled all the achievements let's see
wtf is that bitrate
sry π
bump anyone know?
It's just like listening to a regular packet
oh wait
wrong thing sorry
Anyone know Sending a particle packet with Protocol Lib
Its giving me a rough time
It's just like sending a regular packet
Yeah I know
I'm asking if anyone has any experience because this is confusing and I have tried many a thing
and I just lost what I was trying because I switched my idea back to my original and then remembered after that why I switched it back
whats been giving me trouble is simple
filling out the fields with the proper type
the link to give the packet fields doesnt have much on particles and whats there is confusing in itself
if you read my tutorial
it shows you how you can check the nms fields
You just have to use protocollib's nms wrappers
packet.getNewParticles().write(0, WrappedParticle.create(Particle.REDSTONE, new Particle.DustOptions(Color.RED, 1)));
writes a redstone particle
for example
I already have that part figured out
just finished remaking it
going to try it and see if I fixed it while just making it again if I didnt ill send what I have here
yeah I get this error whenever it tries
This is the Packet Code:
PacketContainer packet = new PacketContainer(PacketType.Play.Server.WORLD_PARTICLES);
packet.getModifier().writeDefaults();
packet.getParticles().write(0, EnumWrappers.Particle.valueOf(String.valueOf(particle)));
packet.getDoubles().write(0, x).write(1, y).write(2, z); // Fills in Position Parameters
packet.getIntegers().write(0, 1);
if (stopMovements) {
packet.getFloat().write(0, (float) 0).write(1, (float) 0).write(2, (float) 0).write(3, (float) 0);
}
ProtocolManager manager = SpiritsUnchained.getProtocolManager();
try {
Collection<Entity> collection = location.getWorld().getNearbyEntities(location, 15, 15, 15);
for (Entity entity : collection) {
if (entity instanceof Player player) {
ItemStack helmetItem = player.getInventory().getHelmet();
if (helmetItem == null) {continue;}
if (SlimefunItem.getByItem(helmetItem) instanceof SpiritLenses || PersistentDataAPI.hasByte(helmetItem.getItemMeta(), MiscUtils.imbuedKey) && PersistentDataAPI.getByte(helmetItem.getItemMeta(), MiscUtils.imbuedKey) == 2) {
manager.sendServerPacket(player, packet);
}
}
}
} catch (Exception ex) {ex.printStackTrace();}
try encoding it with getNewParticles
ngl I have no idea what that means/how to do that
replace getParticles with getNewParticles
if I do that do i replace EnumWrappers.Particle.valueOf(String.valueOf(particle)) with WrappedParticle.fromHandle(EnumWrappers.Particle.valueOf(String.valueOf(particle)))
fromHandle should take an nms object
restarting now
if it was that simple
thank you lmao
we'll see once its started
its not erroring but I dont see the particles however that is probably from my own check before sending it so im not worried abt that
thank you
wondering why u wouldnt just spawn the particle with api
because
need to hide these particles from players unless they have a specific item or a item with a specific persistantdatatag
you can add meta to protocollib packets ^
why isn't this working?
bad url?
works
idfk
i've tried different image hosters
still doesn't work
spigo bad
ik but there is no reason for me to add meta here, then add a listener for getting the packet and check it there, i can just set who im sending it to here and bam no more
you can send it via the api, but just here?
like player#spawnParticle is a thing
unless you're on like 1.8
but then again you're using new particles
w h a t
kill me please
I just wasted
SO much time
Welp ig I know how to send particle packets for future usage
no such thing as wasted time
you learned packets
:)
flashbacks to when I wasted 9 hours making client-side items
because I forgot to set the entity type in the packet
https://github.com/CreeperNation/Geyser any way I can build this automatically with GitHub actions
I have something I added
ouch
ok now is there something like this, but for making a mob silent, I know there is player#hideEntity but that doesn't mute said entity
xd
ill just look into using packets for this
I donβt want the default because I added something new I already made my fork compile it so donβt worry
Yeah, for muting sounds you gotta use packets
is there any way for seeing what actual entity the packet came from?
like is EntityID the UID?
its unclear
the entity id
what is the entity id then
is that the id of the entity CLASS or some ID of the actual entity instance
plz help my deluxe menus dont work after i changed my version from spigot to paper
instance
?whereami
I think
So it is the unique ID?
no
so how would I use this EntityId to get the instance of the entity
Maybe theres a method on the NMS Entity
well
plz
What mc version are you using
This is the wrong channel and wrong server
declaration: package: org.bukkit.entity, interface: Entity
I already saw that, I just don't know how to use that ID to get the entity back
You have to loop trough all entities and compare their Ids with the id from the packet
ah
I think its World#getEntities()
it's 3am don't judge me not thinking about that lmao
1.16.5
it was working on spigot
but dont work on paper now
i switched
What Java version are you using?
you may have to use Java 8
it was working on spigot tho
going off of this would the way to get the packets EntityId be packet.getIntegers().getValues().get(2)
doesnt it have a wrapper
some of the packets do
anyway this should work
But it might start from 0
if it did what would that mean XD
As you can see I am still very new to protocol lib
and packets
It would mean, that you would have a getEntityId method
But I am not sure how to get the wrapper
gimme sec
ok, it probably doesnt have it
yeah I didnt see one
btw it seems to start from 0
ik
I thought it was 2 because there were 3 VarInt entries
i have a test jar to figure out which one it is rn anyways, just going to try all three with proper checks to make sure they dont error
I am not sure if the Enum counts
youll have to try
that is indeed what im doing
so umm. in spigot, making a stringbuilder to get all the args and append a " " between them looks like this:
StringBuilder sb = new StringBuilder();
for (int i = 0; i < args.length; i++) {
sb.append(args[i]).append(" ");
}```
however, now I am making a Bungeecord plugin and `args` doesnt exist. how would i replace that to work with bungee?
Where are the args coming from?
well uhh. command i guess if thats what u mean
Btw you can use String.join(" ", args)
but it doesnt exist itself
So, slight problem
protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.HIGHEST, PacketType.Play.Server.ENTITY_SOUND) {
@Override
public void onPacketReceiving(PacketEvent event) {
Player player = event.getPlayer();
player.sendMessage("Fired Packet Received");
PacketContainer packet = event.getPacket();
Entity entity;
for (Entity maybe : player.getNearbyEntities(30, 30, 30)) {
if (packet.getIntegers().getValues().size() >= 1 && maybe.getEntityId() == packet.getIntegers().getValues().get(0)) {
player.sendMessage("Working 0 ");
}
if (packet.getIntegers().getValues().size() >= 2 && maybe.getEntityId() == packet.getIntegers().getValues().get(1)) {
player.sendMessage("Working 1 ");
}
if (packet.getIntegers().getValues().size() >= 3 && maybe.getEntityId() == packet.getIntegers().getValues().get(2)) {
player.sendMessage("Working 2 ");
}
}
ItemStack helmetItem = player.getInventory().getHelmet();
if (helmetItem != null && helmetItem.hasItemMeta()) {
if (MiscUtils.imbuedCheck(helmetItem)) {
event.setCancelled(false);
}
}
}
});
Thats the packet listener setup and, its just not even sending the Fired Packet Recevied
ohh so i can do strings right?
like replace args with strings in my ccode
code*
Look at the Command interface
alright, thanks
IntelliJ should tell you
oh yea
weird
It says args in docs
You proably don't have sources
maven
is it bungeecord docs though?
yes
well lets see
It is because IntelliJ doesn't put the Maven sources there
Try double press LSHIFT and type Download maven sources
Oh yea its fine now
try it
StringBuilder sb = new StringBuilder();
for (int i = 0; i < args.length; i++) {
sb.append(strings[i]).append(" ");
}
String message = args.toString().trim();
message = PlaceholderAPI.setPlaceholders(p, message);```
oh nvm
i did still strings
k i changed the strings to args it is fine but PAPI still has some problems
Is PAPI even for Bungeecord
I don't think so
oh so i cant use it
nope
alright thanks
Is possible to check if a player is looking at another player head?
How?
oh
"get the entity"
a player head is a block/item
unless he means as a head of a player entity
I think he does
yea possibly
"head of another player"
Hey guys, I'm trying to teleport a vehicle up when it reaches a wall as a kind of 'step up' thing
Here's my code for doing that
Currently it's always returning air however
Try to normalize the vector
why normalise?
won't that make it a length of 1?
yes
Whell you want a block in front of the player, right?
yes, but it's moving and could move more than 1 block in a tick
doesn't matter
I think
The faster hes going, the further block you will get
if he's not moving, youll get the block inside the player
well I don't want to tp it if the velocity is 0
or if they won't actually be on top of the block in the next tick
ig I can try it
but if you look in the screenshots I sent
it's saying there is air in a block with ice
the co-ordinates should be the same
it says blue ice
not in the logs
thats because you are probably not getting the block in front of the player
Also VehicleMoveEvent returns 0,0,0 if it is controlled by player
or should result in the same block
I've actually done the same thing this week
oh cool
with boats on ice
use PlayerMoveEvent
mk ty
Same π€£
is it possible to create a config in bungeecord in a similiar way like its possible with spigot, just create a config.yml in the resources folder?
it's not done yet
its a bit more complicated
yea i kinda have a different system
I recommend using a lib like BoostedYAML
i have this
why is it so spaced out
nope
Plugin#getDataFolder
it doesnt exist
yea
you gotta create it
how?
i doubt anyone would know how to do that but its worth asking
It usually gets created automatically i think
Well
yea. what does that do?
Read docs
Maybe tell us what are you trying to do and there will be a better solution
a time machine
Create all necessary folders for the file
some other plugins may have a data of their own
Or like the folder
alright, so something like this?
getDataFolder.mkDirs()
file.create()
thanks!
Is it for a public server or just personal?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
ill send the code in a sec
Just use BoostedYAML
i dont think thats the problem tho
It'll make it much easier
so how do I make it not null without learning how to use a whole new library?
I've had the same when I started programming "oh it's a bug for sure"
Nah, it was my fault
always
send the code
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
You don't set the instance in the constructor
public StaffChatCmd() {
super("staffchat");
instance = this;
}
k i think i got it
11:17:53 [WARNING] Exception encountered when loading plugin: StaffChatBungee
java.lang.IllegalArgumentException: Plugin already initialized!```
maybe i should switch back to spigot
Is there a way to set more than a stack in a single inventory slot???
there is kind of a way for that, but probably hard and super buggy, so forge would be a better choice here
No not really. You can alter stack size caps but it requires reflection
and its buggy on the client.
G
?ban @cobalt pike
Done. That felt good.
can I teleport a player to a different world?
Does anyone have any ideas on how to create a boat step-up effect?
This is what I currently have
but it's glitchy and sometimes the boat runs into the wall or loses it's velocity
yes
oh I just had an idea
raytrace
what do you mean by boat setup effect
I am trying to hook when a player uses an elytra and I cant seem to figure out the right place to do it. Could someone offer some guidance ? π
is EntityToggleGlideEvent what you're looking for?
step up, not set up
step height
so if you run into a 1 block tall barrier you get tped to the top of it
oh right π€¦
why are you using nms just to teleport an entity
can't teleport a boat with a player on it
true
I've cracked proguard before
had to rebuild an obfuscated plugin and update some nms
took me like 5-6 hours
oh cool
now climb 2-block tall walls
do note that it is a lot quicker if you have the right tools at your disposal
tping I think is a safer option
just check if !next().getAbove().isSolid()
it's a racing game
I had 3 decompilers
Stitch + tiny-remapper + tools such as sl-deobf are pretty good at breaking apart the obfuscation provided by proguard
I don't want the boat's velocity to be stopped when it hits a wall is the main issue
or when it climbs
BUt if it is just updating NMS you probably want to use Recaf instead at which point it will be something that only takes a few minutes instead of hours needed for recompilation
I can sail up stairs which is good
it had name and package obfuscation and I did it manually by hand π
but going around a sloping curve is a little glitchy
Be happy that generics weren't stripped then, the absence is nasty
they were
also anonymous classes were pain
the better decompiler didn't like them
so I had to cross-reference with the worse decompiler
Out of curiosity which where the decompilers?
?paste
Why doesn't the command work?
@Override
public void onEnable() {
// Plugin startup logic
instance = this;
configManager = new ConfigManager();
dataManager = new MySQLManager();
dataManager.initialize().thenRun(() -> {
Main.getInstance().getLogger().info("asdjsaoudsahdousahdosauhdasiudhsaiudhasduksahdiusahdasdsadsadasdsada");
AuctionItemsManager.initialize();
registerEvents();
registerCommands();
});
}
private void registerCommands() {
getCommand("auction").setExecutor(new AuctionCommand());
}
AuctionCommand.java: https://paste.md-5.net/avoxaxuxif.java
Logs:
[15:23:14] [Server thread/INFO]: [CloudAuctions] Loading CloudAuctions v1.0
[15:23:26] [Server thread/INFO]: [CloudAuctions] Enabling CloudAuctions v1.0
[15:23:27] [ForkJoinPool.commonPool-worker-1/INFO]: [CloudAuctions] asdjsaoudsahdousahdosauhdasiudhsaiudhasduksahdiusahdasdsadsadasdsada
[15:23:46] [Server thread/INFO]: SunwooHan issued server command: /ah
[15:23:54] [Server thread/INFO]: SunwooHan issued server command: /ah
is ah registered as an alias in the plugin.yml?
name: CloudAuctions
version: '1.0'
main: md.mirrerror.cloudauctions.Main
api-version: 1.16
authors: [ mirrerror ]
commands:
auction:
usage: ''
description: ''
aliases:
- 'auc'
- 'ah'
- 'cloudauctions'
- 'cloudauction'
- 'clouda'
- 'ca'
- 'cauction'
- 'cauctions'
aliases should be an array not a list, I believe
lists and arrays are parsed the same
nothing changed
if your auction manager fails to initialize, the completablefuture will hide the exception and your command will not be registered
add a .exceptionally(throwable -> {throwable.printStackTrace(); return null;}); block at the end of your thenRun
that's the problem that I had, tysm π
You're missing " on looting
OUGHHH
chance is also misspelt
THANKS!!!!!!!!!
π π
I was working on it really hard when i have 0 knowlage about json and i have small thing that i don't see small thing like misspeling and all that kind of stuff
I'd recommend using YAML instead, a lot easier to get a hold of imo
Hi I have an issue https://sourceb.in/vzmeDlnsNU
Error: java.lang.NullPointerException: Cannot invoke "en.nothing.meridianacore.Meridiana.getParties()" because "en.nothing.meridianacore.Utils.PartyUtils.plugin" is null
at en.nothing.meridianacore.Utils.PartyUtils.findParty(PartyUtils.java:15) ~[MeridianaCore-1.0-SNAPSHOT.jar:?]
at en.nothing.meridianacore.listener.AdapterListener.onCall(AdapterListener.java:354) ~[MeridianaCore-1.0-SNAPSHOT.jar:?]
Until you mix tab and space by acident
It tells you what's wrong
i can't figure out why in i use it in other section and works just fine
The plugin instance is likely null (plugin isn'
(plugin isn't instantiated yet or hasn't enabled yet)
not only likely - it is
im stupid i didn't do on onEnable this.plugin = this
that is not the case however
At least not necessarily
They didn't assign this.plugin
yes my error i didn't put
this.plugin = this on the event OnEnable
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
#getFuelPower() #setFuelPower(int) #isCancelled() #isConsuming()
From first glance
Yeah but you can set the fuel power at your own speed
If it's faster than default
Probably more complex if you want it to be slower
get the block and then use this
declaration: package: org.bukkit.block, interface: BrewingStand
?paste
Why can't it find the class?: https://paste.md-5.net/kicibapiri.cs
class in the .jar file: https://imgur.com/a/ClzWtaI
A NoClassDefFoundError means that the class was found but was invalidated
So this is not the original error which does not help us much
what should I send you then?
Any earlier stacktraces
there aren't any more stacktraces
I suspect the (implicit) static block might be throwing an exception or there is some other linker error
just this one
I don't use static blocks there
should I send you this class?
Yeah would be good
Unless you are running with Java 7 or compiling that specific class with another java version nothing should go wrong there
I'm using the latest Java version
and I compile the entire plugin
Next best thing would be that JPMS blocks something, but that is night impossible too. Both classes probably use the same classloader so that is not an issue though
So uh, did you use the reload command?
Then I have no idea why this would happen. Especially not if it is a persisting issue
yes, it is
it throws every time when the plugin is disabling
cause I use a method that uses a field from that class
in the onDisable() method
try to explicitly load that class in your onEnable
you mean to get a field from it?
for example
I.e. something like
Class.forName("md.mirrerror.cloudauctions.utils.TimeUtils", true, getClass().getClassLoader());
In theory, could be some random spigot bug for what I know
the plugin class loader checks if the plugin is enabled in loadClass(...)
so I guess its on purpose
it works now, tysm π
Iβm surprised it doesnβt show a more explicit error message
It's surprisingly hard to make verbose error messages when it comes to classloading
I mean if itβs explicitly checking if the plugin is enabled can it not just throw whatever error it wants
?stash Would be possible, but first you need to think about that. And not fall to the temptation to use CNFE
And if you do use a CNFE, make sure to not absorb it in other classloaders
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/UnsafeValues.html#processClass(org.bukkit.plugin.PluginDescriptionFile,java.lang.String,byte[]) Could I use this method (with a serious amount of bodging) to mixin into other plugins?
How can i enable keep inv on death?
eg if player is killed by blaze then they keep their inv or not
Something wrong with /gamerule keepInventory true? Or do you want it under specific conditions?
Any idea why this isn't working?
keeps producing null even though the boat is pointing directly into a block
size() == 0 -> isEmpty() π
nvm it's suddenly decided to start working?
π
I would like it so if a player is only killed by another player it keeps the inv
Doesnβt the death event have a setKeepInventory
Right, so if you're making a plugin, PlayerDeathEvent should have a setKeepInventory() method
Yes
and it's not working again??
I don't understand why this is so tempermental
im the biggest noob ever and i need help
if i export my project it doessnt work in server
?dontwork
"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.
?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.
?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.
Yes
?paste
Because we literally do not know what is wrong
Then you forgot to define the plugin.yml or the jar is corrupted
(or you have an invalid name or whatever but that is visible in the logs)
I assume this is eclipse right?
yessir
you mean server logs right?
any error?
You probably did a typo when typing in the key
the key?
Needs to be main: com.dami.Main I presume
The main: part
no, and I'd put main in lowercase
also the package name?
The first one
aaaaaaaaaaaaaaaAAAAAAAAA
Oh right it is double main
so main: com.dami.Main.Main
And that is why you never have any uppercase letters in packages
Because some idiot (me) is going to think it's a class by accident
XD
this is why standards are a thing
well im sorry i fixed it now
when i say im a noob IM A REAL NOOB
average css user
Wasn't it always that way?
At least on a screenshot from april (1.18.2) there is this left padding
is there some utility method to get a file object and create it if neccesary?
very hot and kinky-
i mean wtf
You mean takes damage from falling?
ngl tho very hot
use Path
Path.of?
progress bar looking hot
uwu
Files.touch llfao
what dat do
not gonna happen tho
I mean wha-
but the exception is more detailed
try-with-resources is not such a big deal
try-with-resources is very poggers
is there many ideas for plugins
its ugly and im retrowing the exception anyways
uhhh
cross-server chat plugin?
no i mean is most of the ideas taken
just go to mcmarket and inspire from there
fucking
the town?
bitbybit*
synchronize player time with their actual timezone
lol
xD
hah
or do this
idfk
Find some random plugin and optimise it to oblivion
haha I love optimization
make a calculator
You may only stop once you have replaced most calls with the Unsafe class
x16 = << 4 ez
7 << 3
9-17
haha kms
~0 ^ 8?
smh i had to
alr bet
Could not resolve dependencies for project me.activated:AquaCore_3.0:jar:1.0-SNAPSHOT: Failure to find org.spigotmc:spigot-api:jar:1.18-R0.1-SNAPSHOT in https://repo.extendedclip.com/content/repositories/placeholderapi/ was cached in the local repository, resolution will not be reattempted until the update interval of placeholderapi has elapsed or updates
are forced -> [Help 1]
****
ew AquaCore
If you get something from mcm assume the code quality is quite bad. Also is has a licensing system which could brick your server should something happen to their server
would anyone recommend a course to learn bc im stuck in tut hell
Just jump in the cold water
so no courses
But baby steps. Don't do anything bukkit for the first few months
"If you get something from mcm assume the code quality is quite bad." You're assuming, if you'd actually worked with it then you'd say quite the opposite. While it has some issues I've modified it alot as to where it's very fun to work with.
"Also is has a licensing system which could brick your server should something happen to their server"
Not only have I never heard of this happening, there is a reason I have src
I.e. work with scanner, do some file IO and stuff like that
Anyway, can you help me with my issue?
You forgot the maven repo
ya is it outdated
I just dont understand why my maven class isn't red
Let's say I wouldn't learn java that way
ok how would you learn it
Did you add the jar directly without maven
But then again I learnt java in the good ol' 1.7 days through CanaryMod, so the way I learnt it cannot be replicated at all these days
uhh do i have to explicitly create a database when using sqlite? when using h2, hikaricp created the db for me?
Nvm I see the issue, just had to scroll down, my intelliJ was buggin
Well yeah - you need to connect to it which requires having a db to connect to
well ye ive seen people just creating a file and then setting the jdbc url to that file
im just gonna take a break and come back later
bc i think im stressing my self to much tutorials are good
but just stuck
is github copiliot good way to learn
copilot imo does quite the opposite
oh
I'm someone that believes that typing out everything by hand and having next to no auto-completion is the best way to learn someone (learning by doing)
In that essence IDEs are counter-intuitive to the learning process
But these days only a madman would suggest not to use these tools, so do whatever you want