#help-development
1 messages · Page 703 of 1
You could do it if you had an android tablet
Don’t I right click it and press send to and the. Click zipped file
You should just get the one who wrote the code for you to compile it
Alr but he can not
He sent it to me
So when I’m on my pc what should I do?
Coz he doesn’t have a pc at all
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
Steps
- Learn Java.
- Download an IDE.
- Make your plugin.
- Profit.
Flip 1 and 2
But okay
don;t need an IDE to learn, but I guess
It's easier
yep
Let’s say u haven’t learnt but a friend sent it and you now have the code
What now?
You tell that friend to compile it
?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/
They told me they dk how to but I’ll ask them again cya
I'm going to guess it's a ChatGPT moment
NPC's don;t count
?
a solid 5k unpaid debt?
I don’t owe anyone anything
i found how to make text bold | italic but couldnt find color yet
that's great! but you shuold always have at least a bit of debts for tax purposes
😐
Gtg bye
have a nice day
This is my favorite tutorial for creating a Plugin https://bukkit.fandom.com/wiki/Plugin_Tutorial_(Eclipse)
yeah because you hate yourself
What?
it even has pretty pictures
Anyway bye
eclipse + maven = pain
its pure Love
people who enjioy pain = usually daddy issues or self-esteem problems or suicidal
I got the daddy issues, hence I'm currently trying to learn gradle
and the funny thing is that gradle is a fucking pain
I'm only interested in females with daddy issues 😉
or grandad issues would be better
what about grandmas with grandson issues
and then she's like "you know hun, you could be one of my issues ; - ) `
They'd probably creak a little too much for me.
i better shut up
@round finch
code!?
text is the text pane variable
feed me baby

ayo chilll
n🥜t
no
then I hope you die a slow painful death
bruv just type it out
😂
text.setText("Hello world");
DefaultStyledDocument doc = (DefaultStyledDocument) text.getStyledDocument();
StyleContext cont = StyleContext.getDefaultStyleContext();
final AttributeSet red = cont.addAttribute(cont.getEmptySet(), StyleConstants.Foreground, Color.RED);
final AttributeSet blue = cont.addAttribute(cont.getEmptySet(), StyleConstants.Foreground, Color.BLUE);
doc.setCharacterAttributes(0, 3, red, false);
doc.setCharacterAttributes(3, 3, blue, false);
you're the best ❤️
ty
"text" must not be called be called text unless it's a string, list of strings, or a string array
private boolean isMatureWheat(BlockState state) {
if (state instanceof Crops) {
Crops crops = (Crops) state;
return crops.isFullyGrown();
}
return false;
}
Cannot resolve method 'isFullyGrown' in 'Crops
Hey guys, how can I solve the problem in isFullyGrown?
isMatureWheat verifies that the block being broken is a mature wheat seed. If it is not a ripe wheat seed, we cancel the event to prevent further blocks from being broken.
what's the issue?
yeah that method doesn't exist
there's getAge() and getMaxAge()
so check if getAge() == getMaxAge(), if yes it's fully grown
in this case, for spigot 1.8 neither getAge nor getMaxAge exists, only setstate and getState
I don't know anything about 1.8 api, sorry
crops in 1.8 is a pain 😄
i always confuse BlockState with Block Data
biiiig pain
they have similar names for the interfaces
yeah it's a pain
BlockData is weird and I don't get it
BlockState makes sense, but BlockData just seems weird
BlockData basically is "what you see" (e.g. a stair is left/right), while the state is more like "the internal things", e.g. how much redstone power does it have, what are the inventory contents (if it's a container)
that's not 100% correct but it's a good approximity
ahhh i see
e.g. a sign, it has text - the text belongs to the BlockState. But whether that sign is facing EAST, WEST, etc, that's part of the BlockData
private boolean isMatureWheat(BlockState state) {
if (state.getType() == Material.CROPS) {
byte data = state.getData().getData();
return data == 7;
}
return false;
}
I hope you go, let's test lol
is there a specific reason why you use 1.8? in 1.13+ you'd just cast the BlockState to Ageable and then check if getAge() >= getMaxAge()
creating rankup server for Brazilians who like 1.8
I would change to versions 1.13+, but they like 1.8, I don't know why
Its Brazil so they are likely all cracked
Price of tech and games down there is crazy
bruh tf so BlockData is block state and BlockState is the tile entity state
BlockData is what vanilla calls block state, yes
and BlockState is the block entity data
the BlockState interface existed long before 1.13 when the concept of (vanilla) block state was introduced
unfortunate naming
oh true ig direction was stored with magic value shit before 1.13
which was called block data
id call it TileData tho or some shit like that
when those interfaces were named, mojang maps were not available
they only released them in 1.17 IIRC?
theyre called block states in the json and shit though its basically common knowledge now, and the term tile entities has been around forever. ig its because block states didnt exist before 1.13
I am facing a probelm can someone help please?
18:46:09 [INFO] [BHARAT_OP] disconnected with: Could not connect to a default or fallback server. Incorrectly configured address/port/firewall? io.netty.channel.ConnectTimeoutException
18:46:09 [INFO] [BHARAT_OP] -> UpstreamBridge has disconnected
Just a wild guess, but this is probably due to an incorrectly configured address/port/firewall
Correctly configure your address/port/firewall
Im guessing that your bungeecord config isnt setup properly
Btw this is a question for #help-server
Couldn’t they just use tebex wallet like bbb
I would like to send a packet on a custom channel to a player when they join, from the research I've done it would seem I need to setup NMS but I can't find anything on doing that for 1.20.1, only 1.18 and below
how would I setup nms for 1.20? with maven
?nms
Whats your goal for that?
Also you probably just want to use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/plugin/messaging/PluginMessageRecipient.html#sendPluginMessage(org.bukkit.plugin.Plugin,java.lang.String,byte[])
declaration: package: org.bukkit.plugin.messaging, interface: PluginMessageRecipient
https://github.com/enjarai/do-a-barrel-roll#thrusting
I've only ever developed mods, not really touched plugins since 1.16
thanks
Hello, i have a nice shity issue related to how i coded something. Atm im not sure how the heck im going to replace the placeholders from PAPI inside the custom menus. Because so i far i designed a system for loading the menus, adding the items and the actions. But now, i just realize how i would replace papi placeholder, because the papi methods needs a player to apply the placeholders 🤔
Please reply or tag me if you have any idea because i can see the message fast, thanks
Make each menu tied to a viewer
Replace the placeholders for the player thats viewing it?
Also for some placeholders you can pass null. Actually most should handle null players.
Or if you really care much, replace all the placeholders in all the items when you render the menu to a viewer
Hello there iam trying to make something , so i have this interface :
it extend a BaseProfile which have a UUIID and String .
and the GameModeProfileDAO is being implmemnted in 8 diffrent Profiles types ..
my question is how i can make a addProfile which each profile implementd have its own hashmap with uuid , profile .
- load from mysql
- load in hashmap
what i want to do now is :
A DAO should be stateless.
saveProfile should be generic and take T and the key
Or if the key can be derived from T then only T
the save works fine , my problem is with loadprofile and then accpet
i want to make it so it load all of the profiles for this uuid
add them each one to his own map
You need type inference and unsafe casts for this
can you show me an example?
I asked the same thing a day or 2 ago and I am sorry but I’ve forgotten what you said. So ima ask again if that’s okay. If I have 9 150x150 servers running on a pc. Will it be any different to running 1 big world?
Yes. It will use much more resources.
First i would strongly advise you to make your DAOs stateless. They should not have a map.
A type inferred unsafe cast could look like this:
private void loadProfiles(UUID playerId) {
for(GameProfileDAO<? extends BaseProfile> profileDAO : profileManager.getGamesLoaded()) {
Class<? extends BaseProfile> type = profileDAO.getProfileType();
CompletableFuture<? extends BaseProfile> profileFuture = profileDAO.loadProfile(playerID);
profileFuture.thenAccept(profile -> profileDAO.addProfile(type.cast(profile));
}
}
But let me double check
What resources would it use a lot of?
that's not really gonna work for me
this being implemented in 8 diffrent profiles types
CPU and Ram
Im writing a moch up. One moment.
oky thank you
just to let you understand it :
this is for example the pvp profileDAO
btw, what is a DAO?
Ahh, so the mediator between saving and loading data from a certain data-source?
yes but not exactly ik there is a better way to do it using redis , but i never worked with it ..
But that matters only for the implementation of the DAO, not the structure itself
?paste
But if I have a dedicated pc were I just gave these servers everything it should run fine right?
Here. This works by using a runtime type cast:
https://paste.md-5.net/dujenememu.java
How to use Brigadier ,_,
quality comments
Just doesnt belong in a DAO but whatever
Why isn't it in the manager then?
Or where else would you recommend putting it.
Not in the DAO
?
Depends on your PC
Well it would be a mini pc
Print out the id variable
Depends on which mini pc
Send your specs and we can give you advise
I’m not sure of all specs but I think it has like 128Ram
Somthing massive
i know what the id variable is
its in the command, its only with b:3:1
if i do it with a different name, its just fine
Nope. Brigadier is the internal command dispatcher of mojang
I would probably suggest another command library first. Unless you really need brigadier features.
If I wanna make a quick command I just use skript 💀 99% of time
What do you mean by different name? Im missing some context here.
Print out the id variable for the case that false returns.
i know what id is, its the exact argument (3)
String#startsWith works fine with the argument being "b:test"
oh ok
I dont not modify the arguments of the id variable
it does indeed print out "b:3:1"
Buddy, a number like that wont help us much.
We need the type of CPU and how much RAM your PC has.
Also which type of hard drive (HDD or SSD).
You can look this up in windows via the System settings.
ok i understood what did you did , but in the load / save method
for mysql
so each profile have a coonection to mysql
and each profile have diffrent values to loadded / saved
And for this you should get true if you call .startsWith("b:");
Thats why the DAO is abstract
When I try to print out the names of these blocks they all come out as white wool? Why does this happen? Im on 1.20
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
my fault
System.out.println(modItem.getItemStack().getType().getBlockTranslationKey());
#getType()#name() just prints WOOL
you forgot an api version in your plugin.yml
thanks
Azu typing a book by the looks
Yeah
https://github.com/NerdNu/BeastMaster/blob/master/src/nu/nerd/beastmaster/BeastMaster.java#L1068
so my server admins put together a custom mob spawning plugin that replaces all mob spawns and checks if a new version of a mob can spawn somewhere by getting the mob position, and going !isPassable on the next block upward -- therefore "spawn mob if, if a block is here, it is also in the list of passable blocks", but trapdoors aren't in the list apparently.
unfortunately there's a creeper mob farm design out there where you can prevent everything but creepers from spawning by filling the head space with trapdoors, and I've discovered that this works out to "since the plugin replaces all natural spawns, it will always return false in this design, therefore no spawns"
is there a good way of checking the head space of >1-tall mobs that will take trapdoors into account? that I can pass on to them?
Hm, let me think of one that doesnt impact performance for too much
Hi 7smile7 do you suggest a better system to load the diffrent profiles?
Making this dynamic is a bit expensive to be honest.
There might be something you could cook up with the collision shapes or ray tracing.
yikes
Better than what?
Take a look at the nms spawn implementation.
idk is the system i made very good? there are few things i can't do ..
DAOs are a perfectly fine abstraction for data access. You should be able to do anything with this.
how about hardcoding a list of closed trapdoors, like (forgive me for pseudocode)
height = <2 &&
block={
list of trapdoors in upper position}
return true}```
feels like a plausible inelegant bandaid
I thought about that as well. But you would have to check the state of the trapdoor as well.
hrm
is it possible to always set the player's max health to 20 even if he has custom attribute gear i want his max health to be 20 i tried looping through all players every second and setting their health but when i wore a +100 heath helmet it just gave me 50 hearts that are always empty
Do you just want the hearts to always display as 20hp (10 hearts)?
no i want his actual hearts to always be 10 not just display
Then dont add health to the player...
ok i might sound stupid but how about just displaying the hearts to 10 and show the actual health in an action bar
I dont... understand. I asked you if you wanted to always display 10 hearts regardless of how much health the player
has and you said no.
10 hearts with 100hp would mean each heart displays 10hp
so uh
Isn't that like hypixel skyblock?
idk how to explain this
yeah
basically i wanted to set the player's health to cap at 20 so i can calculaate the dmg my self
so basically i want to just display the hearts
as 10
Like showing the actual amount of hp in an actionbar and then do maths to find out how many hearts to color
You can call Player#setHealthScale(double scale) with 20 for example.
This way the player will always see 10 hearts regardless of how much hp the player has.
Those hearts are scaled as a percentage of the players health.
@Subcommand("give")
public void onGive(Player player, @Optional OnlinePlayer target, int amount) {
}
any1 know how this would work in acf?, like how can an argument not at the end be optional
its just going to try to resolve the amount to the target if i leave it out isnt it
This looks like it shouldnt work
well i havent tested it but im afraid it wont yea
am i forced to have optional args at the end?
ah yea the documentation even sais so im just blind
How else would you resolve the parameters? There is no way to check if an optional parameter
was left out in the middle.
nothing a bunch of if then elses can't fix :kappa:
;d
orrr wel i can switch them around
thats not that bad is it?, give 1 Player
its fineeeee
I would leave the server if i had to use a cmd like this
notlikethis
Cant you make a union type for this?
Union<K, V> PlayerOr<P> extends Union<OnlinePlayer, V> PlayerOrNumber extends PlayerOr<Number>
kappa
There must be a better way to handle this in acf
might as well use dfu for this
yea i was thinking that as well but ig not
Why is everyone so keen on this?
Its just an over engineered way of translating schemas between versions
anyone know why the client doesn't receive the custom payload/plugin message. I don't feel like I'm missing anything obvious from the docs
https://hastebin.com/share/vocegugade.java
Why the fk would you do that?
i just love seeing InjTagged<PStore.Instance<Traversable.Mu<I, J, K>, X>, Y.ListTraverser<T, O, L>> across my codebase
it was passed into a runTaskLater before, I omitted it but didn't bother to change the method
Anyways, did you listen to the right channel on the client side?
The plugin messaging channel.
"I got that CS degree and i'm god damn sure i'll use all of it"
I have a mixin that prints any incoming channel:
@Mixin(ClientPlayNetworkHandler.class)
public abstract class ClientPlayNetworkHandlerMixin {
@ModifyExpressionValue(method = "onCustomPayload", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/CustomPayloadS2CPacket;getChannel()Lnet/minecraft/util/Identifier;"))
private Identifier printChannel(Identifier channel) {
System.out.println("Channel: " + channel);
return channel;
}
}
And that prints out other mod => mod channels, can't figure out why this one doesn't get recieved
The plugin messaging channel is already implemented in the current notchian protocol
That mixin is the exact receiver for those packets, it works with the minecraft brand one, so I know it's working as intended. Issue is with the server sending it
[16:35:33] [Render thread/INFO] (Minecraft) [STDOUT]: Channel: minecraft:brand
Well, minecraft:brand is the wrong channel, no?
o.O Are you doing this in Fabric? If so, tf you using a mixin for?
They have a networking API
Forge also has one
iirc (craft)bukkit expects the client to send the channel name via a custom payload packet under the channel minecraft:register, so something like c->s send("minecraft:register", "my-cool-mod:uncool-channel")
yes, I am aware, I have a registered endpoint for receiving, just want to print out anything to make sure it's received
then the plugin can use it
Okay... but why are you not doing that via Fabric's networking API?
It will handle channel registration for you
iirc it's under the ClientNetworking class or something like that
yes, I have that all setup on the fabric side
public class ServerConfigUpdateClientFabric {
public static void startListening() {
ClientPlayNetworking.registerReceiver(DoABarrelRoll.SERVER_CONFIG_UPDATE_CHANNEL, (client, handler, buf, responseSender) -> {
ServerConfigUpdateClient.updateAcknowledged(buf);
});
}
}
fabric -> fabric works fine
I am trying to make the plugin for non-fabric servers
Did you register an outgoing channel on the Bukkit side?
this is the entire plugin: https://hastebin.com/share/vocegugade.java
How to use abstract classes in plugins correctly?
ignore the unnecessary runnable :P it was just there for when I was using runTaskLater
I would personally opt instead of registerGlobalReceiver() because the registerReceiver() one invalidates between sessions iirc
I've never found that it works the way that I expect
I switched to registerGlobalReciever earlier to see if there was any difference, prior to making the print everything mixin, and that was not working either, but that was because the client is never sent the packet anyway
I guess just make sure your channels match correctly and that you've actually invoked the startListening() method on the client. I'm really not sure how else to help
the channels not matching doesn't matter atm, any packet sent on any channel will be printed, issue is it's not being sent. Well thanks for trying to help anyway.
Well a good place to start would be to have the same channels 😛
it was before, I just set it to garbage to prompt the error message that happens when you recieve an unrecognised channel
inside client custom packet reciever
I have a PlayerInteractEvent and a PlayerInteractEntityEvent that both fire when someone interacts with an entity how do I check in the PlayerInteractEvent if they are interacting with an entity?
I dont want the code to run if they are
how can i make that the TextPane cover the empty space?
Depends on the layout you're using
what?
Uhhh, @tender shard knows a lot about GridBagLayout.
yeah sorry I'm insane and use whatever layout BuildTools uses
I think with GridBagLayout, you need to define constraints using GridBagConstraints. I think #REMAINDER would fill out the space.
GridBagLayout is cursed
Swing in general is cursed
it does matter, cb will not send the packet for a channel if the client does not register the channel to the server
what is framland material in 1.8?
Well I have had it both as the exact channel and garbage and neither are received
And I have the client register the channels in the mod
With the minecraft register packet
I know this works fabric -> fabric, it just doesn't seem to work for plug-in -> fabric
It does work you can take a look at Chocos Veinminer plugin: https://github.com/2008Choco/VeinMiner/
check the Player#getListeningPluginChannels set
what is framland material in 1.8?
i dont know
it doesnt exist
if the client is sending the registration, the channel will be in that set, if it isn't there then something's wrong with what the client is doing
Probably some state of dirt?
how can i cancel all sound for a player
Isn't there a stop sound packet?
like i want to cancel the player death sound im making instant respawn
Doesn't the doImmediateRespawn gamerule cover that?
You can't stop all sounds iirc
Just send them all. :kek:
just 1 i need
Well what sound
The death sound
can you remove nbt data
From?
nice website I wonder if you're ban evading
dont seem like it
How do I check if a spigot server is part of a bungeecord network?
Why does it matter
Im going to use a messaging channel if it is
ig it rlly doesnt matter if i send and its not part of bungee
yeah true
If you have a bungee cord server idk if it’s just me but I can suggest having a back up hub. So if you have lets say a server like hypixle and it crashes. Instead of kicking everyone of the games and lobby, they get taken to the back up hub/lobby. This way ppl don’t leave
What?
How does that relate
i know the answer to that one!
Please do not attempt to help by providing completely unrelated info that no one asked for
I was only suggesting?
u realize most ppl in this channel are devs not server owners
comparing to hypixel while only having like 2 servers doesnt add up
Hypixel doesn't manually setup their proxies either
Alr I’m sorry
rlly?
And their extra redundant servers aren't there for crashes, more that their traffic is wide enough that a single instance can't handle player spikes
All automatic
hypixel is so ahead of the game
yeah but a lot of stuff they have is pretty special
They have the budget
they actually did a dev blog post at some point explaining how their proxies/servers work
you think they use mysql, mongo or cockroach or different
dont they use influx for a lot?
no clue
mygodbroach
think of how much data storage that would even be
SeaweedFS for bucket storage
wouldnt it be redis bungee fork
If you set up a .jar file correctly will it auto create a file on server restart? Or do u have to add that?
auto create what file
So the file chat you can enter and have all the other info
I’ll get an example rq
a config file?
Grafana for monitoring all their stuff
Mans pulling up random folders and tossing keywords and a question mark
yeah
What?
It wasn’t random it was my plugins folder
I don’t think makes sense
Hurray
Thanks
Except you aren't even asking about programming
I was asking about a .jar file
grafana is so helpful
It's nice
i use it on a server i develop/admin on and we use it to monitor so much
I wrote a guide into how to do graphs with influx
Need to update it to support profiling methods n shit
Hello, I'm trying to move the head of this entity (allay) down a bit, as if it were reading a book. However, I've tried various ways to position its head like that, but it's not working. Can you help me?
Im tried to sum yaw 180 and nothing
should i put spigot.jar or buildtools in the ide?
gbl are like gradle
very powerful
very annoying
a pain in the ass
but I'm gay so I'm into that stuff
gridbaglayouts are like oldschool webdesign where you use a <table>
<blink>
Spigot isnt an uber jar anymore.
You can still depend on jars but you would have to find the right ones.
I would recommend using maven.
?maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I send a plugin message like this. These are both in same spigot plugin and the goal is for the plugin to send the message and for bungee to forward it all and the servers that have the event run
Player player = event.getPlayer();
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Forward");
out.writeUTF("ONLINE");
out.writeUTF("BungeeCord");
ByteArrayOutputStream msgbytes = new ByteArrayOutputStream();
DataOutputStream msgout = new DataOutputStream(msgbytes);
try {
msgout.writeUTF(player.getDisplayName());
} catch (IOException exception){
exception.printStackTrace();
}
out.writeShort(msgbytes.toByteArray().length);
out.write(msgbytes.toByteArray());
event.getPlayer().sendPluginMessage(vantageStaff, "BungeeCord", out.toByteArray());
System.out.println("Sent message");
but this never runs
@Override
public void onPluginMessageReceived(String s, Player player, byte[] bytes) {
this.vantageStaff.getLogger().info("Received a message");
}
I register the incomingChannel and outgoingChannel in the constructor of the class for those 2 snippets of code
can someone help?
Ignore
spigot instantiates your plugin on load, but intellij obviously doesn't know that so it says "hey this isn't used"
btw MyFirstPlugin pls
do i have to 😟
kk
?conventions you should follow these
oh ok
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
DataOutputStream dataOutput = new DataOutputStream(outputStream);
dataOutput.writeUTF("PlayerRankAdd");
dataOutput.writeUTF(e.getUuid());
dataOutput.writeUTF(e.getRank().getName());
Bukkit.getServer().sendPluginMessage(plugin,"SyncData", outputStream.toByteArray());
this code works properly when theres a player online on the server but it doesnt work when noone on
u using plugin messaging?
yes
bruh
Yep
thx
if you really need to fix that i would reccomend to use some sorta external system like rabbitmq or redis
would dummy players work
depends what you mean by dummy players
basically it has to be connected to the server through the proxy for it to work
because thats how the proxy recieves the messages, intersepting the bungeecord plugin messages
manually creating a player instance?
How to get a list of a world's entities when the server is enabled? World#getEntities returns an empty list...
?
Who are you saying that to?
Oh I see what you mean
You can only get entities in loaded chunks
If chunks aren't loaded then no entities
Oh - that's the reason I get an empty list then.
I guess I'll have to create a listener for ChunkLoadEvent then
?help
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous usernames, global display names, and server...
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
a
ono
why isnt this code working?
it seems to not send the plugin message at all
Your ram consumption would go to the moon if it'd have all entities loaded
i uploaded my project to another computer, and the new computer tha thas the project like isnt recognizing im using minecraft development, everything is red, how can i fix this?
You should find out why and what is "red"
What IDE are you using? what's the error you're getting?
https://imgur.com/a/CYA8w0e intellij
The image cannot be found
...
issue is in my modules under project settings it didnt carry over the dependencies and i have no idea how to fix this
are you even using a build tool?
yeah my other computer is linux though if that matters
which one?
please show your pom.xml or build.gradle
lol it's a tiny pom.xml 😄
you only have 1 dependency and that's spigot, does maven show any problems with it?
try to reload the project with maven
there we go thank you
how do i delete a bossbar?
BossBar#removePlayer(Player) if you want to remove it for one player.
or
Bukkit#removeBossBar(NamespacedKey) if you want to delete it entirely.
thanks
wait but if i have a bossBar how do i access its namespaced key
You'd have to use KeyedBossBar if you want to get the NamespacedKey tied to it. Otherwise it doesn't have one.
can someone help me regarding bungee fix I will pay 5 $
help i'm a bit confused. This is the block regen code. I'm confused what each Time variable is responsible for? It's just that all this will be configured, but I don't know what is responsible for what
I know but I don't know what it will look like
their interaction
what
every X seconds all blocks will be regenerated. Each block will be regenerated every Y seconds - this true?
Hi, how can i convert the longs into countdown for the scheduler (i don't want to do 2 schedulers but one in this way i can check for the mobs and time)
My logic is:
if Cracker is Years then years are minutes and months seconds
if Cracker is Month then months into minutes, days into seconds and years if detected into hours
if Cracker is Days then days into minutes, hours into seconds, if month is detected as month and years same logic
if Cracker is Hours then Hours into minutes, minutes into seconds, if days into days etc...
how do i iterate through a loop of NamespacedKeys? provided by Bukkit.getBossBars
for (Iterator i = Bukkit.getBossBars(); i.hasNext();){ // Iterating through all existing boss bars (keyed boss bar as we need the namespacedkey attribute)
KeyedBossBar bossBar = (KeyedBossBar) i.next();
Bukkit.broadcastMessage(bossBar.getTitle());
if(bossBar.getTitle().equals("Elder Guardian BOSS")){ // If it's an elder guardian boss' bossbar
Bukkit.broadcastMessage(Boolean.toString(Bukkit.removeBossBar(bossBar.getKey()))); // Then delete it
}
}
this is my code
final int[] countdown = {start};
new BukkitRunnable(){@Override
public void run(){
//do stuff
countdawn[0]-=1;
if (countdown[0]==0){
cancel();
}
}}.runTaskTimer(Plugin, 20L, 20L);
i already know how to do a cuntdown but convert them into minutes etc..
as i explained here (even the logic)
ohhh
Is there a reliable way to get how much disk storage is currently being used with a MySQL database?
SELECT table_schema, sum((data_length+index_length)) AS B
FROM information_schema.tables
GROUP BY 1;
This recommended way doesn't seem to return what I am expecting. I'm looking for realtime numbers and when I add data to the database, the number stays the same for some reason.
is possible to make a countdown with instants?
You realise databases may over allocate
Or preferably do so
I was kinda assuming that, but I was expecting that to be some way to determine actual used space.
I guess a pre allocated/cached value is fine, but I just want to know the circumstances it's under.
https://stackoverflow.com/questions/14714750/how-to-get-true-size-of-mysql-database/21169120#21169120 at least tries to include the free size
Well, that's interesting.
can there be bugs in such dependency?
so
i added scoreboardtag to an entity and in another class checked if that entity has that tag and send the message but its not working
i even tried with pdc
Are you strictly dealing with longs?
help why map is void
probably because your listener isn't registered
#help-development message - this is can be reason?
Is it possible to change the path from witch an Inventory gets it looks ?
I know you can change it for all if you have a recourcepack and edit the files in asset\minecraft\textures\gui\container
But I want to add a container and want to open that if the Invenory the player opens has a custom Name
You can use items in the inventory to apply a texture
or use custom text in the title
It does depend on what version you're on
1.20
bugs may occur if you create an object 2 object in the constructor 1 and put an object reference to 1 in the constructor 2
?
this is not a cycle, but the creation of an incomplete object inside another
What is "incomplete object"
Can someone explain me what I did wrong ?
https://paste.md-5.net/jasogevupi.php
What if I register BungeeCord channel for plugin message multiple times?
Why are you using CraftPlayer to get the player profile
does any1 know why my gradle build script completely breaks after each intellij restart? im forced to delete my .idea folder and then it will work again on the next open
dont understand
Try asking Paper
that makes absolutely zero sense
this is not a spigot question to begin with
so if ur going to answer that dont bother at all
You're using their plugins and most of us use maven here
You will get a better response there
no harm in trying is there
I want to get the CraftPlayerProfile and if I use player.getProfile() i do not get the right CraftPlayerProfile
You're calling the same method
Just one with CraftPlayer which is the implementation and Player which is the interface
The methods do the same thing
okay
Bro I added a scoreboard tag to an entity and checked 8f that entity has that tag in another class but it's not working
I even tried with pdc
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
?paste
how i can get break block ? blockBreakEvent not give me block
it does
^^
Event#getBlock
BlockEvent#getBlock 
i checked in debug and it returns block after it was broken
?paste
Looks like you're never adding to your map when it's empty
So it will always remain empty
yeah no clue what that empty block check is for
this just log
ah
well this nevermind bc this will regen if map not empty
and the map itself is filled in the event
but for some reason, when I break the block, i was get air
How do you know you get air
here
That's not in the event
wym
Hello. How can I get text (around 5000 letters) from player?
getting Block is a bad idea?

.
Holding the reference to a block is a bad idea
what use
data?
end material?
You're checking the material so store the material
?
It does but you're still hard-referencing the block
Not only does it cause mutability issues (probably why your checks are failing) but you're also keeping the block (and world) in memory
So if the chunk (or world) unloads you have a potential memory leak

how can i send a plugin message using a simulated player connection instnace
Mans trying to bypass the bungee thing
aaa block contains a link to the world
That's not how it works
Plugin messages are weird
The spigot instance sends a packet to the player
And bungee intercepts that packet
If the connection is simulated directly on spigot, it won't ever reach bungee
tldr use redis
ok
Boys n girls any idea where I can look for paid devs?
?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/
^ They have annoying minimum requirements
if you look for a beginner, pick me
if you look for an certified expert, dont pick me, im too lazy
You can contact a dev in the offering section
without meeting requirements
No not really
It's always like
"I have 1 year experience"
Small plugin - 50$
And either the most beautiful thread design
or comic sans
And it's completely impossible to tell because the really good devs don't do much to show their experience
and the complete beginners often lie
forum or helpchat
Saying they got 19 years of experience because they played minecraft back in the womb
mcmarket 
i wrote my first compiler when i was 5
I have 6 years of java because I played minecraft.
(it worked just in time and ahead of time)
Started to dabble in minecraft servers when I was like 9
time to say I'm 18 with 12 years of experience 
so when do you wanna start to get good?
I’ll write in the forum I guess
mmo core
lmao hope you have those 10 grand
I wrote bat files when I was a kid.
Half work is copy paste
yeah sure buddy
yeah sure
Bros typing like he got more insight than me
ok
Bro invented my issue boards
maybe because we do this for a living?
Bro actually inside my brain
he underestimates my 3 days of programming
Im a Softwareengineer man i also develop for a living I’m just tryna save some time no need to be a dick xd
actually 4
oh it doubled
because i wrote a multithreaded 🧌 ddos tool (in gta) 🧌 ||in bat||
my life is over
ping adress
ping adress
ping adress
is drinking underage bad
Nooe
Nope
he started with 9
ah ok
Everything legal when pooolice not there
here you seen an example of "legal cocaine"
depends where you live
Lmfaooooo
Xd
how can I get a region by all its locations, I heard about some way there is something to be divided
just ask good questions ffs
??????
how to get Protection Region with 1 location without FOR using Map
.
region with 1 location?
thats one block then
shit my scroll wheel is dying
in short, there are all sorts of skywars, I heard that the island is received there through the Map
getting a protection region from where?
should I pay 30$ for a new mouse
I use the g502
might just get the wireless variant
I love wireless mouse
I still use an M705 Logitech
blew on it and it's much worse now
my batteries last around 2 years
bluetooth mouse will never beat wired oen
it's not bluetooth tho
then whatever current wireless technology is used
ok, here's a shorter question how to get region without this method
how to optimize
ehh worldguard api is weird
what you mean
its annoying to work with
barely anyone understands it properly
and if you dont they scream at you on their discord
what??
What's wrong with that method
let's start with that
Is it giving substantial performance issues?
yes
did you benchmark it
because there is for and the volume of the region can be large
hashMap is better
but
how to connect
Mans worried about time complexity
while holding hard-references to blocks n shit
You guys wanna see a huge tantrum? https://www.spigotmc.org/threads/why-didnt-hypixel-just-do-this.456246/
Just found this gem
considering what kind of event this is, I'm sure it's a bad way to get
for example, you will immediately understand whether playerMove is bad or not so blockBreak event too
LOL
"Hypixel really needs to stop using Java for their projects because it's old and inefficient."
use python instead
it requires a lot of resources, and if the breaking of blocks is fast and a lot in 1 second, then the server may crash
so fast and modern
It’s interesting that schematic files are potentially smaller than their format
Wonder why
Let's use rust
no
well, schematic files give flexible on the one hand, but you can argue with anti-cheat
Schematics and their format are wildly different
While schematics just hold a palette, dimensions and a huge array of palette indexes
Their format also has to account for lighting and all that
oh
Ah it holds lighting
Is it really worth the extra storage to not calculate that on load
Yeah that's their "extra" tag
hmm, I wanted to try something to make my schematics
public class EntityEvent implements Listener {
@EventHandler
public void OnBossKill(PlayerDeathEvent e){
Player player = e.getEntity().getPlayer();
Entity killer = e.getEntity().getKiller();
if(killer.getScoreboardTags().contains("s")){
player.sendMessage(ChatColor.RED + "YES");
}
its not working
i gave that entity a scorebaord tag in another class
show code where you add the tag
hey, I found the setMaxStackSize() method while coding. does this also apply when putting items in as a player or does it only apply when setting inventory Items using code?
this would be cool
it won't work at all from what I know. If you want to change the max stack size for any given material, you can check out the source of my StackResize plugin https://www.spigotmc.org/resources/⭐-stackresize-⭐.102376/
Max stack sizes cannot be set to higher than 64, because the vanilla client woudln't let you stack items beyond this amount anyway. This might be possible in the future, though.
I dont need. When I need an modded client I dont need to implement this feature in my plugin.
lmfao
hypixel should move away from java and use public plugins that their paid devs have already made 100x better plugins of made for their exact server
yeah but it's fine to make other chagnes, e.g. to make ANCIENT_DEBRIS only stack up to 8, or make DIAMOND_SWORDs stack up to 16, or to make cookies stack up to 64, etc
okay, but I dont need this. thanks anyways
Did the client change? I know in the past in kind of tolerated stacks up to 127
that is still allowed but the client won't try to actually stack them itself
Ah
meaning you can only stack them with commands or by manually doing stuff in InventoryClickEvent etc
Still increasing some of the 1 stacks sounds nice
Potions stacking to like 4 or 8 sounds cool
WitherSkeleton ent = Bukkit.getWorld("world").spawn(player.getLocation(), WitherSkeleton.class);
ent.setCustomName(ChatColor.BLUE + "" + ChatColor.BOLD + "Ancient Wither Skeleton");
ent.setCustomNameVisible(true);
ent.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
ent.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
ent.getEquipment().setItemInMainHand(new ItemStack(item));
ent.setMaxHealth(2048);
ent.setHealth(plugin.getConfig().getDouble("Ancient.health"));
ent.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, Integer.MAX_VALUE, plugin.getConfig().getInt("Ancient.strength")));
ent.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, plugin.getConfig().getInt("Ancient.speed")));
ent.getNearbyEntities(30, 30, 30);
Double x = ent.getLocation().getX();
Double y = ent.getLocation().getY();
Double z = ent.getLocation().getZ();
PersistentDataContainer ancdata = ent.getPersistentDataContainer();
ancdata.set(new NamespacedKey(Bosses.getPlugin(), "anc") , PersistentDataType.STRING , "anc");
ent.addScoreboardTag("s");
there u go
i added tag there and checked it on other class didnt worked
yeah that's possible with STackResize. The actual code to change the stack sizes is in JeffLib though
yes
Ye
I remember setting it to max value and messing around
Didn’t really work in the inventory but I did stack thousands of items on the ground
The client sort of denies overwriting max stack size to a certain extent
WitherSkeleton ent = Bukkit.getWorld("world").spawn(player.getLocation(), WitherSkeleton.class);
ent.setCustomName(ChatColor.BLUE + "" + ChatColor.BOLD + "Ancient Wither Skeleton");
ent.setCustomNameVisible(true);
ent.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
ent.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
ent.getEquipment().setItemInMainHand(new ItemStack(item));
ent.setMaxHealth(2048);
ent.setHealth(plugin.getConfig().getDouble("Ancient.health"));
ent.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, Integer.MAX_VALUE, plugin.getConfig().getInt("Ancient.strength")));
ent.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, plugin.getConfig().getInt("Ancient.speed")));
ent.getNearbyEntities(30, 30, 30);
Double x = ent.getLocation().getX();
Double y = ent.getLocation().getY();
Double z = ent.getLocation().getZ();
PersistentDataContainer ancdata = ent.getPersistentDataContainer();
ancdata.set(new NamespacedKey(Bosses.getPlugin(), "anc") , PersistentDataType.STRING , "anc");
ent.addScoreboardTag("s");
someone help please
i added this tag to that entity
public class EntityEvent implements Listener {
@EventHandler
public void OnBossKill(PlayerDeathEvent e){
Player player = e.getEntity().getPlayer();
Entity killer = e.getEntity().getKiller();
if(killer.getScoreboardTags().contains("s")){
player.sendMessage(ChatColor.RED + "YES");
}
and tried to chekc if that eneity has that tag but its not working
pdc not working as well
then either you are not creating the entity you think you are, or you are not registering your listener
i did registered it and idk what u mean by the 1st one
a pdc can't "not work"
So either the mob you are using is not the mob you think you spawned
u can see in code i gave that entity a key value
or your listener is not registered.
my code is above
add more sysout debug
Wait
i added a key value and check if it has that key value didnt worked as well
You are letting the boss kill your player I hope
then how can i get the boss as killer
cast it ?
Get the last damage cause
Check if it’s an EntityDamageByEntity event
And then get the damager from that
?paste
You forgot to include jedis in your plugin
You need to shade it
so i need to use the shaded jar?
Maven?
?paste
how can i send some data from a bungeecord proxy to a spigot server if the spigot server has no players
You'd need to make your own sockets to send data through
is there no api or easier way then?
and security wise is there anything i need to worry abt
wouldnt bypassing that be a viable option (fake that via a plugin/edit the server software)?
You'd still need to make your own connection
The API uses the players connection to the server to send data
which is why at least one needs to be online
hm
You can use ssl if you want
Depending on what you're trying to do you can also use a messaging system like RabbitMQ or Redis pub sub
just trying to send an int in between servers
Anyone looking for a server crasher?
just while(true)
lmao
haha, that must be replaced to bukkit tasks right?
why even try sleeping at that point xD
yeah i dont know things like i have seen many, they even do it for scorebaords 💀
Instead of using bukkit tasks which are designed for that specific things
I have experience with Redis, what are you looking for?
im doing it w sockets
?
Is it possible to lower the server tps by sleeping the thread every tick?
why does my server just stop loading when it gets to my plugin it works fine with the normal jar but not with the shaded jar
is it memory problems?
How much do you give your jvm
minimum of 1024MB
and an unbound max?
2048MB
Its a bit tight but should be fine
the server just stops entirely during the start up process when it says its enabling my plugin
How does this 'stop loading' manifest? Ive never seen that.
what is the common interface between BlockPlaceEvent and BlockBreakEvent
e
just loads normally until it gets to this
[23:45:51 INFO]: [StaffUtilities] Enabling StaffUtilities v1.0-SNAPSHOT
then it just freezes
did you made that plugin ?
yes
so ur server is working great without that plugin
org.bukkit.event.Event is the only common interface of those two
well yea
bruh
its only when i use the shaded jar
cuz if it is then there is a problem in the plugin and since u coded it we dont know whats inside
dont use the shaded use the normal one
im using jedis so i have to shade
thats why intellJ better
The jar with the -shaded tag is the wrong one
when i use the normal one i get a classdefnotfound error
Don't use the one named -original
use the normal one
and if your still getting an error then must be problem with ur plugin and since u created it we dont know whats inside it
ok
Not sure it's an interface for those but you can try blockevent
Oh i was on PlayerInteractEvent. Did he edit this?
quick question, does:
player.isInWater()
return true if it is raining? or only if they are in phisical water
the latter
ok ty
how would I check if the player is standing in rain then? Like there is nothing above them, and they are getting rained on? Do I need to check the weather, then check the biome and then check blocks above them? It seems like it would be easier because riptide already does it...
java.lang.NoClassDefFoundError: com/mongodb/client/MongoClients
the 2 jars in my target folder is the original- and the one that got replaced wtih the shaded one
You need to shade the mongo client
Did you forget to shade the MongoDB client
how to do so?
Are you using maven or gradle
maven
Use the maven shade plugin
Hi, im trying adding into an Instant Months and years but they are not supported, how can i add them (i just don't care about being precise, because none gonna spent 1 month on the server non stop waiting or a year)
If you configure it to do so
what an avatar
xD
im using mojang mapping
❔
I did some shit with my partitions and I tried to run ddrescue to recover my data. It didnt finish because the output file didnt found enough space, but it has 854gb and my data had around 700gb. How can I open the .img file now?
Ill take a wild shot and guess that you need this?
Instant later = Instant.now().plus(Duration.ofDays(30));
Bro ist a plugin help
is it possible to get the action bar showed to the player?
probably fixing with localdatetime (just needing it to convert to EpochSecond)
yes
how?
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(text));
no i mean like
i dont want to overwrite an action bar if the player already has one shown
cuz it makes it look weird
u should use packets ig
[00:24:37 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[00:24:37 WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[00:24:37 WARN]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
what is this error
Messages are fire and forget. You have no control over how long the client shows an action bar after sending him one.
You could listen for outgoing packets and add a timestamp to track when the last action bar was sent.
Unless you are not using other plugins that use action bars. In this case you can just track it yourself without using packets.
why not player.sendMessage
you're holding the block reference
