#help-development
1 messages · Page 1289 of 1
a guy created 16x16 1-pixel sized colorable overlays for an item texture
so the entire texture was directly pulled from the item components, pixel by pixel
it supposedly is somewhat heavy on the gpu
in fact we tried a 64x64 bitmap as well and that seems to be about as far as a consumer grade gpu will go
but it does work
if i want to nuke the player's gpu
interestingly at least this portion of the resourcepack model predicate matching seems to happen on the gpu
and it of course happens every frame
or at least that's my theory, i don't see how this would perform this terribly otherwise
which sadly means there aren't many practical applications for this
i was planning on doing some procedurally generated custom item textures, without having to like refresh the player's resourcepack every time they create a new item
im getting error "depend is of wrong type" when starting my server with my plugin
what did i do wrong?
name: HypingBids
version: '${version}'
main: dev.siliqon.hypingbids.HypingBids
api-version: '1.21'
prefix: HypingBids
authors: [ SiliQon ]
depend: HypingCounters
soft-depend: PlaceholderAPI
Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Iterable (java.lang.String and java.lang.Iterable are in module java.base of loader 'bootstrap')
why doesnt translateAlternateColorCodes not translate this hexcode? &#d39e14A&#d9a413J&#dea913T&#e4af12H&#e9b411E&#efba10B&#f4bf10O&#fac50fL&#ffca0eD
whats the name of the file
that gets that error
just saw that
same for the soft depend too probably
ive never had that happen
in any case
any idea?
dont you have to give it the char
ehhh, spigots chat colour does not do RGB
so translate alternate colour code also probably doesn't do anything there
hello, I'm trying to create a simple function in my 1.8.8 minigame plugin which "sends a packet of what block is currently there". goal is to resync a block that's not shown on the client's screen. my lobby has a mode where it can "show/hide certain blocks", which is specific each per player
I already got the function almost working as needed with NMS using PacketPlayOutBlockChange, the only thing is that I am unsure how to set attributes like wool color. (example, wool color will always be white). using Spigot calls I can do things normally like get/set blockdata.
I would like to know either how I can set this data, or if there's another way to just simply resend packets to plays of blocks that are really there on server side. an idea I had was to just use the actual Spigot call "block.setType / block.setData", which would consequentially send the packets, however, I'd like to avoid this if necessary as then I'd have limited control over which clients receives these packets
if anyone has any answers or advice, it'd be greatly appreciated. thanks!
oh thank you so much, I'll take a look at that
I'll see if it works for what I'm needing
alright works perfect. thanks again
you can send the current block type to reset if
Weird question but, has anyone had problems finding a material enum? I keep getting null returned when I try to use "light_blue_dye"
Did you define api-version
did you?
I did, I found a work around now but idk if im stupid or what. All im trying to do is remove 1 primarine shard from the held item stack. It works if theres only 1 in the stack, but if theres more than 1 it removes 2, although I set it to just - 1?
Player player = e.getPlayer();
int handSlot = player.getInventory().getHeldItemSlot();
ItemStack handStack = player.getInventory().getItem(handSlot);
if (handStack == null || handStack.getType() != Material.PRISMARINE_SHARD) return;
if (handStack.getAmount() > 1) {
handStack.setAmount(handStack.getAmount() - 1);
player.getInventory().setItem(handSlot, handStack);
} else {
player.getInventory().setItem(handSlot, null);
}
Ive removed this block of code to be sure nothing else is subtracting from stack, nothing else does
Will anyone help revamp my code?
Nty
@playerinteract
?playerinteract
?playerinteractevent
?interactevent
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
sure show us
Ok it’s for my smp hold up
can i just dm you it it wont let me send it here
?paste
how do i use this 😠
paste your code in
press save
and send the link
if it's bugging out
use
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
save > copy shareable url
DID it
Okay so you would just like feedback?
alr give me a moment
- You should be following OOP principles, the string based ability system works but it's not really reliable and at scale you will have a MASSIVE class file.
You should split your abilities into separate class files and use a base abstract ability class.
something like so:
public abstract class Ability{
private final String id;
private final String displayName;
private final long cooldownMs;
public Ability(String id, String displayName, long cooldownMs){
this.id = id;
this.displayName = displayName;
this.cooldownMs = cooldownMs;
}
public abstract boolean activate(Player player, int abilitySlot);
}
public class BlazeDashAbility extends Ability{
public BlazeDashAbility() {
super("blaze_dash", "Blaze Dash", 1000);
}
@Override
public boolean activate(Player player, int abilitySlot){
//Do stuff
return true
}
}
This will require some sort of registry and manager but it's far better than a massive switch statement
private final List<String> powerNames = Arrays.asList(
"blaze_dash", "frost_step", "ender_blink", "earth_shove",
"healing_aura", "shadow_cloak", "wind_jump", "fire_nova",
"time_slow", "lightning_call"
);```
Is just a final list of objects. This is what an enum is. use an enum
Note- this list should be immutable (Arrays.asList is technically immutable, but use an ImmutableList impl)
3. I'm not really sure what the if(abilitySlot == 1) means or why each ability acts differently but if every ability has the same boilerplate code, you can reduce that to something more simple. Again, with point 1 this could just be an abstract method
4.
```java
private final Map<UUID, Map<String, Long>> cooldowns = new HashMap<>();
private final Map<UUID, Map<String, Integer>> powerLevels = new HashMap<>();
private final Map<UUID, Integer> playerLives = new HashMap<>();
private final Map<UUID, String[]> activePowers = new HashMap<>();
While this does work it's sort of hard to follow, one main context class would work a lot better in your favour:
private final Map<UUID, AbilityContext> abilityContextMap = new HashMap<>();
public static class AbilityContext {
private final UUID playerId;
private final Map<String, Long> cooldowns;
private final Map<String, Integer> powerLevels;
private final Map<String, Integer> playerLives;
private final Map<String, String[]> powers;
}
- You should always avoid using
§in your code like here:player.sendMessage("§cThat ability is on cooldown!");This should either be replaced with ChatColor, translateAlternateColorCode or just use Adventure Components
@brazen gorge
… thank you so much
formatting is shitting itself
Totally a you issue
there we go aparently lists and code blocks do go well together
I think I fixed it thanks for the help @drowsy helm
broo
Hello Bro!
I'm from East Java, Indonesia, and I'm planning to build a big Minecraft server project. The theme is Roleplay, similar to GTA RP. I'm looking for developers who can create various plugins for the server.
Specifically, I need plugins related to:
3D models
Player animations
Custom GUI interfaces
Custom emotes
Custom vehicle plugins
And many other plugins to support the roleplay experience
If there's anyone here who can help with plugin development—especially those skilled in 3D, animation, UI, and custom vehicles—I’d love to work with you! Since I'm planning to order many plugins, I hope the pricing can be affordable. I'm from Indonesia, so when converted to our currency, USD becomes quite expensive for us. 😅
Thanks in advance!
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
also why post in every single channel
what do you mean bro, i don't really understand
That link is for the forum to request services
thsi is not the place for that
bro, how to post a sentence in spigot forum? can you tell me how to do it briefly? or someone else can tell me how?
HI hh iam working on skywars project and iam missing something huge ..
Lobby Server GUI: Map Selection
Players see all available maps in a GUI menu.
Map names and their metadata are configurable through a config file for easy management.
Server Spawn Request
When a player selects a map in the lobby, a request to create and start a new game server is sent.
The request includes the selected map name and game mode.
Proxy Server: Server Creation & Management
The proxy listens for spawn requests via Redis using Lettuce.
Upon receiving a request, it allocates an available port and sends server launch instructions.
The proxy dynamically adds the new game server to its server list and handles player routing.
Game Server Setup via Presets
Each game server instance is created based on a preset corresponding to the map and mode.
Presets are stored in structured folders, for example:
serverstemplates/solo/jungle/ containing the necessary plugins, config files, and world data.
This preset system is flexible and allows easy addition of new game modes or maps.
Player Queue Management
Once the server starts launching, players are placed in a queue on the lobby server for about 10 seconds (or less), waiting for the new game server to be fully ready.
When the server is ready, all queued players for that map are forwarded to the game server.
Subsequent players who select the same map while the server is running are added to the same queue or sent directly if capacity allows.
what do you thing about this sys?
bro, how to post a sentence in spigot forum? can you tell me how to do it briefly? or someone else can tell me how?
Seems fine to me, but how do you plan on utilising the server templates?
kubernetes?
Create an account and click "Post new thread"
idk i want ideas ....
I think the core concept is fine. I have a similar orchestration system for my network whic uses redis.
The hardest part you will find is effectively launching servers. I would recommend looking into kubernetes for server orchestration but it's quite a task. Will probably be your best option
Also would be handy to have some cold-spares to launch into instead of having to wait for a server to spin up which could be upwards of 20 seconds even if optimised
Thanks
bro, I can't find the button to post on the spigot forum, I only found the new post button but I clicked it not to post text or photos but instead showed the latest posts from the forum, can anyone tell me how to post on the spigot forum):
You are logged in, right?
iirc you can't just make a request post right after making account
you need some points or something :D
best bet is to look for ppl who are offering services instead
Bro, I've logged in, and I can't find the button, and I just created my account
.
bro do you have 2 spigot forum accounts? if you have please lend me 1, or you can post it for me
that would be very against the rules
Like steve said, if you dont have enough rep. Look at the Offering subforum and hire people through that
What do u even wanna post
Oh
...
yeah we've lost parity years ago
but we're catching up a little bit with the dialog system
is the material of wheat thats on the ground different from wheat that is in my hands
don't believe so
unless there are multiple entries in the material, its the same
Carrots have two materials, one item, one block
same for potatos I believe (which once caused some funny bugs on Hypixel Skyblock hehe)
Here's docs so you can take a look yourself
lovely consistency
tell mojang to flower themself
torchflower crop? torchflower??? torchflower seeds????
what the actual f
i'm actually not sure why the handheld item is different from the block
because mojank
I think it's cause they look different?
that might make some sense
Where's for other things the item texture is just a small version of the block
i mean nowadays the model can be different in the inventory vs in the world i'm pretty sure
I mean kinda, but not really, its like the wheat example
but that probably wasn't a thing back when wheat was added
there is wheat and there are seeds
but there is no wheat crop
is the torchflower crop an item you can pickup?
Ok I have no clue then
but apparently thats also the block thats on the farmland
that doesn't sound right
probably has to do with how they register certain blocks/items
most likely the texture i think
plenty of other blocks like logs have multiple block states (e.g. orientation for logs) and still have the item be the same as the block, so it's not that crops have growth stages
but back in the day there weren't any model/texture predicates you could use to render the item differently in e.g. hand vs inventory vs placed as a block
get the block from the world and set its type
how can i detect if a crop hasn't grown to its max potential
declaration: package: org.bukkit.block.data, interface: Ageable
alr thanks
for combatlog x, how can i open chest/ect when in combat
if(event.getBlock() instanceof Ageable block) {
if(block.getAge() != block.getMaximumAge()) {
return;
}
} else {
return;
}
like this?
no need for the last else
ah
i have been killing myself to fix this bug
and the diff was a .getBlockData() ???
tahnks
why didnt u guys reply
i get why the asker shouldnt reply
Configure the CheatPrevention expansion
also that's a question for #help-server or the CombatLogX (SirBlobman) discord
oops
Ok so all of my codes aren’t working will anyone just revamp the code I give them a little
i hate this process:
- package
- move to plugins
- sudo docker compose restart gardening
- wait
i wish there was hot reloading
cuz easy deployment
Yeah but for testing?
Helllo everyone
it does and everyone discourages doing it
its just plugman or /reload
You can skip move to plugins part by linking build jars to plugins folder
No not that
I mean actual Java hotswapping
No actual hot swap
no way
Can be buggy iirc
gotta give that a try
I wouldn't say buggy, just some operations aren't supported
If not, you can just make a script that automates what you are currently doing
You could embed scripting(like lua) into your plugin
Bruh what
how 2 make hard link linux
I want to hot swap my plugin, so im going to add a lua interpreter and fully rewrite my plugin in lua
ln file folder
cant it be ln file file? like ln pathtobuild/plugin.jar serverdir/plugin.jar
public void onBlockDropItem(BlockDropItemEvent event) {
event.getPlayer().sendMessage(event.getBlockState().getType().toString());
yo why tf does this say AIR even thou i broke a potato
it turned to air when you broke it
does anyone remember whether PluginDisableEvent fires before or after the plugin's onDisable is called? off the top of my head i think it was before, but i'm not sure
i should be like: if event.getBlock() == air then fu*k you u aint getting no drops
Before iirc
Worth double checking tho
sadge
i have a library style plugin which offers a service to plugins depending on it, which the depending plugin should close before disabling, and i'm trying to set up a fallback in the library that'll catch the plugin disable event and close the service if the plugin itself forgets to
i could use the scheduler to check if it's closed by the next tick and close it if it isn't, but then if the plugin was reloaded, it's going to re-enable before the next tick, try to recreate that same service, and explode
i'll just have to jerryrig it somehow
Inb4 bytecode injection
new Double(0.65) 🗿
i dont even know why it is throwing an error
i used this several times and pretty much nun happened all the times
i don't think it should, but there might be some strange interaction between autoboxing and widening primitive conversions going on here
maybe possibly check the language level your ide is set to
in intellij it's somewhere under the project settings
file > project structure > project settings > project > language level
yeah i'm not getting an error for this
my dumb head cant find where files at bro D:
ik where structure is but idk if it is the same as project structure
hang on
i found it
it is sdk default
i can compile it safely tho so no problem ig
as opposed to unsafely?
I've been MIA for a while from MC dev, seen the new Dialogs that were added in 1.21.6 and md5 added an experimental api. How come it's only in Bungeecord (https://github.com/SpigotMC/BungeeCord/tree/master/dialog) and not in Spigot currently, I'm assuming just because it's experimental?
would this work on BlockBreakEvent?
if(plant.supportsAutoPlant() && hoe.isAutoPlant()) {
dropCount -= 1;
new BukkitRunnable(){
@Override
public void run() {
if(event.getBlock().getType() != Material.AIR) return ;
event.getBlock().setType(plant.seed());
}
}.runTaskLater(Gardening.getPlugin(), 10L);
}
like the "dont plant if it aint air"
It's in Spigot as well
declaration: package: org.bukkit.entity, interface: Player
I used multiverse to create another world, for my spawn so players dont see it from outside but now, when rtping players cant rtp to the world and it just says couldnt find a safe spot
it is available in spigot, the exact bungeecord api is ported to spigot
Ah nice, I must have missed it in the commits then, I shall take a look!
Also do people still use MultiMC or is there something more popular now?
Oh boy I just googled multimc didn't know there was a whole load of drama around it
what drama
what? its the perfect place
according to everyone else
Yeah my bad haha
Does the server need to be running under bungeecord to access the new Dialog stuff though? Just tried it and I get java.lang.NoClassDefFoundError: net/md_5/bungee/api/dialog/Dialog
Hmm Paper not merged it in? I'll try standard spigot too This server is running Paper version 1.21.7-15-main@0cadaef (2025-07-01T22:53:44Z) (Implementing API version 1.21.7-R0.1-SNAPSHOT) You are running the latest version Previous version: 1.21-111-66165f7 (MC: 1.21)
?whereami
paper has hard-forked from spigot
it no longer pulls changes and updates from spigot
Oh has it?? Damn how long have I been gone lmao
its pretty recent
Well that's a pain lmao
1.21.4 i believe
last i checked the market share, which admittedly was in like 1.18 or something, paper and paper derivatives was like 80%+ of modern versions
looks like it's ~75% across all versions on bstats now
75?
63% paper 10% purpur and one or two percent from whatever other forks
or did purpur hard fork from paper lmao
my only gripe with bstats is it does not link stats together
so i can't know, for example, the server software distribution within a specific version
yeah it's pretty lacklustre
i'd like to know the distribution for modern versions, since i'm fairly sure like half of that 15% spigot market share is on 1.8 or something
anecdotally, simply seeing the amount of people asking for support for old versions, the amount of servers on old versions that are not using a patched software is concerning, lol
they go with whatever the latest build of spigot/paper for that version was
it seems like no matter which version of the paper api i depend on, intellij always complains there are reported vulnerabilities in it
might as well give up
because there are, but probably none that affect paper anyway
just turn off the inspection 😎
yeah usually those are coming from like guava or gson or whatever
which are about obscure features of those libraries that no-one uses except for, like, alibaba
Why they do that, have they stated it?
they got a whole forum post about it
and have made a couple of discord announcements as well
muh material enum
using tags for 1.21.7 but for some reason i update everything and cant get them to work
Description Resource Path Location Type
Items cannot be resolved or is not a field Starttutorial.java /starttutorial/src/main/java/starttutorial line 1656 Java Problem
Blocks cannot be resolved or is not a field Starttutorial.java /starttutorial/src/main/java/starttutorial line 1678 Java Problem
if (org.bukkit.Tag.Blocks.WOOD.isTagged(type)) { // Includes all wood blocks with bark on all sides (OAK_WOOD, STRIPPED_CHERRY_WOOD, MANGROVE_WOOD, PALE_OAK_WOOD, hyphae etc.)
return Material.OAK_WOOD; // Canonical: Any wood block (often used for fuel or building)
}
if (org.bukkit.Tag.Blocks.LEAVES.isTagged(type)) { // All types of leaves
Blocks/items cannot be resolved, im not sure where im messing up
package starttutorial;
import org.bukkit.Tag;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.attribute.Attribute; // This MUST be present for GENERIC_MAX_HEALTH
import org.bukkit.block.Block;
import org.bukkit.command.Command;
How did you import the Spigot API to your project
lbiraries under class path
And you added what jar
is this code from chatgpt?
probably
Tag.Blocks or Tag.Items is quite simply not a thing
right that too kekw
dark times
so when i do ItemMeta.setCustomModelData(Integer int), how do i get that integer?
I updated my spigot version and now getCustomModelData() is deprecated
It's deprecated because Mojang replaced that int
The set custom model data converts the int to a float and sets that in to the new format
ok, how should i get that float from the floatlist?
You can get it from the custom model data component
declaration: package: org.bukkit.inventory.meta.components, interface: CustomModelDataComponent
ok
uwu step-lerp what are you interpolating?
so it will just be a float in getFloatList?
also will it be the only float
ok thanks i think i understand it now
You can read about the new component on the Minecraft wiki
nvm i forgot to compile it again :I
thx u guys for help ❤️ ❤️
Compare different mappings with this website: https://mappings.dev/
guys whats a Activation code for. idea?
Sounds like you downloaded the Idea Ultimate
You want the community edition unless you want to pay
alr
is there any tool which converts intermediary mapped .java files to mojang mappings ones?
does the animation need the tickCounter? Cause u could totally move the tickCounter++ into the hitbox tick method param
that depends, do you like your animations to animate
would you say time is an important factor in an animation
depends if it has it's own tick counter 🤔
no, because I am not a monster
the whole point is to centralize behavior so I don't end up with 15k independent 1 tick tasks
also I hope you like components
@Getter
private InteractionComponent interactionComponent = new InteractionComponent(this);
@Getter
private HitboxComponent hitboxComponent = new HitboxComponent(this);
@Getter
private DamageableComponent damageableComponent = new DamageableComponent(this);
@Getter
private AnimationComponent animationComponent = new AnimationComponent(this);
and callbacks
well that's how I turned 700 lines into 275 lines of code
can you show me how one of those look like inside?
pastebin it
if you think the code looks weird and bad maybe consider that actually you are the weird and bad one here
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.
super cool 😄
public void setCustomHitboxOnUnderlyingEntity() {
if (modeledEntity.getSkeletonBlueprint().getHitbox() == null) return;
NMSManager.getAdapter().setCustomHitbox(modeledEntity.getUnderlyingEntity(), modeledEntity.getSkeletonBlueprint().getHitbox().getWidthX() < modeledEntity.getSkeletonBlueprint().getHitbox().getWidthZ() ? (float) modeledEntity.getSkeletonBlueprint().getHitbox().getWidthX() : (float) modeledEntity.getSkeletonBlueprint().getHitbox().getWidthZ(), (float) modeledEntity.getSkeletonBlueprint().getHitbox().getHeight(), true);
}
yet another great 1-liner
did you just use a ternary for Math.max
that's my favorite time to use those
how do i retrieve random tick speed?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#getGameRuleValue(org.bukkit.GameRule)
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/GameRule.html#RANDOM_TICK_SPEED
declaration: package: org.bukkit, interface: World
declaration: package: org.bukkit, class: GameRule
try searching for game rule in the javadocs
if there's an event for it then there's an event for it, if not then not
off the top of my head probably not but i could well be wrong
this is insane, I just rewrote thousands of lines of really stupid complex code and it seems like everything is working first try
this is a first in like 12 years
command preprocess event exists 😉
Yeah I did obv but no sign of that
This will work + maybe a timer task
If some plugin modifies the gamerule
if i use a Block as a hashmap key, what is getting hashed exactly? just the block position and world? how can i check that? im caching stuff and apparently the material doesnt matter?
bro forgot about switch statements
You can check the stash
But Block is a location+world wrapper as far as I'm aware
?stash
Holy ifs
not sure what you mean, you mean i should read spigot's code?
or just decompile that shi
the type is just read every time you call getType, it wouldn't make sense to hash it
keep in mind storing blocks in a map can cause a world leak
Let's say you have temporary worlds
and apparently Blocks are mutable? so the cache uses that hash, the key itself changes the material, but the thing i cached is inmutable and independent of that, so i get the old value
For example, from a dungeon / minigame plugin or the world just gets unloaded, keeping the block in memory would still keep that (unloaded) world in memory
Again, every time you call getType it reads the data, no point in storing block instances
You could however just store the BlockData along with a position
right, yea, well that doesnt happen on my sv, but ill keep that in mind
either with palettes to be somewhat memory efficient or not, who cares
right, well i think i will just invalidate the cache and thats it, makes sense in my case anyway
Is the world held in Block a weak refrence
nope, hard reference to the nms world
Spooky
Though you could just hold location instead
Since that does use a weak reference for the world
public class BlockSnapshot {
private final UUID worldId;
private final Position position; // just make your own record or whatever
private final BlockData data;
private BlockSnapshot(UUID worldId, Position position, BlockData data) {
this.worldId = worldId;
this.position = position;
this.data = data;
}
public static BlockSnapshot create(Block block) {
return new BlockSnapshot(block.getWorld().getUID(), Position.at(block), block.getData());
}
// add more static factory methods
public Location getLocation() {
return new Location(Bukkit.getWorld(worldId), position.x(), position.y(), position.getZ());
}
public void apply() {
getLocation().setData(this.data);
}
// equals and hashcode, maybe a codec / serialize to pdc? who knows!
}
This is an example of how I'd do it
tbf I have my own block thing with support for custom types
Instead of this you can also make your own schematic system if you feel like reinventing the wheel
plenty of options
you could also omit the apply() method and just make this a data class, having your own WorldAccess interface for applying blocks
That way you can choose if you want to apply it manually, batch them or just route to WorldEdit
hello, i'm working with inventories in 1.21.1
in 1.21.1 to get the title of an inventory you need to get the InventoryView
and I don't know how to get the InventoryView from the Inventory
this is what I want to do
if (inv.getType() == InventoryType.BREWING && "Runic Table".equals(inv. ())) {
Thx for any answers
Anyone do a code for me?
Don’t compare inventories by title
?gui
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
How do I use it
make a forum post on the thread
Where's the best place to find an experienced full-time Minecraft developer for hire other than Spigot forums?
dm this user
didn't you say you were open to free work the other day?
and you want to help the community
:(
Yanderedev become java developer?
hi , is it possible too get the folder name of the server?
just new File().getParent() ?
hi , iam trying to register a server to my proxy bungeecord
but its not registering
InetSocketAddress address = new InetSocketAddress(serverAddress, port);
ServerInfo serverInfo = ProxyServer.getInstance().constructServerInfo(serverName, address, "Dynamic registered server", false);
ProxyServer.getInstance().getServers().put(serverName, serverInfo);
but in mc game , when i type /server
i don't see the server name there
it should show this server folders xd
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
i was messing around
trying this but
it looks like it works but sometimes its making me feel like im messing up somewhere
heres the result
whats wrong with that?
idk mate it feels like sometimes it loops
like idk
it feels unfair for someguys yk :D
thats just natural randomness
you should do a weighted system if you want equal distribution
cuz i know one of my friends is just gonna say "hey!! this is unfair that guy didnt got selected once!!!!!!"
i need that bro
maybe i should add another one so it doesnt look like this
guy1
guy2
guy1 <----- this is bad for me (atleast it feels like it)
since im making a game like hide and seek
u dont want one player to be selected that much
otherwise he'll not be happy :D
why do you need that randomness for a hide and seek minigame?
i wonder if there's public community driven documentation for NMS server classes i could use?
to pick IT
other than mappings, no
you only need to pick a random one from a list
ik but it looks like crap
like guy5 gets selected 2 times in a row a lot of times
make a list with all players
each time select random, remove from list
once list is empty fill it again with same players
each player gets selected equal times
I think
it should be better when there's more players tho
that's randomness
sometimes it gets selected twice
i blocked that dw :D
this is genius dude
ty
i'll try
the only other way is to have a previous seekers list and give lower the chance that way
ik but sounded complicated
so i didnt even try it
And I am talking about a (Array)List<> not an array
Removing from list shifts all elements to the left and changes the length so there would be no need for null checks
based steve
this plugin uses my api as dependency
throwing this strange error message
the method signatures are correct
hmm i guess i foundy why
my api uses 1.21.6 spigot-api, while my depend plugin is 1.20.4
i moved my abstractions into my plugin and its solved
i dont know why this happened
my abstractions was only using ItemStack class
Press the insert key
pretty sure u need PacketEvents as a jar on the server
like you would with Vault
it says its loading packetevents right after
you need to add it as a dependency in your plugin file
i guess i added them depend and softdepend at the same time
thats the problem i guess
it was only softdepend
oh yeah
if it doesnt hard depend (or if you dont use loadafter( if that even exists) the load order is not guaranteed
k now its loaded
Anyone ever have an issue with target or build not showing in the Project Tree, in intelliJ?
no
LOL wtf... this is all I see, but if I open in explorer,...
have you tried to restart your wlan router?
bruh what
reinstall intellij
buy a new house???
have you tried microwaving your pc?
sometimes it reorders the bits
and it works again
nah lowkey smart
i know
everytime i get a nullpointer caused by a bit flip from an
solar storm, i put my server into microwave to revert the bitflip
guys can i get help for a small custom plugin?
chatgpt can help you
I want a custom plugin for EssentialsX that works like this:
When a player runs /baldeny, it prevents other players from using /bal on them.
When a player runs /invseedeny, it prevents others from using /invsee on them.
If someone tries to bypass this, they get the following message:
&cError: &4This player not found
i did. not. worked with chatgpt
idl why
k
its a simple. plugin
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
You can contact someone offering their services
where can i found them
here on the forums
"offering services" lol
Did u google
its available if you use a version past the middle ages
Spigot doesn't have API for it. It got blocked by Paper developers, who then introduced their own API downstream before they hard forked, then I gave up
oh oops I was confusing it with paper again
from looking at the PR it felt like there were some issues raised around how number format was implemented more than anything, but not anything blocking per-se
ig the most damaging thing is that it deals with components and the bungee chat api is incomplete for this purpose
help
they are not showing when i do /server
for some reason when i register the servers using the method i mentioned , nothing happens when i do /server
never worked with bungee but i'd maybe guess that the collection returned by getServers is a defensive clone and you can't put things in it or remove things from it and have the changes actually reflected on the proxy
what do you mean it got blocked by paper developers? How does that work?
no its not
it should work
There was a comment from a higher level maintainer about design conflicts
Often they were unhappy with the way things were implemented, often for very, very small things, and nothing was ever good enough because it wasn't up to Paper standards (despite being in the Spigot project...)
Yes, Spigot Stash changes
It got blocked by paper devs within spigot?
Yes because of review comments
some consideration was probably being given to paper because they'd have to inherit the changes downstream
Correct
And they were never happy with how things were done because nothing was componentified
Which I also did in a separate PR but they also weren't happy with that one either because it wasn't Adventure, so 🙃
huh?
lmao
Sounds like a bunch of pretentious losers who enjoy being nitpicky for the sake of an ego
i do hate trying to get into review wars with the paper devs to try and get some pr through
paper smh
It's why I gave up
paper devs in a nutshell
I submitted a bug fix to adventure-nbt, guy said it looked good
Too many complaints, not enough effort from them
then merged something else, published a new version and never merged my shit
but that always happens
not only at paper
12 year old code btw, pre Java 8
(8 is newer, obviously, but Minecraft ecosystem wasn't really Java 8 by that point)
yea but it's been revisited post java 8
god forbid anyone changes a single line of code and moves forward
Could open a PR if you reaaaally wanted 👀
oh i really do not
talk is cheap, send PRs
but that code a s beautiful piece of art
I figured as much lol
im not touching that
Want me to open it for you?
😘
have chatgpt rewrite it
i got you, i'll approve it
usually after i see some pr get shot down i just end up going into nms for the same thing
i hate that
thankfully that's pretty easy and maintainable these days
boy oh boy do I love using nms
it's only those prs that require big diffs to nms internals, like the async chunk pre load event, that are a bummer to see shot down
the rest are like an expected level of recurring disappointment
-# rs

there as been a pr that tried to update it
^mfw i see that class
xdd
could just resolve some of the conflicts lmao, it would be good to go again
Too large in scope
But I essentially wrote the same code using a stream but used two separate filters (which imo is the correct way to do it)
How would I prevent the Dragon Egg from spawning after the dragon has been killed?
By the way, BungeeCord only jumped to Java 8 five years ago in 1.15.2 (2020). The earliest change to that tab completion was 7 years ago, so :p It hasn't been touched since the J8 bump
I don't know if an event is called for that
honestly amazed how well it stands with that little of a change in architecture, looking at diff from then
there's of course new packets and what not, but nothing too wild
Yeah, no event is called for it. It's done in EnderDragonBattle#setDragonKilled() but I see no Bukkit event call. Honestly not really sure what event would be used. EntityChangeBlockEvent maybe lol
I wish the EntityChangeBlockEvent had a similar documentation to the BlockFormEvent, that way I'd actually have examples as to when it is triggered
I never remember what it is actually called for lol
Caused by an entity? ECBE. Caused by a world action? BFE
So i was hacking xaero's worldmap for serverside integration, and i was wondering why tf do i get white player heads for no apparent reason. i spent like 8 hours trying to debug. turns out that's just a bug in xaero's world map
fml
What about EntityBlockFormEvent then 😔
that mod is still being updated, that's crazy
what server side integration were you trying to add
Okay you know what? I have no distinction between EBFE and EBCE lol
someone probably forgot that EBCE existed when adding EBFE. Can't blame them since I also forget that EBCE exists all the time
Form has a block state, Change has block data, but yes, I'd say it was probably a case of someone not realizing an event existed already
basically im working to syncing player positions with browser map, i already decompiled the project and remapped it to mojang mappings for reference code, i've hacked my way through with reflections externally just to not infringe ARR copyright and i was like why tf all player heads in gui render properly and in the world map itself they're all white
At this point though, I'd say Change would be preferred unless you need to retain the data of a block (i.e. a chest)
that sounds like a bigger undertaking than just taking an open source minimap mod
i mean there's no proper open source minimap that works as good as xaero's afaik
one of these days i want to integrate a view distance extender plugin into the distant horizons mod
i think it might already have a bukkit plugin but the vd extending impl is kind of terrible
VoxelMap is ARR licensed, Xaero's Minimap is ARR licensed, JourneyMap is ARR licensed
they're all closed source
does World#getGameRuleValue default to default gamerule value?
this is crazy
I didn't realize until you pointed it out, but you're right
VoxelMap-Updated is source-available, at least
and JourneyMap seems to have a bunch of addons so it is probably more easily extendible than xaero's, not that I'd know
time to make an open source minimap solution
Xaero's minimap has bunch of api's that it just doesnt expose for some odd reason
you can add custom player trackers with one interface
yet for some odd reason owner just hides them for internal use only
its primarily used for only its own mod integrations
I mean, there is a method to get the default value so probably not
but let me check just to be sure
yeah, doesn't look like they are taken from the same source:
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/CraftWorld.java#1784-1794
i like how this dialog still exists in windows 11
this is ancient
i remember it being in win 95
is that the dialog that pops up if you do alt + f4
😠
there are a lot of things in modern windows left in from the very start
e.g. the services manager
no clue
idek how entirety of windows 11 works
but ik start menu bottom panel is a web app
it's 10 but with a bit of polish which is 8 with a bit of polish which is 7 with a bit of "polish" and jank
I'd assume the reason they haven't changed it is some accessibility issues around replacing it
i.e., that pop up is going to be shown regardless of the explorer failing you IIRC
wouldnt ever call it polished 😂
windows 11 has really made strides on standarizing the windows UI
i use all 8 10 and 11 on a daily basis and there really aren't any differences between them apart from some visuals in the shell
good ui
windows 10 did most of the legwork for it, but windows 11 made it follow a language design
sure, but it made it slow af as well, some winui apps run like shit, while some arent like windows terminal
eh, while I also love gnome and fedora, they don't have to deal with decades of tech debt
I honestly haven't noticed that
they do take more than a "native" app to boot up, but barely so
install powertoys and see how its winui gui runs slow
I wouldn't install powertoys, because it is bad software 😛
funny how no app makes native ui for windows
i don't use any winui apps
i just dont get it why microsoft would make wrappers under WPF, UWP to implement WinUI consistently. that's like hiding dust behind a carpet
they somehow managed to fork Wox Launcher and make it slow as hell. Powertoys Run is unbearably slow
its a ticking time bomb of mess and spaghetti code
even Flow did a better job at forking Wox
true
they never remove anything, only wrap it in another layer of shit
i just dont get it why they dont utilize compatibility modes and optional features more
to cleanup the codebase
they can't remove anything, removing anything means breaking user-space, and unlike wayland compositors, that is a no-go usually
they already have things implemented they just decide to layer shit
to do more involved config things i find myself using 98/xp era, win7, and win11 tools at the same time (and they all link to one another back and forth) because none of them have all the settings and all of them have some of the settings
im not talking about removing it, im talking about modularizing and choosing what you need
optional features already kinda does it, but they still decide to layer shit on top of shit
instead of trying to build better foundations and exposing legacy codebases under optional features
e.g. to change the system language, the entry point is the win11 "settings" app, which opens a win7 control panel window, which opens a win98 sysadmin settings window, which opens another win7 control panel window
if it isn't part of the settings app, I go straight to the registry editor lol, can't be bothered to search through the old admin panel
myeah that's more and more the meta these days
hey my pom.xml isnt putting the final compiled jar where i want it, what did i do wrong here?
?paste
Enlighten me iOS. Why would I want to open an XML file in a video conferencing app?
onedrive
desktop
spaces in directory names
apostrophes in directory names
nahh windows is just annoying like that. All your user dirs reside under one drive
oh right sorry
i mean, i just copied what the directory actually was + it worked for my other plugins
i didnt know there was an actual way to set the output directory
is Location safe to store as a map key?
WrapperPlayServerPlayerInfo playerInfoPacket = new WrapperPlayServerPlayerInfo(
WrapperPlayServerPlayerInfo.Action.ADD_PLAYER,
Collections.singletonList(
new WrapperPlayServerPlayerInfo.PlayerData(
null,
profile,
GameMode.CREATIVE,
0
)
)
);
why this not work in 1.21.1?
Yesn’t
Probably not stable hash considering it has a weak ref to a world
Yeah, it uses 0 if world is null aka unloaded
But if you never unload words, it isn’t an issue
Definitely not one for the default world given it can’t be unloaded, if anything
could just make a record honestly
yeah obv
public record StableLocation(String world, double x, double y, double z, double pitch, double yaw) {
public StableLocation(World world, double x, double y, double z, double pitch, double yaw) {
this(world.getName(), x, y, z, pitch, yaw);
}
public StableLocation(String world, double x, double y, double z) {
this(world, x, y, z, 0, 0);
}
public StableLocation(World world, double x, double y, double z) {
this(world, x, y, z, 0, 0);
}
public Location toBukkitLocation() {
return new Location(Bukkit.getWorld(world), x, y, z, pitch, yaw);
}
/* maybe add some withers */
}
I wish they implemented the derived record creation JEP already so we don't have to write withers manually
if you want to do something more involved, you could create a dynamic World proxy that stabilizes the hash code by keeping the uuid around regardless of whether the world is loaded
something like this: https://pastes.dev/Bde8YaBFgU
only issue with this is that it would lead you to believe the world is loaded when it isn't, and it breaks symmetry with CraftWorld equals since Craftworld checks for class equality
the world isn't the issue with the hash code
since it's just the hash of its uuid
the issue is that Location is mutable
I mean, both are the issue
you can circumvent Location being mutable by well, just cloning on put
but you can't circumvent the world unloading
has anyone here ever tried implementing LUA as a way to program aspects of their plugin from 'config' files?
As far as i can tell the current inventory click event api can't distinguish between a single shift click and a double shift click, because the double shift click just fires as multiple normal shift click events.
Because of this there's a possibility where individually shift clicking each item has a different result as shift double clicking, for example in the case where there isn't enough space in a inventory for all of a type of item to fit in the opened container but some of it can.
Both fire as a move_to_other_inventory inventory action also
Because of this, you can't accurately predict the result of the move event without like looking at the packet or something
is this correct or am i messing something?
I know lua has a reputation to be easy for these things, but I am wondering just how much work that would imply on my end
I don't think it'd imply much work if you use luaj/luna
did anyone uses ai agent for their spigot projects (for example cursor ai)
i mean vibe coding stuff
hmm
No we clown on people who do so
I do like the idea of lunaj
I have these 'props' which are just custom models you can place in the world and give them custom behavior
and there's three types of custom behavior, right click, left click and entering its hitbox space
it would be really neat if you could just write a small lua script for this
would really give it that flexibility
luaj outdated use: https://github.com/gudzpoz/luajava
so that's the updated one, I never know nowadays
not that it matters, lua spec hasn't been updated in a while, welp, seems like I was wrong, it was updated rather recently, just that I never used recent versions lol
it does not seem too hard to do
btw i mean fully ai coding
not even copy paste
stuff
Oh yeah then you're definitely being laughed at
its changing codebase automatically depend on your prompt
I did use vscode copilot for some spigot projects
probably a new update
how would somethihng like this cope with imports?
it was fine for the most part, if anything you can't depend on it to know about paper specific tooling like paperweight, but other than that it does fine as long as you provide appropriate context
If you're letting ai write the whole project, we're laughing hard at you
you can import things in luajava, you just do java.import("some.class").someMethod
Tab complete should be enough
kind of like a requires in js
why
Cuz I don't take vibe coders seriously
I don't take anyone doing plugins seriously
if you want better UX for your thing, you'd make your own lua objects though
I do wonder how lua LSPs handle something like luajava
Dont forget sync lua states otherwise it will crash the jvm
so people will have to manually look up paths for everything huh
how to delete all items in the crafting slot, i try to clear inventory but not cleared.
Interesting comment, you sure help a lot of people even though you're not taking them seriously kek
just write a bunch of lua scripts that people can depend for better UX, something like a stdlib
why on earth are you programming java on mobile
for anything advanced you'd just let them search the paths, at that point they'd know anyway
I don't have pc lol
did you register the listener?
that is very much what I am considering
i did
sounds pretty doable if you don't care about generalizing the concept honestly
and did you make sure the code reaches the clear line?
the kind of annoying thing with making a standard library is that this is at a complexity level that I might be the only one who will do it
if you do care about that then you'd go into codegenning java objects into lua scripts or something like that which would be a lot more involved but that can be work for later
at which point it would save me a lot of time to just make these hardcoded
well then your interface is too complicated
how do you even run a minecraft server if you don't have one
I guess you could use a host, but still. How do you connect to it to test lol
also you better charge that thing
sounds like a situation, props to you for still trying though
its boutta run out
The event is triggered before the result of the action is calculated, so you'd be correct in that it's bit hard to get the result correctly
adapt functionality for console duh
thats to make it cancellable right?
Well because it's minecraft ofc, people like minecraft
yeah and thanks for responding
no but i mean the packet itself is able to differentiate, the event is just make in a way that dosn't show that info
im not vibe coder
Honestly sounds like a true dev, push to master with no tests of any kind beeing done kek
You have all the actions in getAction
well, it is doable and pretty easy to integrate if you just want to yank it. It'll probably give you headaches on the long run but not like you have many options when it comes to complex features in your plugin
As i said, if i use getaction its move_to_other_inventory
you could just make a Skript addon™
this one action can have different consequences based on if its a single or double click
Then there you go that's what the packet is saying
so getting that won't help you
i guess im just annoyed that the api could give more info but it dosn't
well maybe it does
hmm 1 sec
does the packet even have a double shift click?
I don't think so, the confusing thing is that when i shift double click a item, i get multiple events of shift single click
so where is this shift double click idea coming from
like when you shift double click a item in a chest, it moves all similar items also
but if there is enough space for all of them, none of them move
vs if you just shift clicked them one at a time, some of them would move
collect to cursor iirc
maybe you get both the single click and double click im not sure
im printing the action, its not collect to cursor
also the clicktype enum dosn't have a double click
oh wait it does nvm
ok that might be it lemme check then
i think the confusing thing is just that it sends multiple events for the one double click
I believe it triggers for each click, since the packet is also sent for each click
well no it might send 5 or 6 times, if there is 5 or 6 items to move
the inventory action for shift double click seems to be PICKUP_ALL
im talking about when you double click shift on a item where there is others of the same type in your inv
I don't think I've ever tried that
are you sure that is a vanilla hotkey? Let me check
It's an auto transfer mechanic for all items matching the type
It is in fact a vanilla thing
it does set the click type to double click, just no inventory action for it if carried item is empty
it could be that you're hitting a race condition and carried item is set to null before the event triggers, so it doesn't have the appropriate inventory action (in this case, collect to cursor)
click type should still be consistent, if anything
make sure you're testing on survival also
try shift double clicking with this setup
wait i can't upload imgs 1 sec
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
the cursor item can be anything
wierdly this only works when the items are in your hotbar to normal inventory, and not the other way around
it seems to just push all items to the top left most slots
same thing
also when shift right clicking while another inventory is open (in my case a chest), it sends the items to the bottom right most slots
start: https://prnt.sc/HEEImKFAvd0Q
after shift double clicking: https://prnt.sc/FmK9PsJg4o-8
welp, it seems like you hit an edge case
the inventory events, same way as the interact events have always been finnicky, so you always end up with edge cases like these
you could try and detect shift double click by checking if the action is shift click twice in a row, given something like a 200ms debounce
that or listening to the packet and also making an issue on the jira about it and see if md can come up with a fix
?jira
i give up
the codebase is such a mess that you cant figure out what's what if you want fully decompileable build
there's classes with 2400 lines of code
could be worse xD
one of my events probably reach 1000 lines of code
and its riddled with useless abstractions
thats the best of both worlds
i should split them up
events are one thing , at least you can have centralized logic but when you have SystemManager which handles Managers which handles Readers which handles generic type parameter Player objects which are defined somewhere else in gluecode to fabric is another
i dont even understand why code is so abstracted when the targetted platform of this mod is primarily fabric
funnily enough it dosn't even register as a double click at all https://prnt.sc/WQOmmJWzt6NI
it used to be the same with my code, but i reduced it drastically
i think it's mostly one thing now
how you guys animate icons in inventory menus
abstraction go brrrrrrr
make a class that has inventory, as a field, have a tick method in said class, open the inventory for players
im asking this because i believe spigot is single threaded so there are could be 2-3 way to make it. I have already have menu system but dont want to inject JavaPlugin into my menu implementation
just have it run every second instead of ticks
i use the least amount of ticks to make it smooth approach
i'm missing info about why you need java plugin, you can just call a method of the menu if you want to run an animation
to run BukkitTask
have methods that you can call from a different class
don't be scared to branch out into classes that each do things
abstraction go Brrrrrrr
@worldly ingot im sorry https://i.imgur.com/upYeP5k.png
damn what the hell
At least you tried
guys can i get help
i compile this plugin to 1.12.2
https://youtu.be/DLNt4LDVY0c?si=eBoyezpHYRcnl-ZX
and evreything is good But it only works in one direction. can someone help me for. fix it
https://limewire.com/d/LPQJL#9Z4BRYkIPB this a jar file
this a video for a proplem
Bro... "Wurst" 😭
I forgot that I made a custom recipe system, basically event CraftItemEvent does not work ;v
Hello guys , so after along time of thinking i decided not to use Docker or kubernets ..
i made my own app that connect to jedis ( recieves messages and send messages to and from spigot , proxy servers )
Features :
-
dynamic create servers
-
delete server that stop and create new one once its requested by users
-
dynamic add servers to proxy bungee and remove them too
what do you think about other features i can add?
docker support
kubernets support
I don't have a sprint mode
thats why i used wurst
anyway i didnt get a helpp
i need a help
For toggle sprint ?
Sure buddy
yp
What are we supposed to do with a jar file
You want us to decompile it ourselves ? Hell no
Sharing the source code would be the least you could do
Best would be pasting the relevant code here:
ok 1min
Oh I personally won't help you with this, I am against gambling. Even if it is virtual.
we all gamble
just not always with money
am i tripping or did u role change pink before my eyes
I just boosted for this one sticker :)
🫃🏿
ohkay
my fav emoji is built right into discord
15min sorry i got bussy rn
is bussy short for badussy
ye, it's busy*
don't say.. that
give up.
i will decompile only xaero's world map and make stub classes for soft dependencies, that way i dont need to decompile the soft dependencies too
not sure if it would work
but if it doesnt i 100% give up
Why?
It is?
yea
thatgs pretty shitty