#help-development
1 messages · Page 122 of 1
Here are some examples
So have a fixed timestamp in your timers and use a single task to check on them.
There is a very well performing approach by using a PriorityQueue but thats probably
a bit too complex.
alr
should I create new thread on db(mysql) writing?
or it will work fine on one thread?
...
netherite:
world: world
loc1: [-5. -55, 6]
loc2: [-9, -51, 10]
blocks:
ancient_debris: 90
netherite_block: 10```, the list I get from `section.getIntegerList("loc1")` returns [6] and I have 0 clue why
full config: https://hastebin.com/udokuniqot.yaml
One thread is fine as long as you dont use the main thread. Because this will just lag or even freeze the whole server.
There are no block number ids anymore. This is something from an ancient past.
You notice the dot there, right?
I might be a teensy bit stupid
thanks
i already found it ;.
There's a reason it's deprecated though lol
He's using an ungodly old version. 1.8 probably. Garbage.
Tell people that want development work for this version to fk off
Its only a handful of people that play this version anyways
its like a mirror its same to new that old cant use due new features in newer versions
idk man i dont really decide what to code i do community requests
which are getting removed later from spigot due obsfucation 🤮
What
i wouldn't say that
because some rats reported it
i mean the largest server in the world uses 1.7
Why obfuscate community requests? Why obfuscate at all? There is 100% nothing worth decompiling and the stack traces are horrible to read.
So?
I can statistically prove it
my plugins dont cause any errors
so
they work smoothly
yes im just saying besides modded, after latest, 1.8 is probably the top
either in case if there configs and the fool wrote down something not possible i check it as well during start up
Not even close
but i do agree, 1.8 apis were bad
Imagine obfuscating community requested plugins
didnt ask you to judge
i do it for free
Here is a list of all versions which are bigger:
1.19
1.18
1.16
1.12
could you cite your sources mla format
bstats
6.3% is nothing.
The only reason the biggest server uses 1.7 is because they've spent millions of dollars you don't have paying java engineers to develop custom solutions for the version and upgrading is probably too expensive
amount of empty servers is huge
lmao
this precentage based on servers without any players
so please.
that's what i thought. big servers likely disable bstats, and if a server uses viaversion/protocolsupport (correct me if im wrong) it won't show
nah no one uses bstats man
only some wierd ass servers
i mean it is enabled by default so i wouldn't go that far
So? Natural distribution. There are the same number of empty servers in every version.
i bet
with 25%
lol
there way more
@lost matrix if you think about it, there are probably more empty servers in the latest version
Speaking of relative numbers of course
orvit
just give up
they just hate the old versions
and when i ask an question i end up with
Naturally
?howoldis18
People high on copium think they can make a 1.7 server that will remotely be as successful as just using 1.19 and all the benefits it provides.
i still find it painful that 5% of servers on bstats use Windows Server 💀
With good reasons. The 1.8 fortnite kiddie pvp community held back api progression for years.
my servers runs from 1.8 and upwards
Minecraft is such a weird game
and i would tell you that most players use 1.8
and i have many players around 300-400
Yeah, that's a hard no
How many other games have content creators still developing for 7 year old versions
rn 83
Most players don't want to use it.
many
fool
dont speak if u dont know
people still make mods for very old games
I never said old games
Which is statistically insignificant.
Thats why 1.8 people think they are big. They are in a bubble.
I said old versions
lol @lost matrix hypixel running pre 1.9 actually is very important
judging by the fact that hypixel's entire player count (during the day) is more than how many people combined are connected to all bstats servers
and switch to new conterstrike
hypixel doesnt use the original api
...
they have recoded everything form scratch
so they dont suffer from our issues.
like some wierd bugs
on chunkload and shit
not fully, no
Its not. They support all versions. Only their backend runs on 1.7
this argument was about what has the most players, not api originally
well your bstats statistics use server version 🤷♀️
Which is representative of what people want. A 1.19 player is not gonna start a 1.8 server.
Counter strike 1.6 is still the latest version of the original counter strike
well why they dont go to cs 1.8?
it exists
in fact
so man
just please dont argue about it people can do what ever they want
i have no idea why people stick 1.8 yeah
which its really easy to change everything that was made in 1.12 for example to work same as 1.8 beside some client sided shit which is not big deal with mods
but either way i do agree that 1.8 api is awful
Sure. They can use 1.8 if they want. But they should not expect any support whatsoever. You go with 1.8 then you are on your own.
and paper's new apis is amazing
it used to be decent
back in the days
old can be gold
dont judge by the book package
but its not the point yeah
its reallly bad comparing to the new
you just didnt see the evoluation guys
of older api's
Imagine having to fiddle with nms only so you can send action bars.
Or to write data into an ItemStack.
Or a player.
Or a world. Or chunk. Or TileState.
Ah the good old days when we had to use NMS to send particles
i use it
I do not miss them
If you're making a new server use the latest version. Hypixel, if they were to make a server today, would most likely be using up-to-date API's so they can provide a much better experience
what do you know man
they stick to old version
because some gamemodes are for newer
some allow old
Because they have to
so everyone can play
its just the backend
yeah many player uses 1.8
imagine gettings that hit
lmao
You can run your server on 1.19 and still allow all players down to 1.8
It's not like people can't run 1.19 lol
Yeah but why sacrifice the 1.19 API and all it's features?
And you can run your server on 1.19 and allow 1.8 - 1.19
how 1.8 would be able to process all the shit that the client isnt familiar with
insta game crash
You can also run your server on 1.19 and only allow 1.8
And with this you get the new api + 10 updates worth of new content
You do know via backwards and via rewind exist right?
not sure how it would work.
And they have for a long time
Protocol transpilation
Most things work fine
The main downsides are the offhand not being in 1.8, and extended world height not being in 1.16 and below
Custom Resource packs allowing for cool and unique items.
Easy access to NBT thanks to PDC
List is a mile long
I actuall just finished worldpainting a new map with the new height settings.
You can do really nice big mountain ranges with it
Oh yeah increased world height
In theory up to 2048. Im actually planning on doing something vertically soon.
its updated by the community no longer by the author
Spigot is also updated by the community
I mean Hypixel has in the past released 1.8 libraries that are basically updates
int radius = 3;
int bx = location.getBlockX();
int by = location.getBlockY();
int bz = location.getBlockZ();
for (int x = bx - radius; x <= bx + radius; x++) {
for (int y = by - radius; y <= by + radius; y++) {
for (int z = bz - radius; z <= bz + radius; z++) {
double distance = ((bx - x) * (bx - x) + (bz - z) * (bz - z) + (by - y) * (by - y));
if (distance < radius * radius && (distance < (radius - 1) * (radius - 1))) {
what i did wrong in this loop?
it should be hsphere
but it outputs a 3x3 cube
for god sake
if at the end cuts the cube
a radius of 3 is going to be a cube
oh fk
ill try with radius of 5
im a bongus what can i say
since i was like it should cut the extra in the end
This is super slow.
Use a midpoint circle algorithm or a Bresenham circle algorithm.
I almost failed math
and a check at the end if its inside
i need to give attention to each block
im looping thru everyblock and gathering data of it
Yes i can see that. But this will lead to spheres with holes.
increase the radius and you will see
ill try to increase to 5
I just yeet that kind of code from my beloved stack overflow
stackoverflow 🥵
Are you making an empty cube?
Filled?
i make explosives
Ohh
and sphere are cool
as a pattern
i make different patterns of explosives so ;l
yikes
well in highschool the best student in the class
either my math teacher used to beat me because i used my cellphone his whole lesson
but he didnt really mind because i cloud solve any thing without even learning
like only forumla now adays most of people are 2 digits 😢
So Ur making block sphere?
didnt look up yet
If you can translate js to java then you can use this:
https://jsfiddle.net/mtimmerm/ay2adpwb/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
ill look once i find nothing
wont be issue to translate it too
but holy sdhit it looks good
why my loop causes it look like this
i cant understand
it should be sphere some how
and my creates this
the AIR == loop output
fixed it
Translated it into java
yeah its pretty simple to translate it
like the concept of loops is the same everywhere ;P
Yeah but this code is quite messy. And there is no concept of blocks or similar so its a bit hard to
get from 3d boxes to a discrete voxel
Anyways here is the code for everyone that wants to copy it.
https://gist.github.com/Flo0/62c95b98ca4536e1d9a2fdc4b5d1872a
It really boils down to a simple
public List<Block> createSphere(int radius, Location location) { ... }
Vector previous = entity.getVelocity().clone();
entity.teleport(location.clone().setDirection(entity.getLocation().getDirection()));
entity.setVelocity(previous);
That is my current code, however the player is not keeping it's velocity, how can I solve that?
Try setting the velocity one tick later.
How do you determine if the player keeps his velocity or not?
I have a command to apply a fast velocity to the player (like launching) to test, if they keep moving after the teleport at roughly the same speed, success
eyy it works
how do I hardcodedly add extra Y +1 to a pre defined bukkit Location variable?
like, myLocation + (0, 1, 0)
Just call add(0, 1, 0) on your location
ah cool
if it is an entities location you might wanna clone it first
This had to be done in 1.12 and before
Not needed anymore
Now every Location is a clone when you get it
what is the difference between equals() || isSimilar()?
creates a black hole if you use both
yep equals check if stack.isSimilar(otherStack) && stack.size == otherStack.getSize()
apparently this is deprecated, I need to use it for my library so I can include a jar that contains minimized adventure, I don't want to install the jar with maven because its for public use and thats just inconvient
<dependency>
<groupId>com.sample</groupId>
<artifactId>sample</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/Name_Your_JAR.jar</systemPath>
</dependency>```
WorldGuard by far has one of the most fucked up API designs ever. Just look at this:
public class WorldGuardProtection implements PluginProtection {
@Override
public boolean canBuild(@NotNull Player player, @NotNull Location location) {
com.sk89q.worldedit.util.Location weirdLocation = BukkitAdapter.adapt(location);
LocalPlayer weirdPlayer = WorldGuardPlugin.inst().wrapPlayer(player);
return WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery().testBuild(weirdLocation, weirdPlayer, Flags.BUILD);
}
Okay, I gotta convert a Bukkit Location to a WE Location using BukkitAdapter. I get it, makes sense.
I also gotta wrap the Bukkit Player to a WE Player, makes sense. But... the **BukkitAdapter **cannot do that. Instead, I have to do WorldGuardPlugin.inst()
Okay, well, maybe this has some reasons. BUT NOW WTF. One could assume that WorldGuardPlugin.inst() is what I need for most API calls, but no - to actually get a region container, I now have to use WorldGuard.getInstance().getPlatform(). WTF? Who the fuck thought "yeah this makes perfect sense
"
Why is there even a difference between WorldGuardPlugin and WorldGuard, why do both have an instance, and why can the BukkitAdapter adapt locations, but e.g. not players?
sounds like badly planned api decisions piled ontop of eachother
Not just open-source
I mean
reasons for all tbh
BukkitAdapter is pure, does not work with any state
WorldGuardPlugin is specifically for bukkit based players, tho it needs state as we players require a plugin instance to fetch most of their data
last part then obviously is the platform independent part
I guess you could re-expose WorldGuardPlugin's methods in the bukkit adapter tho like
that mangles state as you'd have a stateless pure namespace like class depend on some partial static state in WorldGuardPlugin
or re-expose the bukkit adapter methods in the world guard plugin tho that also kinda does not fit
¯_(ツ)_/¯
what is wrong with maven
Just installed Intelij IDEA after changing my OS
And getting this error.
Tried maven plugins import with force updating but didn't worked.
my pom.xml is same with Minecraft plugin dev's spigot.
anyone has any idea what's wrong?
first link on google
you invalidated cache ?
pretty sure it has no reason to not work, i mean if it doesn't work for you just manually put plugins in /.m2/repository
WorldGuardPlugin isn't just for Bukkit, it's the same for forge and fabric etc
oh wait I confused WorldGuardPlugin with WorldGuard
then why couldn't at least the BukkitAdapter methods also be in WorldGuardPlugin or vice versa
Well one is stateless and the other isn't
i dont get what you mean with that
bukkit adapter does not require a plugin instance
you can always construct a WE location from a bukkit locatio
you can only construct a WE player if you have a plugin for it
yeah okay that's the technical explanation I already said made sooome sense internally, but why e.g. couldn't at least WorldGuardPlugin also implement / extend WorldGuard or whatever
it doesn't really make sense from the enduser point to have three different endpoints
Well yea but that is generally the pain of a multi platform stuff
I guess your world guard plugin could also just expose the region manager from the core
but like
¯_(ツ)_/¯
they could at least have called it WorldGuardBukkit or so, because... is it WorldGuardMod in Fabric then? and what is in Forge? also WorldGuardMod?
I would have understood WorldGuard<Platform>
then <Platform>Adapter
and finally, WorldGuard
Welp naming conventions are a wild thing xD
or well, naming choices rather
but yea I agree, you generally just have a fun time when consuming API from a multiplatform
could also just be solved by not having the player require a plugin instance
so you don't have to call WorldGuardPlugin at all
yeah overall it's just a bit annoying lol
how do I get a metadata key's value
getMetadata() ?
and how is this not exactly what you want then?
it returns a List of MetadataValue, the list contains the value for each plugin that has set data for this key
it just returns @27hc8(912u4 or something
it returns a List<MetadataValue>
you can then filter this list for the value that has your plugin instance as owning plugin
alright lemme give it a shot thanks
something like this, haven't tested though
// set the value
myPlayer.setMetadata("age",new FixedMetadataValue(myPlugin, 42));
// get the value with that key that was set by your plugin, or null if not set
MetadataValue value = myPlayer.getMetadata("age")
.stream()
.filter(m -> m.getOwningPlugin().equals(myPlugin))
.findAny()
.orElse(null);
// If the value is not null, we can get it as int, String, or whatever it is
if(value != null) {
int age = value.asInt();
}
Sorry guys, I had a question, in this century have they invented a method to make it easier to set something via chat? That is, that you click "Set" and it says "Write in chat your new favorite block" and when you write in chat, it sets it and reopens the inventory?
An API or something
To avoid the usual 1000 lines with an arraylist to accompany them
what is .stream()
one of the nicest things in the world
learning basic java time
in my experience, after 3 years I had skipped that part, now I know it and I hardly ever use it hahaha
Guys, if you can help me, I will send you a little flower via discord 🙂
I feel it, mfn alex has the answer
you could of course also use a regular for loop
myPlayer.setMetadata("age",new FixedMetadataValue(myPlugin, 42));
List<MetadataValue> values = myPlayer.getMetadata("age");
int age = -1;
for(MetadataValue value : values) {
if(myPlugin.equals(value.getOwningPlugin())) {
age = value.asInt();
break;
}
}
baeldung has a nice explanation about streams
us*
What error are you getting
Also is it your plugin?
ConversationAPI
declaration: package: org.bukkit.conversations, class: Conversation
no I think my I am using info wrong
what's line 53? your paste doesnt include the imports etc
I am sending you a flower via binary code 🍗
you have no mysql server running or not on 3306 or it's blocked by your firewall or your DNS name "db1.falix.cc" doesn't point to your server's IP
also why do you posted your full credentials here
why not
Could be Nat loopback issue too
But as he provided no error, we can't know
¯_(ツ)_/¯
45.129.180.23
is that your server's ip in the first place?
the mysql server's ip?
getInt get's the int of the column you give it
what does getLeaderboardType().getRows() return?
so what is "rows" in this case?
level? wins? finalkills? whatever of those it is, your table doesn't have such a column. it seems quite weird that you call it "rows" while referring to "column names" btw
so where is the "level" column?
print out the result of getRow() before throwing it into getInt() and see what it says
what's Stats line 70?
"connection" is null
it should throw some error
i dont even know where your MySQL class comes from, so I can't tell you anything
if you catch it correctly
maybe you shouldnt ignore all exceptions but rather print them out or rethrow them
and then see what they say
alr
Virgin e.printStackTrace() vs Chad try-catch(ignored)
and when pasting, please do not remove all the imports. for example now I have no idea whether you have your orn DriverManager or whether you use the java.sql.DriverManager
try {
DriverManager.getConnection("asd");
} catch (SQLException exception) {
throw new RuntimeException(exception);
}

you don't have to access, or the password is wrong, etc
[12:39:46 WARN]: Caused by: java.sql.SQLException: Access denied for user 'u728282_rUvDJMZKnj'@'46.4.94.213' (using password: YES)
print out your SQL queries before executing them
nice password
that's only the username. the password's here: https://cdn.discordapp.com/attachments/741875863271899136/1017755908236918834/unknown.png
why do you keep sending random screenshots instead of what I'm asking for lol
print out the SQL statements you execute before executing them
no...
you print out the result
not the sql query
the actual SQL string
SELECT lastRank FROM FeatherAccount WHERE name = mfnalex
that is the actual query
e.g. so we can see what ? gets replaced with
or print out the whole cachedRowSet by looping over everything inside
it's really hard to help you if you don't know the basics of how ResultSets etc. work
I'd also split up everything so you better see what exactly throws the exception, e.g.
String name = cachedRowSet.getString("name");
Whatever result = DatabaseManager.query("SELECT lastRank FROM FeatherAccount WHERE name = ?", name);
String lastRank = result.getString("lastRank");
no idea what DatabaseManager.query(...) returns
I guess another ResultSet?
again, same problem
you don't seem to understand that a MetadataValue is not a String
declaration: package: org.bukkit.metadata, interface: MetadataValue
But I need a string, that's what I meant by "value"
then take a look at the javadocs I just sent
My password is the same
or at the code I sent you earlier which showed you that MetadataValue has methods like getInt(), getString(), etc
@tender shard my password is correct
show your enum thing again
then you don't have permissions for this database
you need to advance into the first element of the row set i think
if its not null
is there a cachedRowSet.next() method?
oh wait i missed u already callling it
can you send the full stascktrace
How can i fix this error in console? I triend to fix it my self but i can' t understand it very well.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
there's no need to ping me
send ChatEvent.java line 18
also looks like you are using paper
if (p.getInventory().getHelmet().equals(Utils.getMask())) {
Player probably has no helmet on
So you have to check if p.getInventory.getHelmet() != null
your CachedRowSet simply doesn't have any column called "name" as it seems
print out the actual column names of your result set right after you retrieved it
CachedRowSet set = /* ... */;
ResultSet result = set.getOriginal();
ResultSetMetaData meta = result.getMetaData();
for(int i = 1; i <= meta.getColumnCount(); i++) {
String name = meta.getColumnName(i);
System.out.println("Column " + i + ": " + name);
}
then you cannot get the value of the column "name" if you only selected "lastRank"
learn the basics of SQL please. this is a good place to start https://www.w3schools.com/sql/sql_intro.asp
dumb question but can you force open the player inventory
no
unfortunate
guys one question, i'm sending the PacketPlayOutEntityEffect but its not working, have i send another packet?
show your code
private Object PacketEffect() throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException, NoSuchFieldException {
Constructor<?> spawnEntity = getNMSClass("PacketPlayOutEntityEffect").getConstructor(int.class,getNMSClass("MobEffect"));
Constructor<?> constructor_mobEffect = getNMSClass("MobEffect").getConstructor(getNMSClass("MobEffectList"),int.class);
Class<?> moblist = getNMSClass("MobEffects");
Object mobEffect = constructor_mobEffect.newInstance(moblist.getField("INVISIBILITY").get(moblist),Integer.MAX_VALUE);
return spawnEntity.newInstance(getEntityIDArrow(),mobEffect);
}
using Reflection, sorry xd
damn, interesting lol
this returns the packet and i send it with my method "sendPacket" (that method works 'cause i'm sending other packets)
Will there be any economy plugin that is compatible with GeyserMc?
geyser is just a packet translator
it has nothing to do with how your server works
pretty sure its completely clientsided
doubt its possible
any errors or just not working?
no errors x.x
Object handle2 = arrow.getClass().getMethod("getHandle").invoke(arrow);
sendPacket(PacketSpawnEntity(handle2));
sendPacket(PacketEffect());
sendPacket(PacketMetaData(handle2));
Get their inventory and open it
Well, and any economy plugin that you recommend?
Check out vaults spigot page
doesnt work
not going to work
There are many, I don't know which one to choose
the method isn’t named that at runtime
why are you using reflection btw
ah yeah, it would be obfuscated
those names are just remap names
all versions
na
it would lol
thats the outcome
That’s how it should look
its not to me
remap is just for development, it changes to obfuscated version when compiled
compile time and runtime are different
not whati m going for
i'm using mvn, i dont want to create a folder for each version xD
why not use regular nms names if you're doing reflection anyway
im not saying it is
PacketPlayOutEntityEffect packetPlayOutEntityEffect = new PacketPlayOutEntityEffect(entityId,
new MobEffect(MobEffects.INVISIBILITY,Integer.MAX_VALUE));
CraftPlayer craftPlayer = (CraftPlayer) player;
craftPlayer.getHandle().playerConnection.sendPacket(packetPlayOutEntityEffect);
its doesnt apply the effect :(
if you are just trying to hide the entity, send an entity remove packet
but i'm using the entity as vehicule (Passanger is an armorstand)
will it works if i remove it?
noup
player wont ride it
arrow.addPassanger(armorStand);
player.addPassanger(arrow);
``` this is what i'm doing
Are trying to open the normal inventory
yeah
not possible as far as i know
i mean it might work, idk what your usecase is
worth a try
why isn't it relocating, its still at net.kyori
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>net.kyori</pattern>
<shadedPattern>com.neomechanical.neoutils.kyori</shadedPattern>
</relocation>
</relocations>
<minimizeJar>true</minimizeJar>
</configuration>
</plugin>```
so whats the different with deploy and package?
still, I doubt that would not relocate it
Is there a plugin that is to remove the commands? It gives a lot of lag when I put the command bar
deploy is for when you are putting it on a remote repo
my full pom.xml is here https://github.com/KyTDK/NeoUtils/blob/master/implementation/pom.xml
remove what commands
but I am putting it on a remote repo lol
I mean do not remove them, remove them from the chat, keep them working normally
doesn't sound like a dev question
do you mean how do I remove certain commands from a plugin?
I ran clean and it did nothing
by nothing I mean it still doesn't relocate
No, I mean that when I put the / many commands come out, then it gives me lag
I would like to know if there is a plugin to remove that
thats not a development question
we make plugins, not suggest them
go to #help-server
OK thank you
Did you use the shaded jar?
maybe try net.kyori.adventure
instead of net.kyori
yes I'm checking the shaded jar
im reading on github and people are saying they have issues when they use the groupId
if its the same as the package name
thats strange, look at my jar
its not relocated but there is a kyori dir with some classes
You sure that’s the shaded jar
kyori package owuldnt be in there if it werent
im looking at the left one
Try using net.kyori.adventure then
💀 I just did
that was buoobuoo's suggestion
geyser uses the entire .netkyori package
ssems to work fine for them
have you tried without minimizeJar?
Set the scope to compile
nope, it didn't fix the problem
wdym
yes there is a way
try the maven jar plugin even
yeah use an async tab complete
im setting phase from package to deploy, seems logical
Do you guys know where to find some good examples of using ConversationalAPIs? I can't find anything much and I don't see Doc explaining it as well.
did not work
weird how its only relocating some packages
very strange
class extends TabCompleter
constructor() {
PluginInstance.getCommand("cmd").setTabCompleter(this);
}
Did you set the compiler level
public List<String> onTabComplete(and so on) {
// you have String[] args here, use it lol
}```
Isn’t there a tabcompelete event
?paste
?jd-s
this is the build log for my module trying to relocate kyori https://paste.md-5.net/etujuledal.rb
if (List.of(args).contains("yourWord")) {
listToReturn.remove("yourWord");
}```
or right in the end when you made all tab completes in one list to return
listToReturn.removeAll(args);
explain it fully then
tf you want then
I think you could use what I sent and then modify the set
your explanation is very vague
????
cmd.getName()
you want to remove it when player wants to run the command by pressing enter?
not possible afaik
you want to edit the tab completor for commands to remove a certain thing?
you could - make a command for each world name
and disable it if the world isnt available
I don't understand what you really want
so tab complete wouldnt work for it
yep
only args can be tab completed
no thats a lie
commands can, but you cant get a tab complete befoer an entire command is entered
yeah thats what i was saying before
just disable the command if not applicable
so it wont tab complete
true
but theres a lot of fuckery to that
I fixed the relocation problem
what was it
I can't relocate in the module that shades the dependency for some reason, I have to relocate in the parent module
its whacked but I'm glad it works
oh so you knew about this?
I was unaware that was a thing
oh well, at least I learnt something
Can I listen for other plugins triggering ex. actionbar?
could listen for the packet
not the api method itself though
dangg
what usecase
I've just found
somethign called Instrumentation
has the redfineClasses method which can change method behaviour
could use it to rewrite the action bar method and intercept it
yeah altho requires a java agent to be enabled
I want to roughly make a tiny cloud of particles in a block, does setting count make that effect? (Like spawning say 15 particles inside a block spread out?)
roughly, yeah
great
the offset isnt heaps
Yeah just roughly
To give like a mini cloud effect
Hm
I'll fill the rest and see
what is it suppsoed to indicate
Hm looks a bit strange imo
how could i detect when an attack is blocked by a shield?
Yeah
still working on it
At some point it will transition between where you are and where you are going
so it looks as if the world is changing around you as you move in it
pretty sure EntityDamagedByEntity still gets called if blocked by a shield
just check is player.isBlocking
alright thanks :D
guys, should this work?
CraftArrow craftArrow = instance;
craftArrow.getHandle().setInvisible(true);
because its not working to me :(
new CraftArrow(ServerLevel,EntityTypes.ARROW.a(worldserver));
need with packets
uhh
also i'm sending PacketMetaData
the arrow spawn with PacketSpawnEntity but doesnt works the "Invisible" method
also i tried PacketPlayOutEntityDestroy but the solution isn't that i looking for
also i tried :
PacketPlayOutEntityEffect packetPlayOutEntityEffect = new PacketPlayOutEntityEffect(entityId,
new MobEffect(MobEffects.INVISIBILITY,Integer.MAX_VALUE));
CraftPlayer craftPlayer = (CraftPlayer) player;
craftPlayer.getHandle().playerConnection.sendPacket(packetPlayOutEntityEffect);
``` but not working idk why
what is the purpose of giving invisibility 2 billion
Duration
just hide the arrow
entity destroy packet should work
not to me because i'm doing :
player.addPassanger(craftArrow.getHandle().getBukkitEntity());
Honestly I'm not sure Arrows can be invisible, that's why all the threads are telling you to send the destroy packet.
If the arrow exists on the server, and you send the destroy packet for a player, the arrow would be invisible for the player but still exist on the server.
Since you're sending the arrow as a packet in the first place, the server has no idea its even there.
they can, with bukkit api yo can do
Arrow arrow;
arrow.addCustomEffect(...);
Sure, but that doesn't mean the effects actually do anything.
just because its available doesnt mean it works
I mean, you can give a Shulker speed/slowness, doesn't change anything about it though afaik
Your best bet probably is to spawn the arrow normally and then send the Destroy packet to everyone you want it to be invisible for.
how to get verified?
!verify
Usage: !verify <forums username>
i know the command but like im not verified
It sends you a PM on the spigot forums iirc
iirc??
but i using player.addPassanger(craftArrow.getHandle().getBukkitEntity()); so if i destroy it, won't work x.x
if I recall correctly, check your spigot dms
Why wouldn't it?
just its not working xd
oh ok
How are you spawning the arrow?
I want to change world gen system with my plugin. I found a basic from spigot forums. but where I can learn it properly?
x.x if i do world.spawn(location,Arrow.class); it will be on client-side and server-side
orr...
wait
<.<
noup
It would be both, yes. That's why you send the Destroy packet so you're basically removing it from the Client side
Which makes it invisible
right but i have to do for all players
Yes
better just do with PacketPlayOutSpawnEntity
Well okay, but you can't use the API to set their passengers then.
yes but its not server side
ArmorStands support invisibility and arrows dont though, so it doesn't translate 1-to-1 
yep :(
ok thanks
i can destroy the arrow but Passanger wont work :c
what exactly are oyu trying to do
There's a SetPassengers packet you have to send
arrow.addPassanger(armorstand)
player.addPassanger(arrow)
for example, name tags
PacketMountEntity?
ah you're trying to mount it
just teleport it same time as player move packet
its seamless
i have a zombie spawns with a custom command and i want to set him drop diamond blocks but i confused how to set him data .if i use nametags users can use nametag to acces that mob
i'm doing asynch task , then it will shake
Yeah I guess
pdc
?
?pdc
?pdc
wrapper for nbt
🥷
lmao
i'm doing it too xd
PacketMountEntity(handle2) and handle2 = craftArrow.getHandler
and how do i get voice chat?
Mod <.<
...................................................................................................
yay just spent 30 min on verifying my account for nothing
@drowsy helm I got a gif to show you how the portals work, though its like 40M
G R E A T
dude, u are askin in #help-development xddd
arrow bigger than the lil gentleman
xD
i'm teleporting the arrow to the position but if i dont
:
but the arrow is invisible <.<
k guys my soluation were dogshit
how to compare
block data
please dont comment ussless things like
"use newer version"
the to string solution was bad?
very bad yes
just use like 5000 if statements
or store field offsets of classes and compare each field one by one using Unsafe
do yall know what
content {
onlyForConfigurations(PAPERCLIP_CONFIG)
}
this would be in groovy?
maven("https://papermc.io/repo/repository/maven-public/") {
content {
onlyForConfigurations(PAPERCLIP_CONFIG)
}
}
full part
ik i can add url "" to maven
thats correct groovy syntax
show err
> Could not get unknown property 'PAPERCLIP_CONFIG' for object of type org.gradle.api.internal.artifacts.repositories.DefaultMavenRepositoryContentDescriptor.
so correct syntax just different naming
well
im currently migrating to groovy
¯_(ツ)_/¯
upstream decided to use kotlin but i dont like it
what r u trying to do
.
ou nicee
wahts the name for those sort of areas
non euclidean
something like that
bruh that almost crashed my phone
7.8MB
kotlin is ass
tasks.withType < Javadoc > {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType < ProcessResources > {
filteringCharset = Charsets.UTF_8.name()
}
what would those be
shalli just do the name way of groovy
nah its way too many things to do and its start to be messy
why using kotlin too
please dont let me to stick to it
i had other issue updating the block later
fucking broken 1.8
broke ass version
mojang should ban it for god sake
from usage
is that ur code?
yeah
i got messy due i cloud not get compare those fucking bytes
so i had to get byte and add it to string and compare it
and guess what
it worked
but updating block data doesnt work as well
i use switch cases really often
what the heck is the difference between worldguard's StateFlags "BLOCK_PLACE" and "BUILD"? o0
build is a generalized thing
Yeah
build also blocks mining blocks!
yeah but just imagine I use worldguard's api to check if a player has BUILD permission
and they have perms BLOCK_BREAK and BLOCK_PLACE but NOT to sleep in beds
then they do NOT have build permission?
how is sleeping related to building
Hm yeah I wonder what their order of priority is
or does it mean they have BUILD flag if ANY of those mentioned things is allowed? because that would mean they have BUILD = allow even when they cannot place or break blocks but are only allowed to switch levers
both makes zero sense
I assume if you directly check for build permissions but, for example, they have block-place denied, build would return true but that doesn't necessary mean they can do all the things under the build flag
How can I store the world in a var?
So if block-place is denied, build returns true but they still can't place blocks
I guess 
basically I wonder whether I should use BUILD or BLOCK_PLACE in the first method here
@Override
public boolean canBuild(@Nonnull Player player, @Nonnull Location location) {
return testStateFlag(player, location, Flags.BLOCK_PLACE);
}
@Override
public boolean canBreak(@Nonnull Player player, @Nonnull Location location) {
return testStateFlag(player, location, Flags.BLOCK_BREAK);
}
private static boolean testStateFlag(Player player, Location location, StateFlag flag) {
return WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery().testBuild(getWeirdLocation(location), getWeirdPlayer(player), flag);
}
I'd use block place tbh
Since my bets are on that one taking priority? Maybe you need both 
yeah I guess so
Someone pls ans this ;-;
worldList a list of some string
worldList.stream().map(Bukkit::getWorld)
that will return a Stream<World> type
and you can do what you wish with that
filter that by notnull probably
yep was about to add
alright. thanks
how can i do that if block.getLocation == 155, 100, 50...?
this doesnt work``` Location lapisBlock = new Location(player.getWorld(), 155, 88, 145);
Location redstoneBlock = new Location(player.getWorld(), 155, 88, 147);
Location emeraldBlock = new Location(player.getWorld(), 155, 88, 150);
if(action == Action.RIGHT_CLICK_BLOCK && hand == EquipmentSlot.HAND)
{
if(block.getType() == Material.LAPIS_BLOCK && block.getLocation() == lapisBlock)```
use equals
just =?
block.getLoc().equals(otherLoc)
Either .equals() or use identity comparision with .getBlockX, .getBlockY etc
so block.getLocation().equals(lapisBlock)?
yes
= -> Assignment operator
== -> Identity comparision
!= -> Negative identity comparision
+=, /=, -=, *= -> Assignment operator with expression
>= -> Value comparision (greater or equal to)
<= -> Value comparision (smaller or equal to)
== checks if two objects point to the same space in memory, equal compares the object based on its internal state
if overridden atleast
intresting, thanks
That only applies to L-type (traditional objects) references
ints, floats, doubles, longs, etc. will be compared by value (there isn't a memory location in a traditional sense anyways)
isn't build like a combined version of place and brake?
dont stack values have a memory location too (as they can have pointers)? 👀
Similarly value types/primitive objects are going to behave a bit differently, but they aren't available outside of LWorld testing builds
stack values?
And in the end wanna say that Strings are in a string pool
unlike all other objects/primitives
If you do:
String s = "Hello";
String s2 = "Hello";
s == s2 will return true
well stupid question actually
But new String("hello") == "hello" will be strictly false
The string pool is not a magic thing
String s2 = new String("Hello");
s == s2 will return false
But s == s2.intern() will return true
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
List<String> uuidList = new ArrayList<>(DataFile.get().getConfigurationSection("Players").getKeys(false));
if (!(uuidList.contains(player.getUniqueId().toString()))) {
DataFile.get().set("Players." + player.getUniqueId() + ".Ban", true);
DataFile.get().set("Players." + player.getUniqueId() + ".Name", player.getName());
DataFile.get().set("Players." + player.getUniqueId() + ".Data", "");
DataFile.save();
}
else return;
}```
Hello, i'm trying to create a section affiliate to the player when he connects on the server but this dont works, can you help me pls ?
(No errors)
Yes, just that .intern should only be used by the JVM - hence the name
Also
s = new String("Hello");
s2 = new String("Hello");
s == s2 return false
Relying on the string pool is nice and all, but there is little use in that
even though they have same value
Yes, because they are L-type references
It just happens to be the case that the JVM caches them (which is the string pool) because it makes sense to do that
Yeah, speed and stuff
I don't remember, but there probably was a VM parameter for String Pool GC
Related to pool only
Not sure why you'd want to have it though
Unless you have some bork application running
Well every function is made for something
Someday you might need it
For complete dummies
String s = "Hi";
String s2 = s;
s == s2 returns true
and
String s = new String("Hi");
String s2 = s;
s == s2 also returns true;
If not sure, equals/equalsIgnoreCase is better
why do you return
Yes, due to some applications using the .intern method when they shouldn't
Myeah, the else return is superfluous, but not strictly an issue
What exactly isn't working
maybe you forgot @EventHandler, or forgot to register listener, or wrote .save() method wrong
ooooops i'm soo dumb
i try wait
Also remove else return
it's useless
there is also a new String#comapreTo(String) method
what does that do
Idk if it's worth use, but maybe just a replacement of equals, cuz equals runs for OBJECT, so checks if object is instanceof string and so on
Never seen compareTo or String#equals realization
Cool
If it's 0 then they are equal, but if it's -1 or 1 it indicates < or >
Good for sorting alphabetically ^
or backwards alphabetically
I always sort my strings like this
strings.sort((o1, o2) -> o1.equals(o2) ? 0 : ThreadLocalRandom.current().nextBoolean() ? -1 : 1);
if(zombie.getEquipment().getItemInMainHand() ){}
``` i want when a zombie spawned with an iron shovel server do an action but how can i set it?
lol
tnx
if(player.hasMetadata("meta1") || player.hasMetadata("meta2") || player.hasMetadata("meta3")) ``` Is there a way to check which one is the true one without 3 additional if statements
uhm no
you could assign them all to a variable to reuse
before this if statement
if (meta1) return;
if (meta2) return;
if (meta3) return; works
how often do you guys write pseudocode
?dmca
An unofficial explanation of the DMCA can be found here: https://www.spigotmc.org/wiki/unofficial-explanation-about-the-dmca/
Only really write pseudo when I'm writing comments for future methods or helping someone.
Same as above or when I can’t figure something out
once a year or so
https://sourceb.in/wteptnLgJi Hi im having an issues regarding the particle disappearing from the player after showed
Full code: https://sourceb.in/j1cIf8Q5SQ
particles are not permanent
how i can solve this?
i know that
that answers the question you asked
Jitpack sucks
yes but a work around to fix it?
