#development
1 messages · Page 80 of 1
true ig
yesno
same
I tried using an http and websocket library but I forgot what it was called
It was something popular/big I think
Who made svelte
Me
rich harris
I'm rich and harry
svelte was bought by vercel
and is funded/maintained by them
aka, svelte is not going anywhere
What’s its package name or whatever
package name?
Like for dependency, I feel like it’s what I tried using or something similar idk
tbh too tired to understand what you mean, here:
Frontend: https://svelte.dev/
Backend: https://kit.svelte.dev/
me go sleep
adios
Ok nvm that’s way too modern, I was using something from like the 1800s
lol
svelte is a modern framework
def. recommend it though
has been my go to framework for fullstack
For java?
Yeah was gonna say I was reading js stuff on site
I heard https://java-utilities.srnyx.com is making progress on replacing it
🤨
Dw it uses gradle galaxy
Not that much progress it seems 😔
fr
was about to say that
imagine also not using BetterJDocs for the javadocs
pfff
no i meant that you implied that you're adding an http framework to it
Wait where do u even see that
Ohhhh in README
What’s wrong with jitpack?!
Ohhhh uhm yeah just gimme a few years
🥲
Firstly (not sure if this is still a thing) jitpack is horrible at handling transitive dependencies
And it has caused many other issues to me in the past when using libraries from it
Just post it to maven central, it's free
But can it do individual commits
Why do you need individual commits? I mean just set a github action to publish on commit, but that sounds overkill and dangerous
there are snapshots :)
If you publish each commit, sure 
I like to wait weeks sometimes months before releasing a new version 😊
doesn't jitpack just run the publishToMavenLocal command or smth?
No idea
Yea
setting up spigot api dependency but replace the spigotmc repo with sonatype/maven central repo
idk
what really are the downsides of jitpack tho
Yeah I haven’t experienced anything too bad
I’ll probs stick with it for now ¯_(ツ)_/¯
ye it runs ```
./gradlew clean -Pgroup=com.github.srnyx -Pversion=1.0.0 -xtest assemble publishToMavenLocal
I’ve never had any downtime with it, I think that was old issue or something
@dark garnet ask josh nginx thing
i mean it had downtime like 2 days ago
@dark garnet ask Josh nginx thing

Worst game of Russian roulette ever
Wouldn’t the mob then just try to retarget the player, and then I’d cancel and it repeat every tick and the mob would never target anyone else
i do this for my plugin: https://paste.srnyx.com/adunumenom.java
hey
am i able to get in a vc with you to help me with some stuff
what
just ask here?
well so im trying to make a minecraft server like BerrySMP or somthing its a eco server with kits ranks cratesquest jobs and more but idk what plugins to add
theres also shop sell pw tpa fly claims crop hoppers chest shops
1.8.8
1.12.2
1.13.2
1.16.5
1.20.2
v1.10.5
v1.13.7
v1.14.0 - Latest
v1.14.0 - Latest
v1.14.0 - Latest
how do I remove a player from tablist, without removing his skin/entity?
In 1.8.9 a simple REMOVE_PLAYER packet worked
now in 1.20 REMOVE_PLAYER also removes him from the world
and makes it like he isn't even on the server
How can I use PAPI to translate placeholders? Like in my plugin I want to use %player% somehow
Best velocity/proxy-wide mini-games or event plugin?
Probably best to ask on #general-plugins or #minecraft
Didn’t even see that channel, thanks
:ohthemisery:
You know what they say about Missouri
Yo guys, im excited to be here, looking forward to making cool shit
Thank you Havoc Goober
Exploding bees
@wheat carbon https://helpch.at/docs/ update? 😅
wot for
i use it for https://srnyx.com/docs/spigot
Easily share Bukkit/Spigot Javadoc members across any Minecraft version!
Made by srnyx ❤️
and i wanna compare 1.20.4 vs 1.20.5+
Oh
how do i get enchantments by name/key now?
like i have users define enchantment in config, but idk how to convert that to an Enchantment with the new registry system or whatnot
nvm i figured it out lol
NamespacedKey#minecraft(String) :))
h2.jdbc.JdbcSQLSyntaxErrorException: (Message 42S22 not found); SQL statement: SELECT "ll_lives" FROM "entities" WHERE "target" = ? [42122-220]
what the heck is wrong with the SQL statement
happening when i use Connection#prepareStatement(String)
ping if reply pls
Double quotes are for strings, try backticks for columns/tables
SELECT `ll_lives` FROM `entities`
For DeluxeMenus, I want to make sort of a queue system
Where you can join different rooms
However, I'm having trouble since I don't know how to display the players (in the lore) who are in the room
Wrong chat
you dont even need those lol
Yes
I saw somewhere u need double quotes for it to be case sensitive
To be what case sensitive?
The table and column names
Why would you want them to be case sensitive?
Anyways, check the docs of your sql impl
fr
Implemented a kotlin script for this to give it a test run, which was good because I fixed a bug! I need to make a wrapper for tasks for sure 😳
https://gist.github.com/DrZoddiak/8901c2900256cc7a74c1715d7c8ac065
bc im converting from old data system which was case sensitive
just wanna be safe, plus it just makes sense in my scenario, think there were also other reasons i just forgot 💀
How can I use the paper api, which requires java 17, and still compile using java 8? I swear I did this before but I can't remember how 😐
why are you targeting 8?
if you're targeting paper, you might as well just do 17 lol
and in 1.20.5+ it's 21
it is for papi expansions, I only need a method or two from paper
if I can't get this working I will just use reflections 
Does InventoryHolder#getInventory returns the combined inventory (when it's a chest), or only the block inventory?
good question
i think its the block inventory but i would do getView().getTopInventory() just to be sure.....
DoubleChestInventory#getHolder() returns a DoubleChest
DoubleChest#getInventory() returns the exact same inventory you called getHolder() on
like
Prove it
let i be dn
Of course
Hello so ive recent started coding in 1.20.6 but when dealing with potion in 1.17 there use to be org.bukkit.potion.Potion but in 1.20.6 can see what the replacement is
does anyone have any idea
declaration: package: org.bukkit.inventory.meta, interface: PotionMeta
im using normal spigot 1.20.6 and its removed so should i use paper insteadd ?
ignore me
No, it's been removed by Spigot in 1.20.5/6. Use PotionMeta instead, as the deprecation message says in that screenshot lol
reading is hard
Hello, does anyone have resources or tutorials of how to make an API design for a minigame plugin?
This will be my first time developing a Spigot plugin and want to make sure I'm using good design techniques
Hello, I have been sitting with this issue for a while. My plugin gets successfully hooked, but when I use one of my parameters, it just stays like that. If someone has the time and effort to maybe look for the issue in my code, I would really appreciate it. The Expansion class is called "GeoLocPAPIExpansion". You can find it here: https://github.com/TSERATO/GeoLoc/blob/V1.7/src/main/java/dev/tserato/geoloc/GeoLocPAPIExpansion.java
Hello, I am trying to build a plugin from source code but I get the following error, how can it be solved?
A problem occurred configuring project ':v1_20_R4'.
> Failed to create service 'paperweight-userdev:setupService:a77b6b7fc970a2fc1fc285d4820d0a5fcdd3f00801c4a47eda3632746be3d0cc'.
> Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
> The paperweight development bundle you are attempting to use is of data version '5', but the currently running version of paperweight only supports data version
s '{2=class io.papermc.paperweight.userdev.internal.setup.v2.DevBundleV2$Config, 3=class io.papermc.paperweight.tasks.GenerateDevBundle$DevBundleConfig, 4=class io.papermc.paperweight.tasks.GenerateDevBundle$DevBundleConfig}'.
update paperweight userdev
do you have java basics? OOP, etc?
Just love mojangs obfuscation consistency lol
at least class names arent obfuscated lol
Yeah for some reason spigot uses an absolutely wild mix of obfuscation, their of mappings and Mojang names
🤷 I was trying to use F() but it doesn't exist lol
what class is that lol
ahh yes, "a,b,c,d,e,G"
do people ever use Yarn mappings for plugin dev?
no
spigot is a disaster, and while paperweight does in theory support it (paperweight reads tiny mappings), we prefer mojang mappings
can someone be of any assistance here i have a class to clone the hand items of an entity bellow a shulkerbox named {handitems} and for the most part the logic works but the issue is if the entity already had an item in hand before going bellow the box the item gets cleared completely but i can still alter the item in hands via the box with no issues im at a loss here
public class CheckShulkerBoxesTask extends BukkitRunnable implements Listener {
@Override
public void run() {
// Periodic check on all entities below Shulker Boxes
for (var world : Bukkit.getWorlds()) {
for (var entity : world.getEntitiesByClass(LivingEntity.class)) {
if (entity.getType() == EntityType.PLAYER) continue;
checkShulkerBoxAbove(entity);
}
}
}
@EventHandler
public void onEntityPickupItem(EntityPickupItemEvent event) {
if (event.getEntity().getType() == EntityType.PLAYER) return;
LivingEntity entity = event.getEntity();
Location aboveLocation = entity.getLocation().add(0, 2, 0);
Block blockAbove = aboveLocation.getBlock();
if (blockAbove.getType() == Material.SHULKER_BOX) {
ShulkerBox shulkerBox = (ShulkerBox) blockAbove.getState();
if ("{handitems}".equals(shulkerBox.getCustomName())) {
updateShulkerBoxFromEntity(entity, shulkerBox);
}
}
}
private void checkShulkerBoxAbove(LivingEntity entity) {
Location aboveLocation = entity.getLocation().add(0, 2, 0);
Block blockAbove = aboveLocation.getBlock();
if (blockAbove.getType() == Material.SHULKER_BOX) {
ShulkerBox shulkerBox = (ShulkerBox) blockAbove.getState();
if ("{handitems}".equals(shulkerBox.getCustomName())) {
updateEntityFromShulkerBox(entity, shulkerBox);
}
}
}
private void updateShulkerBoxFromEntity(LivingEntity entity, ShulkerBox shulkerBox) {
Inventory shulkerInventory = shulkerBox.getInventory();
ItemStack mainHandItem = entity.getEquipment().getItemInMainHand();
ItemStack offHandItem = entity.getEquipment().getItemInOffHand();
if (!isEmpty(mainHandItem) && isDifferent(mainHandItem, shulkerInventory.getItem(0))) {
shulkerInventory.setItem(0, mainHandItem.clone());
}
if (!isEmpty(offHandItem) && isDifferent(offHandItem, shulkerInventory.getItem(1))) {
shulkerInventory.setItem(1, offHandItem.clone());
}
}
private void updateEntityFromShulkerBox(LivingEntity entity, ShulkerBox shulkerBox) {
Inventory shulkerInventory = shulkerBox.getInventory();
ItemStack shulkerMainHandItem = shulkerInventory.getItem(0);
ItemStack shulkerOffHandItem = shulkerInventory.getItem(1);
if (isDifferent(shulkerMainHandItem, entity.getEquipment().getItemInMainHand())) {
entity.getEquipment().setItemInMainHand(isEmpty(shulkerMainHandItem) ? new ItemStack(Material.AIR) : shulkerMainHandItem);
}
if (isDifferent(shulkerOffHandItem, entity.getEquipment().getItemInOffHand())) {
entity.getEquipment().setItemInOffHand(isEmpty(shulkerOffHandItem) ? new ItemStack(Material.AIR) : shulkerOffHandItem);
}
}
private boolean isDifferent(ItemStack item1, ItemStack item2) {
if (item1 == null && item2 == null) return false;
if (item1 == null || item2 == null) return true;
return !item1.isSimilar(item2);
}
private boolean isEmpty(ItemStack item) {
return item == null || item.getType() == Material.AIR;
}
}
Anyone know how lpUser.setPrimaryGroup() works? Because a user can have multiple primary groups?
try and see
or ask LP discord 🙃
Ah yeah found out that it basically does nothing lol
Well, it does. Kind of.
Actually. Nvm. Idk where it is used
or if it even is used at all. Would have to check the code
LP mod told me that vault uses it, but most plugins shouldn't
Oh. Ok then
I'm just adding a group.whatever node, didnt think that would work but yeah
It's apparently how groups are added, which is what my goal was
How would you recommend "reviving" all players, even offline players, by setting their gamemode to spectator and changing a group
It's essentially a revive command which is working, but it should also revive offline players. No idea if this makes any sense lol
public void revive(Player player) {
player.setGameMode(GameMode.SURVIVAL);
removeRank(player, Rank.SPECTATOR);
setRank(player, Rank.GREEN);
}
Well, I don't think you can actually set the game mode of an offline player in Spigot so you'd probably have to store a list somewhere and when the player joins, switch their game mode.
Yeah exactly, setting up a database just for this just seems a bit overkill but it's probably needed
file might work as well
even a simple yaml file and use spigot's yaml implementation
no need to handle the reading, writing and parsing yourself
This doesnt seem good tho lol
well, it says in the description it can be pretty bad :))
I think paper has something like getOfflinePlayerCached or something that is better than what bukkit has
I belive so yeah
Nvm it was smth for a single player https://jd.papermc.io/paper/1.20.6/org/bukkit/Bukkit.html#getOfflinePlayerIfCached(java.lang.String)
It would be better to do it on join
I need to add all offline players when the revive command is ran tho
Can it run async?
This I mean
public void reviveOnJoin(UUID ... players) { //TODO Async?
List<String> current = config.getStringList("players");
for (UUID uuid : players) {
current.add(uuid.toString());
}
config.set("players", current);
}
From here
playerManager.reviveOnJoin(Arrays.stream(Bukkit.getServer().getOfflinePlayers()).map(OfflinePlayer::getUniqueId).toArray(UUID[]::new));
I don't understand, what are you trying to do?
Basically this command runs and revives all players, then adds all offline players as well because they should revive when they join.
Command: ```java
public void onReviveAll(CommandSender sender) {
Bukkit.getServer().getOnlinePlayers().forEach(playerManager::revive);
playerManager.reviveOnJoin(Arrays.stream(Bukkit.getServer().getOfflinePlayers()).map(OfflinePlayer::getUniqueId).toArray(UUID[]::new));
}
When the server starts or reloads, this is called
public void reload() {
reviving.clear();
reviving.addAll(config.getStringList("players").stream().map(UUID::fromString).collect(Collectors.toSet()));
}
So when players join, this is called
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
UUID uuid = player.getUniqueId();
if(playerManager.shouldRevive(uuid)) playerManager.revive(player);
}
public boolean shouldRevive(UUID uuid) {
return reviving.contains(uuid);
}
The revive method is just this
public void revive(Player player) {
player.setGameMode(GameMode.SURVIVAL);
removeRank(player, SPECTATOR);
setRank(player, GREEN);
}
wait that can be an IO operation??
wdym?
like can that method open files
since you never wanna do that on the main thread
and I always did it on the main thread 💀
Yeah that's why I'm asking if it can run async hahah
it can run async yeah
Can't remember if ACF can have async commands actually
Can you not put a flag somewhere and actually revive the players on next join?
Not sure, I couldn't find anything under OfflinePlayer
shouldRevive() { return shouldReviveFlag; }
Ye from memory right?
no it reads the disk every time the method is called
might do some quick testing later to see how much time it takes
I mean to save a boolean somewhere on a file, once
Hi kids
Hello
But then that boolean would always be true. If a player dies, then player leaves, then command is ran, then player joins again, then dies again, then joins, they should not invite
Ok that probably makes no sense
But it does in my head lol
If I just save a boolean, it can activate multiple times for a player
ig there could be a weekly reset or whatever
.
Why does clicking an armorstand with a nametag send PacketPlayInUseEntity 3 times?
The actions are INTERACT_AT -> INTERACT -> INTERACT_AT
mojank
mojack
mojack
I have a web page where users can post files. I want to display previews of these files in the web page. I am looking for a JavaScript library that has built in previews for the more generic file types. I have an endpoint that returns the files and also the MIME type in the Content-Type header.
I just don't want to build this from scratch and it feels like this is something that someone else would've probably made already. I am not using React or any other framework in the front end.
Not just images. Users can upload almost any file type. So I'd want something that would render videos, audio, images, and maybe a text box for a bunch of text file types such as txt, json, etc.
actually a tad bit tricky to do
I just found a library called box-content-preview. Going to try it, but if someone else has other recommendations, I am willing to try them.
well that one seems to render a whole pdf for instance
unsure if that's a good idea with large pdfs and several files
I mean, I would probably make this work one file at a time. Just have a styled div with the file name and when clicked open the file view
JavaScript library for rendering files stored on Box
Are they though?
nah. you can self host but I just ended up making my own stuff.
just images, videos and audio
couldnt you in theory get a lib that turns pdf to text and then just use a small portion of that text as display?
pdfs a bit more complicated than that I think (thought I haven't used anything for them, so can't say for sure, maybe just yappin)
OCR moment
Stfu comment
Where can I get help?
it depends
plugin and configuration help? #1007620980627230730
server help? likely #1007620980627230730 or #minecraft idk
coding help? #development
thanks!
Hi guys i got some "weird problem" i'm trying to shadowJar a dependency called AnvilGUI by WesJD when i shadowJar'd my plugin it does not contain any of the Wrapper classes which made my plugin unusable i've already tried everything from using AI to reading whole shadow documentation. Can anyone help?
AnvilGUI version: 1.6.1
Gradle version 8.0.2
Java version 11
shadow version 8.1.1
(can't send images so i can't show output jar files)
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
send your build file?
When will 1.20.6 support be added?
what kind of files are the wrapper classes? just a wrapper you built around anvilgui or one provided by the plugin?
try without the minimize, maybe that is throwing something away?
already tried that, without minimize only thing that is showing in jar is meta files
oh nevermind it fixed everything thanks a lot ❤️
ah thats good!
It might be scummy idgaf as long as its earning me money
sorry bad man 😱
Like you get them as rank lootbox
so its like a kit but with chances on good rewards
good rewards as in pay to win rewards which are so low chanced to win the user is forced to spend huge amounts
gotcha
thats nice but that doesnt exactly answer my point tho cause i didnt talk about keys

silly goose
stop trynna scam kids
We dont sell lootboxes
You get x1 lootbox daily
As part of your rank
p2w 🤢
lucasssss
what tracker
Eh at this point its harassment
whats harassment dawg
lil bro loves some good ol' antip2w video 
Stalking*
cause i dont find scamming kids cool
dawg I just joined helpchat and saw you here
mhkay
So you dont happen to know anything about the owners united bot which alerts certain members of what server im in?
aint a thing
based on ur pfp ima guess its a pedowatch
😭
do yk what he did
scam kids probably
much worse
I don't
he is a "minecraft youtuber"
"stays in touch with the younger generation"
they censor the word on this server
but p3d0
ah
wsg
PYROO
HI
is this cracka fucking hunted or something tf he do
ik for sure its something scummy
considering hes openly p2w and scamming kids
yea some server
that thinks they own discord
they do
na bru
they do own discord
💀
discord is theys sorry mate
i sent .gg/discord
I wanna show what he did but i cant send images
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
@silent karma No invite links.
LMAO
ah
imgur!!
@dusk spruce Too many caps.
omfg
well done mush
@silent karma why am i banned from ogrival
heh?
Duping, Doxxing, DDosing, Botting channels, Threatening to send a pipe bomb to someone's house Stealing content, False copyright striking, Doxxing (again), Attempting to falsely terminate a YouTube channel, Lying about age, Lying about someone doxxing someone else.
ayo
err

@silent karma 1v1 fn?
😘
im plat
He'll ddos you to win!!!
in a match
im plat 3
idk? I dont own it?
uh huh
fym xD
Is there any better way to turn a string into a NMS component besides CraftChatMessage? It is using a ton of resources on my server I am not running it that often.
Build the text component yourself.
I dont know how
Wdym by string into component? Json string?
I am setting the text of a NMS text display which requires an NMS Component arguement
and I have a string
Use adventure then convert from adventure component to minecraft component
I use IChatBaseComponent.ChatSerializer.a(string). But I have no idea if it's any better.
Would this be more efficient?
I have a feeling Adventure would consume the same amount of resources
I can just test it
Thanks, I will check this out
(i may be wrong), well it looks like the fromString method is parsing your strings with regex which is what its spending most of its time doing
an adventure component would only need to be copied to a minecraft component which is def cheaper than regex
depending on what and how you do it, it might even a) do that conversion lazily, or b) not at all!
Anyone knows how to translate messages for PlaceHolderAPI
or how to translate time messages
?
you might get an answer here, but for future reference if your problem isn't programming related, #1007620980627230730 is the right channel for plugin support
What JDK to install
whichever one your server version needs (probably java 21 if you are on latest)
bet, thank u
Right, I am currently developing a Hypixel Pit Remake server and need another dev, if anyone here would be interested in participating as an owner and helping develop this crazy server with huge potential DM me.
I already have had offers from Mineplex to buy the idea and for us to develop for them. This will include alot of money lol so just hmu.
oh god
wdym remake
also, #1236274252399775744
Do you code?
yes
hypixel pit remakes are usually garbage
i wasted 400 hours of my life on that game
Lot's of Hypixel copies end up being pretty bad
yes, and advertising yourself as a remake of what has become a horrible game isn't a very appealing description
check dms
Well this is not just a copy
I'm not saying yours specifically, just in general
No of course I know what you mean as well
every remake is shit
Why is this NMS packet constructor private on 1.20.6 but not any version prior? (the other constructor takes an entity). Normally packets have two public constructors, one with a arguement that grabs all the data from something like and entity, and one with a bytebuff, but for some reason this one is different.
Anyone know what class is for add more lines on player hologram? That was is upside the player head
That contains usually "{Rank} - {Name}"
is it possible to support a countdown for a player that can be configured to countdown while they're offline or not using only 1 saved value
so like if counting offline, id save a timestamp, then do now - timestamp and compare to countdown duration
if not counting offline, idrk what id do tbh, maybe save now - timestamp when they leave then update timestamp when they rejoin to now + timestamp (issue with this is that if server changes to count offline while player is offline, itd break when they rejoin)
but i just wanna know if there is an easier way to do it ig
ping if reply
just save the value that the countdown ends at
then whenever you need to know the current countdown state, it is always end - now
unless you mean you want it to stop counting down when the player is offline?
yeah i want a toggle for that functionality
Save passed time on leave, get on Join.
Regularity ensues
i think you will always have to save more than one value unless you are okay with constantly updating it while the player is online

yeah so save on leave now - timestamp then save now + timestamp on join (to save end)
i accidentally mixed up 2 methods in my og msg
actually yeah i guess if you change the format between being offline and online ig you can save just one value
idk its late i dont want to think about this im gonna go watch shorts
yeah but then:
(issue with this is that if server changes the toggle to count offline while player is offline, itd break when they rejoin)
no at that point you would just re-change the format to be as if the players logged back in
basically your toggle will fake all players being online all the time
it also depends on what exactly your limitations are on storing stuff if the server goes down
how would the plugin know to do that tho
are you asking how the plugin would be notified of the toggle change?
well yeah, how would it know that it needs to ignore the current value and set a new
also it would lose the original timestamp that was set
think i may just have to use multiple values
this is for a grace period thing btw, so just getting how long the player has been on the server (either online time or time since first join)
i mean as long as you can detect the toggle change, you can convert all the current values to a new form that represents something else, eg. when converting from no offline tracking to offline tracking, it converts offline players from the time they have left to the time their cooldown will expire at
detecting the toggle change would require another storing another value, albeit 1 vs 1 for each player ig
don't you have to detect the toggle change regardless though?
or am i missing something
hmmm
yeah ig
the only way i can think of actually is storing a value that says whether the other value represents offline or online time format
ill just come back to this tmr 💀
good idea
grace period time value saving discussion
keyword msg so i can easily search back to this :)
I'm going to ruin your day and @dark garnet to bookmark it instead
i will generate you a 32 byte bookmark uid
0f7cf3bbb413ca5d8a8a8d3129bc687f6524a0abcaade7f8aab84c83bf4bc387
amazing
mojang moved many things to de/serialize with ✨ codecs ✨
and they'll keep doing it
until the whole game is just one big json state machine
data driven items when?
If I wanted to get into web development what’s the best way to do it, aren’t there all these like libraries like react etc?
I don’t really understand what that all is
Simplest... Start with HTML, CSS and javascript.
I mean I’ve done quite a bit of that already, but I want to build more complex websites
Anyone familiar with 1.8 spigot / bukkit API?
Lots of people are, it's better if you ask your question
Question is not if people are familiar but if they actually hate it.
But yeah, what is the question
@torpid raft i think imma store user first join timestamp & duration left in cooldown (update every time they leave/join)
ok
that didnt work 😭
imma just do the long way: time played online, time played offline, last join timestamp, last quit timestamp
then combine time played online and time played offline in different ways depending on toggle
nope that doesnt work either
im just removing toggle 💀
😌
I'm getting the already known issue "Cannot invoke "me.clip.placeholderapi.PlaceholderAPIPlugin.getLocalExpansionManager()". As others have already said, that means that I'm shading the Plugin. But I already have set the scope to "provided" in Maven... I'm still pretty new to Java / Kotlin Minecraft development, so I don't know what to do now...
Hey folks, I am trying to create a simple UHC plugin, and I want to create a map with a limited size. While I understand I can simply add a world border in a world, I want to skip the extra chunks being generated and hence have a world thats only a set amount of chunks in size, e.g 500x500 blocks
I have a worldGenerator class which generates this for me
const val MAX_RADIUS = 500
fun generateWorld(id: String) {
val creator = WorldCreator("game-$id")
creator.generator(GameChunkGenerator())
val world = creator.createWorld()
if (world != null) {
generateChunks(world, MAX_RADIUS)
}
}
private fun generateChunks(world: World, radius: Int) {
val chunkRadius = radius / 16
object : BukkitRunnable() {
var x = -chunkRadius
var z = -chunkRadius
override fun run() {
val batchSize = 5
var count = 0
while (x <= chunkRadius && count < batchSize) {
while (z <= chunkRadius && count < batchSize) {
world.getChunkAt(x, z).load(true)
z++
count++
}
z = -chunkRadius
x++
}
if (x > chunkRadius) {
cancel()
}
}
}.runTaskTimer(CustomUHC.INSTANCE, 0L, 1L)
}```
and my custom chunk generator
class GameChunkGenerator : ChunkGenerator() {
override fun generateChunkData(world: World, random: Random, x: Int, z: Int, biome: BiomeGrid): ChunkData {
val chunkData = createVanillaChunkData(world, x, z)
// Check if the chunk is within the desired radius
if (Math.abs(x) > MAX_RADIUS / 16 || Math.abs(z) > MAX_RADIUS / 16) {
println("yup")
return chunkData // Return empty chunk data for outside the radius
}
// Delegate to the default generator for normal terrain
val defaultGenerator = Bukkit.getWorld(world.name)?.generator
println((defaultGenerator == this).toString())
if (defaultGenerator != null && defaultGenerator != this) {
println("yup 2")
return defaultGenerator.createVanillaChunkData(world, x, z)
}
return chunkData
}
}```
But the world is completely empty
does anyone know why?
the chunk generator is tweaked by chatgpt a bit
but ive already tried everything i could think of
I just want a completely normal world, but chunks are only loaded within a certain radius
can you show the surrounding code & your pom.xml?
and you're creating the jar with mvn package right? (or something similar)
One second
I was eating just now
Here's my pom.xml: https://pastebin.com/CpgfGAsw
and i'm building it with the intellij artifacts: https://imgur.com/a/9nJfuPF
(I removed Placeholder API to see if that would fix it, that's why it's not in the screenshot)
enjoy your meal
oh i already finished 🙂 thx tho
this is why
basically
maven and intellij artifacts are both build tools
they are used to manage your project dependencies (such as PAPI) and then build the jar using those dependencies and configurations
so you can't use two at the same time
I would recommend not using intellij artifacts
to build the jar using maven, double click ctrl and type mvn clean package and the jar should appear in the target folder
ok yeah strange that worked. is there a way to run a script after pressing the "Build Project" button?
nevermind... found the "rerun automatically" button 🙂
But my placeholders still don't work although it's even showing me this: "[PlaceholderAPI] Successfully registered internal expansion: WoolWars [1.0-SNAPSHOT]"
am I doing something wrong?
package com.recomplexed.woolwars.expansion
import com.recomplexed.woolwars.WoolWars.Game.countdown
import com.recomplexed.woolwars.WoolWars.Game.map
import com.recomplexed.woolwars.WoolWars.Plugin
import me.clip.placeholderapi.expansion.PlaceholderExpansion
import org.bukkit.OfflinePlayer
import java.lang.String.join
class Placeholders : PlaceholderExpansion() {
override fun getAuthor(): String {
return join(", ", Plugin.plugin.description.authors) //
}
override fun getIdentifier(): String {
return "WoolWars"
}
override fun getVersion(): String {
return Plugin.plugin.description.version
}
override fun persist(): Boolean {
return true
}
override fun onRequest(player: OfflinePlayer?, params: String): String? {
if (params.equals("woolwars_map", ignoreCase = true)) {
return map
}
if (params.equals("woolwars_status", ignoreCase = true)) {
return countdown
}
return null //
}
}
btw the Author and the Version is loaded just fine
are you using /papi parse to test?
if so, can you paste the command here
if not, try using that command
Can anyone teach me plugin development
https://www.spigotmc.org/wiki/spigot-plugin-development/ if you want to learn on your own, #1236274253595414598 if you're eager for 1 on 1 hand holding stuff
the identifier is the placeholder prefix, you should change
if (parms.equals("woolwars_map" to if (parms.equals("map"
now, you can do %woolwars_map%
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/PlaceholderExpansion#full-example-1
it's 10 am in germany
oh ok
good morning, 1pm for me xd
Why advancedban doesnt appear in lp?
Assuming you're talking about the permission suggestions, and that's because LP only suggests permissions that have been cached
Looking for payed developers, payment paypal: 250€ dm me
this may be silly, but is it possible to create color-able item textures? similar to how potions can take in a custom color, but for custom models added with something like itemsadder? i heard something about this once but can't find anything currently so i'm not sure if this is possible or not
talking about LP specifically right now, so I changed some plugins, restarted the server and now my ranks wont show in chat, but do show above names and in tab. Any possible ways to fix?
I'll take an answer from anyone
You can yes, by making it a custom model of a colorable item, normally people use leather horse armor
Any grayscale texture will have color applied
How can I add that you get rewarded aka. Get given an specific item after each kill?
would that be skript plugin or different one?
- wrong channel in theory
- There are plugins that do things on death.
- You can code your own plugin for it if you wish
- DO NOT use Skript, simply don't. Stay far away from it. Don't touch it. It's an Hazard.
- Which would be the correct channel?
- Could you list one good plugin or multiple ones as I'm unable to find them.
- Not a good knowledge of coding.
- Rodger that!
- Depends on if you want to use a plugin or code it yourself, if it's coding it, then it is the right channel.
- I mean, I actually (funnily enough) have one in spigotmc called SoftDeaths, but it's old. Pretty sure you can find more plugins if you search for "death" or smt.
- Then proceed to #general-plugins.
- o7
https://www.spigotmc.org/resources/death-commands.74687/ from a quick search..
no idea if it's good
why misinformation (4.)
not misinformation, straight facts
why would I tell someone to go to hell? (which is what recommending Skript is)
clearly u havent even used it once but go on
yeah ur nder smth i swr
is the soft death's plugin able to function with custom made items? like renamed items
because default item code will just give them regular item
no idea, coded that ages ago, think it just executes commands so you can handle that on your end, but don't recommend using it, use something newer.
I don't even know why I still have it there
should've deleted it
alright lol, ill have a look 👍
Elaborate
Made using the Minecraft-specific scripting language, Skript. (like Python for Minecraft servers)
Also using a Resource Pack with a custom shader to help visualize the regions -- shoutout to @spheya_ on Twitter for making it for me!
-
- v - - - MY SOCIALS - - - v - -
Twitter - @ScreenNameBoxic
Discord - Boxic
- v - - - MY SOCIALS - - - v - -
Skript is only as bad as their user
^
I think it's a great concept and good in execution, it has some quirks as I can observe but otherwise it's quite a good option for people to implement really simple things really quickly without learning Java
I haven't used Skript much except for prototyping a quick idea before setting up a new plugin but
There are things that should and things that shouldn't be done with skript
Yup
Agreed
problem is 98% of the time people use it for the things they shouldn't.
They don't understand limits.
The concept of Skript is quite awesome, its community (or well, how people use it) and execution are the bad part.
Skript is full of spagetthi code (actual words of the devs)... the project started as a hobby a scaled a ton. If there ever was a Skript rewrite, I would 100% support. Would be awesome. Maybe I do it one day, who knows.
Realest take in HC history
lmao
wth, with skript 😭?
KotlinScript is the future
oh no 🪦
afonso gonna go bonkers when he sees KotlinScript
/s
(i hope /s)
Afonso a hater
It did it has been a while since I've heard anything about it so not sure how it works on more recent versions
I wasn't sure they passed the classloader in a way that the isolated classloader would work, but I see they do.
Wish I'd seen this project sooner, would've saved me a little time
Oooo it even has an ij plugin
as much as I am a kotlin hater (low iq bozo)
it does look good
tho the syntax irritates me fsr
What's wrong with the syntax?
Understandable
Some projects get a little goofy with the fluent-style syntax, but it's fairly sensible when not used for evil
is there are simple way to get all the spawn eggs and corresponding entities (.class)?
MaterialTags.SPAWN_EGGS, iterate through the values, get meta, get entity type, get entity class
lmao
I mean, like matt said, I did know Bukkript
and tbh, wpuld prefer that over skript probably
nha just a memer
Hello how to reach iut to suport?p´
Bcz they havent replied for a month now and it is rly important
Pls
?not-discord
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
advertising what tho 😭
programming languages dont make money
not sure why kotlin would be out here paying people to promote it
its simple really
jetbrains makes kotlin
kotlin gets popular, they get to sell more IDE subscriptions
visual studio code......?
what about it
you can..........use it for free?
yeah, you can also use notepad for free
jetbrains will undeniably make more money the more popular kotlin gets
also embed fail
yeah but i really dont think they are gonna go through the effort to pay people to promote it on discord servers
true but its also not like advertising it is outside the realm of possibility
yeah but its extremely unlikely
im not saying there are actually kotlin sleeper agents inside discord servers
but jetbrains (an ide company) paying to advertise a programming language they themselves made is totally reasonable
not saying it isnt just saying its unlikely
which part is unlikely
im confused if you mean them advertising in discords, or advertising in general
because yes like i said they are not going door to door in discord servers
¯_(ツ)_/¯
Idk, I posted in showcasing.
If I had to guess my use of the word "host" goofed them up?
for asynchronous tasks, is it fine, performance-vise, to use Bukkit schedulers (ex. runTaskTimerAsync), or just use built-in java ones?
the Bukkit schedulers just use a thread pool and run based on the game loop
if you need your stuff to be scheduled relative to the game loop, then definitely use the Bukkit schedulers
if it's a few things and you don't really care, then Bukkit is probably fine
if you have a lot of things and want full control of the threading, and your timing requirements aren't tied to the game loop, then do your own thread pool stuff
yeah well, I don't need it to be tied to the game-loop, I just care about the performance itself
I suppose Bukkit schedulers just use java threads under-the-hood, so writing my own impl might not be any better
yeah the only thing to worry about is exhausting the pool if you're doing a lot of tasks
but you're probably not lol
yeah, true
VirtualThreads 😉
Btw if you're curious it just uses Executors.newCachedThreadPool()
Looking for good developer, i am going to pay them DM me.
That's not a very good sign..
fr
What's the best way to check if 2 objects are instances of the same class?
Might be a stupid question but yeah lol
I only have the interface of the class
a.getClass().isInstance(b)
a instaceof X && b instaceof X?
So that would check if they're both instance of the same class?
interface.getClass().isInstance(obj)
is equal to obj instanceof Interface
not too sure what you mean by
2 objects are instances of the same class?
might need an example if the above doesn't work
There is also isAssignableFrom if you don't have an instance
oh wait right
Alright I'll try to explain it. I have a list of objects from this interface public interface DataStructure
It has 3 implementations: UserAttribute, UserConsumable and UserPhysicalCosmetic
Each of these classes have a component / field based on their type, for example UserConsumable has ConsumableData. ConsumableData is an interface which has implementations like this: class NicknameConsumable implements ConsumableData
I need to check if the list contains multiple objects of the NicknameConsumable class or whatever the child class is.
This does probably scream bad design but not sure how to restructure it without breaking database, as I tried making it easy to deserialize and serialize into a database, following composition pattern I believe it's called
nicknameConsumableClass.isInstance(consumableData)?
Although I'm not sure how the DataStructure or the other 2 impls take part of this, so I'm probably misunderstanding
This is what I came up with, not sure if it works yet
if(dataStructure instanceof ConsumableData consumableData) {
if(predicate instanceof ConsumableData predicateConsumable) {
return predicateConsumable.getClass().isInstance(consumableData);
}
}
But how would you restructure this?
If you would
uhh
you only need the 2nd if statement
I'm pretty sure
if you want to make sure that one's a ConsumableData as well
otherwise you don't need either if statement
Fixed, this is working but very ugly lol
if(dataStructure instanceof UserConsumable consumable) {
if(predicate instanceof UserConsumable predicateConsumable) {
return predicateConsumable.getConsumable().getClass().isInstance(consumable.getConsumable());
}
}
I feel like that kinda breaks the idea of composition if you need to do checks like that
I mean yeah in this case, I changed the structure to composition to make database management easier, but yeah
Not sure if I can combine inheritance and composition in some way, or what would you recommend doing?
does Bukkit.getOfflinePlayers() contain Players if they're online?
i think (im not educated on this) its for cracked accounts?
im just guessing as offline mode typically means cracked players are allowed to join
so it would only contain online cracked accounts
no OfflinePlayer is just an offline player
Player extends OfflinePlayer
Gets every player that has ever played on this server.
- Bukkit.getOfflinePlayers()
then it gets every player that has ever played on the server
ya
oh im late
yes but i need to know if all those players will be OfflinePlayers or if online ones will be Player
no
online and offline
ok thx
ohh
it gets "every" player that "has played"
oh i didn't understand it like that
so its offline and online
i can check 1 min
i think ur misunderstanding me
no im not
i know it will return all offline/online players
but i need to know if the online players will be Players, rather than OfflinePlayers
so what is ur question
yes
they will be Players
and the rest OfflinePlayers, yes?
might be overstated in this server but it really is safer to try it and see
@dark garnet can confirm
true
it does include Players
im just lazy, rather make dkim do it for me 
lmao fair
it calls an initial getPlayerExact
thx :))
🥲
wait how do u know
i've been enjoying dkim's arc into becoming an absolute subject matter expert on spigot ngl
ofc u went into the source code 🙄
🥴
I wish it used github tho
is it possible to get uuid from a player's name without having to get their OfflinePlayer or Player 
and without making requests to mojang servers
what why 
cause this hurts :(
@Nullable
public static OfflinePlayer getOfflinePlayer(@NotNull String name) {
// Check online players
final Player online = Bukkit.getPlayerExact(name);
if (online != null) return online;
// Check offline players
final String nameLower = name.toLowerCase();
for (final OfflinePlayer offline : Bukkit.getOfflinePlayers()) {
final String offlineName = offline.getName();
if (offlineName != null && offlineName.toLowerCase().equals(nameLower)) return offline;
}
return null;
}
build a lookup table for yourself
maintain it on join then easily access it elsewhere for cheap
if you use paper then you can kinda do it built in
do u think itd be worth it?
im not using paper :(
i wouldn't rely on that, I'd check if OfflinePlayer#isOnline() + OfflinePlayer#getPlayer()
depending on how often you retrieve the uuid, maybe yes
seems isOnline just checks if getPlayer is null or not
so ill just check that myself ig
so that it isnt running getPlayer twice
actually it doesnt rly matter how i check cause i changed it to check online players first
only mattered before when i wasnt checking online first
Heya guys, really unique question here.
Currently developing a game where negative flight duration rockets would be useful. With mc commands you can give yourself fireworks with negative flight duration e.g. -1 (which essentially gives a short elytra burst). /give @p firework_rocket{Fireworks:{Flight:-1}} 1
but the built in FireworkMeta#setPower() (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/FireworkMeta.html#setPower(int)) to create an itemstack throws IllegalArgumentException - if height<0 or height>127
ItemStack fireworkItem = new ItemStack(Material.FIREWORK_ROCKET, 1);
FireworkMeta fireworkMeta = (FireworkMeta) fireworkItem.getItemMeta();
fireworkMeta.setPower(-1);
i was wondering if anyone had any ideas to get a workaround to force a negative flight duration on the itemstack?
Thanks a lot :)
Seems like an oversight, since flight-duration can be -128 - 127
nms time :panic:
yeah thats what i was thinking, thanks for the confirmation 
nah nms ain't terrible just annoying when working with multiple versions
yeah fair fair, ive done quite a bit of it before, not looking forward to 1.21 though xD
Maybe ask in the Spigot Discord
Is it possible to remove slots entirely from a gui without using packets? like this
Anvil inventory in this example
resource packs ig
Ah yeah
Can I change the slot for anvil to go to the center instead?
It's by default to the left side
I don't really want to use the anvil gui rly lol, I just need the text editing thing
you cant move it afaik
Im trying to generate sky islands high up in my world, but the problem is that they cast shadows way below them
Any way of removing those block shadows from specific blocks or any other ideas for preventing this? Any ideas greatly appreciated
You could disable block updates on the shadowed blocks but that's only a temporary solution
does anyone here have experience with JFrames?
so im going to assume that means yes... i have a jframe jar application im developing but my big issue is i cannot for the life of me get an icon to set no matter how i try ive tried setting it from a url, downloading from aurl and referencing a local file, and lastly and more preferred referencing from a compiled file via inputstream resource, all methods of which with debugs say it should be working but simply just does not, im aware of the fact that it has to be set and init before the jframe is built and visible but no matter where i put it in the program process it just doesnt work and ik it probably should work i just dont understand why it wont, i can provide the full code on a paste bin if needed but this is the moethod that sets the icon, this method is called after the buildgui method gets called on start ```java
private void setApplicationIcon() {
try (InputStream imageStream = getClass().getResourceAsStream("/nscp/server-icon.png")) {
if (imageStream != null) {
BufferedImage img = ImageIO.read(imageStream);
if (img != null) {
setIconImage(img);
revalidate();
repaint();
log("Icon successfully set from static source");
sendToConsoleAlt2("Icon probably unsuccessfully set from static source");
} else {
log("Could not read icon image from stream: " + imageStream);
sendToConsoleAlt("Could not read icon image from stream");
}
} else {
sendToConsoleAlt("Could not find icon resource at /nscp/server-icon.png");
log("Could not find icon resource at /nscp/server-icon.png");
}
} catch (Exception e) {
sendToConsoleAlt("Could not load icon from resource: " + e.getMessage());
log("Could not load icon from resource: " + e.getMessage());
}
}
I think it would be worthwhile uploading the class(es) to a paste service for others to look at, yes @fleet shale
and a log might help too
ok i'll upload that to a pastebin rq but this is the only log i get out of running the program ```log
java -jar ServerControl-v1.5.2.jar
successfully fetched font ttf, setting fonts to buttons, and console
Icon successfully set from static source
[NSCP] attempting to download server Resource from http://ycs.canvaswrite.com/resources/nscp/worldPoints-v1.6.12-2.jar
Resource downloaded and saved as plugins/Newts-Worldpoints.jar
[NSCP] attempting to download server Resource from http://ycs.canvaswrite.com/resources/nscp/Vault.jar
Resource downloaded and saved as plugins/Vault.jar
[NSCP] attempting to download server Resource from http://ycs.canvaswrite.com/resources/nscp/BetterEconomy-2.15.jar
Resource downloaded and saved as plugins/BetterEco.jar
hmm, I'm going based on what you said about needing to set and init before building the jframe
right below the config, version, and user init I would load the icon InputStream and BufferedImage there @fleet shale
then you can use it later
if that doesn't work I'll let somebody with more knowledge answer 😂
ok so i place this right bellow the user init at the top but it errors at .read with a garble about unhandled javaIO exception ```java
public InputStream imagestream = getClass().getResourceAsStream("/nscp/server-icon.png");
public BufferedImage img = ImageIO.read(imagestream);
ah ok hold on i know hwat you mean
so i placed it in the constructor now but still got the io exception issue but fixed it by adding a throws ioexception to the constructor which then made me have to aslo add a try catch to the main[] but got no icon on successfull build still i also updated the paste to what my code currently looks like so you can see if maybe i still misunderstood the assignment lol http://ycs.canvaswrite.com/resources/nscp/fullclass.java
you're still loading creating another variable inside the setApplicationIcon method still, and I think you might need to do ImageIO.read in the constructor as well
ah youre right the seticon void is now ```java
private void setApplicationIcon() {
if (img != null) {
setIconImage(img);
revalidate();
repaint();
log("Icon successfully set from static source");
sendToConsoleAlt2("Icon probably unsuccessfully set from static source");
} else {
log("Could not read icon image from stream: " + img);
sendToConsoleAlt("Could not read icon image from stream");
}
}
I see this on stackoverflow https://stackoverflow.com/a/17011990
they use an ImageIcon object
yes i did attempt that
maybe it formats the image or something, idrk
ah
ya, i'll let somebody with more knowledge answer
but the setIconImage() takes an image so i still have to convert the iconimage back to an image and same result sadly
That’s possible??
What’s the easiest way to do that 🤔
yea light updates are a separate thing that gets calculated serverside
Is it not possible to create a custom gui that can use the text editing from anvil then?
No
... Really?
Really what?
Any idea where I can find packets to accomplish it?
Looking right now lol
Never really worked much with packets as I always try to avoid them so not sure where to look lol
tf?
PacketPlayInWindowClick
private static Map<UUID, Inventory> inventory = new HashMap<>();
@EventHandler
public void interact(PlayerInteractEvent event) {
Player player = event.getPlayer();
UUID id = player.getUniqueId();
if(event.getHand() != EquipmentSlot.HAND)
return;
ItemStack nametag = new ItemStack(Material.NAME_TAG);
ItemMeta tag_meta = nametag.getItemMeta();
tag_meta.setDisplayName("Custom Anvil...");
nametag.setItemMeta(tag_meta);
Inventory custom = inventory.containsKey(id) ? inventory.get(id) : Bukkit.createInventory(null, InventoryType.ANVIL);
custom.setItem(0, nametag);
custom.setItem(2, nametag);
player.openInventory(custom);
inventory.put(id, custom);
}
@EventHandler
public void click_result(InventoryClickEvent event) {
Inventory current = event.getClickedInventory();
Player player = (Player) event.getWhoClicked();
UUID id = player.getUniqueId();
if(!inventory.containsKey(id) || inventory.get(id) == current)
return;
event.setCancelled(true);
if(event.getSlotType() != SlotType.RESULT)
return;
player.closeInventory();
inventory.remove(id);
}
// Injection handler
if(packet instanceof PacketPlayInWindowClick) {
PacketPlayInWindowClick click = (PacketPlayInWindowClick) packet;
Utility util = Utility.instance();
ItemStack result = util.asBukkit(click.g());
ItemMeta result_meta = result.getItemMeta();
player.sendMessage(result_meta.getDisplayName());
}
```https://i.imgur.com/CaLBowh.mp4
Ohhh nice, but this is just a replica of anvil inventory right? The reason I'm doing this is to configure the layout of that inventory, which is not possible afaik. So I want to create a normal inventory and add the text box
Yeah only an anvil inventory.
Ah found your original message. Yeah you can't just manipulate the GUI's like that. You can do some fancy shit with a resource pack and make the players inventory hold the items you want.
Lol how much time did you spend proving the wrong thing now xD?
Yeahhh I don't think it's possible to create a replication of the text box sadly
Can't find the source code for Bukkit.createInventory as it just goes to the Server interface
Wait then wouldn't it be possible to place like a fake light source
To remove the shadows
Idk
Less than an hour lol
Can't find where they actually create the text box in the source, anyone got an idea?
I was thinking I'd use something like this to configure the anvil slots, but not sure where I'd get the inventory from
public class TestAnvilMenu extends AnvilMenu {
public TestAnvilMenu(Inventory inventory) {
super(-1, inventory);
}
@Override
protected ItemCombinerMenuSlotDefinition createInputSlotDefinitions() {
return ItemCombinerMenuSlotDefinition.create().withSlot(0, 27, 47, (itemstack) -> {
return true;
}).withSlot(1, 76, 47, (itemstack) -> {
return true;
}).withResultSlot(2, 134, 47).build();
}
}
AnvilMenu is from net.minecraft.world.inventory
You have it in the constructor?
https://media.discordapp.net/attachments/930572389576769556/1133808571210014720/Minecraft__1.19.2_-_Multiplayer_3rd-party_Server_2022-09-17_20-23-18.mp4?ex=66521b84&is=6650ca04&hm=e707d9dcbb07d1530ca1e6ac81c3f76f108d7da4f7c3995adb5f85bb82f4dbd0& you can in theory move the text input with resourcepacks and shaders but it’s really not worth it
how would you actually move the clicking area
that's still just the same thing just retextured
With shaders, as he said
how would you do that with shaders
shaders don't move the interaction boxes
someone should make an anti-aimbot mod, so it does exactly the opposite of aimbot and puts your cursor as far away as possible
You don’t
The text input doesn’t need to be clicked to type
Yeah it opens with an item in the rename slot so it automatically starts taking text input
I am kinda new to the whole multi version NMS stuff, and I am struggling with something due to different Java build versions. 1.20.6 wants Java 21, whereas the other versions want a lower level. I have to compile my main module in 21 or else the 1.20.6 module doesnt resolve. However, I get this error due to it being compiled in a higher java version when running on any version other than 1.20.6, how do I get around this?
Unsupported class file major version 65
when running on any version other than 1.20.6
upgrade the java version
but other than that, I don't think there's much you can do
hopefully the standard will go to 21
like how it went from java 8 to 11 when java 11 was required
So when a piston pushes an entity there is no indication that it was pushed... I can't find any packets or such sent.
That being said upon debugging, the location of the entity hasn't changed either.
The player sees the entity at the pushed location though... Any ideas what else I can check for?
it could be calculated client-side, but that's just a guess/possibility - I haven't verified
That being said upon debugging, the location of the entity hasn't changed either.
wdym, like which location?
because Player#getLocation should be updated - or at least it'd make sense if it was
Ok but, I have a question then. If a large plugin like lets say ProtocolLib, supports 1.8 through 1.20, do they force everyone to be on 21? (I honestly dont know)
edit: nvm
wdym, like which location?
The entity's location.
like bukkit.Entity#getLocation?
wait hmmmmm how do they compile java 8 with spigot 1.20 api
im so confused how is this possible 😖
yeah...
and now I have this, so my server starts up with a 21 java:
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS, mixed mode, sharing)
Yet it still has the major class version unsupported error
are you sure you started with java 21?
thats what the thing says
it literally says
System Info: Java 21 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS) Host: Windows 11 10.0 (amd64)
Loading libraries, please wait...
and whats the full error?
yeah its confusing
iirc ASM hasn't been updated to support Java 21
latest it supports is 19 i think?
So then how can a plugin that supports 1.20.6 work on any version less than that?
Cause it works on 1.20.6, but any version less than that and it has a heart attack
idk man, version constraints be wild
I have to compile with java 8 because 1.13 adds a version check and checks bytecode apparently.
Apparently paper has an option to ignore java version 🤷
DEBUG >> Stand: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Original: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Place: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Distance: 0.0
DEBUG >> Stand: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Original: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Place: Location{world=CraftWorld{name=world},x=-1.5,y=50.0,z=-64.5,pitch=0.0,yaw=-90.0}
DEBUG >> Distance: 0.0
where can i see 1.8.8 bukkit source code?
trying to figure out what gson version they were using
its here btw: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/pom.xml
but not sure how to get 1.8.8
ping if reply
Load version on gradle, click on gradle tab, dependencies, spigot api
is it possible to cancel a chat event in velocity without getting kicked for "[22:42:08 FATAL]: A plugin tried to cancel a signed chat message. This is no longer possible in 1.19.1 and newer. Disconnecting player"
turn off signed messages
hey
i'm trying to make packet nametags
and i managed to do it using by modifying gameprofile
but It's not good because gameprofile alters with tab completion and quit/join messages
I only want to modify the name above the player's head
I'm not sure what method to use that's a client-side nametag and isn't with modifying GameProfile#name
wheres that?
Anyone know how the client knows where to move the armorstand even though the location of the entity never changes?
Because the piston pushed it
There is no packet, and the entity's location hasn't changed so how does the client know a piston pushed it...
client predictions
Besides spamming teleport/move packets any way to keep it stationary?
Cause gravity and marker clearly don't work.
damn this was a wild ride
solution was deep-cloning intercepted ADD_Player ClientboundPlayerInfoUpdatePacket packets with initalizing new objects so the GameProfile doesn't get overwritten
cool
Did you try setting it as a marker? Idk if that will work
I don’t want to move the text box, I want to either add a replication of it to a custom gui, or change the slots for input etc so you insert your item in the middle of the menu
What version are you on? I just tried with a marker armor stand and it worked
Hello, does anyone know about an ectasy hack and how it works? my server is being attacked by a guy who is using this to attack and is managing to access the console in such a way that he is managing to delete everything from the server without exception. I blocked all commands and it still happens, do you know any way to solve it? I'm not accusing any plugin, I'm just looking for a solution.
1.8.8 - Latest.
Nms or bukkit?
randomly when logging back onto my server, my custom placeholder no longer registers
when using parse and a logger it doesnt even run the onRequest function
it was working perfectly fine yesterday so idk
we need more info, like yapper said.
I just tried on 1.8.8 and 1.20.4 single player and it didn't get pushed, it shouldn't matter what server software is used because you said no packets are sent right?
Are you using a client other than vanilla maybe?
it's bukkit, spigot version 1.8 to 1.20.4
just ask what you need answered
I was talking with fisher lol
I'm using nms entities. As Emily mentioned it's possible the client is predicting the location even though no packets are sent telling the new location.
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
I mean client predictions would make sense if it wasn't a marker armour stand, but being a marker should work (and, well, it does work for me), like, straight up spawning a marker armour stand and pushing it with a piston, no funny business
I know... it's what I'm trying to prevent. Or atleast have a way to know that the player sees the armorstand in a new location even though the location wasn't updated.
It doesn't make sense that they are seeing the armor stand in a new location, because the client doesn't do predictions for marker armor stands
So either you're not on a vanilla client, a packet is being sent, or something funny is going on
Apparently "BlockAction" packet is sent to the player. But this does not include any entity data I can remove.
What are you actually trying to do?
Because if you're just trying to prevent an armor stand from moving, setting it to marker does work
Bukkit or nms? I'm using NMS and it's still moving.
Vanilla
Are you sure the armor stand is a marker?
Try spawning one in with a command and pushing it with a piston
Thats not NMS
I'll show code tomorrow.
You just said no packet is sent
So how would it being an NMS entity change anything?
Have you made sure it's a marker armor stand?
I just tested and it did not move
class ArmorStand extends net.minecraft.world.entity.decoration.ArmorStand {
public ArmorStand(EntityType<? extends net.minecraft.world.entity.decoration.ArmorStand> entitytypes, Level world) {
super(entitytypes, world);
this.setMarker(true);
}
public ArmorStand(Level world, double d0, double d1, double d2) {
super(world, d0, d1, d2);
}
@Override
public boolean alwaysAccepts() {
return super.alwaysAccepts();
}
}
I'm not, I'll try tomorrow if I feel like it
But that really should not cause any difference
At all
🤷 no fucking clue then.
Also make sure you're sending the entity metadata packet
I do. You can look at the picture. Everything is sent properly.
What version are you testing?
1.8.8 - Latest (1.8.8 doesn't have marker)
Very last test was on 1.20.6
Why in the jesus are you still supporting 1.8.8
What is MiniPlaceholders
Abandonned plugin
Developer is afraid of change
Developer "dislikes" the syntax
Developer is a spigot fanboy and wants to stay stuck with spigot (he also refuses to support paper only)
Developer doesn't even try to migrate because of people around him telling him it's bad
Developer is lazy af to update his plugin because he thinks it requires a lot of work.
Very likely one: Developer wants to keep support for his 2% userbase in legacy versions.
Plugins not abandoned.
I use the new API and would use the newest java version if it was supported. (I still use new methods where possible)
Yeah I don't support paper or its forks. Don't need too.
Wrong.
I support backwards and forward compatibility depending on which plugin.
Wrong.
I said last reasons, not all, those were regarding minimessage
if the last one is wrong then you are lying lol
cause anyone that supports 1.8.8 nowadays, is 100% to support the 2% userbase that loves pvp or whatever
there is no logical explanation to supporting 1.8.8 besides that one, downgrading on purpose?
?
bstats shouldn't be used for this lol, 80% of 1.8.8 servers are cracked for starters. And bstats fails to show that on 1.20+, over 90% of servers are on paper
not together though
true
where do you find your stats from?
Umm where do I find help
let me get the link, on the phone rn
plugin devs supporting 1.8.8 are wasting their time
oh so ur agreeing
🤷 our time to waste
I mean theres nothing wrong with supporting 1.8 but its just not worth the time
https://minidigger.github.io/paperstats/#1.20.6 latest stats are bugged idk why, but up to 1.20.4 its good
Small website to calculate the market share of Paper for different Minecraft versions, based on data from bStats
uhh is it possible if anyone can use mini messages instead of default color codes
explanation: i tried using minimessages and have read their docs but i didn't got how i implement it in
player.sendMessage("§eTest Message");
this seems off
paper is so good that 5.65% are running it twice 😱
🤦 Was not a marker...
Fixed the method check, and making it a "marker" breaks things lol
Name is at the feet of the armorstand and you can't interact with it.
I can do some raytracing if I need interaction but the name placement is not ok.
1.8 still allows interaction, and the name is at the right spot. But can still be pushed by pistons.
You could use a second invisible armor stand above it for the name
Would defeat the purpose of the recode.
Another thing you could do is on the piston push event, set the armor stand to a marker, then once it's done make it not a marker
anyone...?
Are you using paper or spigot?
I would have to loop over all the armorstands I have cached and check every block thats moved. All sync because its on the piston event.
You just have to check armor stands in the blocks in front of the piston push
They don't exist server side.
I cache them in a ConcurrentSet
It probably wouldn't be hard to switch to using this
How are you detecting the player clicking them?
Are you using the entity id?
Not the issue though. Its the fact I would have to loop over both the blocks and then loop through the armorstands for everyblock. All so I can set them as a marker as the event is running.
Yes
It's not difficult to do though, and there isn't any other way around it
