#help-development
1 messages · Page 1530 of 1
Is it the same with bukkit.getplayer and main.getserver.getplayer
since Bukkit.getScheduler is also just server#getScheduler
there shouldn't be any difference at all except the laziness
and being a lazy developer == being a good developer
Is it more efficient to save a hashset of all online players as they join and leave instead of doing bukkit.getPlayer
probably not
Bukkit#getPlayer just takes the player out of the already existing collection #getOnlinePlayers
No because getOnlinePlayers is already saving it
and it'd have to be a map not a set
i don't remember the exact backing impl of getPlayer
but i'm assuming it is map based
Alright 👍
It’s mostly good for unit testability but no one actually does that since unit testing in spigot require you to emulate an entire server
lawl
real men test on prod anyway
Absolutely
Fixing the nullpointers as they come flying in instead of writing proper checks 😎
Needless to say print statements are nice
if half of your code doesn't consist of stouts you're doing something wrong
Anyone know a way of sending data without a separate backend?
Between servers
That aren’t bungeeafied
Redis
PMC, Redis
PMC is bungeeafied arguably
yeah that came when i pressed enter
Lmao
🥲
Ok - I’ll have a look at redis
Take a look at Jedis java library it has the pub sub you need
Ok thanks
What is speed like?
Suppose that the servers are local host to each other
Or, at most the local network
you mean how fast redis is?
Yeah
It is super fast with amazingly high throughput, as it can perform approximately 110000 SETs per second, about 81000 GETs per second. It also supports a very rich set of data types to store.
Hey guys ! What bukkit's classes would be useful in order to calculate areas of the world etc ? Idk if I'm missing something
areas or volume
with x y z
thanks for help
Location, World, Chunk, Vector 
Hmm yea vectors seems the way to go, I'll look into them, thanks
what did i do wrong that this doesnt work
i already gave myself a stick with custom model data 3
define doesnt work
what about checking if the current hand does have the item instead of getItemInHand
When i add Vault to my plugin do i need to download the vault plugin? or API thing? I use Eclipse
wdym
#getItemInMainHand
also you are not checking if the player is right or leftclicking
and
ItemMeta meta;
meta =....
// why
i started learning spigot/paper yesterday
seems more like you started learning java
i think i clicked intelij idea thing
by accident
try to replace getItemInHand with getItemInMainHand. otherwise do a else on your if statement and debug the output of the custommodeldata
try to look up a java tutorial
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
its a method not a field
also i think you won't need that. there should be something like #getClickedItem from the event iirc
please do us all (and mostly yourself) a favor, and check this out. really
also -> Plugins should check that hasCustomModelData() returns true before calling this method.
can someone explain me what difference a BlockVector has with a Vector in bukkit ?
@chrome beacon When i add Vault to my plugin do i need to download the vault plugin? or API thing? I use Eclipse
doesnt a vector already in Block units ?
is this what BlockVector refers to ? a vector in BlockUnits ?
Either
to add a library to your plugin, you need to download it. or use maven/gradle, and add the dependency to your pom.xml/gradle.build
Or import the jar directly
please
?jd
;/
If it's deprecated, it might not work correctly
is it possible to use packets to change the players username above their head?
Yes
i'm figuring out how
Change it in the Entity Metadata packet
wiki.vg contains the rest of what you need
isn't that what Entity#setCustomName does?
I don't think that applies to players? I could be wrong
^
i said nothing...
I added it but i have still errors like could not resolve to a type STAINED_GLASS_PANE
uhh... what are you trying to add?
vault
STAINED_GLASS_PANE is minecraft-side
yh but it says it cant resolve?!
Did you add spigot too
yh i did
yeah, but thats definitely not vault's fault
or any libraries fault in general
except spigot
nono i fixed that i think
the error for vault went away
but now its those errors
i changed so much in my code now, i feel like my whole pc will crash when i re-build lmao
Which version did you add
1.16.5
Add 1.8.8
But i want it for mc v 1.16.5
Well the plugin is made with 1.8
So use 1.8 to compile it
It might still run on 1.16.5
why dont you just use maven? there are no errors when using it in 1.16 tho
changing to 1.8 will probably do nothing
ight i'll try
if you use cross-version api snipets only*
vault should be fully compatible to 1.16
Yeah it is
it is
how can i make a custom entity for 1.12.2?
you should learn java first
and how to google
Since you're new to spigot (and Java?) you should wait
xd he's straight
he's going from 0 to 100 really quick
most likely
yeah, nms is not a thing you should start with
i do
well you're gay
i can't be gay if i am a member of your religion
lol
people use 1.12, because much people don't update higher than 1.12
an infinite loop of non-updating-people
1.12.2 is stable and good
^

compare 1.12 to 1.16 in performance
and there are not many people who need updates, because they play on 1.12 anyway
so no need to update
i mean, why updating stuff, if no one asks for
versions >=1.16 are totally fine too and very nice for having a great survival OR mmorpg experience. but if i would have a minigames server i would never upgrade to higher than 1.12.2 i guess
you are gay
whats not gay?
i am the straightest man
i am glacial

of course not
nah i stop here i am bringing myself in a not-nice situation
lol
Which gay are we talking about btw? Happy or homosexual?
lol
happy gay?
the one that gets thrown off rooftops and stoned to death in certain countries
yea
Oh
so.. probably the second one
that's nice
except you're beeing stoned for beeing happy
okay
wouldnt surprise me today anyway
which culture?
any culture
well not at all
1.8 culture 🥲
since when does gay means being happy
i don't support/respect any culture who kills people who are loving their own gender
sorry, but just no
it used to be the original, literal meaning of the word
you sound islamophobic
perhaps you should be sent to a mental readjustment camp
lol
lol never knew that
so... just for example...you think terrorism is okay? i mean.. it's their culture... they're believing everyone who doesn't believe in their believes has to be killed.
hard example, i know
it is a culture of peace
they're just trying to make the world a place of peace
through terrorism
it's not peace at all
the logic is simple
to kill people
you just haven't read their holy book enough to understand it
Does the player.sendMessage send it to every player in the world?
if you aren't one of them you aren't friendly. simple.
No Player2606
no just to the player player
;7
once everyone else is dead, the world will be at peace
It sends it to the player you call the method on
all infidels to the chopping block
since humans are dead then
well then ima loop through everyone to semd em the death message
You can broadcast a message Bukkit#broadcastMessage
or just overwrite the death message from the playerdeathevent
and the terrorist incidents are mostly done by the deep state anyway
thanks 😄
i can feel the bot in my neck. is there a way to deactivate auto-mention when answering to a message?
yea
jet fuel can't melt steel beams
but you have to disable it everytime you answer something
the lizardmen in the US deep state were responsible for 911
Some tos breaking stuff can do that
thanks to discord
probably with backing from israel
Yeah
ik but i meant like setting the default
Ok
nope
not sure if this would be tos breaking since you don't really modify the code
maybe there's a bd plugin for it... but it's not possible without breaking tos
^
bd itself is against their tos
nope
it is
nope
discord says so..
nope
one sec
It literally is
already went to the support a 1000 times
nobody gives a shit about the tos
because of any modifications
it just breaks the tos if any plugins is doing in the tos downwritten prohibited things
or modifying the code in any way
They can’t ban betterdiscord but anyone who uses it can be banned since they’re breaking against tos
still not
betterdiscord is injecting into discord pretty surely
It is
so it's most likely against tos
why does discord says so
wait does redis only support windows?
i mean...
Jeff I believe both?
the tos is pointless anyway and nobody cares about it
i can only see linux install
that's the spirit
the only way i can see to install redis on windows is to get wsfl
since you don't respect the ragheads because they stone the homos, you shouldn't respect discord tos either because they harbor CP and other degenracy
betterdiscord itself is not forbidden by the tos. just the modifications coming with it. if you have them disabled you are fine.
forbidden modifications would be:
- see chats you can't see
- message logging
- automatic sent messages or status updates
- ....
you're literally much much overacting... holy fuck
no, really, discord is an enermous cesspool of degeneracy including but not limited to child pornography
i wouldn't respect their tos either
& because of that you are using ripcord lol
lets just say to not respect anything
i'm using ripcord because the pisscord client is so fucking heavy I can't run it on this shitty machine
that it infringes the tos is just a bonus
@opal juniper https://redis.io/download
that is for linux tho right?
How I can check a fly?
first you need to catch it
for that you will either need fly spray or a web
then you probably want a magnifying glass, as flies are very small
i literally have this small nano-fly flying around
cannot catch it at all
it doesnt care about any traps.. it only cares about flying into my nose
i'd call him and me friends
don't the micro flies die in like 2 or 3 days
well
they have a super short lifespan
he apparently doesnt
sounds perturbing
But how i can check fly
Flyticks?
wait until it sits on the floor and than bodyslam it
you could use a scheduler
and than there is a fancy method #isFlying
or listen to the playermoveevent
Anyways just having it running is against ToS, discord even states it like such https://support.discord.com/hc/en-us/community/posts/360061473731-BetterDiscord-BD-is-Bannable-
maybe they shouldn't have made their client so fucking shit if they didn't want people to use alternatives
It seems fine to me?
its totally fine you are just gay
only because you have an abundance of resources
and you don't know better
i'm not going to start ranting about it again, if you want to know why I think it is shit you can use the discord search function
which, by the way, is also shit
Can you send text messages? Yes.
Can you talk via voice to other people? Yes.
Can you send files? Yes.
That's all discord is used for, and it does all those jobs perfectly fine.
can you go to the moon with a catapult? yes.
Windows also?
you can't do it well
idk about the "make" command
it doesn't work good
its fine tho
it could be done better
i found a way
It does the job doesn't it?
it does the bare minimum that could maybe vaguely be considered its job
and does it poorly
that doesn't mean it's not shit
i couldn't say it better
sadly they do, yes. but they don't ban normal BD - or other modification - users. often enough reported to them. they just count the plugins/some functions as a security risk
Discord has enough features as is.
it has too much bloat
Apparently not
tf
Since people are using these client mods
It works fine for what it needs to do so.
it doesn't
It does tho.
it doesn't, though
I can send messages using it fine.
i can't
Why not
Sure it works but people don’t seem satisfied enough as it is
because it requires too many resources to do so
?
because it is inefficient and bloated and shit
It's not tho.
it is
Chromium 🥲
i can hardly start it up on a lower end machine
discord needs a theme feature. and they cannot hide behind PeOpLe cAn uPlOaD CrAsH ImAgEs
if they could, they could also do that by sending you a picture/gif.
I mean, it starts up fine for me
so its obvious that they are just too dumb to do such a feature i guess, idk
yes, and like I said, it's because you have an abundance of resources
I do not
I don't think I should need half a gigabyte of physical memory to run discord, or allocate a quarter of my cpu time to sending text messages
I think it is inefficient, overly bloated, and shit
How can i be subscribed to a redis server + also keep the server running 🙃
It doesn't even do that..
it does
discord is really shitty when it comes to cpu performance
it's literally a browser in a bottle with bundled in webpages
inefficiency is a given
discord sucks almost my whole power when talking in a vc
I've never had these issues?
whats your pc specs
even on idle the discord client uses a quarter gigabyte of physical memory and like a quarter of my available cpu time
I got a i9 and 32gb RAM
lmao
yeah, no shit you don't face these fucking issues
discord is using 3% RAM max...
one of the best midclass cpu's
ryzen. there's your issues
what, do you think I should buy a 2000 dollar computer so I can run a shitty chat application?
why isnt discord optimized to use ryzen
fuck you and fuck your inefficient expectations
because its fucking inefficient and sucks dicks
I mean, ryzen isn't actually that good imo.
What’s not good about it
your computer shouldn't need to be good to use a fucking chat application
^
it's a fucking chat application; text on a screen
it shouldn't squeeze my processor to overdrive
my minecraft runs at 600fps - so it should be obvious that a fucking chat app can run smoothly
one thing what put me off getting AMD is the lack of the backup video
Like, if your gpu goes you're screwed
in your eyes somehow.
there's my "agree" duck
yes, in my eyes that have 3gb of memory and use 600mhz processors
yes, it is shit
because it doesn't fucking run
Honest question, how long would it take for them to "fix it"?
oh, agree? interpreted as ducking as shots being fired
i don't know, but a guy wrote a nearly feature complete reimplementation of the client in C in like a month
a single guy
so their multi million diverse dev team can probably do it faster and better
with all of their nitro jew gold
you think my head can think so far?
you're far away
i mean duck - ducking
I'm not asking them to fix it, either; other people already fixed it on their behalf
my head can think from the bed to the fridge
I'm just saying that their product is fucking shit
I gotta work out how to fix the stupid code with fawe and worldedit. this'll be "fun"
even skype was more lightweight
yep
never used skype lmao
at least it wasn't electron, I don't think
skype was OG
it did crash and burn all of the time, but at least it didn't kill my machine when idling in the background
coming home from school, going on skype with a buddy, and just playing good old bedwars
miss these times
i am not going to lie. i never used teamspeak
and never knew why people were using it
😦
i was banned from my server's teamspeak
teamspeak was cool ig
you could run your own TS servers
because it was easier for everyone to connect to 🤷
that's the primary reason probably
you had to pay for them lmao
Didn’t teamspeak cost
ye
yeah
thats a thing what dc does good
couldn't you just host it yourself tho
but you weren't reliant on skype's servers
it provides free servers
yeah the issue with being provided a free server is that the server isn't yours
you could, but you would need something for that
so they can just come and delete it or shut down their service
they aren't really servers
and most people dont fordward portss
more like groups
guilds
yeah, but doing the same
^
wasn't there once a rumor that having a server will cost sometimes?
because if they did few people would use it
If discord had a whole dedi per server. Imagine how much that'll cost it'll crazy amounts of money haha
they got so much money from nitro? lmao
i don't think discord is profitable still
if you account for the initial investments, I don't think they've made a penny back
so wonder why they dont sell it at ms
they are probably making profit on a yearly basis now
but haven't yet earned back the millions that were invested by investors over time
discord is the number one, why should they sell it?
and probably never will
well, except the client
the client is fine
why doesn't nitro provide the feature to customize your fucking client? themes and stuf
it's not though
then nitro would have a real sense
well, 'fine' by modern standards, maybe
^
i mean right now... there's literally no real benefit for buying nitro
but people these days have way too low standards for software
1080p streaming? cmon
you can customize your profile a bit
why only the profile?
having a banner and a "about me" in the future
thats cool
and those little emojis

like, I would for example like to be able to use the client without buying a new, dedicated machine for it
why not the client? i don't think they dont know how to implement that
or having to shut down everything else on the system for it to run
so i'd like to know why they dont implement themes
that would probably make much people stop using bd
most of people just use bd because of themes. like me
still waiting for ripcord to implement image and video previews
Nah i am not new to java, i am new to the spigot api
yeah, then you should still not start with nms
yeaaaaaaaaaaaaaaaaaah no
not that*
https://www.youtube.com/watch?v=Ku8OBQP45Do
this is for 1.11. that's probably the nearest you can get.
also nms depends on what you want to do with that mob
you can go the way around and use some tricks to accomplish it without nms
"custom mob" doesn't sounds just like give him a custom name
if i run a task async, when i call: Bukkit.getScheduler().runTaskSync(plugin, "new runnable etc");" on another thread, will it go to the main spigot thread agan?
yeah and?
No ikew
you are running SYNC
i don't think he will have much fun doing that stuff without nms
okay, thank you
true. but i had and it was fun to trick around
can just recommend it
When scheduling it async it will use an internal cached thread pool to execute the given runnable
using runTaskSync schedules the runnable in the argument on the server thread, but wont change the context of your async runnable
Also runTaskSync isn’t a valid method
and note that the task is only run at the start of the next tick
so there may be a delay of up to 50ms before it actually runs
Was it not that?
runTask and runTaskAsynchronously
ah
🙌
i just typed it out in discord
but thx for the responses
How do i compile Intellij plugin i dont get it
maven
What is the best way to do this. Atm to listen for jedis messages i have a class that extends thread and i just let it tick over in the background. then, onMessage it fires a custom Bukkit event for testing. this induces some delay though.
What is the best way of actually listening for the messages and then getting the data out?
If you use Jedis then you’d have a pub sub listener
what are you doing
Huh
so i wanted to try something out
basically i have two servers
and the end goal is to mimick the actions on one server on the other
(some)
not all
https://github.com/lucko/helper/tree/master/helper-redis/src/main/java/me/lucko/helper/redis maybe take a look at this or smtng
are you trying to shard your server
sorta
does that show me the compilation?
glhf
😄
its just something i wanted to try out
@Override
public void onMessage(String channel, String message) {
Bukkit.getScheduler().runTask(plugin, ()-> Bukkit.getPluginManager().callEvent(new DataBroadcastEvent(gson.fromJson(message, MessageContents.class))));
}
cause this is gonna induce at least a tick of delay ^^
but it was a proof of concept
wdym
Is there an easy way to make a "ghost" player
is it gonna be like citizens api or something
whats ment with wdym
if you're sharding, you probably would want to send packets to the server via protocol to emulate a real player
i mean - eh
i want to export my finished plugin as usable jar file
can i not just fake it to the player
maybe
You need to make an artifact
but faking players is kind of annoying
because mojang doesn't want you to fiddle with skins and shit
yh if it called like that
the protocol around those parts is super specific and fragile
Yeah
Is there a library for fake players
need like a
player#movex
FakePlayer player = new FakePlayer("jeffmcjefferson")
shit like that would be 👌
Share please
I don’t want to make it
Lmao
I found one but it only supports spawn / despawn not move
I need like one that supports all of the player interactions I guess
would have to search too
Ok
but i dont want to
Yeah - I got that
I’ll have a look
Is there a “blockchangeevent” that just does every block change
I feel like that is a dumb question
what?
if there was a block change event
plugins could reliably store data for non-TE blocks
so the deep state doesn't allow for something that to be PR'd
because it would be too good and make peoples lives easier
oh sorry i didn't detect the sarcasm 😄
There is a BlockData#getAsString but how do you then serialise it again?
nvm the method is under bukkit
why
ok guys, i need your math.
i need to get the difference between those two dots, so i can do smt like
pos.setAbsolute(pos.getAbsoluteX() + <difference_between_dots>, pos.getAbsoluteY() + <difference_between_dots>);```
red dot is the outline of a rectangle, black dot is my mouse cursor
how can i calculate that?
what are you trying to do
i'm thinking of a nice piece of meat
you familiar with a^2 + b^2 = c^2
not a single bit
how lmao
yes, i have discalkulia or whatever, and missed 2 years of school
blame me if you want lmao
Jeff the math teacher 😌
i cannot find out anything in this picture tbh
what tf means a^2 lmao
so do this:
so 4+4 is just 4^2 right?
No
no
wtf
Only with multiplication
4x4 = 4^2
ahh ok
a = dy
b = dx
so then plug into the equation here
And you have ur distance
d = delta
which means difference or change in
gimme a hour or smt xd
you need to concentrate
stfu
i'm a very surprising guy
yeah i see
you get it?
not really tbh
what are we talking about
Vector diff = otherVector.subtract(centerVector)
both work yes
diff.distance() returns the distance
hypotenuse = longest side of right angle triangle
you need some rifle shots
opposite right angle
dumb goyim
i see
don't say that
he said such things a lot
i can't see replies
are you being triggered by my ÜBERMENSCH language skills
perhaps I should send some BLITZKRIEG your way
What are the data types of your locations?
are they bukkit locations?
Kann mir jmd sagen wie ich Vault als depency zu meinem Plugin himzufüge in Intellij?
stick to english please
stick to english
Rivex speaks my language guys
yes, then move this to DMs
y
okay rlx yo XD
pack die dependency in deine pom.xml, wenn du maven benutzt. wenn du gradle nutzt, packs in die build.gradle
sorry i had to :(
me 2, but it's an english discord
yeah, but not all people speak fluent english
and as long as people know theyre not using any swear stuff, i think it's okay at least
well i can but i was too lazy XO
if you can
I just filed a report against him
i don't accept random requests
DM
how to check whether the player killed an ender dragon or not
I need to check it with the player statistics, is there any way to do it!
int bossKillCount = player.getStatistic(
Statistic.MOB_KILLS,
EntityType.ENDER_DRAGON
);
but it not worked! any other ways to do it?
do you just want to have the statistic or do you want to do anything IF he kills the enderdragon?
just statistic
is it MOB_KILLS?
i am not sure if such a statistic exists
what about KILL_ENTITY?
isnt MOB_KILLS a total?
that's what I thought
yes but we can pass a entitytype to the getStatistic function to get the specific mob kill count
Enderdragon may not exist
since it's used to be killed just once
But it's just a guess
but we can respawn that and can kill again too
Not in the base game
but cant fetch the kill count using
player.getStatistic(
Statistic.MOB_KILLS,
EntityType.ENDER_DRAGON
);```
with the degg
wait it's showing up in your statistics
waaait
but it works with other mobs?
yes
confusing
and there is no other ways to get the total kill count of the dragon ? by using statistic
I don't know yet, if it shows up there has to be a solution
OnEntityPlayerKill event ?
how about wither and giant guardian?
if there are no statistics for those mobs, there isnt probably for enderdragon too
y you could count it urself but it's redundant if statistics counts it..
leme test and i will say it works or not and i will send the error for the enderdragon
2min pls
y
there is an error?
yes for enderdragon
for this code
^^^^^^^^^^^^^^
😂
now he's gone 
i want to make the mob always angry at the player
so just set yourself as the target of the entity
#setTarget
Oh
hey it shows like this
rg.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
....................................................................................................
?paste
paste it here
paste the full exception, goy
yeah and the player is probably null
but it works for other statstic code
Player.getStatistic(Statistic.MINE_BLOCK,Material.DIAMOND_ORE)
it works fine and correct
what is on line 92
player.getStatistic( Statistic.MOB_KILLS, EntityType.ENDER_DRAGON );
?
the error is still incomplete
i just copy pasted the full error idk whats missing
its most likely your player. make sure its not null.
there should be something in between
at java.lang.Thread.run(Thread.java:832) [?:?]
and
at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
at me.tgn.smp.survivalsystemsmp.SurvivalSystemSMP.onPlayerQuit(SurvivalSystemSMP.java:92) ~[?:?]
stupid question, but is the player online? @north niche
he just quitted so no. but shouldn't matter as #getStatistics comes from OfflinePlayer
the player is still online during the quit event
and the event should still have the player during the event
so yes they are guaranteed to be online
if he did not delay it*
he couldn't have delayed it because the exception was caught by the event bus
can you send us your full code?
or there is something in the exception message that he omitted that would explain what's happening
don't think so
the exception message should have been copied in EventException yeah
everything is there just the Caused by is missing
but I've seen stranger things happening
the Caused by line contains the actual underlying message
which is missing
it could be "illegal argument exception: you can't do this because x"
would be the only logical exception throwed by the getStatistic method
since it only throws this exception
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) throws IOException {
Document document2 = new Document();
document2.append("boss_killed", event.getPlayer().getStatistic(Statistic.MOB_KILLS,EntityType.ENDER_DRAGON) );
}
its just the quit event and im appending some statistic values to the document2
ok wait i wil send screenshot
without like, opening up the source of the server and finding that specific preconditions call
which I don't have the effort to do
I have a problem, to string are identical but when I do a condition if(string 1 == string 2), it is not working
upload it to imgur
use .equals
check for object type, that would be comparing if the objects are exact.
== is just checking if they both refer to the same object in heap
ah yes, I test that
Hi,
Does anyone know if there is any data out there about the performance between iterating between 2 locations and using raytracing?
@hybrid spoke It's good ! Thank you
raytracing is basically just iterating between 2 locations
it doesn't need to be, but I doubt bukkit/nms implements it super differently from that
what are you trying to achieve
yeah, thats what I was thinking. but depending on how its implemented it could be faster. if its implemented far enough down it wouldn't need to make calls on every block. but there isn't much information as to where in the process order its performed etc
probably just want to use raytrace as provided by bukkit
look at the implementation
it won't be heavier than iteration
and you will know it
or if it is, it isn't by a fair margin
and it's probable that it has been or will be optimized further by people like paper
using it will allow you to leverage those improvements without having to implement them from scratch yourself
its working fine with an iteration at the moment, just looking for places where i can shave a few ms
you could always test it
use a profiler or a sampler like spark to see which parts are taking how much time
i think ill have to, theres not much information around and bet to check the shortest routes first. testing is next i guess. ill benchmark it
i have a function timer from another set of project i can probably adapt
and yes godcipher, I could read the code, but I would have to read all of it to see the context in which it is implemented before i know. a test would be quicker
Good evening, if I have a stick in my main hand and the DisplayName of the stick is SpeedStick, I'd like to give it speed for the entire time I hold it.
use a scheduler and give every second every player with the stick in his hand speed for 2 seconds
Scheduler?
Hello! Can I see full source code instead of just interface like that?
public interface Inventory extends Iterable<ItemStack> {
int getSize();
int getMaxStackSize();
void setMaxStackSize(int var1);
@Nullable
ItemStack getItem(int var1);
void setItem(int var1, @Nullable ItemStack var2);
iirc there was an event that is fired each time the held item of a player is changed for any reason
player hold item event i think
listen to that and update effects accordingly
Hmm.
Does anyone know how i can create patches for paper ? For spigot its clear, but with paper im not finding the way to do it
I'd like to know some example sites or source code.
Can I see full source code what are they doing inside all of that functions instead of just that interface?
Anyone else have any ideas to make an entity noclip?
@wraith rapids I’ve been at work since our chat last night so I haven’t tried your implementation just yet
Right now I have it, and a vex strategy
Can you add the noclip property to custom mobs…?
Actually
Here’s some I don’t know
Is it possible to create a custom mob which uses the model of another mob?
Like a vex which uses a falling block as it’s model
with the protocol, you can disguise an entity as another kind of entity
have you tried the relative entity move thing yet
i think that would be the best and/or only way if you don't want a million entities
I’ve been at work since our chat last night so I haven’t tried your implementation just yet
right
any idea how to fix this issue e: ...\build.gradle.kts:28:9: Unresolved reference: compile https://hastebin.com/epozaqogas.swift
file is a bit of a mess from me trying to fix it
I can't use compile/implementation, etc.. in the subprojects for some reason
hello i need to import a ready maven project to my intellij but the dependencies don't download
Right click POM -> Maven -> Reload Project?
already tried
is there even a compile in gradle kotlin dsl
i can check, but implementation doesnt work either
You imported the project as a Maven project right?
the maven artifact you're depending on is in your local maven repository? if not, did you declare a repository in your pom.xml that describes where maven can find the artifact
p sure it's diff for if you're doing a project, but idk. implementation doesnt work either so
oh wait i might have found the issue
subprojects {
dependencies {
compileOnly("io.papermc.paper:paper:1.17-R0.1-SNAPSHOT:mojang-mapped")
}
}
works perfectly fine for me
have you tried with another module within the same project
why would you specify that on the root project tho
wouldn't that cause the module to depend on itself
IDK but that's not the issue anyway.
If that happens I can just copy paste stuff out
idk I just have my build files in the respective modules ¯_(ツ)_/¯
and I am pretty new to gradle myself, so can't help much sorry 😭
ah yes the java 16 plugin
Java16Plus.jar
does world.getNearbyEntities() load chunks?
this is code
how can it be duplicate
one of my plugins users has that problem
I can't recriate it
and what would be solution
Is it possible to catch all exceptions from YOUR plugin and save them in a txt file? I don't have any idea to do this (I can handle the exceptions, but not listen for it)
not entirely sure why you'd want to do that since the server logs everything for you
I know, but I am not asking for your opinion, I just want to know how to log the exceptions
try {
public class PluginName extends JavaPlugin {
public void onEnable() {
Bukkit.shutdown();
}
}
} catch (Exception ex) {}```
😵
by catching them and logging them..
Yes but how to catch them? That is the question
you might be able to modify the log4j2 logging configuration of the server ?
using an exception filter
Yes but that doesn't catch all exceptions (like null)
Great, but I don't have any idea on how to do this
dunno if log4j2 can write those into their own file
so solution check if last_seen exist
well technically it would if errorProneMethod threw NullPointerException
I can't do try-catch for every method, that would be a mess
I think log4j does actually support an ExpressionFilter as well as multiple appenders
don't know how to correctly set that up tho
so, maybe you can learn a bit through google
sentry is also a potential option
Then I get many xml files, and no Java code
has some pretty neat error hendeling
what
it is a single xml file
idk what you are on about xD
Yes ?
I don't know how to do that in Java code? Java is not xml?
Yes you don't do that in java code
you will never be able to from your plugin
your plugin is not the one initiating all calls against your components (e.g. listeners)
Yes I understand, but what is then the way to go?
so either try catch everything or look for a solution outside of the plugin
since when was citizens paid?
since when you cloned the repo and built it yourself
long long time ago
thats the plan
why make it paid if you open src it?
They have a jenkins
You pay for support
whats the class/method to see what block a player is looking at?
I don't know the exact terms to search
take a look at the javadoc
thanks
everything you ever need is there
I've been looking at it, didn't know what to search
would it be under Player?
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Player.html you can hit ctrl f and search "target" or "block" something like that, or just use the box
iirc
and it shows inherited methods as well
mvn package
ill give it a go
most of the configurations will be in the subprojects
or submodules
whatever they're called
Yeah modules