#help-development
1 messages ยท Page 357 of 1
Ahhh very good, I will now try and code this thing and will report back
ok
imagine how much less pain you'll have if this shit would've gotten fixed already
Lolol no kidding, I am learning things about packets though which is going to be useful
help
I've been writing a game engine for a small project for the past two years and am dreading making it client/server based. Although its all ECS based so I expect writing code to serialize the components will basically be the bulk of the work
its cleaned when inventory is closed
leaving the server, inventoryclose() would get executed iirc
could prob just store player UUID or something instead too
You know what I find strange though
guys, do you ever used ACF?
but at least its cross version compatible
why cant I just do something like inventory.getId()
why all this weird hackiness =[
because bukkit api expects you not to use it
fair enough haha
Ok one final question before I start getting into it
Is there a way to only execute a piece of code if a given plugin is installed? I imagine there is some weird reflection stuff I can do but there might be an easier way
Bukkit.getPluginManager().getPlugin()
does ProxiedPlayer work also when player isn't connected?
note that this is dependant on plugin's name provided in its plugin.yml
You might want to take that further and use PluginManager#isPluginEnabled(). While it may be present, it may not be loaded.
Ohhh yeah thats good stuff. I will go that route
hopefully the package name doesn't change, but I imagine a plugin as widely used as protocollib will be good about that
ACF (Aikar Command Framework) and custom args.
this feels so hacky ๐คฃ but sometimes you just have to embrace the jenk
its really incredible the amount of stuff you can do server side in this game, spigot is amazing
combined with resource packs you can make stuff almost as cool as modded and it feels native
We still need custom blocks
That would make plugins insane
I mean you can do that it's just jank and laggy
Oh snap is that not something that is achievable atm? I basically am making "custom items" using the persistent data container
could you do the same for a block?
Kinda
We've had custom items for a while now. Custom blocks not so much.
You need to use armor stands iirc
oh wow, that is hacky haha. I would like to learn more about that
23w06a. Best. Snapshot. Ever.
https://www.minecraft.net/en-us/article/minecraft-snapshot-23w06a
Merch: https://phoenixsc.store/
Cape: https://store.badlion.net/shop/PhoenixSC
Patbox: https://twitter.com/TruePatbox/status/1623436131449843712
Datenegassie_: https://twitter.com/Datenegassie_/status/1623492820714799104
--------------------------...
Or re-textured blocks like barriers or noteblocks.
yo, nani the fuck lol
that is cursed
Is that custom textures though
no
no
It's purely visual though. There's no hitbox for them.
you can use barrier tho
woahhhhhh this video is cool ๐ฎ this is one smart man
It won't match up if the block is scaled X.5 blocks though. Yea, you can set the block_display to a barrier block, but it doesn't copy the block properties. The display entities don't tick and have no hitbox. It's 100% visual.
VERTICAL SLABS
can also animate blocks
i still see potential
yes
Mojang adds features the commmunity wants in weird ways e.g wirless redstone (skulks)
?pastebin
thats the truth lol
skulkers and target blocks
both awsome, not quite what I had in mind
that wasnt the command?
?paste
ah lmao
I'm still waiting for the day they make tile entities movable
Neverrrrr
๐ญ
I should also add to this. Since they have no hitbox or physics, you have to simulate everything yourself. So making them act like normal blocks with different scaling settings will be quite the challenge if they aren't the standard size.
i can see some cool stuff being made with the features in 23w06a snapshot and being able to apply direct damage to player without effects is nice.
oof I'm SO close
but I notice the type for the "string" of the window title is Chat
but WrappedChatComponent seems to be abstract
you need to convert translateableComponent to json string
and provide it there
there should be a method to do it inside TranslatableComponent class or its superclasses
processing ๐
is it possible for intellij to open multiple projects on the same window?
nvm found it
is there an implementation in Spigot API for /fill command?
wdym same window?
i always have multiple windows
Yea a for loop
hmm give me another nudge if you would ๐ its expecting a WrappedChatComponent, not a TranslatableComponent. There are methods in the translatable component to convert to plaintext however.
didnt know that
yea
you convert TranslatableComponent to json string
how can i check what position a player has in relation to another location, i.e. front, back, side
But StructuredModifier<WrappedChatComponent> wont accept a string, its expecting a WrappedChatComponent. And I can't seem to instantiate that class as it is abstract.
brain hurty haha
you create one
What would be the best way to run something every certain amount of ticks
?scheduling
thx
WrappedChatComponent.fromJson(GsonComponentSerializer.gson().serialize(translatableComponent))
(I think)
I see now, thanks so much. I will prob have questions about translatable component and how to direct it specifically at "ender chest"
but one step at a time =]
you create that component as in this example code from nms
but without private and final shit
for ender chest translation
Ahhhhh gotcha so you point it to the unique ID for ender chest
and translatable component handles the localization for you
So awesome
This has been a wild ride haha
translatablecomponent only sends the key to the client
and it says hey
im not actual text
im a translation key
May as well use this update to sneak in bstats and an update checker while I'm at it =]
What does the "20L * 10L" actually mean?
L means long value
those some loooong bois
20*10 does not reach integer 32 bit limit
lmao
wait holup, I imported gson but I don't have a GsonComponentSerializer. I notice it is part of the adventure api, but I don't seem to have that.
ahh I see, I have to include it
well it exists for me
this is purely a developer dependency right? clients wont have to install like an adventure api plugin?
no
if they're running paper servers
it wouldnt work on spigot
since they dont have adventure api built in
Ah shit, I definitely wanna support spigot native
best to shade it
even though everybody SHOULD be using paper haha
scope compile or implementation if ur using gradle
i mean you can always use chatcomponent generator online
to format your component
and paste the json output
inside the wrapped container fromJson()
that way you wouldnt need to use adventure api at all
addPassenger not working for players
I have something like this
How can I get next argument after, lets say user:
you mean for tab completion?
just check the size of the arguments, and then make a switch to return a list of options for each option if that makes sense
wtf is a WrappedChatComponent and why have I never heard of it?
ProtocolLib
this is basically the same as the line i gave you before but you need to manually edit the json (but you dont need adventure api then)
What would I put in place of plugin?
@Override
public void run() {
Bukkit.broadcastMessage("Mooooo again!");
}
}.runTask(plugin);```
does it work?
a plugin instance.
oh so 'this' then?
if its in the class that extends JavaPlugin yes
pls someone make a pull request to paper to add translatable components to inventory type enum class
at least a separate method
to retrieve them
because now only hardcoded ones are wrapped
while normal ones are just hidden from the api
any1 ?
for the plugin instance you can create a function inside your main java class that returns the instance
string builder the args after however man that define the command
and how should I check for it?
rn Im using if(args[0].equals(..))
moment of truth =] time to test
can or would it be multiple words
mostly one word
mostly or always
just get the arg
in this case the exception dictates the rule
I got some errors haha, but I think I saw an entry in the protocollib wiki for this
if its multiple words
StringJoiner joiner = new StringJoiner(" ");
for (int i = argStartingNumber; i <= args.legnth; i++) joiner.add(args[i]);
hmm ok, so following the instructions here did fix the error
but that seems weird, so I have to note in my project readme you HAVE to use the latest dev build of protocol lib?
I figure most players will just click download on the page and be confused when they get an error
AH
nevermind
it explicitly states it on the protocollib download page, its on the players then if they miss that ๐
How can I put a custom name on an ItemStack ?
Oh
ItemStack stack = ...;
ItemMeta meta = stack.getItemMeta();
meta.setDisplayName("cool custom name");
stack.setItemMeta(meta);
haha beat me to it =] I was gonna answer a question instead of ask for once lol
but meta.setDisplayName() is depreaced ?
it wut ๐ฎ
interesting, I don't get that warning
He is probably using paper
yes
?whereami
honestly I don't know how to do what I have been told could I get some help on how to actually do it?
LMFAO theres a command for that ๐คฃ must be a common occurance
๐
use the scheduler, not bukkitrunnables
ok protocollib understanders, what am I missing here
from what I can tell, these indexes are correct
hooooold on
I think im stupid, its because getIntegers() wont have anything in it yet
InventoryType.PLAYER vs InventoryType.CRAFTING, what are the differences
well, no it should shoulnd't it. since I'm initializing it with the packet type that should have those values... hmmmm
I'm guessing inventorytype crafting is whats in a crafting table
but thats a guess lol
CRAFTING is the player's 4 slot crafting
so technically still their inv
WORKBENCH is the actual name of a crafting table
how can I also shade system dependency?
mvn install it
I'm new into Maven Commands
I tried runing mvn install CMI-API..
mvnpath install:install-file -Dfile=CMI9.0.0.0API.jar -DgroupId=com.zrips -DartifactId=Zrips -Dversion=9.0.0.0-Dpackaging=jar
tysm
mvn install:install-file -Dfile=C:\Users\TomKo\Kastrol\Otto\CMI-API9.3.1.2.jar -DgroupId=com.zrips -DartifactId=Zrips -Dversion=9.3.1.2 -Dversion=9.3.1.2 -Dpackaging=jar
when I open it where it is, it says it requires pom.xml
but now it just keeps saying that .zrips is "Unknown lifecycle phase"
hey guys
is that in cmd or somewhere else
cmd, IJ
so I did a log on the PacketContainer I am trying to work with, and I notice it does not match the packet structure listed on wiki.vg here
https://wiki.vg/Protocol#Open_Screen
So I decompiled spigot and looked inside the net.minecraft.network.protocol.game package, and I notice the following
the wiki has it listed as two int arguments and a chat argument
but the decomp seems to show an int argument, and a Containers argument? What exactly am I working with here?
sorry, decompiled spigot not paper, edited
try running it outside of intellij in cmd where the file is
I think im getting close to the answer.....
ive got no idea how that happens, that command worked for me when i was using 9.0.0.0 api
also just specify the jar file
and open cmd where it is
-Dfile=CMI.whatever.jar
Som1 know how i can make a craft with CustomModelData (like if the item hasnt customodeldata:2 it doesnt work
it still requires pom
so I will open in my project
ok?
show the command you use now
also you shouldnt be mvninstalling the plugin you should mvn install the api
mvn install:install-file -Dfile='C:\Users\TomKo\Desktop\MCServers\BungeeCord 1.19.2\Bungee 1.19.2\plugins\CMI-API9.3.1.2.jar' -Dfile=CMI-API9.3.1.2.jar -DgroupId=com.zrips -DartifactId=CMI -Dversion=9.3.1.2 -Dpackaging=jar -DgeneratePom=true
oh I have 2x Dfile
so downloading source code
I downloaded one from their GitHub
https://www.zrips.net/cmi/api/
https://github.com/Zrips/CMI-API
but imma use this one
So now I open CMD where my API is, and run that cmd
yeah
this one should do that
mvnpath doesn't exist
I reckon I should use mvn instead
i didnt want to restart my pc when i did that so i just used the direct path
the hell? you got maven installed? try doing that just in downloads folder
im executing it in Documents folder, I have all APIs stored there
if that matters in some way
and yee
I got maven installed ๐
I was working on something that required Maven installed seperately
I managed to get this
And then I fixed typo and again got Unknown lifecycle phase ".zrips".
so am I ๐
I looked a bit and found that spring plugins can compile with system scopes
"C:\Program Files\Maven\bin\mvn" install:install-file -Dfile=CMI9.0.0.0API.jar -DgroupId=com.zrips -DartifactId=Zrips -Dversion=9.0.0.0 -Dpackaging=jar
that worked for mine
i think the missing space caused it
just change the path to mvn
I added that space and resulted in that Unkown..
maybe wrongly specified lifecycle?
you got gitbash installed?
actually
it works in cmd for me still
ive got no idea how the hell that wont install
?paste
Hello, i see there is isHandRaised(), but is it possible to set it in 'false' state?
i'd like to put custom cooldown on shield after every interaction, but when i use setCooldown() shield still being active on client side
Basically I want to trigger shield blocking animation and without actually dealing damage to the player
this just keeps returning the second input vector no matter what i try
yep yep
I'm confused, but I'm joining the convo late. What are you trying to do here?
not use system scope in maven, somehow maven cant mvn install the file
im trying to locally instal an API
cause I need to shade it into plugin
You talking about the these flags?
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/yourJarFile.jar</systemPath>
Well guys thanks for your help
I gtg away from PC
I can only be at phone
yep these
yeah
system scope is bad
Why is it bad? Because it's deprecated?
Neither your response or that link tells you why it's bad.
think if you add a jar file to a plugin, add it to github, someone changes that jar file and you dont realise
could easily be malware
the .add doesnt want to work for some reason
Vector[] v = new Vector[offset.length*shape.length];
Vector[] o = new Vector[offset.length];
int k = 0;
for(int i = 0;i < offset.length;i++){
o[i]=offset[i];
Vector[] s = new Vector[shape.length];
for(int j = 0; j < shape.length;j++){
s[j]=shape[j];
s[j].add(offset[i]);
v[k] = s[j];
if(k < v.length-1){k++;}
}
}
return v;
}```
Looking back at this screenshot, you missed a space between one of your command line arguments at the end.
You put -Dversion=9.0.0.0-Dpackaging=jar There should be a space between the last 0 and the next argument.
yeye I then rerun it with that space, resulted in unknown lifecycle
Probably need to wrap the values in quotation marks then. Specifically the groupId one.
makes sense yeah
I tried wrapping those paths only
Is there a way to stop the execution of the command?
... Database.getInstance().validateCommand(player, args[1], isOwner -> {
if (!isOwner) {
player.sendMessage("Deze token is niet van jou.");
}
});
...
I want the command to stop executing after the sendMessage however it still keeps on running the command.
return
they want it to stop but it doesnt i think
^
well then just return yea
but I thought return didnt work either. But im gonna try again
How would I fix this? "Default system encoding may have misread config.yml from plugin jar"
It ruins my symbols in config
config should be saved as utf8
?paste
ChatGPT response: https://paste.md-5.net/yetenahehi.cpp
junk
it sounds right
spigot by default attempts to read as utf8. you never use an inputStream
his issue is his file is not utf8 in his jar
It doesnt seem it stop, The code underneath the validateCommand() still gets executed
how would I save it as utf8?
it assumes the system encoding isnt in UTF-8, builds off of that. otherwise its pretty correct, apart from the last part
actually I can probably just look it up
you don;t specify the encoding anywhere, only when you initially create the file
create it as utf8
thats coz ur doing it in a consumer
maybe recreate the file and copy contents?
that just returns the consumer
lemme try that
So is there any way for me to stop the execution? I cant do the check outside the consumer since I havent found a way yet to access the boolean inside the consumer.
assign isOwner to a boolean outside the consumer
wht does validateOwner even do. looks kinda weird
It checks in the DB if the a given token belongs to the user executing the command.
alright thank you
ok, but why do u do it with a consumer<boolean>
seems to fix it
long story short,
Im still learning and currently using Foundation (Sorta Spigot framework developed by MineAcademy) it should make coding a bit easier. But all of their query function run async and I cant return any values using their async functions so Someone else learned me to use consumers, However till today I never needed to access the boolean outside the consumer.
should probably use completable future
i could show you how to do that if you have some time to wait. bussy for like 20min
I have the time!
alright can i dm you then in a bit?
yea sure!
What does this do?
i think it kills the entity
probably a stupid question but i just started learning plugin development and im wondering if it would be smart to make an own folder for inventories / GUIs. and if so, how i could select a specific one and open in other classes.
thats what removal means
could you develop more
make folders?
directories
i think they mean in like the animation
I understood that
do they just stop existing or do they die naturally
it removes the entity the next tick
Is there a reason for why X got ceiled but Z got floored?
Do too many mob spawners with entities in them cause lag?
minecraft doesnt know basic maths :(
This is literally driving me insane right now, :-: I don't find anything useful about how block positions are defined. That has to be aligned with N-E-S-W somehow, as it only screws up in one orientation but matches in another.
}.runTaskLater(this, 40L); im trying to schedule something in a listener, but im getting an error with this. What should I put there instead of it?
thats not where the plugin instance goes
actualy
one second
"this" only works if you are in your main java class
I think
oh so i need to pass the plugin instance to the listener?
yeah I think
Bukkit.getScheduler().runTaskLater(PluginInstance, () -> {
code;
}, delay);
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
ok ill try
I'm sorry I looked at guides but I got lost ๐ how can I make an array list for ItemStack?
List<ItemStack> stackList = new ArrayList<>();
same way you would make any other list
That moment when you realize you missed the negative sign. Alright, I'mma head out.
public void onBlockBreak(BlockBreakEvent e){
Player p = e.getPlayer();
Block b = e.getBlock();
if(b.getType().equals(Material.OAK_WOOD)) {
b.setType(Material.BEDROCK);
}
new BukkitRunnable() {
@Override
public void run() {
b.setType(Material.OAK_WOOD);
}
}.runTaskLater(this.plugin, 40L);
}```
Anyone knows why it won't place bedrock for 2 seconds, and then change to oak wood again?
!
yea i tried to add that to see if that was the problem but it wasnt
compare Enums with == or !=
yea still not
your code without the ! will only change the block if it's is OAK_WOOD to start
yea it is though
like the bukkit runnable is working but not setting the type to bedrock
Why tf is essentials teleport async?
why not
in case u tp to an unloaded chunk, it might be proven of beneficence to do it async
Good afternoon, any suggestions on the best method to change an item's durability in 1.19.2?
or a method that works at all would be preferable.
Is it good to create a create nullify method like data = null; for saving memory ?
Or just let it to java cleaner ?
Depends on the place that variable is at
Examples?
But I don't think nullifying variables will help much with memory unless you do it in a huge amount
Yeh ofc
There's variables that are global and stay in the plugin till server closes(on main class) and then there's those variables that are created and used just during certain moment(functions, or commands or events)
I think it would only make a difference if it was on those "global" variables.
But you would need to nullify a lot to make small changes.
Why do you want to save memory anyways?
From my experience plugins don't consume much memory unless it's a plugin or code that lags the server, and that should be fixed, not cleaned. Most of server ram is from chunks loaded on the server and players itself.
you shouldn't really set things to null to save memory. its used more often for logic purposes, like you set something to null because you need it to not exist logic wise, if you know what I mean
I could be wrong tho, I never set variables to null.
Yeah. Don't bother setting things to null unless you have an express reason to lol
I start variables as null and then try to load smth and then check if it's not null for example
the java garbage collector knows when to set things to null by itself pretty well ๐
Is there any way to create server with snapshot (23w06a) and get API of it?
I don't think this is the right place for that sir.
Spigot releases api/server versions on full releases I believe
For that u would need to have a "normal" Minecraft server, to run snapshots
Maybe Bukkit does it ๐ค
hmm
But a quick search online and you can figure out how to make servers with snapshots.
I found this:
A: Can i compile spigot manually to acheive a snapshot release?
B: yes but it won't be easy
yes, mostly because in a snapshot nothing is really certain for 100% so there is no point to ad the API for it already without having teh full picture
yes i did
Yeah
yeah
That answer is completely useless
well unless you are a spigot dev, I think it would be hard to get an API for a snapshot version
hmm yea
"You can but it won't be easy"
And proceeds to not give any info on how to do it or where to start.
you just gotta wait like teh rest of us ๐
So take that as completely bs.
also true
Best shot I believe would be Bukkit place.
But im not sure they themselves do apis for snapshots
Haven't used Bukkit in years
You want snapshots and with plugins right?
The Bukkit team doesn't exist anymore. SpigotMC is the Bukkit team. We maintain Bukkit and CraftBukkit
Oh fr?
And like I said the other day, we don't do snapshot releases
ohh what's difference with bukkit/spigot?
spigot has more stuff
A few performance improvements, configuration, API, etc.
but yeah, see <#help-development message>
I haven't used Bukkit in like 7 years
ahh but why bukkit still exists?
Easier for us to update
oof
oh
mhmm
xD
so yeah, just wait it out
yee
yea xD
anyone have any knowledge about how i would go about keeping the vanilla generation but using a heightmap to change the heights
I got the heightmap part into a 2d array but i cant seem to figure out how to use ChunkGenerator
it actually doesn't seem like there is a way to do that without specifically setting the type of the block to a certain material
just made my first API
Hi!
I got this error: java.lang.IllegalStateException: Asynchronous entity add! and from what I've read online, it seems that it's because I'm trying to edit the world in an async function (that's right) but spigot is protecting me from doing that because that would most-likely corrupt my world. Is there a way to spawn entities asynchronously?
mhh ok and would there be any efficient way to do that a bit quicker? I'm aiming to spawn around 100 items at a time, would servers support that?
Congrats ๐
Thanks
md_5 you like overall spigot power dude. got any tips?
is there a way to get the dragged item from when you click drag an item (and then click a slot with that item)?
InventoryDragEvent
Is it possible to make my plugin load before all other plugins via the loadbefore plugin.yml field?
only if you add all other plugins to loadbefore
why would you want to do this though?
so if I wanted to make it dynamic it's not possible?
e.g. * wouldn't work?
external/in-house plugin conflications
Where is the "Bukkit" class for reference? everything under the org.bukkit package name is nms-related
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
Hello
Help me plis
I m search in programminst
I speak russia
And English 10%
whut
how can i reset only the outer end islands
ive still got barely a clue on how world generation works
if (!(block.getState() instanceof TileState)) return;
TileState tileState = (TileState) block.getState();
PersistentDataContainer pdc = tileState.getPersistentDataContainer();
String sr_output = pdc.get(CustomNamespacedKeys.output, PersistentDataType.STRING);
ItemStack output = SerializeItemStack.deserialize(sr_output);
if (output == null) {
pdc.set(CustomNamespacedKeys.output, PersistentDataType.STRING,
SerializeItemStack.serialize(recipe.getOutput())
);
} else if (output.isSimilar(recipe.getOutput())) {
output.setAmount(output.getAmount() + 1);
pdc.set(CustomNamespacedKeys.output, PersistentDataType.STRING,
SerializeItemStack.serialize(output)
);
}
pdc.set(CustomNamespacedKeys.recipe, PersistentDataType.STRING, "");
pdc.set(CustomNamespacedKeys.processTime, PersistentDataType.INTEGER, 0);
tileState.update();
Bukkit.getLogger().info("Completed recipe.");
updateInventory();
the code runs no problem no errors i get to the debug message but pdc doesnt change and my testing also proves that it doesnt get overwritten by another piece of code
could someone help?
and values are correct also
Hi, who can help make a plugin construction system as in rust?
Pliz
@vagrant stratus handle this person or whatever
He booster?
What
@quaint mantle Don't go pinging everyone
I am not your sugar daddy sorry
your server is so shitty, it will never get any more boosts
@native gale They're wanting someone to boost their server lmao
I wish life was that simple
@quaint mantle Still got a screenshot lmao
๐
This is actually funny lmao
Buy it yourself
No one's going to boost your server, and this isn't even the channel to ask. Drop it
I in form russian
ะัะฐัะธัะบะฐ, ะฟัะตะบัะฐัะฐะน ะฟะพะทะพัะธัััั. ะััั ัะฐะบะฐั ะบะฝะธะณะฐ "ะััะฐัะธะฝะพ", ัะฐะผ ะบะฐะบ ัะฐะท ะตััั ะฟะพััะธัะตะปัะฝัะน ัะฟะธะทะพะด ะฟัะพ ะปัะดะตะน, ะบะพัะพััะต ะถะฐะถะดัั ะถะธัั ะฝะฐ ั ะฐะปัะฒั. ะกะฟะพะนะปะตั: ||ั ะฐะปัะฒะฐ - ััะพ ะผะธั||
We are aware lmao
This dont buy
ะั ะผะฝะต 1 ะฑััั ะฝัะถะตะฝ
ะ ะฒัะต
Yep
Spend some cash then
@vagrant stratus can't you really do something abt it?
This dont buy nitro
For the past 11 minutes this channel is just a mess.
11 minutes already?
Guys plissss
damn time flies fast when there's clowns involved
Give boost
Give me back braincells and you got a deal ๐
@quaint mantle
ะัะปะธ ะฒั ะฝะต ะพััะฐะฝะพะฒะธัะตัั, ะฒะฐะผ ะฑัะดะตั ะทะฐััะธัะฐะฝ ัะฐะนะผ-ะฐัั.
ะะฐะผ ัะถะต ัะบะฐะทะฐะปะธ "ะฝะตั" ะ ะพััะฐะฝะพะฒะธัััั, ะผะฝะพะณะพ ัะฐะท.
I am archiving this in screenshots lmao
No need
Best thing that happened in 2023
"serious development help" | ask development related questions here
For if they delete messages, I love looking back at these episodes
ugh, all I wanted to do is work on projects qwq
ะฅะพัะพัะพ
ะัะพััะพ ั ะฝะต ะฟะพะฝะธะผะฐั ะฟะพะปะพะฒะธะฝั ัะปะพะฒ
Ok , iโm stoped
ะั ะฟะพะธัะธ ัะพะณะดะฐ ะบะฐะบะพะน-ัะพ ััััะบะพัะทััะฝัะน ัะตัะฒะตั, ะธ ะฟัะตะบัะฐัะฐะน ะพััะพะฟะธัั, ัะตะฑั ัะถะต ะฟัะตะดัะฟัะตะดะธะปะธ. ะขัั ะฟะพะผะพัั ะดะปั ะฟัะพะณัะฐะผะผะธััะพะฒ.
ะ ัั ััััะบะธะน?
Back to this, more important lmao
I mean if you can teach me to stop procrastinating lol
make bigger anxiety to smaller anxiety's
then solve smaller anxiety
Yes, but not questions lmao
Hey friend! I know you've been struggling with procrastination and I wanted to share some tips that have helped me overcome it.
First, figure out why you tend to procrastinate. Are you feeling overwhelmed, unsure of how to get started, or just not interested in the task? Understanding the root cause can help you address it.
Make a list of tasks you need to do, and prioritize them based on importance and deadlines. This way, you can focus your energy on the most important tasks first.
Break down big tasks into smaller, more manageable steps. When a task seems too big and overwhelming, it can be easy to put it off. But if you break it down into smaller parts, it becomes much more doable.
Get rid of distractions. Turn off your phone, log out of social media, and find a quiet place to work where you won't be disturbed.
Give yourself a deadline and stick to it. Having a deadline can help motivate you to get started and keep you on track.
Reward yourself for completing tasks. Treat yourself to something you enjoy, like a favorite snack or a fun activity, to give yourself a sense of accomplishment.
I hope these tips help! Let me know if you have any questions or need more guidance.
What do you need? Vbucks?
kek
I procrastinate a lot as well and these sometimes help
so. many. open. issues.
I have no clue what that is
First one is https://www.spigotmc.org/resources/spigot-anti-malware.64982/, the second one I don't bring up often since it's less useful for this community lol
send me excellent crate
what son of a gun ghostpinged me here
A spammer who pinged every nitro booster
because they wanted you to boost their server
please stop deleting @ everyone messages, it doesn't remove pings, just leads to confusion about who did it
to the mods
It wasn't an everyone
same point tho
the bot is never confused
Not sure if staff were the ones that deleted the messages
since when does the bot auto remove ping messages
that user wasn't banned tho
^^
searching for the ping keyword in a channel to see who pinged me is a stupid way ngl
hoping someone said something along the lines of "dont ping ppl"
lol
.
Well as mentioned there was a person spam pinging boosters
who didn't get banned, yes
it is also possible they modified their message
you know that its visible when messages are edited right? lol
Anyways, it is funny that these spam pingers who come here
and when they decide to ping boosters
they always skip my name XD
its funny that i#
oopsie
that i'd get banned for sending a screenshot of my discord, while spam pingers who are just there to annoy don't get
like lmfao
of my discord, yes
oh just specifically yours
Who write plagins?
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Yes
ping me again, and feel the non existent consequences
@slate mortar hi
What
sup nerd
no u
aka general, yes
yes please,
BlockBreakEvent#getPlayer is notnull so ig not
yes you can say the executor is the player, but its also possible to execute it on console
is there some s3 api other than the one from amazon?
how does playerinteractevent work? the only packet I could find that was sent every left click was the animation one
so I learned this like 2 days ago
but the playerinteractevent fires based on the arm animation since there wasnt a better way to do it
which means it also fires for dropping a block by using the drop key (default Q)
and it fires usually when you use an item by right clikcing on a block or in the air
@alpine swan
oooo thanks interesting
how could I make leaf decay faster and make them not to drop items?
does anyone know how i would be able to check if a player who is offline ever played before? I am trying to add a /pf command and want it to work on offline players too, but not output anything for people thath ave never touched the server
How could I forget... thanks!
Do you also know how to add offline players into tab completion as 'args' for commands?
nah i mean like a universal api for s3 compatible storage
not like provider
you can get them with this https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Bukkit.html#getOfflinePlayers()
declaration: package: org.bukkit, class: Bukkit
I know that but how owuld i add em
do you already have a tab completer?
nope
extend TabExecutor instead of CommandExecutor
wait is it for a command or just any tab complete
command
implement TabCompleter then
can i make it so it only works for 1 command then tho
TabExecutor is a shortcut. it implements both command and tab
๐
but how di i add offlineplayers to completion w using that
TabCOmplete returns a List
you fill that list with whatever you want as choices in Tab
depending on args.length
ohh sao i just first add a normal command and then the tab completion seperatly
heeheehee old code
lol, i already got it no worries
acf is so much better
wait now that i changed tabcompletion it will not update the list when i type smth like "A" it wont remove the player namers whcih do not start with an "A" now
huh i dont really get it ๐ค like the players will be removed from tabcompletion when the first letter isnt equal to args[0]?
no
depending on args.length YOU filter the list to be whatever you want
if args.length == 1 you are on teh first argument, so args[0]
so filter teh list excluding all that don;t contain args[0] or start with it
ohhhh i get it now, thanks
no s its only StringUtil
thats crazy
whats wrong with this code?
Main class
why
init them in ur constructor
^^
okay
below this.plugin =plugin
yes
what is conventions
the way you should be naming things in java
Did i named my class wrongly?
SwearPunishCommand should be swearPunishCommand etc
ah yeah
ur class name is fine
why
because naming conventions
it will make your code easier to write / read / maintain.
how do I make a bucket place a block but not get emptied?
cancel the BucketEmptyEvent or PlayerInteractEvent
but wouldn't that not place the block?
so like getting the coordinates the player is looking at and putting a block there?
pretty sure both events supply the clicked block
BucketEmptyEvent supplies the clicked block & clicked blockface
so u know where the liquid wouldve gone
something like event.getBlockClicked().setType(Material.WATER);?
thats using PlayerInteractEvent?
no, the BucketEmptyEvent
or BucketEmpty
right
so u would do this
event.getBlockClicked().getRelative(event.getBlockFace()).setType(Material.WATER); psuedo code
hmm
Is there any way I can have the Main world not save chunks/entities
reminds me of legacy console edtion
Does the new snapshot allows better custom blocks with custom textures?
If I have a bounding box (diamonds for showing area) why does it detect me as if was outside it if I to the location of the gold blocks
bad math
the diamonds delimitate the boundingbox
show some code then
battle.box.contains(playerLocation.getX(), playerLocation.getY(), playerLocation.getZ())
nvm
Hello, how can I change the DeathMessage of a player when he was killed by a zombie?
Why were chat previews deprecated?
I aint doing the math
if you are just testing (true) then your location is bad
draft api, and i think they got removed 1.19.3
because if I change it by one block
declaration: package: org.bukkit.event.entity, class: PlayerDeathEvent
it is inside the glass
what do you mean they got removed? chat preview is used for chat signing right?
chat signing is not removed
a bounding box covers teh whole block
chat preview got removed
the signing didnt
Yes I know that but how do I get the mob that killed him I tried event.getEntity().getLastDamageCause().getEntityType() but I only get type Player back
so now you cant reformat chat at all without losing the signature?
getEntity already is the zombie i believe
box:
pos_1:
x: 42
y: -60
z: -9
pos_2:
x: 35
y: -46
z: -16
world: battles```
BoundingBox [minX=35.0, minY=-60.0, minZ=-16.0, maxX=42.0, maxY=-46.0, maxZ=-9.0]
you can, but just invalidating the signing iirc
@summer zodiac so getEntity().getEntityType().
look @eternal oxide
damn. I was following the information in the 1.19.2 post to add chat signing support to private messages in my plugin
but I guess it is no longer possible
Here's my fancy cuboid class https://sourceb.in/djQGHDbgTP
Try with this, if it no worky, call displayParticles(world, Color.RED) or something to see what's wrong
my guess is just rouding issues
ah my bad
player death event can only give player as killer
getKiller() only return a player
ill try to do the math by myself then
if no worky ill try your Cuboid
you need to use entity damage by entity event and check the last cause
I asked to see if I was doing something wrong
do your contains checks with getBlockX, getBlockY, getBlockZ
I get playerLocation
@EventHandler
public void onPlayerMove(PlayerMoveEvent event) {
Player player = event.getPlayer();
Battle battle = BlockBattles.getInstance().battles.get(player);
if (battle == null) { return; }
Location playerLocation = player.getLocation();
System.out.println(battle.box.contains(playerLocation.getX(), playerLocation.getY(), playerLocation.getZ()));
if (battle.box.contains((int) playerLocation.getX(), playerLocation.getY(), playerLocation.getZ())) { return; }
Location location = player == battle.player1 ? battle.player2Location : battle.player1Location;
player.teleport(location);
}```
your cuboid ends at the smallest corner of the max block
ill make xyz of player ints
yeah
make your box end at 42.9
I can't
after the game ends
I gotta set all blocks inside boundingbox to air
if I s et it to 42.9
42.9 or 42 is still the same
the glass blocks will get set to air
it is because the .contains doesn't check for <=
it checks for <
that's pretty much the same when it comes to doubles
ugh exposing collections
because this
now it worked @echo basalt
if (
(int) playerLocation.getX() >= box.getMinX() && (int) playerLocation.getX() <= box.getMaxX()
&& (int) playerLocation.getY() >= box.getMinY() && (int) playerLocation.getY() <= box.getMaxY()
&& (int) playerLocation.getZ() >= box.getMinZ() && (int) playerLocation.getZ() <= box.getMaxZ()
)
it was because of player not being an int + .contains used < instead of <= for maxN
thanks for that
I just want to change the PlayerDeathMessage when he is killed by a zombie. That's why I wanted to use PlayerDeathEvent but somehow it doesn't work how can I do it?
why doesn't that work?
that should work perfectly fine
player death event killer can only return player
wont return other entities
talking to other person
ah ok
then you can use entity damage by an entity event
there is already .getLastDamger() no?
or does it not work
weird
what are you getting the last damager of?
wait i test it
p.getLastDamageCause().getEntity() ?
might produce nullpointerexception, check for cause before doing that
not sure if it would work
like this?
if it doesnt work make your own event
event.getEntity() returns what? the Player?
yes
e.getEntityType()?
Want me to make an event for that? Ill send the code and the way to use it
easier than this bs
making getKiller not only return player is probably better
yeah
https://paste.md-5.net/nabuyucusi.pl if we choose to ignore the fact its paper, can anyone tell why the hell i get an UnknownFormatConversionException with this code https://paste.md-5.net/ocegunoqob.java
I have my own custom damage events and player objects so it is easier to get last damager and stuff
yeah sorry that returns the entities type
so the players type
do
Hey guys, help me out here. I am trying to send a packet using protocol lib, but I cant quite figure out what the data type the second field is. The first is an int, and the third is a ChatComponent, but protocol lib doesn't seem to have anything for "Containers". Any pointers would be greatly appreciated =]
looks like its inventories
hmm
Ohh inventories, lemme see if there is a getInventories in protocollib
ChatComponent class?
prob nms
I haven't tried it with chat component yet, but when I do a getChatComponents there is only one field, so I don't think its that
since field 3 is a chat component
hmm unfortunately it doesn't seem there is a getInventories
look through the Containers class there is naming to all
I believe the first 0 is inventory size, second inventory type, third inventory name
there is enum
although dated the vg wiki lists it as a varint, but it doesn't seem to be
ohh enum, interesting
hmm help me out here, I'm new to protocol lib
would I need to do something like this?
although I'm guessing I would need to pass it the minecraft container class, not the bukkit one?
How to check if a player has right clicked another player? What event? Could not find anything in the PlayerInteractEvent
player interact at entity event or smth?
No At. Just PlayerInteractEntityEvent
AtEntity is more for things like armour stands where you need the precise location of the interaction
Ok thanks
what is this?
Use normal packets
No clue lol, you mentioned it was a enum I figured maybe that would let me send an enum in the packet
the above is protocollib
I can help you with normal packets NMS
not sure about protocollib
I can give code for normal packets
perhaps if you give me an example in normal packets I could translate it to protocol lib =]
Ok
I have all the fields except for the Container<?> being sent successfully
explain what u want and I'll make it for you
you can do Containers.{value}
it shows the inventories type in name in the right constructor
a-f are normal chests
hmm but I don't seem to have access to the Containers class, as that is part of the minecraft code not exposed by spigot right?
hmm gotcha, so do I need to decompile minecraft and include that as a dependency to work with that? I don't seem to have access to that package
?nms
oh and the first int is the window's id
not the size, sorry
it can be any number but it should be unique
Yeah the first integer field and the third chatcomponent field are not giving me too much trouble
I am able to get the window ID by intercepting window open packets
If your going to use nms best off using moj maps as well much easier to comprehend
i love obfuscated code as it makes my brain actually try code
i mean like what is better than doing
((CraftPlayer) p).getHandle().b.a.k
https://nms.screamingsandals.org will help
Real words probably :P
the compare page is decent
now GENERIC_9x1 is indeed what I am seeing in the mojang code
gives you mojang, obsfcuated and spigot maps
but how do I translate this to a data type to send via a packet >< I am inching closer but still quite confused haha
could u use normal packets
I can provide all code
I suppose I could, but I wanted to use protocollib to avoid having to change things too much between versions
as an example:
PacketPlayOutOpenWindow packet = new PacketPlayOutOpenWindow(0, Containers.a , new ChatMessage("Test"));
((CraftPlayer) p).getHandle().b.sendPacket(packet);
Hmmm that is nice and clean
Anyone now how to use protocollib name tag packet? (SCOREBOARD_TEAM)?
hm?
Check this out for setting items in a slot I believe
https://wiki.vg/Protocol#Set_Container_Slot
Eureka! ๐ I got it figured out with your guys help. I used the spigot jar that was compiled from build tools to access the NMS classes, and was able to send the container class using protocollib as follows.
thanks so much to all that helped me down this confusing road of packets haha
Lol
and all just to get localization working ๐ since opening the ender chest programmatically does not use the localized name for the chest for whatever reason haha
Lol nice
you were a big help sweatty thank you, I feel more powerful with this toolkit now >:D
Np 
how do i dynamically include libraries into my plugin? i've heard about libraries in plugin.yml but i can't find a tutorial anywhere
i want my plugin to weigh less because i want to include some heavy libs
google plugin.yml
yeah i don't get how exactly i'd get to work with the library though? it's not in the project, do i have to download the jar manually or something
is it on maven central?