#help-archived
1 messages Β· Page 63 of 1
you need to get
but its still dum
the actual one
if you gonna hard code messages
at least use the proper char
or like, use the chat color enum like sane ppl
Yes mini, you make a class called C and declare static final variables and use C.Red C.Green etc
set level (getlevel-1)
Guys do you think this code is good for saving and loading my arenas/games
oh yes, sure, just fucking clone the chat color enum
for (Arena arena : arenas) {
int i = 0;
plugin.getConfig().set("arenas." + arena.getName() + ".prespawn", serializeLoc(arena.getPreSpawn()));
for (Location spawns : arena.getSpawns()) {
plugin.getConfig().set("arenas." + arena.getName() + ".spawns." + i, serializeLoc(spawns));
i++;
}
}
}
public void loadArenas() {
for(String arenas : plugin.getConfig().getConfigurationSection("arenas").getKeys(false)) {
createArena(null, deserializeLoc(plugin.getConfig().getString("arenas." + arenas + ".prespawn")), arenas);
for(String spawns : plugin.getConfig().getStringList("arenas." + arenas + ".spawns")) {
addSpawn(deserializeLoc(spawns), arenas);
}
}
}```
LOL
You could just do ChatColor.RED?
Ah yes that makes sense @tiny dagger thank you! π
C > ChatColor
import static ChatColor.*;
Probably gonna switch to the textcomponents next update tho
use mini message if you want text components but sane
text components are gonna be the future soon
no
not quiet tho
why?
Im jk
to both of you
i don't see it being that used still
So I have a question, do List implementation such as ArrayList use arrays to store elements?
for (Arena arena : arenas) {
int i = 0;
plugin.getConfig().set("arenas." + arena.getName() + ".prespawn", serializeLoc(arena.getPreSpawn()));
for (Location spawns : arena.getSpawns()) {
plugin.getConfig().set("arenas." + arena.getName() + ".spawns." + i, serializeLoc(spawns));
i++;
}
}
}
public void loadArenas() {
for(String arenas : plugin.getConfig().getConfigurationSection("arenas").getKeys(false)) {
createArena(null, deserializeLoc(plugin.getConfig().getString("arenas." + arenas + ".prespawn")), arenas);
for(String spawns : plugin.getConfig().getStringList("arenas." + arenas + ".spawns")) {
addSpawn(deserializeLoc(spawns), arenas);
}
}
}```
Are they good ways of saving and loading arenas?
gur.
oh
plugin.getConfig().getStringList("arenas." + arenas + ".spawns").stream().forEach(this::addSpawn(deserializeLoc(spawns), arenas))
javadoc "Resizable-array implementation of the {@code List} interface"
mmmh
I think its fair to say that the array list uses arrays
what
gotta find usecases to stream
that's cool
Syntax error on token "::", . expected
didn't knew either
hmmmm
plugin.getConfig().getStringList("arenas." + arenas + ".spawns").forEach(addSpawn(this::deserializeLoc(), arenas))
Ok dumb question but, what does :: mean again π
plugin.getConfig().getStringList("arenas." + arenas + ".spawns").stream().forEach(spawn -> addSpawn(deserializeLoc(spawn), arenas));
oh
kk
Thank you
I think it was added in Java 8 although I'm not sure
Stream was added in Java 8
The method deserializeLoc(String) in the type ArenaManager is not applicable for the arguments ()
it's probabily static then
nope
I'm just gonna do this
plugin.getConfig().getStringList("arenas." + arenas + ".spawns").stream().forEach(spawn -> addSpawn(deserializeLoc(spawn), arenas));
you can just method reference with arguments???
90% certain you cannot
i am making some sort of kill counter but since it might be called quite fast at a time, how should i save?
i heared something about Maps or so? like Map<Player, int> or something?
what is that saving method called so i can google a bit more
I would recommend using AtomicInt or Map.compute
compute is fine. AtomicInt is overkill
Its personal preference i guess
anyone know a way to get crackshotplus for free
like a dev build or something
map.get(player).increase()
im quite new to that
why are you turning the collection into a stream for no reason
Or map.compute((k, v) -> v++) or something
any tutorials?
computeIfPresent
Not always
i dont have any experience and dont feel like asking it here all
you shouldn't ask people in this discord because you will get what is known as bad advice
what in god's fuck
well i dont know
Just use merge lol
googling saving data to map but just get a ton of results containing "maps"
yea fine whatever
thanks
compute() even tells you in the docs to use merge for this very purpose 
some people dont read docs for every single thing they use π‘
I can't update my scoreboard without it duplicating whenever I use teams.
It'll go from Nickname: Straggly to
Nickname: Straggly
Nickname: test
Using o.getScore(Formatting.colorize("&8 ")).setScore(17); to update it
Do I need to clear entries?
some people dont read docs for every single thing they use π‘
YOU SHOULD OR YOU SHOULDN'T BE USING IT
:))
i mean you literally said If you know how to use compute You dont need computeifpresent
weaponized autism
bro chill
Im still right lmao
I mean in his context
You didnt need ifpresent
But yes there are times when you need to use ifpresent
weaponized autism
This is a sign of a weak mindset
Can anyone help with the scoreboard issue above?
We've mentioned what the issue was already.
Look at teams mate for the most successful help in fixing your issues.
Or show your code in how you are using it fully.
I am using teams
you can probably fix the issue with BiDnsQueryLifecycleObserverFactory::newDnsQueryLifecycleObserver
very obvious
π€
who choose that name should be fired
you'd likely need a custom plugin
to ban them on all servers except anything that is considered a "hub"
isnt << a logical shift?
yes
I started learning them and often see them even in plugins , expecially with chunks where i see << 4
Yes, because it's a binary shifting operator, you're shifting the bits to the left and leaving the ones to the right as 0
Well, sort of
oh, does the JVM work faster with these operators
I think that only holds true in cases where there's only 1 bit
Say you have 00000010 (base 10 is 2), shifting that to the left by 4 would give you 00100000 (base 10 is 32)
oh clear
<< 4 is used because it acts as a multiple of 16
Which, yes, chunk coordinates are just block coordinates / 16. >> 4 accomplishes this goal through binary operations
its just faster and saver
Yeup
They're super useful to know but it's rare that you'll actually find a use case for them in every day programming
bitshifting can be faster if you already know the bits you need
oh boy alot of spaghetii while working with persistentdata
why no PersistentDataType.Object reeee
Especially because if you just do something like System.out.println(13 << 5); it just sprints out some seemingly random number. There's a reason it prints what it does but if you don't understand what << is doing, it looks random
What do you mean, Stell?
atm i save a string wich i dissect to get certain info
You canβt just serialise any object in a persistent data container
You can create a PersistentDataType, yea
rly
well that wouldv been good to know fk me
Primitive is what it will save as in NBT (it should be some sort of base value - a String, whatever), Complex is the type you want to set / get
oh boy.. wouldv saved me quite some work
But youβll probably be writing the serialisation code using the existing types
sadly the deed is done..
Made one for NamespacedKeys a short bit ago https://paste.md-5.net/ubohozinar.java
not an ideal deserialization but it works lol
oh wow wouldv been so easy dammit
Can then just keep a constant instance of that object and re-use it
public static final PersistentDataType<String, NamespacedKey> PDT_NAMESPACED_KEY = PersistentDataTypeNamespacedKey.get();```
It's a Singleton
It is, you're right
well now my spawner holds a string of the type "name type 1 1"π
I did that to avoid constant recreation of that object. Could do the call to get() every time if you're like
I just learned today of that return syntax
Oh absolutely, yea. It's the bane of new programmers lol
cs.update();
pl.getServer().getConsoleSender().sendMessage("Found close spawner");
return true;```hmm
I saw that on the forums just today π
^ point exactly
I should be worried I've been using Java for more than 1 year now π
And didn't know it
If you stop learning, then you're probably not trying hard enough π
I only just recently wrapped my head around bitshift operators when I wanted to learn bitmasks
I wasted 3 day on natives I regret watching that tutorial
lol. Native methods are fun. Still want to dive more into that as well. My knowledge is minimal. I understand how to do it and how it works, just haven't spent time making anything using them. Use-case is rare
Had a project in mind though
Hey I'm making my server that is managed by multicraft and run on spigot. I have noticed that when you are only player in server, you can not do /seen bc it says that "Error: Player not found" but when you are more than 1 player it works perfectly. Is there a simple solution to this error? Pls tag me if you know.
/seen is a plugin command (likely Essentials). Thus Spigot has no control over how it works.
hi how do u get a new build of craft bukkit to stop the 20 second start up please
ok thanks im not the best with this sort of stuf
all you need to do is install "Git Bash" so you can use it on windows
i dont understand how you install that i cant see a link
thank you
it said Unable to access jarfile BuildTools.jar when i ran a commanf
command
i have a question, will 1.16 spigot be out as soon as it comes out or not?
?eta
There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
ok thx
@fervent sorrel theres not been many technical changes so my realistic guess would be very soon after the update
But thats me
Not spigot
yeah also work is already in progress on some things
it's not going to take like 1.13, but we don't know
cool, thx
hi will this spigot 1.15.2.jar run both spigot and bukkit plugins
thats what the code made
yes
thats the point of an api
bukkit plugins can generally run on all implementations
craftbukkit, spigot, paper, tuinity, you name it
thanks i never knew that
Hello. I have a NPC (entityplayer), but when I try to set the yaw of the body, it almost looks like the body's yaw is random, would you know why?
npc.setLocation(spawn.getX(), spawn.getY(), spawn.getZ(), 0, 0);
try {
Field field = npc.getClass().getField("yaw");
field.set(npc,(byte) ((int)spawn.getYaw() * 0.71f));
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}```
i'm pretty sure you said this already
i thought you fixed it by sending the entity rotation packet
why not use #setLocation(x, y, z, pitch, yaw)
setlocationrotation?
No, my problem have evolved Fr33
Because it won't work @pastel basin
body yaw is for sure client sided
connection.sendPacket(new PacketPlayOutAnimation(this, 0));
it's an animation?
No
you're punching
that's juste the body yaw
There's an API method for this
?
1.15.2 iirc
but does it work for npc (fake entities)?
but that's bukkit
Yea?
he sends a fake npc
Oh. Well look at implementation then
EntityLiving#a(EnumHand, boolean)
(for 1.15 - names may vary on other versions - i don't really care lol)
Also note that 1.16 will rename it to swingHand
Hey, in my latest.log is only "logging-disabled" how can I enable it?
^ 
Hero that sounds like a plugin because afaik there's no native option to disable that
Name changes are granted to donors
donate 10$
How do i donate lol
!donate
10 bucks?
yeah
I mean we'd appreciate more but yea, $10 is the minimum
It's a free, open source project after all
dam greedy xD
Not really?
Again, free, open source project
The amount of effort that goes into this project is astounding
imagine how much you would've spent on this project if it wasn't free
I'm not telling you that donating $10 is insignificant but some people see $10 and think "I'll donate the minimum just to get what I need" and see it as an inconvenience
So more is appreciated but you're fine if you don't want to 
its been like 7 months the last time i used spigot
@EventHandler
public void onSugarCane(BlockBreakEvent e) {
Block block = e.getBlock();
if (block.getType() == Material.SUGAR_CANE) {
int canes = 0;
e.setCancelled(true);
do {
block.setType(Material.AIR);
block = block.getRelative(BlockFace.UP, 1);
canes++;
} while (block.getType() == Material.SUGAR_CANE);
e.getPlayer().getInventory().addItem(new ItemStack(Material.SUGAR_CANE, canes));
}
}``` why isnt my code to gput sugar cane directly into the inventory working any ideas still sturggling with this problem.
Still having issues with that one?
yea
I'm just glad "Sponsored plugins" and "Sponsored listings" in forums, etc aren't a thing. Spigot is great how it is :)
no helpfull resource i can really find
i inserted checks and it runns all the way through whitch is confusing me
Let me throw this into a test plugin and see what I can muster up because to me, that should work
well it wouldn't choco
Oh you know what, I might know what's wrong
it needs to be the reversed way
it triggers phisics
If you set the bottom block to air, all the blocks above it are going to break
You'll need to wait until you're manually given the badge @frigid ember
It's in your preferences though md has to manually assign the donation to your account first, Greg so expect 24 hours or so
He's still asleep atm
Then you check the forums for the donator forum and change it there
If you donated with an email not associated with your account, create a thread in Donation Enquiries
I can see why md is asleep, it's 3am here xD
I thought that is going top bottom is that not what BlockFace.UP, 1 does or am i using it wrong
No no, that gets relative
You're starting at the bottom block and going upwards from there
use a deque list
^
store them first
Calculate which blocks to break in a queue, poll through that queue
FILO is what you'll want. A Stack, actually
doubt
Doubtful. Majority of those costs go towards running the forums, stash, etc.
md5 is a slave π¦
could i see a possible example of what your offering I'm rather new to spigot would like to kinda see what i'm supposed to be doing
This is likely what you want to be using
Keep doing what you're doing but instead of setting them to air, push them to a stack
Once you've finished filling that stack (the while loop terminates), keep pop()ing that stack until it's empty
Ran into a new dilemma: Instead of creating a new world directly and running whatever code I would need to run to generate my structures, I was thinking of simply copying everything from a "base" world folder (aka all blocks, their states, their command blocks and so on) and creating a new one.
WorldCreator world = new WorldCreator("new name for copy"); world.blocksorwhatever.copy("Name of base worlds data I want to copy"); world.createNewWorld();
Basically I will have one world that acts as a template for every copy I make, the only thing I want to change in the "paste" world
is that it gets a new UUID and a new name.
Does anyone know or can point me in a direction to make this happen?
@hallow surge here's how I would approach this
private static final Stack<Block> SUGAR_CANE_STACK = new Stack<>();
@EventHandler
public void onSugarCane(BlockBreakEvent e) {
Block block = e.getBlock();
if (block.getType() == Material.SUGAR_CANE) {
int canes = 0;
e.setCancelled(true);
do {
// Push the blocks to the stack from bottom to top
SUGAR_CANE_STACK.push(block);
block = block.getRelative(BlockFace.UP, 1);
canes++;
} while (block.getType() == Material.SUGAR_CANE);
e.getPlayer().getInventory().addItem(new ItemStack(Material.SUGAR_CANE, canes));
// Destroy the sugar cane from top to bottom
while (!SUGAR_CANE_STACK.isEmpty()) {
SUGAR_CANE_STACK.pop().setType(Material.AIR);
}
}
}```
(how does forEach() work on a Stack, actually? Does it pop?)
Looks like it doesn't pop. It's implemented by Vector which does not
So, yea, this is the way to do it
hello everyone i will find plugin like item lore stats who know plugin like this pl tell me thank
@frigid ember Think this guy might have sumn https://www.spigotmc.org/members/vk2gpz.617/ not sure tho
but its a place to look atleast
see if u find something of intrest
why don't i have someone to recommend my minigames :[
It is, yes π
i think java may have not followed their own is a rule with that one
Vector was pre-collections API
It stayed for forwards compat sake
Honestly at this point in time it's used mostly for synchronization but even then, it's sparingly used
I bought a plugin 6 hours ago and it hasn't been verified yet
@subtle blade thank you will take a look at it when im done playing my game π
also should probably get more background in java now that I'm getting to more complex code that I dont understand the java concepts of
It's alright. LIFO collections aren't super common. Stacks are handy in cases like this though!
I understand stacks kind of but not hugely
back to my java tutorials
π thanks for dealing with my incompitance
@bronze horizon would probably help if you showed what exactly you need help with
LIFO and FIFO are a weird concept to grasp. They make sense but even I have to think twice about which ones I need
lol
I like to think of Stack like a literal stack of something. The objects keep piling up on top of one another but in order to get out that item you put in first, because it's at the bottom, you have to take off everything else on top of it first
The last thing that went in has to come out first. Hence, LIFO
push() puts something on the stack, pop() takes it off
Yea! The pancake analogy!
the British refer to lines of people as a Queue
Does America not do this? o.o
No, they just call them lines
We use that as a quick way to reference it but queue isn't uncommon
really?
I mean we know its really called a queue but we don't say we are going to hop into the queue
americans are weird
Yea that's about how we see it, Frostalf
yeah Americans are weird I would have to agree
one of these days I will visit other countries
Visit Canada 
Canada - the nicer USA?
Pretty much, yea
yeah, I will probably visit the east side of Canada
West side of Canada seems to be more dangerous with them vanishing people on those highways to never be heard from again
Do people who hang out here get anything done other than chatting here?
no
Kind of Choco's job to chat here o.O
Highly recommend Vancouver (it's west but super, SUPER nice). Otherwise, somewhere in the marine areas are really cool as well
Yea I get things done lol. I have a job I go to, though aside from that I'm usually programming in the background anyways
yeah I get plenty done, except for the projects that are large
can't program for hours on end either
I'm just saying - went away for like 20-30 minutes while a few people were chatting here. And come back to see the same people π
that is just too much for me
That's about how it goes for me and the forums tbh lol. You'll see me everywhere I swear to God
I usually spend a few hours in the morning on projects, then I take a break towards the afternoon and then towards the evening I do some more work on the project.
but I have other projects outside of MC too
I try to do work for 8h a day. But I usually end up stumped with something and go to the forums to get my mind off of things
maybe I should be like everyone else and create a fork too >>
that reminds me I need to clean out my spigot workspace so I can get ready to start on that pr
kind of a mess at the moment and I am sure MD wouldn't be happy if I pushed something and there is all kinds of merges needing to be done XD
So I finally made my dream into a thing
o.O
vector already did that if I recall
not that anyone uses vector these days considering its on the deprecated list lol
looks cool :p
how to stop silverfish from hiding in blocks? Is there any event or attribute?
yeah
Maybe EntityChangeBlockEvent?
Ah I knew what you meant, I just misread at first
EntityChangeBlockEvent is a bit of an obscure event for that anyways
it does make sense
i googled it first but there weren't any results. By changing hiding to burrow i found it
Really? lol
There are perks to having British English nested into Canadian culture I guess lol
I mean the event name makes sense to me, but idk what else would fire it? Endermen maybe? idk
Called when any Entity, excluding players, changes a block.
thats not nice
They are not! :((
SHOW SOME RESPECT!
They're pesky lil' fuckers but they are useful! lol
idea is cool
the endermite is their cool brother
(they do really need some better use in the game though)
Someone make a plugin to make them cooler
but 1.9 combat made them too hard to kill
How do we make them cooler
i'm using them as rats in a dungeon
Nah. Sweep attacks are great
and using them as Ore Bugs for renewable resources
GAMING CHAT
I DID IT, CUSTOM ENTITYPLAYER FOLLWS A PLAYER NOW https://www.youtube.com/watch?time_continue=10&v=zvILvzQdU6E&feature=emb_title
cool xD
That's creepy 
Idk why I thought it was going to be so hard when it was just 10 lines
@Override
public void tick() {
for (Entity ent : getBukkitEntity().getNearbyEntities(10, 10, 10)) {
if (!(ent instanceof Player))
continue;
Location loc = ent.getLocation().clone();
getBukkitEntity().teleport(loc);
break;
}
}
wdym
the head looking the other way maybe?
I had this line
setHeadRotation(ent.getLocation().getDirection().getBlockY());
but I took it out
I don't understand
Anyone know how to download a worldedit for spigot
Ok
I agree with that. That way it will also support teleportation and checking nearby entities every tick isn't the most performant thing
Keep track of where they were last and teleport there
@frigid ember just download .jar and put it into plugins folder?
/rl
/r1
Then you're set to go. Start your server and it should work
any wierd stuff in console?
If not, you're likely using the wrong version of WorldEdit
hmm
oh ok
i'm making npc using packets but they disappear when you go far away or after some time. Is there any other way to prevent it from happening ||(other than checking is player is in range and spawning them again)||?
you need a tracker
nvm i just read spoiler||good job btw||
you can't without checking if in range
well... making them wasn't easy... 5h on main part and 10-12h on skins
adding dependencies to maven is the hardest part
adding dependencies to maven is the hardest part
eh
Someone should make a good tutorial on 1.15 npcs, because it took me way too long to figure out as well, and there are still a lot of problems
there is no big difference between 1.15 npcs and 1.12 for example
Well in general then, I can't find any custom EntityPlayer class tutorials
Its more complicated than extending the class
What i can say from my expirience:
- When sending packets to spawn npc, store id to later check which npc are you interacting
- By God... head rotation is confusing
- and skins...
Yeah forgot how i fixed head rotation tbh
The biggest struggle was to actually keep the damn npc there when a player doesnt see it
you should start adventuring into nms yourself btw @frigid ember
connection.sendPacket(new PacketPlayOutEntityHeadRotation(npc, (byte) (l.getYaw() * 256 / 360))); <- fixed rotation.
Oh yeah was something among these lines
or this connection.sendPacket(new PacketPlayOutEntity.PacketPlayOutEntityLook(npc.getId(), (byte) (l.getYaw() * 256 / 360), (byte) (l.getPitch() * 256 / 360), true));
it just work at some time i'm scared to change it
Anyone know how to get a MapPallet color from a block?
Yeah @tiny dagger I've just started with nms a few days ago
D e p r e c a t e d
Who needs Deprecated when you have the md_5 emote!
your suggestion is Deprecated..
Deprecated. is such a frightening word. I wanted to make custom crafting with custom items as input and BAM Deprecated. and few weeks spend on making my own system
Why is eclipse IDE exporting my Project in a folder calloed ExampleProjectName with a jar inside it called jar.jar instead of just exporting jar called ExampleProjectName
That's likely what you told it to export as lol
I selected export as jar
Yea but this destination https://i.imgur.com/ABEpf5d.png
That's where you specify the name
For whatever reason, when I do player.AddPotionEffect for Jump Boost during the playerjoinevent, it gives then immediately takes it. it's only jump boost, and if i give it with a command for example it stays. why
1000000000 for example, I give 3 other effects and they stay just fine
show the code?
Run it a tick later. PlayerJoinEvent is super picky about that
Integer.MAX_INT also nice
is there a pause in java? forgot
instead of just putting a big number
Use Bukkit's scheduler
Integer.MAX_VALUE btw :p
Is there any way to get the map color of a material?
is the "delay" in ticks?
Yes
Just 1 will be fine
Sorry I'm like half paying attention. Watching a buddy play in the Rocket League world championship 
yeah it works fine now with 40
the code you gave me isnt working for some reason? maybe its not being recognized?
need to insert my checks still
The one I sent earlier? I ran and tested it, it works 100%
So if it doesn't, you're missing something - registration or something
hmm so can i pay with paysafe ?
No. The resource system only allows for PayPal. Sorry
Paypal is more safe than paysafe
yeah but i dont have paypal
You could try contacting the developer
sure
And asking if he would accept paysafe
@subtle blade its not working struggling to know whats going on here i put it in exactly
oh my god
https://pastebin.com/9qZb9t8K this is my full code
And you're absolutely certain that's being registered? I can assure you, I tested it and it most definitely worked
Only other way that wouldn't work is if there's another event listener interfering
Got any other plugins?
yes i do but its just like world edit, voxel sniper, and askyblock rest are mine and have nothing to do with blocks
only other event I have is a sugarcane place event
i'll try removing alll the other plugins
Worth a shot, yea
I honestly don't know what to tell you at this point because it worked for me
might just make a seperate entity from my base plugin
if it doesnt work
and just use it in conjunction
still not working hmm ima make this its own plugin
could try changing the priority of the event, but its quite possible that a plugin is cancelling it.
generally I check to make sure the event hasn't been cancelled if I really need that event to do something
Does anyone have any insight on how to get a color similar to a known block's color?
the only thing thats being cancelled in that plugin is the place event when the sugar cane is on top of sugarcane
gahhh
frustration
you're not sending any messages
plugin.getConfig().getString("Global.no-perm"); this only gets the message from the config
it doesnt send it
Because you're not sending it
you're only loading it
Send the message. getString() won't do anything. It returns the value
player.sendMessage()
(can actually do sender.sendMessage())
Yep
man, i wish we could go back to the good ol' Bukkit days, back when there was an actual core team of developers
nein
@subtle blade do you really believe the paper team is incompatible with spigot?
I think having a team really complicates things. Different people with different goals
Oh 1000%
i feel like things move faster now than it used to before
both are trying to please their users
Of course but they're also shoving things down the pipe as quick as possible without thinking of future implications
They're also not as afraid to expose internals
so
spigot is the only server software without a core dev team that i've been a part of (in the community that is)
do they need to all operate in the same way?
i mean there's think sure, but he hasn't done anything for awhile
Think retired back in 1.8
well, is md afraid that paper will just screw things up?
how would it screw things up?
Difference in opinions as to how Bukkit should progress
i mean the team
The teams wouldn't ever work together
Until you contribute to Spigot it's not a difference you can easily see
because ever since Bukkit was pushed into Spigot's hands, it's remained with a single core developer for the majority of the time
Vector, the project is open sourced. Contributions are more than welcome
is Think still doing minecraft stuff?
no
He's at Hytale
hes in a better world now
scary
we can blame him if the server api is bad π
I can't post a screenshot of a pie chart in https://bstats.org/global/bukkit but Server Software has paper with a market share of 35.8%, which means that w/e they're doing, clearly they are pleasing their users
i just wanted to point that out
Nobody said they aren't, nor did anyone say you have to use spigot lol
spigot isn't trying to be the only spigot server software used, it just happens to be
They make performance changes on an otherwise unperformant vanilla server
if you only consider ppl who actually update, the marketshare is > 50%
I made that today π
Spigot avoids changes that may infringe on the vanilla server
Choco Idk whats wrong i dm'd you all of my code
I think its worth noting, Bukkits core team wasn't that large either.
spigot maintains the plugin api, paper makes it actually perform properly
well
Most of the changes that were put into bukkit wasn't from the core team either
both tasks are important
interesting page @hoary parcel
it just fetches the 1.15.2 server on bukkit and the 1.15.2 servers on paper from bstats and does quick maths
I wrote it all in githubs editor π
has paper ever had major screwups in terms of preserving the API?
because I'm trying to follow where the actual issue is
but like, that is noticed the day the patch is released
actual issue of what o.O
issue of incompatibility between the paper devs and md
I need to store blocks in some sort of list/array where I can quickly access them with world, chunkX, chunkZ - Something like a["world"][1][1] - What would the best approach here be? Not sure if I need to use normal arrays or I can use ArrayLists. The tricky part for me is the first string key.
There isn't any issues, just differing opinions on how to go about implementing stuff. Anyone can make a fork if they want.
lmao
Is there any way to find a material's map color? According to this I should be able to do it: https://minecraft.gamepedia.com/Materials
would it be possible for paper and spigot to "unite" and work on bukkit together, while keeping their api's separate?
That's how things operate currently but Paper's patches hardly ever come upstream unless coincidence
Doubt it, but it isn't unusual for something in paper to get accepted into spigot either
(please don't do that)
@subtle blade Please don't do that? Then what can I do? haha
mhm
Short answer noπ
i'm just amazed md hasn't reached out to other people
mapception
vector, I recommend you to not waste your time with that topic, lol
He mentioned some time ago that there's been nobody that's shown the ability to contribute competent code on first attempt
(paraphrasing)
I think both projects are happy with where they are at right now
Frostalf, being able to commit to master branch is a scary thing when it's auto deployed lol
well if md_5 is the authority on Bukkit.....
would he clarify that none of the actual Bukkit team are competent?
Only know timtower from bukkitπ
mbaxter pops in here occasionally
I would clarify that some on the bukkit team were not, and even those that were sometimes implemented stupid things. For instance, the code that causes the server to crash because a corrupted chunk was encountered even though that isn't even vanilla behavior
which reminds me, maybe I should try PRing my fix for that
and that's what I mean. If you pay attention to the Spigot PR area, you will rarely find PRs merged without SOME change
i remember that happening to me before @keen compass , irritatingly annoying ><
I've had few be merged
whats wrong with adjusting stuff after they have been deployed?
its a rolling release
because they've then be deployed
ppl who update right away know they are on the bleeding edge
Mini, people still stay on out of date 1.8 versions lol
Ikr
people still use 1.15 >.>
^
instead of 1.15.2
is that your issue tho?
The only reason that code exists is because they couldn't agree on how to handle it @alpine fable and I even tried to fix that while on the BukkitDev team and my PR was rejected because the just didn't want to implement it even though they agreed it was bad for it to do that.
it would be cool if buildtools gave you the option to choose "lts" or "bleeding edgee"
Hopefully 1.16 is the point where alot of servers change
lts is dum
Could anyone give me a quick hand?
thats just unnecessary work
whats up @hallow surge
Oh boy just noticed what section this is in
public class BreakScane implements Listener {
DragonsToken plugin;
public BreakScane(DragonsToken dragonsToken) {
plugin = dragonsToken;
}
@EventHandler
public void blockPlaced(BlockPlaceEvent event) {
Block b = event.getBlock();
Player p = event.getPlayer();
Material m = b.getType();
b.setMetadata("placedbyplayer", new FixedMetadataValue(this.plugin, "something"));
if(m == Material.SUGAR_CANE_BLOCK) {
if(b.getRelative(BlockFace.DOWN).getType() == Material.SUGAR_CANE_BLOCK) {
event.setCancelled(true);
p.sendMessage(ChatColor.RED + "You can't place that their wait for it to grow");
b.removeMetadata("placedbyplayer", plugin);
}else {
event.setCancelled(false);
}
}
}
}``` perfectly functional code given to me by choco
works for them not for me though
No #offtopic reee
yes
are you reloading the server or restarting?
Is it the place event not working?
restarting
Is the breaking one working fine?
Ah
package me.y2k.dragonssugarcane;
import org.bukkit.plugin.java.JavaPlugin;
public class DragonsSugarCane extends JavaPlugin {
public void onEnable() {
getServer().getPluginManager().registerEvents(new SugarCaneToInv(), this);
}
}``` my main class
@vernal spruce offtopic would be #general
Yea but the class you sent above isn't relevant to that independent plugin
You sent a place event ;P
.
Didnt i saw that problem on the forum too?π€
the class that you registered is the SugarCaneToInv
no its block break event
"SugarCaneToInv" this is not the same class you sent before
the class with the method is BreakScane
^
i changed it to another plugin
Oh boy..
so its not the same class
the first argument is the plugin if I'm not wrong
bruh its an entirely different plugin now nothing to do with the old one completely seperated
getting no console errors
just send us your actual code
I need a head exploding emote
This is the plugin I compiled and ran and had work
Eclipse f2w
light mode - _ -
I also use it so i dont get sleepi after couple hrs
this dark mode tread wasn't here a few years ago
@subtle blade loaded a server with the exact same plugin didnt work no errors in console
you on 1.15
im using 1,8,8
Isn't it SUGAR_CANE_BLOCK?
but im getting no errors so same should work
umm let me look
if this plugin didnt require 1.8.8 i would not be using it rn - _ -
materials in 1.8.8 are so confusing
its SUGAR_CANE_BLOCK
They were created in a time where they were at one point accurate
I still remember REEDS though 
yeah but it's outdated and missleading
Oh well. Whatever it is, you want the block not the item
i selected the block still not working hmmm i hate dis xD
reeds then?
no
its sugar_cane_block
the code just still isnt executing
the Item is Sugar_Cane the block is Sugar_Cane_Block
try adding a debug message before you check for the material just so you can confirm what's causing it
you added a debug message and now the block check works?
yea
let me try to remove now
not sure what i did or if i did anything! but it works
I'm happy thanks choco and everyone
how would i make a minimap using the cartography table
I'd really appreciate it if someone could help me figure out how to find a Materials base color as used on maps.
Haven't been able to find anything in the javadocs for quite a while
@subtle blade got it all working thanks π
Player#setHealth(double health)
i think
LMAO
try with the health first
yeah just kill them, that'll help hahaha
no
ik what you were trying to say
also just out of curiousity
is the old minecraft death sound somewhere in the api?
bc that'd be so nice to bring back for nostalgic purposes
probabily thru string playsound
Hey can someone help me with Death Messages prime?
only if it's still present in client
ah ok
if its in neither would I just have to make my own playsound method and use that instead?
welp ping me when you can help me thanks
@chilly eagle you want to make custom death messages?
there is Player#playSound(Location loc, String text, volume, pitch);
@chilly eagle you want to make custom death messages?
@inland depot I want to make custom death message, and I understand the whole thing, but I want to also have the default death message
so when someone dies it should be like:
default death message
custom death message for that player
just listen to the PlayerDeathEvent and broadcast your message
lmao
you do know how to code java right?
that's your first step
Im in a wrong place or something
there might be a plugin you can find
nono
search up custom death messages spigot
there is a plugin
then what's the problem?
Cant configure it
past . it is better
is a very long config
or if you have the dscord of the plugin, maybe I can get quicker help there, idk
no problem @frigid ember
@chilly eagle there should be some documentation from where you downloaded the plugin
try giving that a look
is this a good way to get all the players online? Object[] playersObejct = Bukkit.getServer().getOnlinePlayers().toArray(); Player[] players = (Player[]) playersObejct; }
Why do you need an array
my eyes are bleeding lmao
is it bad?
you dont need to cast to an array
you should learn java before using the spigot api
but then it's an object array
Why do you need an array tho
then? Player[] playersObejct = (Player[]) Bukkit.getServer().getOnlinePlayers().toArray();
Why not use the collection provided?
I don't like collections
lol
??
I like arrays and lists
@pastel condor if you want to get the amount of players:
Bukkit.getServer().getOnlinePlayers().size();
If you want to get a list of online players:
for (Player p : Bukkit.getServer().getOnlinePlayers()){
players.add(p);
} ```
If you want to get each individual player:
```for (Player p : Bukkit.getServer().getOnlinePlayers()){
// do stuff
} ```
thanks
List is an implementation of collection
array lists are great
Eh
ty
why are you adding players to a list
because I hate collections
yuck a set
if you want to keep track of players
sorry, I'll stick with array list
I hope youβre joking
you should probably learn java before doign anything because you clearly have no idea what youre doing
wdym?
uuids also work well
I don't need uuids though
the code i provided was just off the top of my head, there's a ton of better ways to do it
in that case i'd use the for loop
I like to use while loop with a countrt
me?
anyone know the if there is a right click event?
PlayerInteractEvent
oh yeah
PlayerInteractEvent#getAction
what about left click? blockBreakEvent?
same thing
you can check if the action is Action.RIGHT_CLICK_BLOCK, Action.RIGHT_CLICK_AIR, Action.LEFT_CLICK_BLOCK or Action.LEFT_CLICK_AIR
glad to help
anyway way to remove the No Effects https://cdn.discordapp.com/attachments/706396168053063761/707705787920678982/unknown.png
that image since they dont embed
@uncut reef what do you need help with?
Plugin TAB
i have 2 db with the plugin luckyperms
and tab dont detect that and colapse
what can i do?
not sure exactly what you're trying to do
maybe someone else can help you, sorry
good luck π
if you look Rango: cahnge between Owner and Admin
@pastel condor
in your police plugin
you have to remove something from your pom.xml
i want in my lobby stay Onwer and in the other server stay Admin
wdym? @boreal tiger (also how did you know I have a police plugin xD)
he found it
ooof
I looked up your name xD
You have to export it correctly
otherwise your plugin includes the spigot api
which you dont need to
oh thats why the jar was huge!
yep
is it this? https://github.com/ramdon-person/SimplePolice/blob/master/SimplePolice/pom.xml#L22 @boreal tiger
mhm, nop the scope and the pom seems to be fine, my bad
I think its the way you're exporting it from eclipse
Better question
How did you build your jar
Did you use the export feature in eclipse
or did you run a maven command to build it
Your POM is fine. It's how you exported
If you have a Maven project, you should be building with Maven
Yes but you also have the lib in your project
Which you don't need
Delete the lib folder
(shouldn't need that on a public repository anyways - even without Maven)
yeah that was before maven
All your libraries and dependencies are handled and downloaded by Maven now π
anyways, just removed it
That's the beauty of a build system
π
Give 'er a recompile and you should be set
the only problem is I already posted my resource to spigot
should I post an update?
I bought a plugin and have been waiting for 15 hours to ask what is going on
easy enough of a mistake to make especially with starting out with maven.
And you didn't upload the actual server code so you are fine I believe fierceeo
I uploaded the huge jar though
just upload the new version
Yep! just an update is fine
I think you can delete the old ones?
k thanks
In this case it's just the API, it's not the absolute worst thing in the world. You're not distributing the server jar. The API is GPLv3
If it's about your resource purchase not going through, I'd answered it earlier
@frigid ember lol. Stick to a single channel, damn it! That's why you missed my last answer! 
with that ->https://www.youtube.com/watch?v=FGFHU4HM3nE&feature=emb_logo
@uncut reef anyone can help me with that
Much better, fierceeo! π
