#help-development
1 messages · Page 1590 of 1
- Stop using "fake"
- "like" is ambigious
Still does not make sense
But he wants to middleman the packets and make it appear as something else
Yes it does lmao
He wants to make the item appear different to the client
But the server knows
Gl with that if you’re sending a setSlot to a player the server updates off its data
Packet spam time babyyy
it disappears
Yes that’s…
is that it
That’s what he was saying
(or just use packet transformers - which are NMS)
No @unkempt ore you’re thinking so blatantly lol. You can’t just “intercept” the packet and cancel it
Then you will never get the item
Nor will the server
well, you can still modify it
He wants it to appear as something else
i think, that he is trying to say, that you can change the item id
The item can still exist of course, right?
Just be modified when sent to the client
So it would appear different on the client side
item id?
Nope to update the item it requires another set slot. Which will update it for the server
What he wants to do is to make a item that shows for the player but does not actually exist in the server
right?
No
then?..
stop doing assumptions
It exists in the server, but shows up as something else in the client. I believe
the item id in the packet
Oh
Well, “fake item” is vague either way
reversed
The asker is not responding so ...
alright
We should ask him
Why would you ever want to do this
We don’t ask that here lmao
Let’s get the client and server out of sync
"fake" is always ambigious
Yes
same thing
Good idea
Welcome to packet modding…
Wdym?
That’s the whole point of it isn’t it?
Packet modding lol
Yeah I would use this & just modify the attached ItemStack's material ^
it is, yes
@hasty prawn the server will still update it iirc
The whole point is to allow to establish lies between the server and client
It brings you down a level of abstraction
Which is good for making intricate tricks
then just do it again?
And then what it updates for the server again
Do it again, until you want it to actually show the real item
You need to maintain it if I had to guess
It’s your responsibility at that point, because you’re messing with the client directly
Urgh I’m getting on and looking in client just to get a finalized answer
Have you actually tried anything?
Or are you just assuming what we're saying won't work
Yes I’ve messed with set slot packets, everytime the client receives a set slot. The server updates it accordingly
@round finch is the one that actually asked this question just to remind everyone. We are currently derailing this convo into a useless (dis-)agreement
Yo I'm having issues loading one of my plugins from another plugin
PluginA pluginA = (PluginA) this.getServer().getPluginManager().getPlugin("PluginA");
I get a java.lang.ClassCastException for some reason
after some research i think u set the window byte to be 0 and set the short to be equal to the slot of the actually existing item u wanna replace, and then provide the item you which to replace with
Did you shade in pluginA in the plugin that is calling this line?
reading https://wiki.vg/Protocol#Set_Slot will make it easier
Don't you just love setting blocks async :ahegao:
@grim ice thats not the issue
the issue is when you call a set slot
What
What are you talking about
then that is the issue because bukkit classloading is dum
But..why would you do that
well, java classloading is always out there to just throw a brick at you
Speed
yep, that's true
Isn’t there an issue with that and ticking?
yep
turns out setting blocks is really, really slow
not a very good reason to make something async
Is it threadsafe to change their data?
But, if you do it with NMS and use playerChunkMap, since minecraft sends that every 1 tick, you can do it with literally 0 issues
Or atleast close to 0
Never encountered any issues yet
Why is it so slow normally
/**
* Handles pickin up an ItemStack or dropping one in your inventory or an open (non-creative) container
*/
public void handleSetSlot(S2FPacketSetSlot packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
EntityPlayer entityplayer = this.gameController.thePlayer;
if (packetIn.func_149175_c() == -1) {
entityplayer.inventory.setItemStack(packetIn.func_149174_e());
} else {
boolean flag = false;
if (this.gameController.currentScreen instanceof GuiContainerCreative) {
GuiContainerCreative guicontainercreative = (GuiContainerCreative) this.gameController.currentScreen;
flag = guicontainercreative.getSelectedTabIndex() != CreativeTabs.tabInventory.getTabIndex();
}
if (packetIn.func_149175_c() == 0 && packetIn.func_149173_d() >= 36 && packetIn.func_149173_d() < 45) {
ItemStack itemstack = entityplayer.inventoryContainer.getSlot(packetIn.func_149173_d()).getStack();
if (packetIn.func_149174_e() != null && (itemstack == null || itemstack.stackSize < packetIn.func_149174_e().stackSize)) {
packetIn.func_149174_e().animationsToGo = 5;
}
entityplayer.inventoryContainer.putStackInSlot(packetIn.func_149173_d(), packetIn.func_149174_e());
} else if (packetIn.func_149175_c() == entityplayer.openContainer.windowId && (packetIn.func_149175_c() != 0 || !flag)) {
entityplayer.openContainer.putStackInSlot(packetIn.func_149173_d(), packetIn.func_149174_e());
}
}
}```
gl with it
Jesus christ
How we do it? are you asking that?
So I’m having trouble with making a help command, how do I make the help command?
what
use plugin
.yml
is the goal to make tons of block changes quickly?
Basically
its for a prison server
ah yes i see
for mines
Mines, Jackhammer, explosive
hmmm
Its sooo smooth
have you tried using data palettes
1.8 as I said
i mean yea sections are quick
I've got the code
I was just saying imagine setting blocks async basically
I know, can be bad
have you tested it on the main thread
does it even cause issues?
But how can I make a command? Like I looked it up but it’s confusing and I don’t want to have to learn Java
It wouldn't cause issues on the main thread, its just deep into the NMS setting blocks directly in the chunk section
you dont really do something async until you see it causing issues and figure out why.
Its so fucking cool how it sends the update to the player though
I never heard of this method until earlier today
its not even the fastest 🙂
One of my friends made the code for the NMS
and sent me it
I should have really talked about this in general
you didnt even write it lol
got me dead
LMFAO
Yeah yeah
How do I even verify my account here again
holy fuck
@eternal oxide
it still doesnt show the recipe
if the player hasn't crafted the item yet
have you set them as known?
uh
how?
public void onJoinEvent(PlayerJoinEvent e){
e.getPlayer().discoverRecipe(recipes.getZombieKey());
e.getPlayer().discoverRecipe(recipes.getCreeperKey());
e.getPlayer().discoverRecipe(recipes.getSheepKey());
e.getPlayer().discoverRecipe(recipes.getSkeletonKey());
e.getPlayer().discoverRecipe(recipes.getEndermanKey());
e.getPlayer().discoverRecipe(recipes.getSlimeKey());
e.getPlayer().discoverRecipe(recipes.getPhantomKey());
e.getPlayer().discoverRecipe(recipes.getEvokerKey());
e.getPlayer().discoverRecipe(recipes.getSquidKey());
e.getPlayer().discoverRecipe(recipes.getSpawnerKey());
e.getPlayer().discoverRecipe(recipes.getWitherKey());
e.getPlayer().discoverRecipe(recipes.getVindicatorKey());
e.getPlayer().discoverRecipe(recipes.getShulkerKey());
this is my onJoin event
do you know if that code is running?
is it annotated Eventhandler?
oh fuck me
😄
i always forget
why doesnt intelliJ remind
i mean its my stupidity but
he says unnecessary warnings but ignores that
perhaps
i found in google that i have to give the player
a knowledge book
like that
ItemStack is = new ItemStack(Material.KNOWLEDGE_BOOK,1);
KnowledgeBookMeta bm = (KnowledgeBookMeta) is.getItemMeta();
bm.addRecipe(name_tagRecipe);
is.setItemMeta(bm);
no idea, I've never doen it
o
How's IntelliJ supposed to know that method won't fire if the annotation isn't there 😢
did you have to create and give the book?
So... is setting blocks asynchronously a good or bad idea... with NMS [1.8.8], a friend of mine made something to allow you to set block asynchronously and smoothly, is it a bad idea to use it?
Hi does anyone know why my interactive chat sends a weird <chat = my minecraft id> after every msg instead of working?
You can’t set it async
afaik it will be caught and then an error will be thrown
Now that you have it all working, would you like to see a version that uses enums?
Sure
?paste
that does all yours does, including discovering the recipies and you only need .registerEvents(new RecipesManager(this), this); in your main
You also don;t need to pass an instance of teh RecipiesManager
you cna use RecipiesManager.CREEPER.getKey()
honestly
in any other class
what i used is waaaaaaaaaaaaaaaaaaay simpler
even if it takes space im prob sticking with it
The way Minecraft implements recipes is so interesting
You will enjoy enums once you get used to them. Less code and a lot more features
ill try to understand the code you sent me
Please do. Its a lot better than the code you have. But don;t jump to it until you understand it.
Hello. My plugin.yml file doesn't seem to be working properly. All of my commands work, but as soon as I add permissions, it doesn't autofill on client side (where you can press tab to complete the command). Command still works tho.
yeah
how do i remove a row of slots in a chest (menu)?
Well, you can, just using NMS
ChunkSection + playerChunkMap (sync for block updates)
not sure if this will work. it will collide with the main thread since world manipulation have to be done synced.
It Shockingly works, its smooth, but not sure if it would cause any issues
What version are you on btw?
Original message says 1.8
sooo
There is 🙂
Not for that probably
Ah
guys i love you awnser me 🥺
public void setBlock(Object chunkHandle, int blockX, int blockY, int blockZ, int combinedId) {
IBlockData data = Block.getByCombinedId(combinedId);
net.minecraft.server.v1_8_R3.Chunk nmsChunk = (net.minecraft.server.v1_8_R3.Chunk) chunkHandle;
int indexY = blockY >> 4;
ChunkSection chunkSection = nmsChunk.getSections()[indexY];
if (chunkSection == null)
chunkSection =
nmsChunk.getSections()[indexY] =
new ChunkSection(indexY << 4, !nmsChunk.world.worldProvider.o());
chunkSection.setType(blockX & 15, blockY & 15, blockZ & 15, data);
((net.minecraft.server.v1_8_R3.Chunk) chunkHandle).e();
}```
thats how its done..
And setBlock is called async then?
Yep
loop
@EventHandler
public void onBreak(BlockBreakEvent event) {
BLOCK_BREAK_ACCEPT_SERVICE.submit(
() -> {```
thats how its called async ^
Its a prison enchants core
soo
Alrighty
But yeah, was just wondering if it would cause any issues
😩😩
if not then great
Doesn’t seem like it causes any issues rn
But it probably isn’t thread safe in the long run
as i said it might collide with the main thread
yea
Alright, thanks guys! ❤️
I still need md5 to give me the verified role.... fuck me
@eternal oxide I'm making a report. I don't need to include a reproduction plugin do I? It's way too simple
@hybrid spoke The human person doesn't know how to even code
I told them to learn java then the spigot api for you
one sec I have a projectile plugin code here somewhere
ProjectileLaunchEvent would work, I'm sure of that
But the issue is that PlayerEggThrowEvent fires when the egg hits the surface
And I'm pissed about it
not sure what or who you mean
I can test that real quick
but thats good
The human person you replied to with "for loop"
ahhhhhhhhhhhhhh
Starting a server now
Yep, can confirm PlayerEggThrowEvent is broken and only fires when the egg hits, not when launched.
I wonder if its just named really badly
That seems like a useless event anyways
ProjectileHitEvent and ProjectileLaunchEvent cover both of those anyways, so why did we need a specific one for eggs 😕
I guess just to manage spawning
Oh, yeah it's for hatching
Probably EggHatchEvent would be a better name for that ngl
So not a bug, just poorly named
I want “setHatching”
and yes ProjectileLaunchEvent triggers for throwing an egg.
thats only for impact
How should I make sure a chicken doesn’t come out
Guess I could have another handler for it
Just use setHatching?
But that’s kinda..meh
A chicken isn't going to come out before impact
setHatching is a method of the egg throw
set your PDC in ProjectileLaunchEvent then monitor in PlayerEggThrowEvent
Yeah I’ll do that
I’m pissed I wasted this much time over such a terribly named event
I guess that why I never used it. I went staright to snowballs
I remember I did try the egg throw but it seemed to not work
now I know why
its EggHitEvent not throw
or EggHatchEvent
I know I've named some really bad methods before too.
Do you guys recommend XSeries?
xbox?
or do you mean like the xmaterial
ye
ah
I use XSound
Wtf? So there’s an EggHitEvent
But the egg throw event fires when it hits
well yes, the event that says its throw
Ah
hey there how would i go about adding a jsonobject to a jsonarray with gson?
Pretty sure you can literally just add it, can’t you
tried that (jArray.add(new Test(1, "test")); but it says that i need to convert it to a string but if i convert it to a string and then try to write the json array to my json file it will ask to make my json array into a string so that i can then write it but if i do that then i will get a bunch of slashes in my code
?
have you tried? https://github.com/md-5/SpecialSource/issues/67
hey there so with this code im just checking if the appending works
JsonElement openCheckpoints = new Gson().fromJson(new FileReader(mainClass.CheckpointsFile), JsonElement.class);
JsonArray checkpointsAry = openCheckpoints.getAsJsonArray();
RegisterCheckpoints RegisterCheckpoints = new RegisterCheckpoints(counter, p.getLocation().getBlockX());
checkpointsAry.add(new Gson().toJson(RegisterCheckpoints));
System.out.println(checkpointsAry);
``` and the output of RegisterCheckpoints is ` {"ID":16,"X":1899}` which is correct but the output of the checkpointsAry.add(RegisterCheckpoints) is `[{"ID":1,"X":1849},"{\"ID\":16,\"X\":1899}"]` so the adding of the obj to the array is whats causing the issue
if i try to remove `new Gson().toJson` from the line which adds the obj to the array then it tells me to wrap it into a string.valueOf
nope, I didn't find it, I'll give it a try
ok, so now it works, but only from the git bash, but not from the cmd
the cmd throws still the same error
event when i use the same command in both command lines
are you in the correct folder when you run the commands?
yep, the folder is same in the bash (working) and cmd (not working)
and btw the command is
java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.17-R0.1-SNAPSHOT/spigot-1.17-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i TridentGamesPlugin.jar -o TridentGamesPlugin-obf.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.17.1-R0.1-SNAPSHOT/minecraft-server-1.17.1-R0.1-SNAPSHOT-maps-mojang.txt --reverse
so this error shouldn't be based on where I execute it
afraid no clue then. I've not used that at all.
the only problem, that I can see is, that cmd can interpret $HOME in different way than bash
but idk if it is true
use teh full path then
i tried, but that doesn't work even in the bash
or %USERPROFILE%
this also doen't work in both bash and cmd
and when I tried cd %USERPROFILE% it didn't anything, but idk if this is correct or not
bump!
works in command prompt too
yo @eternal oxide do you think you could help me with my issue?
you dont have to ping people, if someone can/wants to help you, they will
Is teh data in teh file actually escaped or are you just seeing that in the IDE?
this is what i see if i dont wrap it to json
oh, the %userprofile% works only on C
and I was on T
Yes, I'm askign if the actual string output to file is escaped
try JSON.stringify(obj)
you are writing a string, and the special characters in that string are being escaped
wdym. where should i stringify it?
where you add
give me a sec
cant find it. im using gson btw
found toString()
though
gson#toJsonTree
sorry i were a little busy with life stuff
what i want is to send a fake Item to client and still keeping the Item on server
btw, I have another problem, that when I remap my plugin form mapping-mojang to mapping-obf, paper still can't load it because it want's spigot mapping, how to solve it?
Hey, im making a bedwars plugin, i want to know, why my fireball isnt breaking blocks? (It isnt a event cancelling)
Contact Paper
Do fireballs break items by default? Honestly don't know
Im using launchProjectile
so with spigot it will work?
ghast fireballs do
https://tryitands.ee/ ¯_(ツ)_/¯
the other fireballs don't
hmm, that also an option
How can i make my fireball breaking the blocks?
are you sure you're firing a ghast fireball
and not the fireball that blazes shoot
Im launching a Fireball.class projectile
are those the same internally? I don't remember
if they are, check the javadocs on Fireball and see if there's anything about explosions there
search the javadocs for Fireball and see if there are other types of fireball
All Known Subinterfaces:
DragonFireball, LargeFireball, SizedFireball, SmallFireball
This chunk of code is looping causing the chat to get filled with the same 3 lines of text when its only supposed to be typed once. I have pinned it down to the runTaskLater runnables and i am here to ask if anyone can help resolve this issue
https://paste.md-5.net/ivuposofax.cs
?scheduling
you never increment progress
do you know how i would increment it?
copy it into a field then ++
you won't be able to increment a local variable inside a runnable since they must be final
i dont understand
and i'd also suggest rethinking your architecture before you want to shoot yourself trying to maintain this code
What of them i use
Try LargeFireball
Ill send my code, wait
A quick note that you shoulden't be running the top runnable every millisecond, do it like every 1 second which would be 1000 ignore this
Hmm I thought that was a ms value
no
the scheduler works with ticks
now im really confused
learn java
?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.
20 ticks is nearly one sec
Evt is the PlayerInteract event.
try setting the yield to a value above 0
It has @EventHandler
ill send all my code
All my problem is my fireball dont breaking blocks ..
ok, so I tried to install normal spigot there and (after increasing allocated ram) i saw, that it's also not working
.
Hello,
I want to create trades plugin, but I have a problem with inventories. I cancel the InventoryClickEvent when player tries to put item on wrong side (which has red background), but sometimes it doesn't cancel the event, especially when I right-click the slot with item on cursor (but sometimes it's enough just to spam left-click).
https://im3.ezgif.com/tmp/ezgif-3-e0d0aedb67b0.gif
nice gif
What's that mean?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
remove ; at end of if()
and that if statement wont work btw
Ohh
you still need to register it
might have
I use that lol
Love it so much
Anyone knows what is causing me to get kicked every time i do [item] with empty hand? (interactive chat)
Sound.BLOCK_LAVA_POP
Thanks
What was that utility that let you see what blocks were touched by a line between two points?
Btw, now it worked with even left-click and I found out with debug that the click hasn't been recorded, like the client sent a click, but event for the click hasn't been invoked.
How to use variable?
On players?
What...
Most likely letting everyplayer have their own var
What do you mean a variable
After I picked up a coal,I got 1 point in a variable
But other player wont get it
like that
You mean a List ?
No,not a list
maybe same as minecraft scorebroad
You'll probably want to use the persistent data container of the player to keep the memory of these "points"
And then when they do something that would merit changing the point values, you just handle events accordingly
So, Players have a getPersistentDataContainer method
I recommend looking up how to use the PersistentDataContainer API
You'll need it with something like this
Hello. My plugin.yml file doesn't seem to be working properly. All of my commands work, but as soon as I add permissions, it doesn't autofill on client side (where you can press tab to complete the command). Command still works tho.
I'm dying by seeing that return; at last and a if() with ;
Ikr
It's just so perfect
yep, creativity
he must be using old intellij idea too, otherwise idea would have said that its wrong
i mean their ide is warning them
How could I get all blocks that are intercepted by a line between two location points?
I'm sure if has to do with a BlockIterator, just not sure how to go about doing that specifically
imagine not learning maths
use distance formula
anyone know what is wrong with this https://paste.md-5.net/yemuvuqahi.cs
What is the thing that is not working with you
is there any other signGui api to open player sign and get text when player close inventory? (But without protcollib.) I'm trying to use this: https://github.com/Cleymax/SignGUI/tree/1.0.0/src/main/java/fr/cleymax/signgui But it doesn't work
(I can't find any other apis without using protocllib)
Looks like it scans all incoming packets for PacketPlayInUpdateSign and gets the lines off that, although ProtocolLib is going to make that infinitely easier for you
Hmm, what's problem with that api?
maybe not injected?
and I don't want to use protcollib sorry
This looks right right?
tasks.processResources {
filesMatching("plugin.yml") {
expand("plugin.yml": project.version)
}
}
}
Are you on 1.17
I'm not using with depend. I'm using creating my package and copy classes
Im asking for help not giving help
oof xD
Looks like it only supports 1.16.4, that's why it doesn't work
You can probably modify the imports to work with 1.15.2
yeah I already made all import to 1_15_R1
and no errors in compile and console
(no any errors)
anyone know what is wrong here?
import serializedobject
where are you trying to get serialized object from
idk
wdym you dont know
what the hell is a serialized object
like what are you using it for
I am trying to serialize stuff
serializedobject isnt in java
OH MY GOD IM AN IDIOT
Yesy
lmao i searched it up its a unity thing haha
no, I was following someone else's instructions
o
and there class name is SerializedObject
.
and no, I did not just copy paste it, but I didn't realize I was supposed to replace that with my class name
Hello. My plugin.yml file doesn't seem to be working properly. All of my commands work, but as soon as I add permissions, it doesn't autofill on client side (where you can press tab to complete the command). Command still works tho.
.
You need that permission to tab-complete it afaik
so I'm trying to figure out using mojang nms mappings (specficially reobfusacting mojang mapped plugins) and have a few questions. 1) I understand a mojang mapped jar can't run on a spigot mapped server, but can a dev mapped jar run on a spigot mapped server? and is mapping a mojang mapped jar to spigot a two step process (map to dev, then map to spigot)? 2) can all the mapping be done within maven, or do I need to have a script and run the extenal SpecialSource jar to map?
Good Afternoon,
I have a server I wish to launch in the near future with a list of plugins I wish to be set up and configured to work along side each other. I work a very intensive work schedule therefore I dont have the time to digest and configure the server settings my self.
Current Server Plugins:
-EssentialsX,
-Factions,
-McMMO,
-Gringotts,
-Rankup,
-WorldGuard/Edit,
-Vault,
-LuckPerms,
-Infernal Mobs,
-plus a few QoL plugins.
What I request: To have a skilled individual configure my settings so that players can accumulate in game currency via Essentials, McMMO, and Gringotts, and purchase ranks via the RankUp plugin.
I understand this task may be tedious, so I encourage anyone who is willing to take on the project to add my discord (at the bottom) so we can discuss and come to an understanding of what I hope to see but as well as compensation as I understand things such as this can take time.
Thanks z_Sand0r
Discord: Sandor#2396
- if I have a multi module maven project, (each nms version has its own module), can I remap the modules before they're shaded into my main jar? or should I only remap the final jar
?services
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/
You expect someone to do that for free?
did you read the closing paragraph, I mentioned compensation
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/
Jw If you’re offering up front payment or server profit
@dusk flicker will do first time lurker sorry 🙂
I've used Mojangs mappings to use NMS within this plugin but i still can't compile for some reason. Does anybody knows what's the issue here?
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.17-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.17-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.17-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.17-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
-
There's effectively 3 versions, Mojang, Obfuscated, Spigot. Only the Spigot version can run on the server, not the Obfuscated or Mojang. Also yes, it's a two-step process, Mojang->Obfuscated, and then Obfuscated->Spigot
-
Yes, it can be done with Maven. In the 1.17 release thread on the Spigot forums, md_5 explains how to setup SpecialSource to automatically map on compile with Maven.
Whats the error
thanks so much, got it working
I'm not too proficient in Maven, but it seems like for some reason Maven cached something & is now preventing the JAR from being downloaded. Is there a way you can either
- Add your local maven repo to the pom.xml, and then build Spigot using
--remappedto get the JARs from there - Clear your Maven cache and see if it'll get the JARs properly from the repositories
works! appreciate your help man --remapped fixed it
hi, has someone already tried to create a hitbox creator/manager/engine plugin ?
how would I do this in a static method
Do what
return (Z) this;
You can't use this in a static method
You can't reference an instance within a static method, you have to pass it in or something
hmmm
So ive been using the spark + jackson so far for all my server api needs. The issue is i only had status and player vault balance available. I want to change to packets, but people tell me they are really bad for big servers, i mean it cant be worse then having a Jetty web server running in the plugin. Should i do the switch to netty packets or leave the jetty server. Packets will allow me to use TCP Shield much more effectivly, compleatly covering up my ip, now you can get it with a api.xx.xx
I was wondering how those auto restart timers work in servers. how do they access the start.sh of a server if the server is offline and plugin is not enabled at that time?
Anyone know about mongodb? I ask here because of using it with spigot.
Its connection(MongoClient) always auto close, can I leave it open for getting data faster than reconnect to get data?
?paste
Hi why cant i use the variable num in my code? https://paste.md-5.net/iyeteremin.cpp
You can, just putting num on a line isn't a statement
ik but when i type for example switch(num) it also wont work wait
like this
it just says that i should create an getter and setter but i dont want it
@hasty prawn
Switch is a method
Send the full code that you're trying
oh wat
@hasty prawn this is the full class this is the broken part about it...
Oh, it's cause you're not in a method
That's why it's suggesting the getters and setters
he say he tried switch()
yes
That's something to be used inside a method not as a method
okay it works but why is it like this?
public void stuff() {
switch(num) {
case 5: //etc
}
}
why cant i just use this variable everywhere?
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.
I think switch can be used outside of a method, but used as an expression
int number = switch (letter) {
case A -> 1;
case B -> 2;
case C -> 3;
};
very different commands
also have pdeop
pop ops you on one world
source code is in skriPt because im on minehut which hasnt got custom plugins yet and im lazy to make a plugin
maybe
cuz im bored
ugh,
i dont think u understand how terribly thats gonna work out...
like... the server is gonna either crash or be super laggy....
:/
its gonna be fine
No it isnt
valknet
mc server host provider in minehut
literally mh unlimited.
crashes , lags
etc
the server hasnt crash yet lmao
nah
and if u dont want it 2... ur gonna have to hardcore hard code it....
i already have a few bits done hasnt lagged yet or crashed but we did only have 1-2 players
since im doing it with my friend
well....
gl trying to make it not die...
:/
u best have a super secure world management system tbh.... :/
like what?
well since on minehut u cant upload plugins,
ur gonna have to figure it out
Skript is over all trash af tbh
soo.... gl..
currently im just using mutliverse lmao
theyre planning on adding plugin support
yk the day when that happens..
ik but thats ages away
is the day i might use minehut again
yeah ik bc thats the only thing u can use.
problem is people can upload plugins that effect the proxy since all servers are connected
yeah
but the thing is,
thats IF they allow bungee plugins
which is unlikely
considering how u have to upload mainly the bungee plugins to the proxy folder,
but bungee spigot is just a spigot plugin with bungee support.
theyre developing technology that will isolate serves and not allow plugins to mess with that stuff
as we speak
o
all i know is trent told me they started working on it a couple of months ago
or weeks
idk
cant remember
oh maybe they did lol
thats what its called,
i dont keep track of it
its in the #announcements channel on their disc
yk if minehut unleashed is good
ill use minehut again no doubt.
but if its trash than no im fr never using minehut again until its good
the only problem is minehut does crash alot tho lol
well if youre using a free host expect limitations lol
ik
yeah ik
but i feel like they the first free host to crash this much
its like a world record
but im talking about they best be letting me upload like over 1 mb worth of jar files. xd
dude u should expect it as they have around 30k players on good days and 20k on peak hours..
probably will be a paywall limit
wdym "paywall limit"
i doubt they would make u pay for a plan for uploading plugins
i think that would fr be super unfair if they did
like you ahve to pay xx to get 10mb etc
well thats bs if they do
? how
and than ppl would just complain even more
because its just stupid
id rather have a plugin limit lmao
its an example
cuz at least than i could put everything into one plugin
they do have a plugin limit on free servers
and having high player count is still no reason for crashing lol
just means they need better infrastructure
ik
but im talking about like if we were allowed to upload plugins, than make a plugin limit for individual plugins
id be fine with that, considering how i can just put everything into one plugin
i mean hypixel is crashing... terribly...
hypixel is over all laggy... soo...
kind of just stating.... minehut is kind of the superior one out of the two atm...
but minehut is better equipped for scalability
they use kubernetes
i hthink hypixel does manual deployment
Umm, I don’t think that because hypixel does it themselves that it is worse
Their servers are spun up / down automatically
But I would presume they wrote their own tool
Is minehut worth using
no lol
heyhey
idk why this is happening
i have JDABuilder imported
theres no errors, no warnings
Importing doesn't mean its available... You either have to be running JDA or it has to be shaded.
if it wasnt available there'd be errors
Its clearly telling you its not available xD
odd
considering its a referenced library
unless referenced libraries dont work that way, and im an idiot
and if the ydont work that way, i have no clue how to import JDA any other way
because im using eclipse
hi im on 2 hours of sleep, sorry that sounded aggressive
You need to shade it if you aren't depending on another plugin that runs it.
Unfortunately that requires a builder such as maven or gradle.
cant i just.. /make/ a gradle file
Search up a tutorial for gradle using eclipse. I'm not the best person to ask as I usually avoid builders when ever possible lol
yeah
thanks
like thank u a ton
i dont think u realize how much that actually helped me LOL
are there still people who code for mc 1.8?
Yeap.
theres people that still do stuff in 1.7 lol
@stone sinew why do you code in 1. fucking 8?
My main plugin supports 1.8.8 up to 1.17
but you dont code just for 1.8?
woah
woah
man sir
mr man
I mean its base code is all 1.8 except for checking the hand lol
lets just chill there
mr mansir friendo
All my new plugins are 1.16+ except for Minions-Revamped thats 1.16.5 down to 1.8.8
Just because it's added in the IDE won't mean it's also built into the jar
yeah
just use spigot's shade task
im gonna sleep
oh
whats that
let me google that
then i'll sleep
and continnue where i left off!
looks more like a question
uh
no
oh is that a maven thing
are you using maven
no im about to install it
nvm ur probably not even using a dependency manager
. no im about to install it
well your entire project has to be a maven project
idk if you can change that now
yeah i'll find a way lol
eclipse has a converter
or that too
Oh
i was just gonna remake the project and copy/paste everything
but that works too
Idk i'm on intellij, the superior ide
¯_(ツ)_/¯
To many issues/errors for my taste
such as
idrk about IDEs, but eclipse seems to get the job done lol
tbh IntelliJ just seems to be fancy
like a cessna compared to a 747
Constant errors on maven building.
The imports are always fucked up.
These were my main gave up on trying to use it after a week.
ah, never had those problems myself so I wouldn't know
sounds like more of a java version error then anything else
Also any time I see someone code using Intellij I always see constant errors getting spammed and they have to restart their IDE xD
again I haven't had those problems
not yet 😉
Been using it for a solid 3 years
Been using Eclipse for 6+ no issues.
make sure to install the dependencies
i failed to read teh proper instructions
I see that
I've used Eclipse, didn't have much problems either
why is this so confusing to me
I just prefer Intellij's look, feel and code suggestions
as well as coming with tons of useful features out of the box
Eclipse has all of that but people never use it. They just complain that it doesn't have it lol
yeah
Yeah I guess it's not as intuitive there
its like actually comfortable chairs in airplanes
no1 really uses them, but the plane doesnt have them >:(
No, developers are just lazy 😉
: o
The installation of Apache Maven is a simple process of extracting the archive and adding the bin folder with the mvn command to the PATH.
No doubt about that
wheres the PATH
there is no PATH
Environment variables
installing maven
For maven anyway
weird flex but ok
this is still
not a flex
i extract the
if you go to new project does it have a maven option?
no lol
type environment variables into your windows search bar
do i not have JDK installed
istg i just downloaded it?
did you download it or also install it
Eclipse wouldn't run without it
thats what i thought
i dont get anything when i searched
Anyone got experience working around with bungeeapi + townyapi to make me a simple death plugin thing
ahhhhhhhh
i see
i was searching in English
so it goes to the Java directoryyy
oh or eclipse
java or eclipse
i dont have a JAVA_HOME one
towny
odd i have everything for Maven installed into Eclipse
from the marketplace
"market"
What is your issue
What build of Eclipse?
Just download and add to path
should be the latest
"Should be"
bruh
3.8.1 is latest iirc
Lmao
ok you are newer than me 🙂
That’s newer
lmao
so yeah i have Maven in like
the addons
im sorry im on like 2 hours of sleep
i have maven in the addons, but idk how to install it, because i dont have JAVA_HOME in my environemtnal variables
nor "PATH"
i do not :o
how to i turn the tick rate down with a plugin? (a time control effect)
So what issue are you having? You have latest Eclipse and maven
i dont have an option to make a new Maven project
not like.. New >Maven project
but like in Java project
right click in left panel, new Other
if theres supposed to be Maven project i dont see it
scroll down to Maven
yep
now to figure out Maven, youtube here i come
whats an Archetype
ooh
i see
Can I automatically add a hash map into interface implementation?
which archetype do i use for plugins..?
So I want every class that implements PaintButton have a hash map automatically.
Your reference to PlaceholderAPI is null
Hey, could someone explain Bukkit vectors to me please?
Inheritance
Elaborate
From what I see it is just a single set of co-ordinates
but it doesn't show direction
It's just one xyz point.
I mean it’s a class that encapsulates x, y, z so basically a 3D vector and then it has a lot of utility methods.
in Maven
in eclipse
when you're making an new Maven Project
and it forces you to select an Archetype
Yeah but I thought a vector is meant to show direction also.
tdubz that’s because the magnitude is inferred
perhaps you are trying to register before PAPI is loaded
So I can just access the map without the map is actually exist on the class?
yeah i think so
the vector automatically starts from 0,0,0 and then goes all the way to x,y,z
anyone has an idea of how can i check a spawner content?
Ahhh
yeah but not visually exist
@summer scroll hi do u know how to check a spawner entity
Is it possible to send a spyglass packet? Hopefully that was clear
when you're making an new Maven Project
and it forces you to select an Archetype
Oh sorry no idea, I use intellij
A
alright, thanks for that
o
Isn’t that just client sided?
does anyone know how to check a spawner content?
Content?
oh ty elgar
No idea honestly, it's possible to open a signed book, so I thought it might work for spyglass too
but if im referring to a block
I can't use that right
That is a Block
So how would I extend the line by 0.5 blocks for example from origin
do you mean an item?
Hmm yeah true unsure myself lol
I do believe spyglasses are fully clientside
Instead of all the way to 0,0,0
yes, that is for a Block, just cast it to CreatureSpawner
Since it's just a vanilla and less convenient optifine zoom
oh
2Hex get the BlockState and then check instanceof and cast to CreatureSpawner is the safest
well teh state anyway
There is a method that returns a InteractionResultWrapper inside SpyglassItem so I still have my doubts
I'll just wait for md5 ig
.
Might be it triggers an item interaction yeah Simon
can i send sculk sensor's sygnal to entity?
Create a vector where the magnitude is 0.5 then add it to the original one maybe tdubz
I can't find SpyglassItem in the docs, is this a spigot class ?
Nms
NMS
So i've no idea what's possible with this, sorry ^^'
I mean we have navigation controllers and some helpful classes for it
bump...?
EntityType creature = ((CreatureSpawner) e.getBlock().getState()).getSpawnedType();
will this work
o
Sculk sensor isn’t even in the game?
else if(cmd.getName().equalsIgnoreCase("feed")){
player.setFoodLevel(20);
player.sendMessage(ChatColor.AQUA + "Your hunger has been set to max!");
}
``` anybody know why when i execute "/feed", it gives me the usage instead of it working?
ok but im just asking for suggestions i what im doing is not bs
yes
Hey, how would I make some code only continue after the called method is finished?
changing return false to return true is a quick way to fix it
Sculk sensors added already, but hidden.
but its not the right way
That predicate will most likely always be true
How can i update my scoreboard line like every 40 ticks?