#help-development
1 messages · Page 2284 of 1
yeah just note that the whole process is encrpyted and the trust is derived from the certificate which the client needs to have ahead of time
Yeah servers will automatically know the SSL keys im okay with that
not true
if someone wants to backdoor at least let them do it securly lmao
It's really great when every answer to your question is "you should have known how this API worked" like man I'm asking a question for a reason
theyre docs suck
wdym
obviously I've already looked into the shit I'm working with before coming here to ask questions
I guess tbf it's not always obvious that everyone does that because some don't, but it's just very annoying
sorry this turned into a rant I will stop now
idk why i found this funny asf, and now i wanna refactor my error handling system to be called "Tantrums"
trust can be derived in other ways other then a certificate. Which can be queried between each other. as long as everything matches up accordingly trust can be obtained
you don't necessarily need a cert ahead of time, having the cert just makes it faster on the verification process
Well both servers need the HTTPS keys
or else connection cant occur
but thats obvious
I was saying my method that I gave the steps for was based on that
IIRC for client socket libary im using for https connections i only need the ssl pub key
probs should use tls btw
for the initial connection yes pub key works
the initial connection, still isn't secure, because you still have no idea on who the client is
so, first step is a secure connection, then verification
if verification doesn't happen you terminate the connection 🙂
weird why does this seem so overcomplciated for wss connections wtf lmao: https://github.com/TooTallNate/Java-WebSocket/blob/master/src/main/example/SSLClientExample.java
How tf do browsers get SSL connections without doing all this
because browsers are not identifying themselves
oh
yeah the people here got really triggered when I used another thread in my plugin cus I was using a seperate thread instead of some complex rescedueling design where one task scheduels the next and I would need a new thread for the I/O operation anyways
the connection is secure, and the browser verifies you are connecting to the appropriate server
however, the server isn't verifying who is connecting
So for wss keypairs would i just share the same keypair with both servers for SSL connections?
no
The server would hold the private key
er, the client
the server gets the public one
host server gets private right
just like with browsers, you need the public key to verify who the other person is
weird cause this code looks like its sending a entire keypair
yeah over ssl a whole symetric keypair is made through some math bs
^
if I recall, the client comes up with a key and the server comes up with a key and they exchange
but the trust is derived from the client trusting certificate X and the server having the private key for Certificate X
the server still doesn't know who tf the client is untill some other form of auth is done tho
well that is how the client can verify the server, for the server to verify the client it is the opposite way around 🙂
isn't encryption fun 😄
for now im just gonna keep running my sockets in ws ill worry about making SSL sockets on deployment
Gonna start on cert system tho not gonna be fun
yay meth math
gonna need some meth for this ngl
Setting up a google oauth server was aids enough
ironically, the best one is weed
or just give up and distribute the same symetric key to all servers
meth would get you too hyped up and you wouldn't be able to process stuff
coding while meth
sounds insecure if that symetric key gets uncovered
weed slows everything down so your brain can process it even if you don't understand it. Brain just like goes AH I know this
naaah
i work better with hype
i listen to hardstyle while coding
the zyzz music
lmfao
yeah if one server gets hyjacked the whole operation fails at once
that is working, that isn't the same as trying to understand something and putting it into practice 😛
true
fortunately, you don't necessarily need to understand it yourself, your brain just does
but if they are all identical servers then it doesn't really matter cus they are all vulnerable in the same way
it took my a lot of careful thinking and thought processing for this auth server and i still dont have the JWT signing done
I needed the proxy before i setup jwt signing tho
not sure if you have had one of them moments where things just click and make sense, but at the same time you really don't know why
also gives you reduced cognitive function
well more in a sense, if someone cracks a pass to one server, they should have to spend the same amount of time cracking it for all of them
or bypassing
whatever tf they did
cracking would take centuries lmao
it can, not necessarily true for everyone
unless someone has a quantam pc in theyre basement
act like the ssh password/key isn't going to be the same on all of them

dont call me out like that
cause it is lmao
well from time to time, SSL ends up with weaknesses. You can't really call them bypasses either
hence why we have different SSL versions
hence why we use tls
Couldnt i just setup a packet processor and encrypt my packets
and that be the same thing as ssl
what do you think https is
brug
yeah but idk if it did anything special on top of that under the hood
cause i already encrypt my actualy json data fields
https can use either tls or ssl
but the entire json data string itself isnt
so my servers pass
{ action: "shdjahkda" } like so lmfao
also frost
x509 isnt native java lib?
x509 is a standard
examples i found online dont import hm
java should be able to handle it
lmao
bruh all example are bouncy castle
ah
cause they not publicly documented
so bouncy castle does it for you lame
lmfao java sucks
jdk 16 privates x500Name
honestly this server seems pretty normal, and to be fair to the general community of developers my experience is a one off and was only really caused by one dude who happened to be a worledit dev
some people are just incredibly elitist for no reason
I don't know how to do it
I will give you access of the server can you fix it for me my server is bedrock + java edition server on aternos
Are you wanting to fix a bug or make a bug?
stick around a little longer, it aint normal
example of what i mean
Microsoft java(C hashtag) user found:
I'll take that over condescending remarks in response to every question I ask after a 7 hour shift at work lol
so ez for commands https://paste.md-5.net/iyovifuliv.java (Dont shit on my code just showing the cli annotations)
typically people in here will answer you directly just as long as the question is asked right
That
Can you explain what you mean
I want to place it
by letting a place place a block?
uh
Cause i mean
on interact -> get location -> getBlock().setType()
that will work when I do like set type etc
yeah should work
i dont think it will remove it when setting its type in nether
yes for Place events
PlaceEvent will work?
well nvm cause
it would break if you place a block nearby i beileve
youll have to try and see
and no
Interact
its an ItemStack (i assume, ie not a block item)
wdym?
Water won't update if you place nearby
That like only check when place
It might because of state updates
like said try it and see
If it doesnt work youl have to setup a handler for canceling the evaporation event
not sure if an events called for that
one moment
Command - https://www.toptal.com/developers/hastebin/esumajukom.java
Event Listener - https://www.toptal.com/developers/hastebin/lovehebaqu.java
How can i make it so once a user clicks on the item, it gives the item in their inventory
Checked on another plugins source and it looks like all they do is setType
so maybe it wont update
Uh normal place is work
I'm trying playerinteractevent
InventoryClickEvent -> getCurrentItem (Its the clicked item in the cursor) -> get player inventory and addItem
cancel -> setItem to waterbucket
yes that what i was saying by setType
How would i get the player inventory?
get the clicker in InventoryClickEvent
getWhoClicked()
oh k
after set that won't working :C
anything else to get the inventory?
Player#getInventory
use
?javadocs
kk
?jd-s
^
this is a fake water
ok I sent
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
if (ItemUtil.equals(water.get(), e.getItem())) {
Objects.requireNonNull(e.getItem()).setType(Material.WATER_BUCKET);
}
in playerinteractevent
will that change it?
Should try it and see im not a compiler lol
But blocks fire BlockPlaceEvent last
anyway let me test
ok it weird more
It just placed the block and my item become water bucket
show the entire event
@EventHandler
public void interact(BlockPlaceEvent e) {
if (ItemUtil.equals(water.get(), e.getItemInHand())) {
Objects.requireNonNull(e.getItemInHand()).setType(Material.WATER_BUCKET);
}
// if (ItemUtil.equals(lava.get(), e.getItem())) {
//
// }
}
?paste
use that pls
Kinda is hard to read code in discord
But i can see what this is at least just barely lmao
your not cancelling the event
you need to cancel THEN set type
and remove -1 from players inventory of the placed item
setType won't let water gone
It should let water gone in nether
You need to handle that water yourself
If theres water in the nether you need to keep a referance to where that source block is
Because its not a natural occuring thing
also if you place water
you should call a state update and let the water flow (As it will just stay in the one block) unless thats intended effect
And the same when you remove it, call a block update to allow the water to drain as it seems it wont handle itself
Unless spigots doing something to prevent setType = water in the nether
I think I'll turn to playerinteractmanager
But I don't actually know what method is right click etc.
What is it for?
Look how they handle it
i know...
that repository is a plugin that allows placing of water in the nether
you can see in theyre code how they handle it
or just yoink theyre code for it
this looks like its the right class
same
also if your not sure BlockFromToEvent is basically a state change of a block when it changes types
careful using it sometimes its ridiculously spammy
but for your use its fine
well you could just cancel interact/place
and set type to water
i said that a few times i guess you missed it or something cause code you showed never cancelled those actions
My idea is
listener interact -> cancel -> setItem to water_bucket -> PlayerInteractManager right click to place
also im now realizing
something etc
ik why this code didnt work
- im stupid
your setting the type of the ItemStack in the players hand
not the actual Block
You need to get the location of the placed Block and then setType on the Block
- you need to cancel the event
That won't let water gone
because you need to handle that water yourself...
I'm trying simulation a place by player
So I look into PlayerInteractManager
my favorite activity is hitting invalidate caches and restart in intellij
@EventHandler
public void onPlace(BlockPlaceEvent e) {
if (e.getBlock().getLocation().getWorld != World.Environment.NETHER) return;
// implement better item checking
if (e.getItemInHand().getType() != Material.YOUR_MATERIAL) return;
e.setCancelled(true);
// remove one from players inventory from item in hand
e.getPlacedBlock().setType(Material.WATER);
}
its the same thing for interact if you use interact you just need to change a few things around
i do it at least 5 times a day
for something so good it fuks up so much
Is it really even good then
sadly
throw new Tantrum("sigh");
i dont make syntax exceptions
so idk what you typed
)"
I just had a thought, can stack sizes be server sided? Such as a chest can I set the max stack size to let’s say 512. Or is this only with mods?
Stack size or inventory size? You mentioned chest so confused for that
You can modify the stack sized past 64, its just they are buggy client sided
anything over vanilla stack sizes is rly buggy client sided
eg if you have a stack of pickaxes, pick it up in inventory, and place it back it will only place back one
leaving the rest of the stack on your cursor
I’m trying to stay away from player inventories rn as I don’t know much, I’m talking about like a normal chest.
it will still do the same in a chest
its all around buggy in any gui when over default stack size
Make a gui and just add that functionality to it you can pull it off with some lore persistent data and a click event
Yeah lore is best way to handle it
Okay, so couldn’t there be a method in a chest for when you click on the item it would give you a stack and keep the other 400 items stacked together in there. And then use another for adding item you’d shift click them into the chest and it gets stacked. Would that fix everything being buggy? As you only being allowed to take out a stack at a time.
Kind of
So like inventory has 400, you click it and it gives the player 3 * 64 of that?
You'd have to add event handling
That way wouldnt be buggy just make sure you give the player the default max stack size for that item and not 3 * 64 in one ItemStack
Yeah
I'd like to stress you can't actually have stacks of above 64 you need to add lore or something and handle it
Yes, so that way when your interacting with them you’d only get 64 at a time.
The stacks can be over 64 they just extremely buggy client sided
It's unstable and breaks apart on the client 🙃
So no point in doing it that way
Yep, but if you have it in a inventory with a event handler and the player isnt draging it around it would be fine
I guess
Just clicking it will be fine if its like a storage system but IMO
any number over 100 is messy
99*
makes guis look blah cause number spacing looks weird
especially once you get past 999 oml
so gross
Oh lol never thought of that haha
Like y2k said lores and pdc gonna be your cleanest method more than likely
plus players would like that more more than likely
Well instead of that you can just make the item one, keep everything stored in a persistent data container then in the chest only show max of 64 but the item meta would show all the items you actually have.
So you would see 64 items in the chest but then hover over it and see 2000
Wouldn’t that mess up the shift clicking tho?
And only take out 1 at a time?
well not rly
you can be like
if right click
take 32
if left click
take one
if shift click take 64
if shift right click take 9 stacks
This gives me a plugin idea ima make it tommorow
Yeah and just make an event for every action
Lol your welcome, I was just trying to sleep, and thought of this
I have no free resources yet I need to put some out
I want to post premium plugins when I can get around to it
Mchub has something similiar for their skyblock server they are called cbus and everything is just collected into millions
running setExceptionHandler on the current thread does nothing, why's that? (onEnable function)
can someone help how to get Build Path of bukkit 1.19?
My brain hurts trying to figure this out... i've been on about this for 30 mins now... can someone please tell me why "&" still appears in the hex colored msgs when i use this function and how i can fix it...
public static String hex(String message) {
Pattern pattern = Pattern.compile("#[a-fA-F0-9]{6}");
Matcher matcher = pattern.matcher(message);
while (matcher.find()) {
String hexCode = message.substring(matcher.start(), matcher.end());
String replaceSharp = hexCode.replace('#', 'x');
char[] ch = replaceSharp.toCharArray();
StringBuilder builder = new StringBuilder("");
for (char c : ch) {
builder.append("&" + c);
}
message = message.replace(hexCode, builder.toString());
matcher = pattern.matcher(message);
}
return ChatColor.translateAlternateColorCodes('&', message);
}
Why would you ever want bukkit?
What do want it to output? like an example
like just for instance lets say if i have a hex gradient going from blue to orange saying "test"
i want it to show the gradient without having a random "&" sign in the middle of every letter...
So it actually just shows that gradient..
I would send a picture of what im talking about with my issue
but i cant upload photos
cant not on windows
??
oh wait
i thought u meant like downloadi t
hold up
https://prnt.sc/aD30bfVPbiTt this is my issue... that i am trying to fix... that is hurting my brain..
i mean i know for a fact that lightshot is on windows and mac last i checked, not sure abt linux
replace the & with §?
np
we are not about to go on about the fact how i literally forgot the replace method existed..
even though i've used it like 50 times through out that function..
I would suggest to just use MiniMessage
what is that
What is the best method to check for a player being afk? Cause when using the PlayerMoveEvent it would trigger when someone hits him and it would say they are not afk anymore
never touch a working system
Ohhhhhh that is what u mean'
Tbh I don't like components too
did the system ever really work in the first place
Lol. The messages in Minecraft are natively components.
Using Strings is a dirty hack.
oki i c well that makes a bit more sense now
for using JavaPlugin normally i used to download bukkit jar file from spigot.org to code but when 1.17 > i can't do that ;-;
it no longer have JavaPlugin
imagine using bukkit
just use spigot-api, its basically bukkit
Either use maven or run BuildTools and get the spigot jar.
ngl if ur not using purpur or paper u literally have 0 knowledge on how to run a good server
and then it will just fail
well unless if ur making a 1.8 pvp practice server...
bruh i don't know how to use maven for Ecipse burh
which is kinda... terrible... but some people make their own server jars none the less.
just use buildtool there you get the spigot api
Then run BuildTools and use the bundled jar.
ok
maven on eclipse is just terrible
Anyone has an idea on that?
Theres no method to check
You need to do a combination of things
yeah that's what I mean with it :d
- Last timestamp of message sent in chat
- Last PlayerMoveEvent
- InventoryClicks (Optional)
I think thats all you need maybe
Check the incoming packet traffic
wont it always be sending traffic tho
Yes
How would I combine those? Cause a player doesn't have to chat to be "there"
so the player will never be afk 
Well you get all the times, and go by the most recent time out of all the times you collected from events
EG
I sent chat message at 4:43
But i last moved at 4:42
Its now 4:45 and i havent done anything since my last chat message at 4:43, therefore ive been afk for 2 minutes
Let's say another player hits you, that would update your last moved
my maths prolly fucked
just track everything the player does 
I would be "afk" for hours, still running around the server
any way to check against that?
Check incoming packet trafic
You can do this in a single class
When it comes to packets I'm just a noob tbh
Not rly because when you move PlayerMoveEvent catches it and cuts the afk timer off
Unless you know how to move without firing PlayerMoveEvent 
It’s trivial once you learn what packet does what
Is there like a nice table where packets are listed together with what they do?
little confusing though
Altho they might have different names when you code depending on what mappings you use etc
https://wiki.vg/Protocol#Serverbound_4
You would wanna listen for serverbound ones i beileve
Well if you use protocollib they should be named with enums
oops
I was gonna list out ones to listen for but tbh almost all of those require user input
hmm
minus the KEEP_ALIVE one
thats a heartbeat
itll always fire
maybe PONG too not sure
persistent beef container
Just keep in mind that the player continuously sends keep alive and player position & rotation
throw new TantrumException();
i wanna make a error handler called Tantrum just for the shits and giggles
throw new AutisticScreetchingException("REEEEE!");
error message would be like
"Exception in thread 'main' is currently throwing the following tantrum:
-> com.bullshit.othershit:NullPointerException - NULL CHECK YOUR SHIT REE
you could make that fire the window/linux beep sound
and just spam it before program exist
ngl i should do that with a dedi of mine make it fire the beep sound
wonder if thats possible
piss the people off in the datacenter lmfao
not sure if they have the beeper tho, my hp server at home has a loud beeper doe
how can I make all the monstaz go away from some coordinate
i m makin a scare crow
i dont think listenin for Entity move is something good (i m not sure if that event exists in the first place)
Uh might be hard to achieve with the api only.
typically that stuff is done with NMS
The only way i could think of is for Mob entities. You spawn an armorstand that floats away and call .setTarget(LivingEntity) on the scared entity, targeting the as.
oo ty
Hi, does anyone here know how I can make a custom night that is generated with a command or at least if it is possible?
As an example, /customnight y automatically spawns a boss bar and a night with a duration of 30 minutes and mobs now spawn with speed.
I would really appreciate it very much it very much, I'm still very new!!
Yeah seems moderately difficult. What version?
I'm making a custom logger and would be interested what do you guys think which events would be interesing to log?
BlockPhysicsEvent and PlayerMoveEvent
Currently I have player join / quit, game mode change, player death, player op and player deop
God logging BPE would crash a server no lie
SignChangeEvent might be interesting I guess
is it possible to create some basic plugins for a bukkit server running beta 1.7.3
💀
thats when I started playing MC
😴
Sure. All you need is a goat head, a pentagram and some blood of your firstborn.
and some ass hair of jesus christ himself
🤨
ayo
Do I have to check for empty strings on signs or are empty lines just null?
If I write smth on line 1 & 3 for example, is line 2 null or just an empty string?
debug it
1.18.2
hello, i am new to making plugins so this might be an easy fix. i get Cannot resolve symbol 'TowerCommandExecutor' when i make a new class for a command in my intellij idea messages
(im a noob at making plugins dont judge me)
Mind sharing some code?
getServer().getPluginCommand("mark").setExecutor(new TowerCommandExecutor()); if ur looking for the origin of error. i already made class in a separate file
Any ideas why java sb.append("| |\\n");
outputs | |
ohk
Where?
wondering whether it's a java thing or discord thing
iirc
ah rip
sending it through a webhook I mean
weird that a webhook message gets trimmed, but a normal message isn't lol
could be, checking that now
so, like this? getCommand("maketower").setExecutor(new TowerCommandExecutor());
still same problem msg
i did, yes
Did you import the command executor class?
hmmmm either yes or no... i use intellij idea so idk lemme check
im not very good at java i dont know how to import classes
theres no option for that
Actually I’ll link you a guide
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
First this
Ensure you follow it to the letter in principle
And then we’ll continue with the command thingy
But also it wouldn’t be dumb if you took some java classes online
alr
i assumed that since i already know javascript it would be easier to learn java since the code look alike
depends
what type of javascript did you do
nodejs? Yeah will make it easier for you especially when working with CompletableFuture's and Lmabdas
html js, p5.js, node.js
considering if you followed OOP in NodeJS it wouldnt be terribly hard to learn
Its just JS isnt very strict on types
while java is
youll probably struggle with that the most
yea i learnt some java through processing
Java is more intricate because it falls back on the fundamentals of OOP much harder
yep
But well any advantages you have will surely help
I tend to find myself writing java style whenever i touch nodejs lmao
🥲
just cause im used to it
You should learn about java classes realguystuff
i meant
javascript***
i made some js and java classes through p5.js and processing respectively
Of course you also need to learn the grammar, the lexical semantic parts of how to write things in Java, but knowing concepts help with that
also wtf are those green things? they always only go back to the same method o0
i would say bare minimum to know is all besides polymorphism and encapsulation
Doubt you would use those first day days of java, but good to learn it
Encapsulation you use a lot for things like user data
indeed but syntax wouldnt take too long with prior programming knowledge
it claims to "go to the implementation" but it doesn't actually do that lol
ctrl + click the method name
If you’ve picked the right filters
I believe
And well if there are any implementations
ctrl + click shows all usages and implementations
that only tells me "no usages" but there are at least 2 classes implementing this soooo
probably caches are fucked up again, yeah
my ctrl click fucks up a lot too like that
intelliJ is pissed at me because the PC was shutdown for 2 weeks, I guess
Is it source or compiled?
source
Odd
Kinda like intellij teling me onStart() is called but in fact it gets called through reflection
My constructor is intialized via reflection too
yeah it's really weird sometimes
ctrl + click shows no implementations or usages but blue = its usage in the project
unless intellij is mega mind and knows im calling it through reflection
It does if you adjust the filter
no like that methods not called anywhere directly
Its called using Method#invoke
cause the class gets loaded in via reflection
Depends, if you’ve hardcoded it even with method handles or reflective invocations it will show up more or less
But anyway Ctrl + click does show up implementations
Compile time ones at least
Oh actually
It shows up the look ups
Not invocations my bad
ohh
so that explains why reflective methods show used
Ye probably
pretty smart ngl i wouldnt expect intellij to do reflective lookups
prolly explains why indexing takes 5 years
Lol, well only hard coded ones so a bit limited but yeah, doubtful eclipse does sth like this tho
eclipse doesnt do stuff like that cause bloat prolly
🥲
The intellij ide for android studio is an older version of intellij
with all the old bugs of intellij
so annoying
hello i have a made 1.19 plugin but i want to make it for more versions so like 1.19, 1.18, 1.17. 1.16 1.15. 1.14 1.13 1.12 .1 11 1.10 1.9 1.8
how can i do that?
Develop on the lowest version you want to support
if you want 1.8 support your plugin api needs to be 1.8
and from there
1.8 - 1.19 will work
If your API is 1.15
then 1.8 - 1.14 wont work, but 1.15 - 1.19 will
i reccomend
dont support lower than 1.14
If its a new plugins I recommend supporting only 1.16.5+
facts
To support 1.8 spigot you have to build against teh 1.8 API and use java 8
There have still been several breaking changes since then
^
Sound enum, biome enum, etc
You have to extremely careful what you use
Nah
Spigot has some weird ASM to support legacy materials
weird i always got errors when using old Material enums on newer versions
unless i got them with string
Ppl in here said xMaterial bad
forgot why
i always jsut used the getMaterial was simple enough and returns null on invalid mats for the server version
I've never used it so can't comment
This is a very simple base you can build on:
https://gist.github.com/Flo0/7157f550c684fdada00dfc131d655a72
All this needs is a command that starts the blood moon on a world.
Well because its kind of a hacky workaround to support legacy versions.
Yeah not sure what it does ngl
i dont get why people jsut dont use getMaterial(String)
XMaterial maps stuff like legacy colors concrete to colored clay or sth like that
But else it’s pretty much useless in and out
oh does it mixin to Material?
yeah ive used it for years
Because it will pickup the material constants from the version you’re running on
Yee
unless you want lapis lazuli on 1.8 💀
Well, until you need to support legacy stuff and data values
💀💀💀
it has legacy option
Yeah it has a Boolean
not sure if that one is on 1.8 or not tho
might be
but who cares about 1.8
im convined that if your developing on anything under 1.14 that your new to plugin/java development
That’s probably a fair assumption lol
Where do you find good Java Devs? like I've tried fiverr (prob not the best plan)
?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/
Theres LOTS of good Devs, just none who are interested in copying the latest fad you have seen on Hypixel, for the hundredth time.
There is actually quite a cool mod pack where you start under ground in a stone cube and nothing else.
StoneBlock
"This modpack is kinda like SkyBlock, except you don't start with a tree and you're surrounded by stone."
how can I allow unsafe enchantments to be used in an anvil? I have given my players the ability to remove enchants off of the items. and some of them are level 10-20, but when they are added into the anvil to be put on something else, they only go to their level cap.
Mess with the PrepareItemAnvilEvent
Try tinkering with the PrepareAnvilEvent
Hy all,
Is there any book to learn spigot API ? The wiki is kind of hard.
Also is there any platform where I can find basic tasks snippets?
help all the plugins i add show this error
how can i set gamerules for generated worlds. I have a plugin wth /world create but there can still spawn mobs and fire tick is on and that kinda stuff
How can i disable certian gamerules
thx
i said all the plugins i add show the error and it even generated a file
Well there should still be something near the start of the logs
WorldCreator w = WorldCreator.name(worldName).type(WorldType.FLAT).generateStructures(false).setGameRule;
the last part is unerlined in red
but why
You need to make the world using it first
I used this when first starting
--> https://www.spigotmc.org/wiki/spigot-plugin-development/
Done with that
Your able to fit together what you normally need
If you need code examples
you can quite literally type
"How to do x spigot"
in google
make sure spigot is at the end
then do that ^ #help-development message
youll gets loads of forums results and other websites that show code examples from github proejcts
nothing
Bukkit.getWorlds().add(Bukkit.getWorld(worldName).setGameRule("doMobSpawning", false);
And why is that not working?
Im kinda dumb
lol
How is it not working
wait
lol
Bukkit.getWorld(String).setGameRule(String, boolean)
idk why your calling add()
dont do that
Bukkit.getWorld works fine for getting world
You should already have a world instance when making one with WorldCreator
yep
then yah what Col said ^
@noble lantern i sent you the screenshots
xd
?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 names and nicknames of a member.
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.
99% its ?link maybe
?link
Syntax: ?mydata
More information can be found in the End User Data Documentation.
3rdparty View the End User Data statements of each 3rd-party mo...
forgetme Have CafeBabe forget what it knows about you.
getmydata [Coming Soon] Get what data CafeBabe has about you.
whatdata Find out what type of data CafeBabe stores and why.
?mydata discord
Syntax: ?mydata
More information can be found in the End User Data Documentation.
3rdparty View the End User Data statements of each 3rd-party mo...
forgetme Have CafeBabe forget what it knows about you.
getmydata [Coming Soon] Get what data CafeBabe has about you.
whatdata Find out what type of data CafeBabe stores and why.
?mydata whatdata
This bot stores some data about users as necessary to function. This is mostly the ID your user is assigned by Discord, linked to a handful of things depending on what you interact with in the bot. There are a few commands which store it to keep track of who created something. (such as playlists) For full details about this as well as more in depth details of what is stored and why, see https://docs.discord.red/en/stable/red_core_data_statement.html.
Additionally, 3rd party addons loaded by the bot's owner may or may not store additional things. You can use ?mydata 3rdparty to view the statements provided by each 3rd-party addition.
xd
. ?verify
?verify
did you get a DM?
^
i think you need to set on spigot site then
!verify
Usage: !verify <forums username>
anyone know how to config Interactive Chat DiscordSRV to show inv , showitem , enderchest , etc . in discord chat?
https://www.spigotmc.org/resources/interactivechat-discordsrv-addon-show-items-and-invs-on-discord-preview-discord-images-in-game.83917/
it's !verify
there it is
yes
you use
uno momento
video should explain the process
its also how you do images in inventories
on hud
etc
Usage: !verify <forums username>
hi guys, how can i add my own plugin on spigotMC site? pls
sec
what did entity drops change to??
I'm trying to set mob custom drops
and keep seeing event.getDrops.clear()
then creating an item stack than spawning the item in, what did the drops change to? or did it get removed since 2017? i cant find anywhere in docs to see this. unless im blind.
i just want to have that fixed xd
i gave you the fix
What do you mean what did they change to
the fix is this
but also note what col said about WorldCreator
EntityDeathEvent#getDrops still exists
thanks
i dont have that button
are you on the right url
its this
help no plugins load in my server
and it still hasnt showed up
im pretty sure theres a requirement
but idk what itis
show screenshot of the page
and u can use help for that command
Nah no requirment
pleasehelp
i was about to ask that next
send error logs
of startup
not that plugin is disabled error you sent earlier
I dont help people in DMs only here
tf
yes but in here i cant send a screenshot
That way everyone see the solution and can help in case i do something wrong
Thats why i said to verify lol
verify
only so you dont have to look in your dm's xd?
!verify
Usage: !verify <forums username>
Time to make one then
where
at spigotmc.org ?
the more questions you ask, the longer it takes to get help
do you know what discord you're in?
This is terraria right?
i forgot to add vault plugin to my server
thought this was ark: survival evolved tf
This server is obviously a fanclub for the hit book https://play.google.com/store/books/details/Michael_Farlin_Rusty_Spigot_Dirty_Water?id=cDGeAgAAQBAJ
Rusty Spigot, Dirty Water: An Introspective Journey for the Offender - Ebook written by Michael Farlin. Read this book using Google Play Books app on your PC, android, iOS devices. Download for offline reading, highlight, bookmark or take notes while you read Rusty Spigot, Dirty Water: An Introspective Journey for the Offender.
ayy i love that book
I just read the abstract. Who has time to read this?
No one apparently since it has no reviews or ratings
!verify mrrioes
A private message has been sent to your SpigotMC.org account for verification!
there should be like an enum no?
rule is of type GameRule and not String
I'm writing a proxy which can switch connections between some hub server and a freshly deployed server on AWS, currently running into one issue. To swap the server the client connects to, I create a new connection to server 2 from the proxy, remove the old packet listeners/packet forwarding between the old connections and setup new packet forwarding to the second server. This allows me to be connected to server 2, receive player updates, send chat messages etc. But my client-side collision is still processing as if I were on the first world, even though world updates are processed on the correct server. Has anyone ever run into this issue? Is there some packet I could send my client to update its local interpretation of the world?
*Which is not an enum but has a lot of constants
and how should i type it know?
javadocs has all listed referance names
setGameRule(GameRule.DO_MOB_SPAWNING, false)
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/GameRule.html
Other available ones if you need later on
Bungee solves this by sending a world change packet to the player. This makes a server change look like a regular world change.
interesting, thank you, will look into it
Hey smile i remember seeing a plugin a while ago that was for proxies and when the server the player was connected to they still stayed in the world itself even tho the server was down
Any idea how that was accomplished?
I assume just sending packets from proxy to player as the server world
was a really cool plugin i wish i remembered the name
Neat was always curious how that was done it blew my mind when my ex showed me that lmao
i sat there for like an hour staying the stopped server 💀
anyone got a guide to custom persistent data types
Do you know where I could find the structure of this packet?
There’s an example here https://hub.spigotmc.org/javadocs/spigot/org/bukkit/persistence/PersistentDataType.html
Implementing PersistentDataType should be pretty straight forward. You just need to implement the methods
primitive -> complex
complex -> primitive
2 longs
primitive should be a byte array right
yeah I've been looking at this, was trying to find the exact packet on there but if you don't know from the top of your head I'll keep looking
just a primitive data type
thanks
alr thanks for help
byte array would work tho actually now that i think of it
not sure if pdt allows primitive arrays
99% sure it does
Yes it does
declaration: package: org.bukkit.persistence, interface: PersistentDataType
this and the other guides ive looked up use a byte array
How can I make some Fake tnts, they look like they are lit, and are bout to explode but dont really do any block damage
byte short int long float double String byte[] short[] int[] long[] float[] double[] (String[] ?)
2 longs written to a byte array will be smaller
and then convert bytes back to string back to the object you want
Thats just basic tho and not the most efficient
yee byte arrays are smallest iirc
The example on the javadocs should be fully working actually, if you want a uuid type
Spawn a primed tnt with a 0 explosion strength
me omw to change the whole JVM and java to just add bit
and my array aint smallest 🔫
How do yall find motivation to open your ide
does my complex class have to implement serializable?
why is this not working
1.8 moment
L
You need to use the old method that takes strings rather than GameRule
the problem is
not to mention
Also you should be using the 1.8 api
^^
^^
anyone know?
No
where can i change that
yep!
Its the import
yep completely right
your using in gradle/maven
using intelij artifacts lmao
you need to change the import in gradle/maven
and where LOOL
you can typically google "spigot <version> <maven/gradle> import"
its how i do it
theres normally a thread somewhere or a list of the versions from repo url
sonatype repo i think it is
if someone has the url they can send
you can view the version in a browser normally as a list of directories
Applied By
56738:
Sep 8, 2015 at 5:03 PM
