#help-archived
1 messages · Page 135 of 1
Also class is not implementing listener
pseudo code
Anyways all other events work just not one thats ran in onDisable()
(1) Test it and find out
(2) To my knowledge, by the point of plugin disable, all listeners have been unregistered and there would be none to listen for it
If you just want to call your own api somewhere just call it from an injected instance or smth
You should also save regularly and not just on disable.
(1) Test it and find out
(2) To my knowledge, by the point of plugin disable, all listeners have been unregistered and there would be none to listen for it
I have tested it lol thats why I am asking if onDisable doesn't allow events to trigger.
And from my testing onDisable does not unload listeners unless you do that yourself.
It unloads plugins tho
How will you allow a plugin to listen to your event if it was already unloaded
Choco are you canadian?
the plugin can disable but still have its data during that event. after that event then I unload the apis data
But yappery, if you tested it you should know if it works or not.
It if doesn't work for you, big rip.
It doesn't. lol
Yes I am
do you recommend it?
i started a paper server and im not sure what is blocking other palyers from joining ive port forwarded and allowed java and minecraft through my firewall
This isn't the paper discord, but have you double checked if the port is open by pinging it @woeful ember
how do you recomend that i do that?
I always just use https://www.yougetsignal.com/tools/open-ports/ to check if my ports are open
Works all the time (make sure something is running on that port at the same time).
i nmap myself from my external VPS 👍 😎
xD. That's another way.
ok so its says that its closed how would i open it up?
when i go to my default gateway website and go to port forwarding the same ip and port are there so how would i open it
On my gateway I had to assign it to my pc specificly, you can try to do that
hm idk try searching for device specific information online
ok thanks for your help
is there a way to make it so that you can climb up any block as if there was a ladder on it?
Isnt that clientside
Hi everyone! seems like max-bulk-chunks is only for <1.9 spigot. Is there any equivalent for 1.15.2? I'm looking to limit chunk sends per packet.
How to save/load a schematic with custom meta data?
What does ping_passthrough do in bungeecord? The config says it passes the ping to the default server, is this the player's actual ping value?
Schematics are part of w/e's support forum.
ping_passthrough passes the proxy <-> client's ping for the backend servers, so yes it is the 'actual' ping value unless you've got some ping spoofing clients.
So server plugins will not be able to see the client's ping if it is turned off?
No it's about the server list details
Nothing to do about the player
@rigid zephyr later versions only ever send one chunk per packet, the bulk chunk packet does not exist
Thanks!
Guys I'm making an RPG System with custom Health and everything and I want to make Armor Stats (Bonus Health and Stuff) but I don't know how I would take away the Bonus Health again?
@fleet crane would there be anyway to limit chunk sends per second per player? or are chunk sends locked to one chunk per packet?
There are some f-words that do it
...will you call me homophobic if I say it?
What does ping_passthrough do in bungeecord? The config says it passes the ping to the default server, is this the player's actual ping value?
it's best if you keep it off
Bukkit.getPlayer(name).isOnline() who this error if someone is not online?
getOfflinePlayer()
ah ok makes sense lmfao
Also, if you're holding names as persistent data across restarts, don't. Only time you should be getting an offline player by name is from player input (i.e. a command)
yea, i am doing a nick command so i just needed to check if the player was on the network
would it error if they havent too?
It just returns a boolean. If they've never joined the server, it will return false
Still use getOfflinePlayer() though
can i get metadata from a different plugin that was set in one plugin?
Yes
is there any way to just run a bit of code syncronously from an async function without making a whole Task?
If you mean besides anonymous classes as well not that I know of
I'm gonna plug Aikar's TaskChain library it might be useful for what your doing
ok ty
how do i add meta data to someone and read it i obviously cant get it..
You would use a persistent data container, but as mentioned by Choco you shouldn't store a nickname in that way
I need help getting bungeecord to work. Everytome I connect to the proxy it tells me to connect to the proxy
wasnt storing it that way, i was just trying to figure out if there nicked. so that i can change their chat message.
Just have a list in memory?
Any idea what's happening here?
hey (sorry @grizzled hound for skip your question but idk)
Someone know where i can ask to delete my ressource ?
np
report it with "please delete"
thx
np
@grizzled hound are you sure spigot is imported ?
wdym?
and what spigot version do you used
1.15.2-R0.1-SNAPSHOT
i meant Are you sure that spigot is imported as a dependency (with maven, gradlew or manually)
yes
here it is in my pom: <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.15.2-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency>
why is discord formatting so bad
np
What metric is this burn time in?
Ticks? Amount of items it burns?
Looks like ticks
It’s usually ticks
i have the economy plugin, when i do /bal for balance, it says that economy doesn't work for this world
can anyone help?
try frConomy 👀
How do servers create "custom" entities? Basically I went onto a server with Dinosaur looking entities in the spawn and all I had to download was the resource pack. Some investigation made it seem like they retextured armor stands with specific items on their heads but I'm not positive on this, but I'm not sure exactly how that works.
Make your entity implement the custom entity thing and then follow the custom model tutorial I think
Heyo - Could someone lend a hand really quick with Bungee?
For some reason my ping is very high on my server
Even though my connection is not nearly as high
hmm... i'm getting "You dont have permission to access this server." with bungee when i do /server hub. I can through the console to send <name> hub and it works
I have bungee's config at default
You cant use the command?
@sullen spindle might be that the serverlist is a proxy ping and the in-game is a backend one
How can I lower the ping? It shouldnt be that high..
@sullen spindle You can't, and im guessing it should be that high, its like that for everyone.
So, the low ping is proxy? and high ping is backend
How can I display the proxy ping rather than the backend?
If I want to ./ping, it should show proxy right?
Shouldnt Ping Passthrough do this?
bah... figured it out... i had it restricted >.>
@sullen spindle the ping on the server list is to the bungee. The server you connect to when you join the bungee could be a server in a different location causing higher ping.
also ping is probably measured during the tick loop
hard to tell without knowing what is happening to measure it, ping isnt a builtin command
Shouldnt Ping Passthrough do this?
@sullen spindle Ping passthrough essentially just makes the proxy MOTD the one where the proxy is pointing to, instead of the MOTD set in config.
I think it also shows the backend ping too, rather than proxy ping
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
Spigot has a great resource under Tips, Tricks and Tutorials...
also on that same wiki is some stuff on plugins
in there you can find the stuff on configuration files
you can also refer to this site for some examples on the Configuration API
you can also look at the java docs on the ConfigurationSection
Hi, my stash account still isn't activated after a while after following https://www.spigotmc.org/wiki/cla/ after weeks. (Username Hex_27). Is there something I need to do first?
Hi i have two questions: 1. Must a OfflinePlayer be offline or can it be online? 2. How can i get a player instance just by their name?
Hi all I'm vergevaliant19! 👋 😃
I need some help navigating different minecraft modding resources so that I can mod my server for me and my friends. Is this where I should put related question?
Are you referring to Forge mods or Spigot plugins?
Trying to delete all entities in the world on disable
public static void removeEntities() {
for (Entity en : Bukkit.getWorld(Statics.worldName).getEntities()) {
if (!(en instanceof Player)) {
en.remove();
System.out.println("entity removed");
}
}
}```
@upper skiff you likely put fake info or info that didnt match your account
just looked, you didnt have ajira account matching the details you put inthe CLA
@fleet crane yoooo. I've tried to not spam you with useless "bug" threads :p
That 99% of the time are not bugs. Lmao
because getEntities only returns loaded entities
not every entity saved in the world
maybe you want to look into ChunkUnloadEvent and remove entities there
Do I fill it in again? How do I resolve it?
make sure you have a jira account and fill in the CLA using the same name+email on that account
yes
It asks for the Jira account, is the the full name or the username?
username
Does Skript have a location of player variable that doesn't include the pitch and yaw?
@fleet crane Last message I promise. I have done a ton of research online trying to get a grip with NMS. I am familiar with reflection - thats not the problem. The problem is, its a massive waste of time trying to figure out what the heck a method named a() does, and how it is supposed to be used in the rest of the class
I'm trying to figure out how to time-effeciently get a grip on nms, and how the guys over at bukkit and spigot (you guys) figured out how to wrap an API around that stuff
Hi i have two questions: 1. Must a OfflinePlayer be offline or can it be online? 2. How can i get a player instance just by their name?
@frigid ember Mappings.
They can be online. bukkit.getPlayer()
Is bukkit.getPlayer() returning all player which are on the server?
They use mappings. They can't use the 1.15+ vanilla server mappings, I believe the method names would be more decined
@frigid ember No. Bukkit#getOnlinePlayers does that
getPlayer gets the one you specify with name or uuid, getOnlinePlayers get everyone online
getPlayer() for online players, getOfflinePlayer() for offline players
ok
@steady cedar i’m not familiar with mappings, at least the ones you are talking about
Does offline players return also online players? There was a isOnline property i think
What does that mean exactly?
“Mappings”?
Found it: getOfflinePlayers()
Gets every player that has ever played on this server.
It gives names to obfuscated minecraft fields and methods.
Spigot as an ecosystem has relatively bad mappings, but HOPEFULLY mojang will stop being dicks and we can use their official mappings
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
?xy
Asking about your attempted solution rather than your actual problem
am i the only one that goes crazy when they ask for help but don't say exactly what we need to know at once? 😂
its not xy im just testing
cut the chase get to the point pls
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
?dogfacts
Greyhounds appear to be the most ancient dog breed. "Greyhound" comes from a mistake in translating the early German name Greishund, which means "old (or ancient) dog," not from the color gray.
retrooper lol wtf
?catfacts
Feral cats will go out exploring more often and much further than house cats. House cats can normally be found within the area they live.
🙂
No @frigid ember wtf makes you think I asked?
Good cuz I didn't even ask
And you aren't being asked
Ok. When i spawn a slime with CreatureSpawnEvent it spawn with size 16 (as i defined) But, if it die its childs is going to spawn with size 16 too. And it makes a infinite loop.
ok
` @EventHandler
public void GigaSlime(CreatureSpawnEvent e) {
if (plugin.getConfig().getBoolean("FCambio9") == true) {
LivingEntity lv = e.getEntity();
if (lv instanceof Slime) {
Slime sm = (Slime) lv;
sm.setSize(16);
double health = sm.getHealth() * 2;
sm.setMaxHealth(health);
sm.setHealth(health);
}
}
}`
this is the code
When new slimes are spawned
simplify by removing == true
check the spawn reason for the event then do something different if theres a reason for slimes?
No
It's not that
The reason is
When the slime splits
It calls CreatureSpawnEvent
Yeah
Yes
Where you set the size right back to 16
That wouldn't even help
Because the size isn't 16 when it splits
Is there a flag to check if it's been split or something?
Asking about your attempted solution rather than your actual problem
He's trying to make the parent size 16, and the children(split slimes) NOT size 16
So they divide as they always do
YES
parent size when created with a spawn egg, or spawned naturally, or when?
if the spawn reason is slime split, return
Oh Creature spawn event
lol
I was looking at entity spawn event lmfao
That's the correct solution
Thank you very much
Are you referring to Forge mods or Spigot plugins?
@zenith bluff Hmmm, well that's my first question. As I understand it they each offer new gameplay but Spigot is more lightweight than Forge?
One example of that difference in lightweight-ness:
- Spigot plugins repurpose core minecraft objects w/ server only (using
org.bukkitpackages likeorg.bukkit.inventory.metaand resource packs) - Forge mods add new minecraft objects w/ server & client (using packages like
com.mojang&net.minecraftforge, using decompilers and mixins/traits)
Do I have the right idea?
You do, yes.
Buuuuut in 1.15 you can do a lot of stuff involving the latter using the former.
Whereas spigot plugins only listen to the protocol of the client and act upon it, forge mods directly act on the client.
1.15 api so seesy
Well, that's the lower level I guess
sexy
@frigid ember Unlike you
OH SHIT LOL
@steady cedar I have stuff on my project that retrooper's brain couldn't handle right
His brain can handle it
just not read it
or understand it
well he can read it, just not understand it.
At all.
His brain would go poof
😂
😐
i am allowed to laugh
did i say i see you laughing
You wanna be the 🤡 of the circus?
no
Wanna be the guy who laughs at something nobody else does?
No you didn't because we were clearly not laughing
#general move
You do, yes.
@steady cedar Great!
Buuuuut in 1.15 you can do a lot of stuff involving the latter using the former.
@gleaming helm Whats an example?
Custom block and item models can all be done in vanilla using server-forced resource packs
There's some REALLY cool stuff that can be done there
Technically speaking you can very much implement everything that forge mods do with spigot.
It would be harder, no doubt
but with 1.15 it's become a greater possibility than ever before
Ah ok. To your point @gleaming helm wouldn't those models of a forced new resource pack overwrite the old item models? It's not like you could have both the original object & model and a new object & model is it?
Actually
Yes, you can have both
Minecraft 1.9+ I believe added the item durability change, so you can assign an item model to a certain durability
You cannnn
But that's for items with durability. Other world blocks, not really a similar hack is there?
1.14? Also added multiple textures without the durability system
Really?
What about blocks?
theres also the modeldata tag
Yoooo?!?
WOAH
And there are 159 unused blocks you can use
There's a trick with blocks
Because big mushrooms are weird
There's a trick with blocks to not even go into those 159 blocks
Armorstands?
Nah it's a little hackier
Armorstands are a good guess though
Do you have any resources, links, plugins showing what this might look like in game?
Close
@gleaming helm let me say it let me say it let me say it
Spawners
Okay
Yeah ok spawners you got it
Nah that’s no good
:3 ?
Still uses an entity
Why is it no good
with the custom models mechanic
The entity inside the spawner
It's a tile entity lol
Same exact performance as a chest lol
Not on FPS
that's such a miniscule drop it's hardly noticeable though?
Sorry bud but you have no idea what you're talking about
again
Same exact performance as a chest
I had a few hundred of them and it dropped my game to pretty low FPS
Then again that was in 1.12 I think
I’ll have to try it again in the morning, see if it works better now
he's doubtng me lol
something like that
Rendering the mob inside it still takes more resources than rendering a chest
https://www.youtube.com/watch?v=SLhudmYgmsQ
35:20
@steady cedar Ooh Additions API wraps that item durability feature nicely https://www.spigotmc.org/resources/additions-api.43955/
Don't need item durability past whenever CustomModelData was created
@gleaming helm aaah do you have an example of Spigot plugins that take advantage of CustomModelData?
Sure
ItemMeta meta = stack.getItemMeta();
meta.setCustomModelData(1);
stack.setItemMeta(meta);
That's all you need to do ^
what is custom model data
void setCustomModelData(@Nullable
@Nullable Integer data)
Sets the custom model data.
CustomModelData is an integer that may be associated client side with a custom item model.
Parameters:
data - the data to set, or null to clear```
Resource pack thing
javadocs bork
thats just javadocs being dum
the legend says once in a while you get quadruple nullable
the more nullable the more sure you are it's nullable
@Nullable[10]{@Nullable,@Nullable,@Nullable,@Nullable,@Nullable,@Nullable,@Nullable,@Nullable,@Nullable,@Nullable}
double nullable = nonnull
yeah but what if you got a triple nullable then it's nullable
the word is losing meaning
when you say a word a lot it loses meaning
nullable nullable nullable
ahah java 1.2 gang doesn't use annotations, real pro store a static final boolean field into the object called notnull
what is help chat without additional retarded messages?
can you even call it #help-archived anymore?
ItemMeta meta = stack.getItemMeta(); meta.setCustomModelData(1); stack.setItemMeta(meta);
@gleaming helm I'm just digging into the minecraft modding ecosystem, link to class docs so I can figure out what this means?
?jd
^
This isn't modding.
This is possible with a vanilla client and a resource pack
Plugin*
Thanks!
Also, what existing plugins that add new blocks this way can I install and see how they play?
have no idea
I think all of the existing block ones have a whacky bug when you place it
They call it "unfixable", but it's not unfixable
I have an NDA though so I can't tell you how to fix it.
As an employee of spigotmc?
There are also datapacks
Spigot is open-source and I don't think they make people sign NDAs
although i wouldn't really recommend them tbh
@fossil shoal People make others sign NDAs for plugins
I know, but spigotmc itself doesn't (afaik)
No, they don't, you just have to sign a license agreement
or something
to contribute
Thanks for pointing me in the right directions for spigot plugins so far guys 🤩
🤷♂️
Kevin are you also not allowed to tell what network you work for?
I'm allowed to say that but I'm not going to for the time being because it's not yet released
If people ask me post-release I'll tell
Okay, I just wanted to know if you are allowed to.
High profile networks are often forced to by mojang, networks such as Mineplex, high pixel, but that's only because they're given the means to use NMS 🤷
... no
You're nonsense @frigid ember
That's for the owners of said networks. I don't have any mojang info, but the person who I'm working for does.
Not at all, a license covers everything other than discussing possible methods for doing things, no NDA would mean the devs could go and tell people how to use NMS to do what they want 🤷
?
If your NDA prevents you from sharing info about bugs in the software that your job is built around and profited immensely off then I don’t know what to tell you
It's a precaution so that I don't get sued
"high pixel" lol
I’ll be happy to call them out on it though
Or does your nda prevent you from saying who they are
It's in the same sense that I wouldn't tell anybody public things. For all I know it could be allowed, but I'm not going to put my ass on the line legally speaking
It's also not incredibly difficult to figure out by looking at the behavior of said bug
Alternatively if you have nothing useful to say then don’t say anything at all
I was pointing out that there is a bug in all of these existing plugins, but it is fixable, so don't let anybody tell you it isn't
I'd argue that's useful information
Also it's not a spigot bug we're talking about
It's an implementation bug in some third party plugins
@gleaming helm You like open source software?
yes?
I like transparent open source software.
OOOOOOOOF
not halfway-open source software.
OOOOOOOOOOOOOOF
Alternatively if you have nothing useful to say then don’t say anything at all
I remember saying that on the spigot forums and getting a warning 😂
My wording may or may not included STFU, but oh well 😂
XD
I remember saying that on the spigot forums and getting a warning 😂
@hoary parcel already admitted that it did
Hey! I get NPE on this line: ((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); is it possible that getHandle() returns null or the playerConnection is null? (I check null for the player, and the packet is definied right before, so that can't be null)
is p null
you should be able to work out what is null just by looking at the stacktrace
Debug your code
not my plugin.
but this crashes our game servers in every half hour with entity tracking exceptions so it's pretty important
if this ain't gonna stop it, I don't think anything will
p.getLocation().getX() + radiusAmount/2
p.getLocation().getZ() - radiusAmount/2
If you wanted to make a 50 block radius around a player, would you work it like this to get the X point and the Z point?
so you want to make a circle "border" around the player , where the player is the center, and the circle has a 50 blocks radius?
Square border
But is that how you'd do it
I'm not sure whare are you trying to achieve but you may need something like this:
private final static int DIAMETER = 50;
Location playerLoc = p.getLocation();
int minX = playerLoc.getX() - DIAMETER / 2;
int maxX = playerLoc.getX() + DIAMETER / 2;
int minZ = playerLoc.getZ() - DIAMETER / 2;
int maxZ = playerLoc.getZ() + DIAMETER / 2;
Wouldn't you only need the Max X and the Min Z?
You're very funny
i'm pretty sure you also need those
Oh, so Max X and Max Z while adding half radius to the Y of each
let me do a better drawing that's shiet
That was a 2d painting for x and z, no y was included
Location point1 = new Location(maxX, p.getLocation().getY() + radius/2, ???);
.... y isn't needed Jan
he said he's making a square border, read his msgs.
Location point1 = new Location(maxX, p.getLocation().getY()+radius/2, maxZ);
Location point2 = new Location(minX, p.getLocation().getY()+radius/2, minZ);
That, makes no sense
why are you dividing radius by two?
There
To get the quaddiameter of course
From the player's location, a 50 square border would be 25 on point1 and 25 on point2?
(My maths talk is 👎 )
I don't think so? You said 50 so it would be (-50, -50) to (50, 50) taking into account position is 0,0, no?
I may be having a stroke
So
but you said 50 blocks away innit
50 block border around a player
my english maths must be autistic
because if you want a 50 block border
its not 25?
Do you wanna check if the player is in that 50 block border?
The total size of the border would be 100 if you do 50, 50 and -50, -50 correct?
yeah its 25 LOL
there's a simpler way
3 hours of gta isn't healthy
Gimme a sec to search what an apothem is
.-.
Ah got it
it's """the radius"""""
although it's not a radius since it's not a circle but whatever you got it
Ohhhh yeah igy
-25 -> 25 = 50
So point 1 would be 25, 25 and point 2 would be -25, -25
my brain is just liquid
Sure
this is basic geometry
if you want to check the radius of a circle do x * x + z *z > whatever point
I think I'll stick to squares for now lmao
dude wtf no
abs(centerX - playerX) > apothem && abs(centerZ - playerZ) > apothem
this returns true if he's outside
false if inside
correct me if you see anything wrong
@tiny dagger what are those weird chars
Imma have to agree with Idriz
can some1 edit me .class file only 2 lines?
abs(centerX - playerX) > apothem && abs(centerZ - playerZ) > apothem
@sturdy oar Isn't this for a square? I'm quite bad at geometry so I'm really not that sure tbh
ohhhhh nvm I'm stupid
how can i pay without paypal?
You can't.
:/
Or at least, not through Spigot.
how can i pay without paypal?
@near urchin through cash!
??
ermmm I'm just messing around
i think donation alerts.com might be an answear 🤔
alerts.com???
i think there are better lower tax ways tho
you can convert any currency into yours of choice with it which is pretty cool
Any idea how I can send like, things from a spigot server to the bungee proxy?
See more about "Plugin Messaging". This is a way to communicate between proxy and backend servers
Hello does anyone know how to add a specific head in a config.yml? How could I replace CHEST_PLATE?MenuBar: ClanItem: Use: true ItemData: IRON_CHESTPLATE MetaData: 0 Place: 3 Text: '&5Open clan menu'
I need help with my bungeecord server. I've had it as a private host (at my house) and people could get on it just fine. Then out of no where all of my perms don't work for bungeecord. Then about 5 days later, you cant connect at all and I did nothing to the configs or anything. Like in console there is no message of someone joining like there usually does. Please can someone help me? I get this error when I try to connect:
java.net.ConnectException: connection timed out:
Hello, I have a weird problem.
@vale vapor Add a "PlayerName" key and if the ItemData is player skull or something like this change the SkullMeta
Currently my server is running at 20tps, but everyone on is lagging
Everything is sent to the console fine, but it wont relay back for a long time
@sullen spindle Then it's your server connection
Where do you host it?
I'm using the heads from this website https://minecraft-heads.com/player-heads
Oh ok, well its water.
@sour gazelle Is you're proxy lagging when you type any command ?
How can I fix this
@sullen spindle Waterfall ?
@sullen spindle What do you mean? When someone place water it's not flowing normally ?
@sour gazelle Can't really do something for you :/
its flowing, but it causes lag on my server
You want to disable it?
Disable water?
Not really
I have a faction server so that wouldnt be very helpful
Then you can't improve it...
@undone narwhal Why not?
Are you using a spigot fork ?
Shark I havn't any information :/ Not either the hoster etc...
How would you like me to help you if you can't even use command
Yeah but: Computer ? Server ? RAM ? CPU ?
Film water isn't the biggest cause of lags. Something else should create lag.
Computer: Unbuntu
Server: BungeeCord
RAM: 3G
CPU:IDK how to check
How would I add this head does anyone know?MenuBar: ClanItem: Use: true ItemData: IRON_CHESTPLATE MetaData: 0 Place: 3 Text: '&5Open clan menu'https://minecraft-heads.com/player-heads/decoration/31169-winzip
So loading in new chuncks?
I'm having issues with my MySQL class reading from the config file, would anyone be able to help me?
?ask @full loom
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
Anyone here know about PacketPlayOutEntityMetadata?
It's a packet
i really need help with it
how i can make an entity position like bedblock position?
i think in newers versions there is a setposition
hmm
only in nms tho
long getFirstPlayed()
Gets the first date and time that this player was witnessed on this server.
I got: 1587038662452
How can i convert that in a human friendly date?
It's prolly unix time
?
Use the java Date class
talking theoretically, if I stored a player object in a map, the player leaves and then I later (whilst the player is still offline) try to change the gamemode of the Player object, would it work or would Player be null?
@left plover when the player leaves, I’m pretty sure the object gets deleted, so it will not be in the map
ok thanks
Np
stuff won't be removed from maps for you
it would have 0 impact, however, there are checks for if a player is online, not to mention their data is already saved to the disk
If you are storing the player you ae doing wrong thingies
so I should save it by UUID?
if you intend to persist the data, yes
Player objects are bound to that session, essentially, if you're sure you're gonna remove them from the map when they log off, not much wrong with storing a player in a map, but for longer, use a UUID, otherwise you'll be leaking memory
@chrome lark you sure? Because I’ve done that test and it seems to be deleted
I'm sure
oh okay, thank you
It would be pretty broken if a map started removing stuff from it on its own
(outside of weak key'd maps which do stuff to manage that)
Then why is it no longer in the collection when they disconnect?
what collection?
If you mean the getOnlinePlayers(), then, yea, the offline player will be removed
If there is one player object per player, spigot can remove that object
if you mean that you're tryna do something like get(Player), then the Player object is still in there, you're likely just using an invalid one
No, it can't
No
Once again, spigot will not manage your own collections
YOU handle what is held in your collections
Just because an object is invalidated does not mean your set is going to remove it automatically
In a static map, it should be removed from your map
No
i delete one object
This is a lack of understanding of how java works
Yes, if you remove an object from the map, it's going to be removed from the map
The server software will not automatically remove objects from your own collections, etc; that's not only practically unviable but stupid
No I just tested this, and I must have done the test incorrectly, as I had multiple online players, made a map of it, one left and then it wasn’t in the map anymore
So you removed it somewhere because I would put $100 on your players not being removed from your collections by CraftBukkit
I mean if he is using a weak reference the gc will set it to null
That’s not CB removing it though 😄
yeah sorry guys I was removing it
ikr
How do you save an inventory's contents to a yml file?:
yml.set("PlayerVaults." + uuid, rPlayer.getPV().getContents());
rPlayer.getPV() returns an inventory. But everytime i save it, it's an empty array.
Im building a plugin in eclipse and I'm getting
The type "Mypluginname" is already defined
any ideas?
Check to make sure that pluginyml exists once and has only 1 instance with the name defined in it
Then delete ALL instances of the plugin from your server (the config should be fine) and re-import it
you may need to stop/start instead of reloading
well my main class has the same name as my plugin
does that count as defining it twice
heres my plugin.yml:
main: com.gmail.(email).(pluginname)
version: 1.0
api-version: 1.13
commands:```
Are you getting that in your IDE or on Spigot?
IDE
Could you send your code please. You've most likely repeated a variable name.
Ok:
?paste
Do I send it in DMS?
I don't open my DMs.
Oh ill just send it here:
I just started making it by following the spigotmc tutorial
You do realise all the (pluginname) is supposed to be replaced right?
yeah i just edited it
Is there really need to censor the name?
¯_(ツ)_/¯
Can you just give it as it is as there's nothing called Mypluginname in there.
Also, why not just not use your email in the package name?
?
Your package name can be anything.
Anyone got an answer to my question?
What's your question?
How do you save an inventory's contents to a yml file?:
yml.set("PlayerVaults." + uuid, rPlayer.getPV().getContents());rPlayer.getPV() returns an inventory. But everytime i save it, it's an empty array.
@worthy lava
What does getContents() return?
IDK if Spigot knows how to serialize ItemStack objects when saving in a config.
It might do, but IDK.
I mean it can save ItemStacks now
Well if i put my package name as anything it just gives a bunch of warnings
What kind of warnings?
Cannot be resolved and string warnings
There are many ways of naming packages, all hopefully following some general standards https://zak.pink/2020/06/Colossal-Bagworm-7838.jpg https://zak.pink/2020/06/Total-Gander-7839.jpg
Could you send the whole warnings.
Yeah
Is it good to save player names? Or it is better to save their UUID or something? And can I store Players in variables?
depends on the context
if you're using a map
definetively use UUIDs as key
since well.. names wouldn't be unique keys
nope
there are users with different UUIDs, and same username
I made post so don't need to type twice
can give you a long list of them
So I can change my name to Notch today?
no...
Mojang is not dumb, but I understand
They are.
I have a problem in other versions the keeploadspawn of the multiverse towards removing chunks outside the range of vision but in 1.15 it does not work for me, is there any way to be able to do it? HEEELP :8174_KnucklesRoll: :8174_KnucklesRoll: :8174_KnucklesRoll: :8174_KnucklesRoll:
I have a problem in other versions the keeploadspawn of the multiverse towards removing chunks outside the range of vision but in 1.15 it does not work for me, is there any way to be able to do it? HEEELP :8174_KnucklesRoll: :8174_KnucklesRoll: :8174_KnucklesRoll: :8174_KnucklesRoll:
@fallow nest contact the developer
@EventHandler
public void onEnchantment(EnchantItemEvent event) {
Player player = event.getEnchanter();
}```
How do I reduce the needed xp level the bottom row which is normally 30, substract 1 from it
ty
been recently dabbling with nbt tags, found a way to add custom ones and i have managed to do it but right now i'm taking the tool out of the player's inventory and putting the nbt-edited one back in,
in this gif it isn't very clear because of the 8mb limit, but occasionally you see the item flicker, in game it does this every time which looks a bit meh, so I was wondering if there was any way of editing it in the player's inventory instead of replacing it
oh really? even with custom nbt data?
Well how are you adding your custom nbt?
Are you using persistent data (PersistentDataContainer)?
er, i'm using this I can't quite remember
1.15.2 has an API for custom NBT
Rather, it was added in 1.14.2
Also, yes, you do have to re-set the item in the inventory. ItemStacks are cloned when pulled from vanilla
It's mirrors nms.ItemStack. It has no handle
ah right, thanks for ur time :)
o/
Is there a way to detect to what slot an Item was moved when Shift-Clicking (e.g. armor/hotbar)
How can I have a block change when a Player login (and ask the server for the world)? Example I want every redstone blocks to be redstone blocks server side but bedrock client side
Use packets
Yeah i know
but it's probably not what you're need
you need to make a packet listener and filter\modify them
but the issue is getting the "event" when the world is "sent" to the client
I recommend ProtocolLib if you'll work with packets
ok
thx a lot men
ok so as said in the mais page of Protocollib: "Certain tasks are impossible to perform with the standard Bukkit API and may require working with and even modifying Minecraft directly"
i kinda expected something like that lol
I can also fork Bukkit
but i'll have to update the code manually
so It's a pain I'll use Protocollib instead
yes
good luck
protocolLib is pretty easy to use
at least definetively more than injecting into netty pipeline
yeah i can see that
there is a JavaDoc
and it works with maven too
which is cool
and there are some prebuilt jar too
nice
it is pretty nice 😄
my forests are constantly burning, but I don't want to ruin the vanilla mechanics. what is the implementation of putting out the fire automatically if it burns too much? can who knows the plugin?
interested in making the fire work normally until it burns too much
You can use this event : BlockEvent#BlockBurnEvent
On the JavaDoc: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockBurnEvent.html
yo so my server just killed itself
and some of the blocks generated by a gadgets plugin are still there at spawn
is there anyway to revert them back or no?
Would be helpful if we knew the plugin, but my default answer would be no.
How can you decrease the lvl required to enchant something with 30 levels to 29 levels so decrease it by 1?
It's GadgetsMenu, but i don't think I can revert anything
Didn't I answer that question earlier
Well the link https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/enchantment/PrepareItemEnchantEvent.html didn’t really help too much
How set the cost after getting the offers?
You listen for that event. The offers are obtainable with getOffers()
Entry 3 is the bottom entry (the one that often costs 30) though may be null if not available to the player. Once you have an instance of it, setCost()
You should understand how to read and navigate Javadocs to understand this for yourself. It took 2 clicks to get to that answer
3 clicks if you include clicking the link 😉
Anyone here experienced in world gen?
I'm having issues with biome transitioning
If you need some code dm me cause it's long
Is there a way to disable worldedit in survival?
i haven't touched my config yet so im a total normie at this.
Remove it
the plugin?
ya
Why do you want to disable worldedit only in survival?
If you just want the wand off /toggleeditwand
Assuming they are staff, can't they just switch their mode
I guess that works too
no he's talking about the wand
Ah got it
The thing is when i wanna test my own server as a default player and use the axe
so if a staff is in gm 0 he doesn't want them to probably f up when using the axe
i still recieve the worldedit
You need perms for the axe to work as wand
ya he just wants it disabled tho for that gamemode
but for that to happen he'd have to add code to world edit]
but I don't think people got time to decompile that and edit that code
Its open source, lol
why would you decompile it, it's open source
yes
I don't use world edit so
There's a few things in the world that suck more than WorldEdit's api docs
lol
I remember that one server owner came to swear at me and threat to decompile the plugin and edit it and before I could link the Github project he had left
They include genocide, death, wars, nuclear weapons, biological weapons
And RIGHT AFTER
is the worldedit api docs
wtf
I hope someone can help me with world gen tho
I didn't realize how fucking annoying world gen is xd
yeah lol
too much playing around with perlin noise for me
does flyingllama exist anymore? I hear he's the god at world gen
if someone can get me in contact with him I'd be happy as hell
Getting my console spammed with errors whenever loading chunks in a WorldPainter world
https://www.spigotmc.org/threads/loading-chunks-error.446733/
yo
so i have a mob (horse animal) stuck in spawn
that i can't remove
like i can't do anything to it
any help
./kill?
What is the papi extension to show the coordinates of a determined player?
@frigid ember do you have essentials
use /minecraft:kill @e[type=horse]
But the horse is spawned from a gadgets plugin
will that command still work?
since /killall mobs /killall named didn't work
And does that kill all horses, or just the horses in the world your in?
That'd kill all horses in the current world
Essentials' killall, WorldEdit's butcher, and more verify the mob is a natural spawn first
alright
This is a Java question, but I'm trying to create a /seen command and I'm having trouble saving a Date object to a file and then loading it on startup. I can do it, but the day/hour/minute/second values seem to be random. I tried using a Date object and then a GregorianCalendar object but I'm having the same problem with both.
Use ZonedDateTime and convert it to string and back, easy
I'll look into ZonedDateTime thank you
It has a parse, and a tostring function
Excellent
I’d use Instants
It's the same new api
Is it?
You can turn an instant into a zoneddatetime object and a zoneddatetime object into an instant
When they have time
yes
Free plugins don’t get checked iirc
suuure
Docker >
you gotta learn to manage the server
its yours, not anyone elses
google is your good friend in this case
dont pay anyone to setup the dedi either
youtube
or google
i mean if you find a good video it isnt
Learn basic UNIX/Linux commands before
you buy a book or read documentations
you dont know something if you dont learn it
Google is not retarded
i was able to learn everything from google
so can you
you can have direct contact with google
buy a Linux system management course them
there is a guide for everything in linux
You're not going anywhere if you don't learn stuff
Hard way?
you came asking for help, now you curse at us
sure
you cant even boot up a server in linux it seems
Instead of writing here insulting us , you could've already learnt how go setup SSH Keys and how to connect to your server
disable root login, create Linux user , install fail2ban, setup firewall, can all be learnt in a day
so apparently you cant cancel a block break packet once you break the block fully
This is #help-archived not #do-everything-for-me @ lenny
@wanton delta theres always a workaround if thats so
well
i obviously dont know what that is
cancelling block change and block break dont seem to work
uh so what is the problem, when a block is broken fully it doesnt cancel?
correct
i would expect the block to still be there
or act like BlockBreakEvent
but that is not the case
it just turns to air :(
weird
Easiest ban of my life. Someone shoulda tagged me lol
what is it you're trying to do?
Easiest ban of my life. Someone shoulda tagged me lol
@subtle blade who
The lenny guy earlier
Rip
lmao
only just caught up on chat
He was really rude
Do you get banned from forum when you get ban on discord Choco?
create 'fake' blocks via packets
No
You should make that a thing
'fake' blocks? As in... sendBlockChange()?
I don't know what that means

even if i cancel the packet
Am I the only one confused here?
They will turn into their original on interaction?
nope
on interaction is fine, i can cancel that
i am confused also
Then do not allow them to break anything
oh really
