#help-development
1 messages ¡ Page 18 of 1
lol I hate learning conventionally tbh its so boring to work through basically what is a worksheet I just throw myself into projects and actually make stuff
nice
When I learned, there was no such thing as tutorials
since nearly its beginning
which I have
wat
I have made plugins for people and have a few in my own library o.O
switching between JSON and yaml is literally so annoying
HoloAPI was the first plugin to allow customizable Holograms and is part of the reason why armor stands exist
you do know yaml is json?
well the formatting's different
tru
hello how can i do a code that automatic builds a glass cube without nothing inside?
the reason Mojang introduced armor stands the way they did, where they can be invisible and as an entity, was so that holograms could still exist. Originally, holograms made use of a bug from the horse. If you set the horse to a negative age it made it invisible except for its name tag
interesting story
Mojang was going to patch it, and if it weren't for HoloAPI and HolographicDisplays(HoloAPI had a 3 month start on them :P) making holograms popular
armor stands wouldn't be what they are now lol
so many people got upset when they learned holograms were going to possibly go away
i want to learn java so i can make better plugins for all versions
bump
cuz skript cant do the same
yes but
just more difficult and inefficient
in case you want to look at holopi's code lol
it is open source after all
there are so many classes
its defunct now, but the one feature that holographicdisplays still has not managed to replicate is touch screen holograms đ
wym
HoloAPI allowed you to go up to the holograms and touch in different spots to do things
currently HoloAPI is the only plugin to ever have such a feature
cool
well the plugin was developed by 3 developers counting myself in that number
a
i am just looking at the source code
i pretty much have no clue
what most of the things do
well its a plugin and api at the same time
it allowed other plugins to hook into it to extend its functionality
need the plugin to be working, which currently it does not work on updated versions because how holograms must be done has changed
maybe one day I will get it working again
If someone can find the relevant code for the touch feature, I am sure they could figure out how to add it to another plugin
a
but that is if you can find it in that web of code đ
oh
its still updated đ¤
Ill just make Burchograms
oh cool
anyways
i still dont know how to fix this
Material.PLAYER_HEAD < error: cannot find symbol
package me.goldenheads.goldenheads.commands;
import com.google.common.collect.Multimap;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.SkullType;
//import org.bukkit.attribute.Attribute;
//import org.bukkit.attribute.AttributeModifier;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
//import org.bukkit.inventory.meta.tags.CustomItemTagContainer;
//import org.bukkit.persistence.PersistentDataContainer;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class GoldenHeadCommandGiver implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender instanceof Player) {
Player player = (Player) sender;
ItemStack goldenhead = new ItemStack(Material.PLAYER_HEAD);
ItemMeta itemStackMeta = goldenhead.getItemMeta();
itemStackMeta.setDisplayName("&6Golden Head");
SkullMeta skullMeta = (SkullMeta) goldenhead.getItemMeta();
skullMeta.setOwningPlayer(Bukkit.getOfflinePlayer("BlindFrenetic"));
goldenhead.setItemMeta(skullMeta);
player.getInventory().addItem(goldenhead);
}
return true;
}
}
If it cant find the key PLAYER_HEAD its a version issue iirc
what version are you on
Older versions, it was just HEAD i think
1.8.8 minecraft version
wasn't it skull?
yeah something with SKULL, in fact just that
^^
its 7 years old so there have been a few changes
Or, you can develop on 1.14 đ
There is only player_head and player_wall_head
1.14 đ¤
version to support when making plugins
he's probably making a pvp plugin lol
the head was changed in 1.12 iirc
same with the inventory view system
why not
sure
xd
first time that this channel is this real quiet
I'm having troubles loading a hashmap (string integer) from the config file. When loading, the key returns fine but the value always returns null
public void setLivesHash(HashMap<String, Integer> hashMap) {
for (String key : hashMap.keySet()) {
getConfig().set("HashMap."+key, hashMap.get(key));
System.out.println(key + " now has " + hashMap.get("HashMap."+key) + "lives.");
}
saveConfig();
}
public HashMap<String, Integer> getLivesHash() {
HashMap<String, Integer> hm = new HashMap<String, Integer>();
for (String key : getConfig().getConfigurationSection("HashMap").getKeys(false)) {
hm.put(key, getConfig().getInt("HashMap."+key));
System.out.println(key + " has " + getConfig().getInt("HashMap."+key) + "lives.");
}
return hm;
}
here is my code to save and load the hashmap
higly doubt i can help u with this
anyone got a cuboid class that has the getBorders method?
i need fill only the borders and not the entire cuboid
borders as in the edges?
or the faces?
faces
I've got that
CuboidRegion region; //Assume this is populated
for (BlockFace face : LocationUtils.PRIMARY_BLOCK_FACES) {
CuboidRegion face = region.getFace(face); // Do whatever you need with this
}```
thanks, how can i set the blocks?
(im new on spigot and java)
oh nvm i found the way
forEachBlock
So that could look like
CuboidRegion region; //Assume this is populated
for (BlockFace face : LocationUtils.PRIMARY_BLOCK_FACES) {
CuboidRegion face = region.getFace(face);
face.forEachBlock(b -> b.setType(Material.STONE));
}```
This would give you a hollow cuboid
any ideas?
how would i make tab completors that sort?
like he default player one, If i have "o" it'll come up with everyone's name that starts with an o
StringUtil.copyPartialMatches
Any good guides on WorldEdit API Schematics
Ty
you're doing the format wrong
and that deprecation is from paper's api
try it
for the format, you have to use %s
event.setFormat("<%s> " + "%s"); this is the example
that will set the format to be <username> message
otherwise, trying a percentage into the chat throws an error
in your case, this would be your formatting String msg = "%s" + ChatColor.WHITE + ": %s";
are you trying to get a custom name or the item's type for the name? (wood, iron_pickaxe, etc)
ah I see, because getLocalizedName() returns localized name based on the server's language
Yo, How do I detect the name of the item the player is holding?
I'm kinda dumb at this
Yeah
one sec
oh alr
player.getInventory().getItemInMainHand()?
alr, thanks
is something like that possible in java? Goal is to take objects of type type
you can use Class#isInstance
Yo, How do I make a item Unstackable
i assume it can't be that much slower than just using instanceof
at least not a noticeable slow down
Does your displayname have colors? Also, yes. Your display name, likely âFiesta Potatoâ isnât going to be âfiesta_potatoesâ
Hi i have model and i wan't to give it to myself in game how do i do it? Its chest model
Use the PDC
That way you can name it whatever you want and still assign custom data to your items.
?pdc
Why not?
I mean, NBT and Metadata are also options, but come with their own set of challenges.
You know that you can store multiple pieces of information in the PDC right?
You just have to use a different key
Yo, How do I make a item Unstackable
Itâs not even about convincing. Itâs just a good option thatâs very flexible. Converting underscores to spaces is an option, but itâs not perfect.
Take your config section âfiesta_potatoesâ. Replacing the underscores would result in âfiesta potatoesâ. Which would not equal your displayname of âFiesta Potatoâ
You could run it through a capitalization method, but what if your display name is something like âFiestaPotatoâ? Then your capitalization method would only capitalize the first letter and you wouldnât have a proper comparison.
If you donât want to use something sane, thats fine, but you should be aware of the potential problems you might face with a system like that.
absorption?
pls help with crates plus
[19:51:43 WARN]: [CratesPlus] Plugin CratesPlus v4.5.3 generated an exception while executing task 11207032
java.lang.IndexOutOfBoundsException: Index 11 out of bounds for length 9
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at plus.crates.Opener.BasicGUIOpener$1.run(BasicGUIOpener.java:84) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.5.jar:git-Paper-794]
show your code
java.lang.IndexOutOfBoundsException: Index 11 out of bounds for length 9
where?
what
i have a lot of codes in that plugin
Hey, How do I make a Item unstackable
BasicGUIOpener.java:84
you can assign a random nbt tag and it wont stack
wait is this your own plugin or?
cratesplus
ask the cratesplus dev
ok thanks
this channel is for people who code their own plugins
lol
This is my code
use PersistentDataContainers and set a tag as a random uuid
K
also that looks like static abuse
I'm kinda a new to Plugin Development
I just follow random tutorials lol
Yeah
?pdc
thats a pretty good link i can give examples if oyu need
Can I have an example? Since I'm kinda confused lol
Alex's blog post about it might be of use https://blog.jeff-media.com/persistent-data-container-the-better-alternative-to-nbt-tags/
Hey by chance did you get collisions somehow on your client sided npcs 
as in player collision?
Just as in detecting if the NPC is coliding when sending the move packet
Oh nah havent really looked into that sorry
been busy trying to make my dude blink lol
yeah switching skins
thats pretty smart ngl, couldnt possible be to complicated i dont think
Unless theres some limitation to hot swapping skins
by the looks of it, they quickly flash to default position before moving so i might have to do some trickery
you got much progress on yours?
Might be able to force some update to the client somehow
Ngl i havent focused too much on skins, when i did it one time and it didnt work i commented it out and said ill work on it later đ
Been trying to just get them to move, which i got absolutely perfectly.... but now im at the point where i need to calculate AABB and jumping calculations myself ._., cause now they just kinda float up to the block and phase through blocks lmfao
Show your code where you accessing the variable plugin from
i tried to do pathfinding and gave up after an hour lol
your trying to access it statically when its not a static
it just refused to move
I use Ollias astar stuff, but i need the collision calculations or itll look fucked
here i got a vid of one moving
are you creating an item in a static method
thats why
just create it on demand
static itemstacks suck and arent dynamic at all
ofc need head rotations added int and it is 100% fine for same y axis with clear path
yeah i was just lazy xD
i used .Pos instead of .PosRot
its because you are accessing pl from a non static context, just make a static
but you're abusing static
im actually trying another lib rn
for(Player player : getInstance().getPlayers()){
Location loc = entity.getBukkitEntity().getLocation();
loc.setDirection(player.getLocation().subtract(loc).toVector());
float yaw = loc.getYaw();
float pitch = loc.getPitch();
Util.sendPacket(new ClientboundRotateHeadPacket(entity, (byte) ((yaw%360)*256/360)), player);
Util.sendPacket(new ClientboundMoveEntityPacket.Rot(entity.getId(), (byte)((yaw%360)*256/360), (byte)((pitch%360)*256/360), false), player);
}``` this is my head rot method if you want
but for some reason, the npc is there but well, its invis xD
ouu perfect
one sec
but you have to send the ClientboundMoveEntityPacket.PosRot
at the same time
instead of both Rot and Pos separately
https://paste.md-5.net/vugacidozi.cpp - thats the shitty math i use for getting him to move
Need to fix up the start of it as its really messy, but the .Pos packets really weird
Does anyone here know JDA? I need help with a way to get the Guild ID
mind if i copy it?
you need to split the packet relative distance values by the speed you want the NPC to move to
go nuts, just note that final location catch is meant to have a callback call
soo
last time i used it was like 2 years ago but i can try and help
if not they have a JDA discord
gotcha
I basically just add this callback as the last argument on the final location so i know when it reaches
its a universal interface i use
You can remove overrides and it will work fine, just no distances longer than 8
Ill work on a splitter for distances longer than 8, but math drives me nuts lmfao
i might be wrong but im pretty sure it has to be locally cached before you can access it
you saved me alotta time thanks @noble lantern
oh god it actually works

ah i see what you mean with collision
if you manage to ever figure out AABB lmk xD
yeeaaah haha
he just phases through
ill try and do some A*
well A* will help but
ngl
that might fix it?
i mean the astar dooooes check for valid walking spots hm
well if its paths around blocks you dont need to worry about collision right
its just a lazy way of doing it maybe lol
then ill be back with results
alr ill tell you how it goes
ill just nag @opal juniper to have his astar to collisions
(make it do collisions)
ollis pathfinding is actually block by block
so youd never need to worry about the limitation if you use his 
thats with citizens tho, they move a physical entity with velocity
them getting stuck is actually the reason i switched everything up
cause velocity was messing with theyre actual destination
May I get some help with naming for a few messages in a language file I'm working on? I'm having a lot of troubles explaining my problem clearly, but I'll do my best. There are two parts to the problem.
First part: I have several pairs of related messages in the file with similar keys, like this pair:
full-inventory-target: #warn target that their inventory is full```
These two messages are used when a sender tried to send their target a gift. Obviously, one of them is sent to the sender, and other to the target.
Second part: I also have a several unrelated messages with a similar naming convention, but each one of them is used in a different situation from each other. Like one for when the sender is in a wrong world, and another for when the target is in a wrong world. In both examples, the message is sent to the sender, and none to the target.
How should I name messages like ones in both parts of this problem so that this distinction is clear?
I really like how the mojang remapped packets are named. For example ClientboundMoveEntityPacket
or ServerBoundPacket
you could do TargetboundInventoryFull or SenderboundInventoryfull?
is senderbound a real thing lmfao
im back, adding astar now
honestly the way it is now is relatively distinct, when you make different lang files most people arent using the keys if they dont speak the keys language
you using a lib?
ah cool
by default it wont rly go for smartest location without a changed method
i just finished adding in the impl
time to test 
ngl
this kinda cute tho
waiiit a minute
lol look at all this shit ive tried xD
packets dont have to be sent sync right
yooo
^ His gui api is now 20x faster
thats why i use futures in that method i sent you
LMFAO
my current system uses "NpcInstances" so different players/groups of players can see diff npc states
i think i can abuse async
oh i abuse tf out of it
as you can tell by my spawnIn()
the callback returns sync, then throws back async with pathfind
right
okay, testing
weird
this isnt waiting
oh
i never implemented the callback
i need the ruber ducky method smh
wtf is that
its basically you have a rubber ducky on your table
and you explain your problem to it
most of the time just by explaining it, you can fix the problem
not a horrible idea tbh
not at all
most of the time when i ask for help in here i fix it by asking and make myself look like abimbo
getBlockData returns a copy of the blockdata, not a retro-active reference, right?
at least nothing in the code tells me that updating a blockdata reference will automatically reflect in the world
(just double checking here, ive tried modifying blockData and i think i forgot it works more like itemMeta)
nah you have to set the data back iirc
ok thats what i figured
okay buoo
this run should
theortically work
nvm
i suck
bbl
buoo stupid question
?
or is it a different casting
OH
uh
lmao
amazon needs to deliver my food im fucking up on simple stuff
amazon delivers food?
yeh amazon grocery
free delivery too with prime on like 25$ or more
(not sponsored)
This is not just for server admins, this is also for future me and maybe other developers. I'll inevitably drop my project due to life, and pick it up months to years later forgetting everything about it, so I'd like to make it a bit easier to pick back up in any way I could lol
how..?
its sooo buggy too
god i wish this was fuckin easier
oh
the one time i need code to block a thread
With mojang mappings, how hard would it be to "restrict" an entity from moving outside of X amount of blocks from a location
just needs some smoothing tbh looks good tho
fixed it more butehhh
i think
every move send i need to send absolute position packet
the npc collided client side and got knocked off course
I have no clue why this won't work
are you using a diff api version
or paper and spigot api or other way around
I did switch the project from paper to spigot using maven. im not sure how I would resolve this issue tho
I can send the pom file if u need that
Anyone know how to control entity AI with mojang mappings?
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.
move(MoverType, RelativeDeltaVector) methods should make it move
considering it has AI
hmmm...
but I cant like.. force them to stay within 25 blocks of a location or anything like that
yes
calculate the target vector from current location vector
.distance they have a method for it
is it a bad idea to extend my "Item maker" class to ItemStack?
I already made that class with just an instance of ItemStack in it but by extending it i can remove a lot of lines of code
would that like reduce performance by making the whole class contain the over 500 lines of the ItemStack class?
could you explain what you mean by this
I know but to have code easier to read itâs better to have less lines of code
Basically everytime I have to modify an item stack i convert it to an utility class that I called CustomItem, so I do new CustomItem(itemstack) and from there to change name I simply call the variable customitem.name(ââ), so I donât have to deal with item meta of the itemstack class
But I though that to simplify some methods I could simply make that class extend to ItemStack class directly, and I cut off lots of lines of code doing that
so is CustomItem just an itembuilder or it also has functionality?
I just asked if itâs bad for performance to extend a class to another instead to make that class have an instance of that clas ls inside
ItemBuilder Yeah
i mean if its just to make easy methods like that, you can just extend ItemStack
Ok, I was worried that doing this could lead to more memory usage since doing that I implement every method of item stack inside custom item class
thats not how memory usage works
no programming language works like that lol
the only "memory" you are really using is how big the jar will end up being. and it will be like 20kb more
Negligible
I mean you shouldnât worry about prematurely micro optimizing like that
For some odd reason, when I try and use &#F81D44 for my HubPvP Sword it comes out like this:
#F81D44
It's hard to show but some other servers use custom hex codes and it looks fine
Well there has to be a way
it says help development
You should ask plugin specific questions in the plugin authorâs discord itself, or in #help-server (hint you may wanna read the channel descriptions)
ah
Anyone know the exact values to replicate the vanilla block break particles? seems so ahrd to get it exactly
wtf is a Mnemonic bookmark
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/World.html#spawnParticle(org.bukkit.Particle,org.bukkit.Location,int,T)
Loop this through about 10 times and have the amount as 3
managed to get it with 50 count and .25 offset
But normally, when using note blocks you don't have to do your own particle stuff
Oh nice
the way im doing it, i have to
nah just some semantics to avoid certain roadblocks
Wym
dw about it lol
Well why not share it
I've been using your custom guis thread to guide people for a long time
didnt think people still used that lol ty. Pretty much if you want to avoid a block dropping items, you can either use breakNaturally and listen for the event (which is annoying). Or use player.breakBlock. Both viable but if you want to simulate clientsided block breaking (breaking blocks just visible to one player) neither of the methods really work too well
so im just trying to make it as controllable as possible
Mnemonic is like iload instead of IntegerLoad
Ohh alright got that, makes sense Ty
theres probably some easier way to do it, but this works for me
Anyone got some good plugin ideas to make 
plugin that makes a plugin
yeah its just boundingbox calcs
Only issue is, how would you calculate the exact point they intersected at?
could use vector math
but err, that would require doing it on 4 lines i think
so probably a better way
sad
what's the difference between a mob's goalSelector and targetSelector? Both seem to do the exact same thing when I add a new goal myself
One is named goalSelector and the other is targetSelector
Targetting is for like aggression of pussy runaway shit
goal selector is for a specific instruction of goal to execute in order
hm well I didn't notice any difference in behaviour though
no matter whether I add a goal the goalSelector or targetSelector, it does the same thing
also pillagers are using the goalSelector instead of targetSelector for stuff like shooting bows
weird
Would it be possible to remove this annoying popup with packet manipulation?
No just let it be
Idk maybe a texture pack
Lingering potion cancel
how do I find my github repo tag for adding to maven?
<dependency>
<groupId>com.github.KyTDK</groupId>
<artifactId>NeoUtils</artifactId>
<version>WHAT IS THIS</version>
</dependency>```
jitpack?
yes
Yeah
You make them
what?
just set enforcesSecureChat to true in the server data packet (ClientboundServerDataPacket mojmap) @onyx fjord
how?
I got one already
So you just use the tag name as version
and I tried it
smart
god mojang even made it easier for us by making the method remapped nicely!
you know what that means right ?
send me your repo
?
im making this a plugin
yes good
shalli use plib or packetevents
the diff is that packetevents can be shaded
can you share the patch? i also have my own fork
oh
i see
its remapped
all g brother
do I just remove?
yeah you cant rly remap in jitpack
i'll find it
can plugins have swear words in names?
u sure?
You can send from server -> client whatever
eg
Bukkit.broadcastMessage("n word");
now
clients might censor it like bedrock ones
but those dont get sent to mojang iirc
i wanted to call it Fuck Popup
now im gonna fork spigot
how about
and do a check
that if a plugin name contains a swear word
Fvck Popup
int won't load
gotta get that pr accepted tho
group id screw.microsoft
exactly
hence why you change it to 16
or 17
whatever version 1.19 is on
its not set to 9 I cant see it
i want to make an algorithm to determine what the player is actually seeing
Obviously I can't guess which camera angle they chose in client settings
But which one should would be the standard one to use server side?
And any clue how I should implment the algorithm?
I thought about "get all the vectors between yaw,pitch - angle and yaw, pitch + angle" and "get all the vectors between yaw - angle, pitch and yaw + angle, pitch", put those vectors in BlockIterator to trace all the blocks in each direction (and break the loop if we got some solid non transparent block)
pitch and yaw being the eye location, angle being the viewangle I asked you above
I don't think it's the correct way to do that though, can I get some input?
raycast outrward from theyre looking direction
outward*
looking direction never lies (Normally)
raytrace**
sorry
World has a method for it
declaration: package: org.bukkit, interface: World
It is not sufficient, raytracing is only for 1 direction
what are you trying to achieve
i mean yeah obviously i will raytrace at some point
Seeing all content that player is viewing, so everything that is displayed to their screens
not only the lineofsight, which is, as the name says, a sole line of blocks
what are you trying to display to their screens?
nothing
đ¤
making an orefuscator? 
lol wtf, why does protocollib have spigot jars in their maven repo
we dont talk about that

could be mirroring the repo couldnt they
like paper mirroring mojangs
sounds like vanilla jar
protocollib virus
eh, @onyx fjord probs better off using packet events now that I think about it
server jars are like 50-60mb now 
otherwise you will get 1 star reviews from noobs asking why no work if they dont install protocollib
no docs tho
why are we still here?
just to Suffer?
or im looking in wrong place
packetevents is easy
you dont know suffering
i can help
until you try aabb
just made a 911 joke to my mum
or
also
yes
NMS Remapped packets...
what are you using, gradle?
I cant figure this thing out
NMS PACKETS REEEEE
yes groovy
i worked with the MC client itself
shut up
ur tellin me
ok 1s
vscode?
git gui lolxd
i used to make MCP clients lole
do you know how to make an entity not collide into a block client side...
via packets
without aabb
example
if block there no it isnt đ

ill just have it detect a block in front and make it scream in chat for someone to break it
well was there actually a block in the entity pos or was it just weird animation stuff
try adjusting x and z +0.5
its hard to do that cause of move packet is weirdd
i need to log the points i have
actually nvm thats not what looks to be happening
https://github.com/retrooper/packetevents/wiki/Setup-2.0#using-gradle @onyx fjord
Add jitpack repo
Then add dependency, e.g:
implementation("com.github.retrooper.packetevents:spigot:2.0-SNAPSHOT") {
exclude("net.kyori")
}
Shadow:
tasks {
build {
dependsOn(shadowJar)
}
shadowJar {
relocate("io.github.retrooper.packetevents", "YOUR_PACKAGE.libs.io.github.retrooper.packetevents")
relocate("com.github.retrooper.packetevents", "YOUR_PACKAGE.libs.com.github.retrooper.packetevents")
}
}
in kts but should work / be easy to convert
im suprised theres no like collides property for the packet
it actually looks like ur already offsetting by 0.5 (or 1?) somewhere
like the center of that npcs aabb is at the 0,0 of a block
lolwtf
well
shalli minify shadowjar aswell?
i set the location to locations returned from ollies pathfinding
Should i try and make the ending floating point .50?
maybe
you can, but I tend to avoid that as I've had issues with it and transitive dependencies before
either +0.5 or +1
?!
hm
well no
cause 5.6 would round up actually
i assum int casting does same thing huh
A Simple to use Pathfinding API for Spigot Plugins - GitHub - olijeffers0n/PatheticAPI: A Simple to use Pathfinding API for Spigot Plugins
its amazing
are questions about automatically solving captchas allowed here
i doubt much know how to do it
ik damn well i dont
Burchard I still got the same issue, my current version tag is 1.2 and its on 16, but it still thinks im on 9, it using a lower version, how do I fix that?
not sure, try google
if jitpack errors its a long drawn out process most times
typically gotta fuck with some type of config
here
idk if
i used that when i had an issue or not
but, might work
oh
yah it is the fix
lmao
Anyone who knows H2/SQL? Because I can only find the same stackoverflow post and it doesn't seem to work.
I want to UPDATE if it exists and INSERT if not. But how?
btw I don't use the row to indentify. I use the playerUUID as a "key"
yoo wtf
making floating point .5 is actually nuts
YOO
I THINK I GOT IT
Is this sqllite?
or actual mysql
idk tbh, I use H2 I think it's a seperate SQL dialect isn't it?
you are indeed correct
it works now :oo
SQLLite, H2, MySQL will all have slight syntax differnces
Cuz idk if H2 supports UPSERT (Insert + Update) and Merge into seems to not work, even though it doesn't throw any errors.
yall
Yeah UPSERT is postgre thing for H2 it seems from my searches, you said merge doesnt work?
any idea on how to automatically solve a captcha like dis:
https://github.com/Coflnet/SkyModCommands/blob/main/Commands/CaptchaGenerator.cs
can u just gimme pictures on how its done
my brains totally fried from code
or a vid of the captcha
bro if i knew i wouldnt ask
oh
How to set owner of skull if im using GameProfile with random uuid?
Not for me atleast. I'll see if it actually enters the loop, but this doesn't seem to work:
public static void saveData(){
HashMap<UUID,Homes> homesHashMap = Maps.getHomesHashMap();
for(Map.Entry<UUID,Homes> entry:homesHashMap.entrySet()){
try{
Connection connection = Database.getConnection();
PreparedStatement statement = connection.prepareStatement("MERGE INTO Homes KEY(PlayerUUID) VALUES ( ?,? );");
statement.setString(1,entry.getKey().toString());
statement.setObject(2,entry.getValue());
statement.execute();
}catch (SQLException ex){
System.out.println(ex);
}
}
}
and gives u a list of answers in chat and if u click one
it sends it to the backend
then
it checks it there
You need to figure out how to set a signed/unsigned Base64 string of the skull texture
Google may have the answer
pretty sure GameProfile can handle it
I only load and save the data of a hashmap onEnable and onDisable, to avoid reading from the database all the time
Is it always a math equation
or random questions that are multiple choice
i can make it with itemstack, i cannot set it to casted Skull block
ngl i havent touched SQL in java in forever so reguarding actual code youll have to ask others
always a math question
kk, appreciate it though
i can make a solver for math questions but
the thing is
how the fuck
do i send it to the backend
So essentially your just getting the chat strings of the answers
send a chat click packet to server
Parse the Options and perform the command
not a server
They really could've made update insert if there's nothing to update lol
it's a forge mod
return new DialogBuilder()
.MsgLine($"What is {McColorCodes.AQUA}{first} {McColorCodes.GRAY}{word} {McColorCodes.AQUA}{second}{McColorCodes.GRAY} (click correct answer)", null, "anti macro question, please click on the answer")
.ForEach(options, (d, o) => d.CoflCommand<CaptchaCommand>(o.Text, o.Code, "Click to select " + o.Text));```
this is how he sends
the captcha
it's in csharp
you could always GET and if the result sets are empty insert, if not update
More dirty but hey, upsert :))
Why are Forge mods in C#?
its a backend for a forge mod
No Wonder modded Minecraft Takes ages to load
the front end is in java
Then I'd RE the Frontend instead
If the source is Not available, Recaf is your friend
lmfao
Then wait a min, I'll Look at it
everything is under the organization btw https://github.com/Coflnet
gonna sleep, having a hard time typing sentences without adding ; to the end 
backend: https://github.com/Coflnet/SkyModCommands/
front end: https://github.com/Coflnet/SkyblockMod
Does anyone know what does the damage from a lingering potion classify as?
If I Had to guess, there is No captcha
wa
wait
how
u mean it's a trick or smth
i dont think so
I am trying to make this plugin where the Warden is immune to all kinds of damage except for melee but when I cancelled the potions the lingering potion of harming for some reason still works
There is only CoflSessionManager but that one does Not describe your captcha
hmmm
but i think i caught how they're doing stufff
so basically the command isnt registered on the client
it gets sent to the client with a socket
then when the client
sends an unknown command
it sends it to the backend
Nah
public void SendCommandToServer(String[] args, ICommandSender sender) {
String command = String.join(" ", Arrays.copyOfRange(args, 1, args.length));
//JsonStringCommand sc = new JsonStringCommand(args[0], WSClient.gson.toJson(command));
RawCommand rc = new RawCommand(args[0], WSClient.gson.toJson(command));
if(CoflSky.Wrapper.isRunning) {
CoflSky.Wrapper.SendMessage(rc);
} else {
sender.addChatMessage(new ChatComponentText("CoflSky wasn't active.").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
CoflSky.Wrapper.stop();
CoflSky.Wrapper.startConnection();
CoflSky.Wrapper.SendMessage(rc);
}
}```
Hey I try using maven for the first time and I added the spigot api in the pom.xml but I wont work like theres not JavaPlugin, CommandExecutor etc here my pom https://paste.md-5.net/fahodenesu.xml
That is only invoked with /cl (args)+
Hence the command is actually registered
@noble lantern ?
do what ollie said
If I click 1, how can I operate the event?
still not working
does maven give an error
no
i doubt that
so those slots
got weird numbers
found the error
Bukkit.broadcastMessage the click events e.getSlot
you can find theyre number there
pom was in target folder
lol
thanks bro!
thanks anyway
yep, theres a thread on spigot that shows the slots but the numbers of slots are outdated sadly
https://www.spigotmc.org/wiki/raw-slot-ids/
This page needs some TLC
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
wonder whos gonna do that đ¨âđŚŻ
how can I set items in anvil?
ok so this
if (e.getItem().getItemStack().equals(new ItemStack(Material.ENDER_PEARL))) {
e.setCancelled(true);
}```
works if only there is one epearl to pick up
PlayerAttemptPickupItemEvent btw
I think it's because default amount is 1?
yeah thats what i figured out
Will anyone make me a mobportal plugin like this for free?
https://www.youtube.com/watch?v=fux3NTrz8K0
Is possible can you make it as configuable as you can? Thank
If you wanna make it dm me
how do i update my spigot plugin to the latest verstion>
?
bc i got the error
'''This server is running Paper version git-Paper-"86f87ba" (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) (Git: 86f87ba)'''
This server is running Paper version git-Paper-"86f87ba" (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) (Git: 86f87ba)
What error lol
oh shit
mb lol
one sec
java.lang.IllegalArgumentException: Plugin already initialized!
so registering events ?
Will anyone make me a plugin for me for free dm me
Do something like e.getItem().getItemStack().getType().equals(Material.ENDER_PEARL))
ahhh ok
instead of doing Main.getInstance() in main class, do this
in my main?
damn
That's not where the error is
okay so what should i be looking out for ?
new Main()
i havent got anything like that anywhere
To me he shouldn't use getInstance at all, better using dependency injection
Could you send the full error in a paste
Main.java line 13
?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.
tysm!
i saw the error lmao i had a final in there
actully
what should i change it too
this is line 13
public final class Main extends JavaPlugin {
Show your main class
Whole
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
I didn't even notice
what can i swap it too?
How can I include local JAR Api into Maven Build?
did you build the api jar?
its downloaded from Internet
its CMIApi
no clue what that is
oh no CMI
anyone?
ye thats where Im taking the APi from
still getting the error lmao
reposity with url?
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>```
i meant how do I get that?
if i would know the id
and remove system and systemPath
You can paste the github link in to jitpack
and it will tell you
com.github.Zrips.CMI-API or ^
ooh
ok I got this from jitpack
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.Zrips</groupId>
<artifactId>CMI-API</artifactId>
<version>Tag</version>
</dependency>
buuut I still get
Tag is most likely not the version
changed it to last releaased version on GitHub and still same error
jitpack says latest version is 8.7.8.2
yep I tried it with 8.7.8.2 but still it can't find anything
but the error says it can't be find in sonatype
isnt that also a repo?
oh my
maven searches all your defined repos
You will have to do as Olivo said earlier, install it locally
well imma try therefore
he ?
don't think I have ever seen a command specific for packets. What does that command even provide
but yet im not doing anything in this folder
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.
Didn't you say you already watched like 50 spigot videos
practice
?google youtube.com advanced spigot courses
Google your question before asking it:
https://www.google.com/



