#help-development
1 messages ยท Page 147 of 1
he is talking about vanilla statistics im pretty sure
Statistics are in Bukkit
Elgar
anyways, ideally you only need to check stats from online players
Its not a plugin
My problem is the thing i set in config file is wiping
how are you trying to read the config
I want to understand it
Yea, like it's been mentioned multiple times by now, it's cause you are wiping it on load.
Elgar bro
I have tried newHashSet(); because i couldnt get any consequences
Without it still wiping
newHashSet() is giving you a BLANK Set every time you call it
My guy, what do you think the new keyword does?
all you do is throw the results away and store a NEW blank Set.
Elgar i deleted it bro forget that method please Elgar๐ฅฒ๐ฅฒ
give me at least one reason to store all players in config everytime player joins
still why
Next best option?
its quite obvious, everytime a player joins, you just overwrite the players list in the file
Wait Elgar
You know what's even more funny. He doesn't even update the list.
how can i simulate block break particles?
?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.
basically just spawn them
how
particles or teh texture on the block?
My brain is able to understand it
the breaking particles that spawn when a block breaks
yes so why are you still confused by it
your brain is not able to create a full idea and code it
we don't understand your goal
then yes spawn prticle
oh wait im dumb
lol
bruuuuh
public HashSet newHashSet wait wha
how can I look up current existing variables like a debugger but only for my plugin?
so uh I do player#sendBlockDamage and it works.. kinda. It changes the blocks damage for a split second and then it turns back to whatever was on the clients side
reflection?
or
I tried sending it every tick but its flashy
just print every second
I tried mining fatigue, didnt owkr
yeah you need both
but than wouldnt this cause that my variable never gets garbage collected
my goal is to see if my variable will be garbage collected
WeakReference the way to go?
it might trip if you make negative levels with spigot's api, so you might need to send effect packets directly
I need every tick and mining fatigue -1?
ye
override finalize with a sysout call and youll see?
isnt it unsafe to use finalize ๐
what version
1.8
fuck off then
lol
oh god i would really rather not fuck with packets
it only happens on 1.8
?1.8
Too old! (Click the link to get the exact time)
Didn't you just change it from 1.8 to be a 1.19 animation
That is an error I've seen plenty of times with invalid packets
It works in later game versions right?
yeah
Do you have viaversion
it kicks on 1.8 but not 1.19
Or is it viabackwards
yes
Damn it really is a skill issue then
Full plugin list?
just viaversion and the plugin im working on
no its using-a-7-year-old-version issue
yep, so its a using-a-7-year-old-version issue
I mean its weird that you can connect and the packet isn't being translated
Idk a 7 year old version is still the best one I've used so far
I don't use it anymore because I'm forced to but its still bussin
that is definitely not true-
I love opening a voxel game and my laptop not exploding
Just make a better 1.8 api what can I say
i remember the time my old laptop took 5 minutes to start minecraft 1.14
Ikr
is this page empty for other people too: https://www.mingw.org/
I have a threadripper now and it loads the latest versions fast but I will never forget how good of hardware I need to run such a simple game so I will forever support 1.8 users
Ya but why bother when theres a new version
The new versions are a lot more resource intensive
p.p skill issue what can I say
yea mojang developer skill issue in optimisation
Yes
but optimisation simply doesnt make money
so why bother
it doesnt bring new players, shiny cool toys bring new players
Idk probably because people would finally stop playing 1.8 ๐
got it ig
doubt that
most ppl who use 1.8 are usin it for pvp
After 1.8 the only updates i played were 1.12, 1.16 and 1.18
Because they actually had content
also people playing newer versions dont give money to mojang
That I found enjoyable
Are you sure about that
Btw what the fuck does PotionEffect#ambient do? Makes potion effect produce more, translucent, particles. made no sense to me
Maybe I'm a minecraft marketplace user
Maybe I'm a realms 1.8 user
youre forced to the latest version
Idk if realms even has versioning lol probably not
realms dont have versioning
Lame
it simple, optimisation doenst make them money
Idk people tend to not use unoptimised stuff
People don't play star citizen cause they need a spaceship gpu to play a spaceship game
Also because its overpriced but that's different lol
Yeah, but a update like "Look guys we made it faster!" doesnt bring in new players now does it?
I mean it would bring my gf back
But "look at these new shiny toys you can play with" keeps people engaged
She used to play but over time with all the updates her laptop can't run it anymore
But I guess she already owns the game so she's not new lol
Eh, is she gonna buy a new account? No? Doesnt make em money now does it
it saves on server costs
is there a way to make a task run faster than 1 tick?
also eventho people say minecraft is terribly optimised
yes an executorservice
They dont host the servers, why would they care
They host realms as far as im aware but they can just charge more
Oh you mean the server itself
afaik the server is run internally along with the client
Well player counts not being there becsuse there's other performant games also doesn't bring them money
its still decently runnable
So it optimizes single player performance
Bruh yeah for a 1000$ pc
Try running it on an i5 ๐ฅฒ
they have no competition, what are they gonna play? fucking fortnite?
I've put like 1.5k into my pc and can barely run 1.19 above 200 fps
w decent mods like sodium you can run it at 60 fps
Sodium only ever did Jack shit for me
my old pc could barely run 1.8 above 60fps
bro idk what to say except still issue
I installed sodium and some other weird element mods and it gave me like 10fps more 40 fps still ain't fun
upgrade your computer
Idk or mojang can upgrade their code
you gotta realize that poor people exist
They can tho
they can
its not as easy as "oo lets just make it faster!"
there are some pretty stupid things going on
It really is
Most major performance gains will require a whole rewrite of a system
which will require more systems to change
I can't sleep until my code runs under 0.1ms
If there's whole mods dedicated to optimisations don't you think there is a major skill issue
@EventHandler
public void PlayerLoginEvent (final PlayerJoinEvent event) {
inject(event.getPlayer());
}
public void inject( final Player player) {
(((CraftPlayer)player).getHandle().playerConnection // being null why ?```
**why the playerConnection is null?**
Yes because the official version was incompetent so mod devs took it upon themselves?
It doesn't change the fact it can be optimised
God
mods inject into the game's code
you clearly have 0 experience with making games
it can be, and it does
Yeah sure it does
If the game wasnt fucking optimised the performance between 1.17 and 1.19 would be major
Let the mod devs do the work for you to fix your own skill issue gg
but the new stuff and optimisation kinda cancel each otehr out
ehh not really no
you can make new, optimized stuff
or grab old code and rework it
while adding new features
Its not as easy as just "lets optimise th is function"
minecraft is a billion dollar game
If you're adding a new feature on top of a non performant base you can always rewrite that
it really is
source: I optimize shit
gosh i cant be bothered to argue lets just say youre right so i can get back to my work
player not joined yet?
Enjoy
paper optimized nms collisions
integrating those patches directly on the base game would bring a performance boost
but that event is called everytime the player join tf
the player connection should be initialized during preLogin
as it's used for the handshake process
what i need to do then?
again doesnt bring as many players as new stuff
ye
players quitting doesnt make them lose money, thye dont give 2 fucks if you buy the game and never play it
most peoples pc can run minecraft at a decent fps even without mods
not really
is there a way to make a task run faster than 1 tick?
it can run faster than 1 tick
use a timertask ig
but the server will only update it after 1 tick
uh
Idk, I dont think it works
If I had quit minecraft due to shitty performance like 8 years ago
I wouldn't have given them hundreds of dollars in merch
mousepads, lights, mugs etc
It also ruins their reputation
If async yes
cyberpunk flopped a bit because of its shitty bugs and performance
yeah but you wouldnt quit minecraft due to having 150 fps instead of 200
I ran the game on a computer that had a pentium 4 and couldn't handle windows xp
ran that shit in linux mint 16.04
playing on 1.5.2
with 20 fps
sure the game crashed a ton
but it was still playable
I only built my 10/10 rig like 2 years ago
after saving up for months
got all my cash from 5$ plugin commissions
I'd say 30-60 fps is playable
but how is it that I get more FPS on the newer call of duties than minecraft
oh im not saying minecraft is optimised
its performance is shit
but ppl are acting like its as easy as just "yee lets just.. um make it fast"
good code runs fast
If you actually know what you're doing, you can optimize code quite nicely
Thing is, minecraft's a weird ball of tape
some things are fast, others are slow
yeah cuz u dont have 800 different stuff constantlyy interacting
and it's always easy to just build on top of an existing foundation that isn't as big as it should be
depends on the plugin
depends on the plugin too
Ehh actually it is
I'm making a learning platform
that has to synchronize guis across instances
raytracing client-sided image boards and all
I've had some tough code to optimize
Yeah no I dont think this wroks lmao-
e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, Integer.MAX_VALUE, -128, false, false));
actually kinda seems like haste...
imma try changing it to haste?
I tried -1 didnt work
Ya but it made the attack thing super fast so maybeee
yeah no doesnt work
how i can check in the event EntityDamageEvent who attacked the player
listen to the EntityDamangeByEntityEvent instead
with that event i can still manage i only need sword one
im in 1.12.2
is tehre anyway to monitor packets client side
how do yall join spigot plugin dev groups? is there anywhere to look for one or is it a get approached thing?
what type of group are you looking for?
I look for local cults
1.12 is not supported
Dev group, like all work on a single plugin if that makes sense
Oh, for collaborative projects. Not sure actually. The spigot forums is probably a good place to facilitate that
Sweet! Ty lol
first, you sharpen your skills as a coder. Then second, you let those skills go to waste while sitting in this discord. Third wait for the invites ๐
I have started 2 projects with myself maintaining it and two other maintainers joined me for both respective projects. It can just happen ๐
fuck
you didn't have to personally attack me like that
lol
Lmfao yeh been a while since Iโve coded in Java, giggin season is over and now I need to โworkโ ๐ฌ๐ค meh fuck it at least I like it lol
plan your plug-in, write it and test it in baby steps, and itโll be a treat to finish ๐
just make some public plugins here and there, and joining here especially as verified helps too. Takes time really
generally mc is most active around holidays and summer time
I was a pritty active spigot dev a while back got a few plugins with a few hunderd downloads! :))
nice
But yeh looking for smtn good arround xmas lol
I remember that milestone, lol.
Recently our plug-in hit 100k. But it doesnโt mean much. Servers actively using it, user contributions, etc are far more important metrics I think.
Omgggg im gonna cry
I TRIED FUCKING EVERYTHING
I even tried to find a fucking packet listener to see how hypixel does it
BUT I CANT FIND IT DUDE
ok
You just trying to listen for packets?
I'm trying to make a custom mining system, I got everything working but when I do player#sendBlockDamage it shows for a split second and then the client overrides it
While the player is breaking the block? Yeah. Because the client is re-sending that block damage packet while they're breaking the block
Yeah, but how do I fix thattttt
I'm not familiar with the hypixel system, but is it similar to cosmic prisons one?
So basically you want to change how the block damage looks?
yes
This might be of help
Yeah, I know it's definitely possible to do bc I've done it before ๐
I just don't remember what I did
I tried that, didnt work
That exact code in that thread does work, I've used it before. Obviously version changes are probably needed
well okay I only tried the
public void addSlowDig(Player player, int duration) {
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, duration, -1, false, false), true);
}
public void removeSlowDig(Player player) {
player.removePotionEffect(PotionEffectType.SLOW_DIGGING);
}
part
but that should be it to prevent it
That stops them from actually breaking the block
Yeah so the client shouldnt be able to override it
maybe its smth with player#sendBlockAnimation
someone might remember this atrocity: java ArrayList<ArrayList<ArrayList<ItemStack>>> rItems
What's the best way to store a Material => Collection<ItemStack> map, and what's the best way of collapsing the first into the second?
I've been thinking of collapsing everything into one ArrayList<ItemStack>, make a list of all materials, then make a list for every material, insert the itemStacks into it and return it as a HashMap<Material, ArrayList<ItemStack>>. Does anyone from the top of their head know if there's a better way than doing it like this?
public static HashMap<Material, ArrayList<ItemStack>> itemListSorter(ArrayList<ArrayList<ArrayList<ItemStack>>> rItems){
HashMap<Material, ArrayList<ItemStack>> returnMap = new HashMap<>();
HashSet<Material> materialHashSet = new HashSet<>();
ArrayList<ItemStack> rItemsCollapsed = new ArrayList<>();
ArrayList<ItemStack> addList = new ArrayList<>();
for(ArrayList<ArrayList<ItemStack>> t0 : rItems) for(ArrayList<ItemStack> t1 : t0) for(ItemStack t2 : t1) rItemsCollapsed.add(t2);
for(ItemStack stack : rItemsCollapsed) materialHashSet.add(stack.getType());
for(Material m : materialHashSet){
for(ItemStack stack : rItemsCollapsed){
if(stack.getType()==m) addList.add(stack);
}
returnMap.put(m,new ArrayList<>(addList));
addList.clear();
}
return returnMap;
}
Holy fuck 
wym
var x = new HashMap
any reason to use var instead of saying what the hashmap actually contains?
it just looks ugly?
no it also changes the method whatsthatword to <Object, Object>
I mean if you're using a Map<Material, List<ItemStack>>, you could at least make use of an ListMultimap<Material, ItemStack>
so im not 100% sure i should
never heard that one
is it a new thing
guava kekw
ListMultimap<Material, ItemStack> map = MultimapBuilder.hashKeys().arrayListValues().build();
Or something like that. I forget the exact verbage on the methods
kinda verbose
Then it's just simple .put(material, itemstack) calls and it will automatically generate lists for you
Anything that's fetched with a get(material) is a List
ah
that'd remove the redundant loop
considering the list inserts have to be called either way it should be faster
huh thats weird
it wants my multimap to be object, object with that builder
Might have to type the methods
Sec
Nah seems to work fine for me. Just make sure you have everything imported
yeah no i dont think so
whats ur code
ArrayListMultimap<Material, ItemStack> multimap = MultimapBuilder.hashKeys().arrayListValues().build();
cuz that says please make ur variable <Object, Object>
If you really don't care about the list type being an actual List with you get() it, you can just use a Multimap instead
it needs to still be iterable
Yeah you can iterate over a Collection
Can anyone show me an example of creating a inventory(gui) for the target player so for example /inv <player> it would open for specific player
yea my thought
With a for-each anyways. You can't get(i) it
nah thats not the intended use
the structuve vanishes if i collapse it anyways
oh on that topic
Then yeah I'd just change ListMultimap to a Multimap instead
Highest possible denominator
is there a better way to collapse it than doing
ArrayList<ItemStack> collapsed = new ArrayList>();
for(ArrayList<ArrayList<ItemStack>> t0 : list) for(ArrayList<ITemStack> t1 : t0) for(ItemStack t2 : t1) collapsed.add(t2)
i thought maybe some consumer stuff but idk if thatd work
i'm making my cache classes implement Iterable now so i can do userCache.forEach(database::saveUser) lol
dont u have to implement that foreach urself anyways
also
the issue with foreach here is that the consumer wants a ArrayList<ArrayList<ItemStack>> not a ItemStack
which only collapses the outermost layer of that list inside a list stuff
hence the question
Consumer<ArrayList<ArrayList<ItemStack>>> hehe
welp i guess ill keep this and replace the collapsed.add with the multimap.put
Anyone know why im getting this error? I use this all the time, never had it before
You're running a CraftBukkit server
Wow, I think that's the first time I've seen some1 running raw bukkit
๐ CraftBukkit
If they using craft bukkit good chance they got a nice illegally redistributed copy
its just my localhost
illegally redistributed copy? Take a break pal
Bet you're fun at partys
This isn't a party may be wrong but I believe this is discord
I don't have to be fun for you
I re iterate my comment
Also such redistributed jars may contain malware it was of my best intent to inform you that you may have installed some form of malware
I haven't
BuildTools still builds CraftBukkit ;p
If your using buildtools no reason you wouldn't just grab spigot
Especially since you installed it from spigot
Hello there, I'm currently using BungeeCord and wanna make a check if player has permissions.
What can I do if Server is using luckperms bungee or something related?
#hasPermission still works, someone correct me if im wrong
Your parentheses are wrong
You're getting the String "Punish.Inventory.Items." from the config and then adding i + item
Yes
ItemStack#setAmount(item.getAmount() - 1)
I should remove the .Items from the second part then before the + i?
So the listener is the instance that implements Listener, and the EventExecutor is what is called when the event is fired
Uh, I suppose that'd work. I'm honestly not sure how it uses that Listener object you pass
I'm calling registerEvent in a method, and that class implements Listener so I just used this.
how can I add my plugin to the gradle local "repo" so I can use it locally in a different project using gradle
That looks like an extremely convoluted way of just checking to see if someone is clicking a specific block.
Add maven-publish plugin and then use publishToMavenLocal
uh ok :D
Does it work? Everything looks fine to me with the only difference being how we're passing Listeners
Is it though?

Looks like a much more difficult setup
You probably don't need that empty method btw
Since it's calling whatever is in the EventExecutor and not that method
new Listener() {} might also work 
If you have 3 and click does it go to 1?
If it does that means you're not checking for EquipmentSlot
Because PlayerInteractEvent is fired once for main hand and once for offhand
Oh I was talking to Enes sorry
It just so happens you guys are working with the same event LOL
Hi
Hi Verano
someone explain to me
what kind of whichery is this
is it only texture packs?
because when he goes through the wider buttons the text doesn't dissapear
aka hitbox of the item is expanded in the menu
I honestly have no idea how to make those inventories lol
Well I know that much
But the hitboxes and stuff I've no idea how they do that
thats sick
One day I'll figure it out
because switching between items in the inventory should make the item info flash while it switches between slots
joink
Looks literally like registering a listener with extra useless steps to me
make it generic then
Yes really
dang
What difference would it be from just having a Set with a location check?
Then passing it into a function
If you want to make it convoluted be my guest lol
It's more complex than it needs to be
Yes really yes
You could just have a method call that takes in a listener and a Set<Location> and it would function the exact same.
Yes and you can do the exact same for pretty much every event
Cause it's easier and faster to write?
i dont think you will convince him
Send the BlockUtils
and how can I then add it?
do I need:
maven {
// ...
}
but I dont know what to put into the maven stuff
if you want it in your local maven just mvn install
both are gradle projects
ah
but I want to use the one in the other project via local repo
Add it like you would any other depend
Just make sure you have mavenLocal() in your repositories block
but which url should I use?
also I cant find the repo locally even after publishMavenToLocal
Sir, if even i use save method to save my config and it actually happens, why does it wipes the config after reloading?
fileConfig = new YamlConfiguration().loadConfiguration(file);
fileConfig = new YamlConfiguration();
What is the difference
whats wrong with YamlConfiguration.loadConfiguration(file)
the first one creates a new config and then loads the contents of "file"
and the second one obviously only creates a new one without loading anything
It helped to save single variables
also the first one doesnt make sense since loadConfiguration is a static method, not an isntance method
you should call it from YamlConfiguration and not from any YamlConfiguration instance
but HashSet still wiping
ah man abusing static method
YamlConfiguration fileConfig = YamlConfiguration.loadConfiguration(file);
that's how to load a .yml file
FileConfiguration.load(File file); And what is this
yeah it does
that is an instance member of FileConfiguration and loads the values of a file into an already existing config object
people ignoring ide warnings as usually
Guys Iโm freaking out when I do getServers(). keyset(), in the ProxyServer instance, I get a few times both servers, sometimes only the main one. These API drive me crazy, theyโre not stable
(Bungee)
I am saving single objects and they are staying normal when reloading. And i had a list to save but everytime i reload it just wipes the list
@EventHandler
public void onJoin(PlayerJoinEvent e) {
Player p = e.getPlayer();
TestConfig.load();
Main.getPlayers().add(p.getUniqueId().toString());
//This part TestConfig.getConfig().set("players", Main.getPlayers());
TestConfig.getConfig().set(p.getName() + ".deaths", 0);
TestConfig.getConfig().set(p.getName() + ".kills", 0);
TestConfig.save();
}```
Main.getPlayers(); is the set
Hmn which are the parameters that maven deploy exposes?
the ones you entered?
I mean I need to know the request body
that depends on which deployment method you use
Because im trying to do my own sever side for maven Artifacts
just the builtin https provider?
I need the parameters used when you deploy vรญa http
Hmn
Have you seen nexus?
Im trying to replay it myself but custom @tender shard
Sorry for ping ๐ฌ
why do you always fking tweezing stuff from the code instead of advicing something
Ikr
Was just about to say here we go again morice the mong talking down on someone
||i love abuse||
https://haste.miketheshadow.ca/iletuzayav.csharp
When you call the method it goes from
blockUtils.createClickableBlock(block, player.getLocation(), new BlockUtils.Click((listener, interactedEvent) -> {
PlayerInteractEvent customEvent = (PlayerInteractEvent) interactedEvent;
if (customEvent.getAction() != Action.LEFT_CLICK_BLOCK || customEvent.getClickedBlock() == null) return;
if (customEvent.getClickedBlock().equals(block)) {
customEvent.getPlayer().sendMessage("It works!");
}
}, block, EventPriority.HIGHEST));
To
blockClickListener.getBlockMap().put(location,new Context(example -> {
event.getPlayer().sendMessage("It works!");
}));
Probably some ways to improve it but drastically improves readability
you can decide
int level = p.getItemInHand().getEnchantmentLevel(Enchantment.DIG_SPEED);
int levelupgrade = level + 1;
p.getItemInHand().addEnchantment(Enchantment.DIG_SPEED, levelupgrade);
Someone help me? I'm trying to enchant the item without limit, but when it reaches level 5, it gives error to enchant for level 6, how can I enchant without limit?
public String getTicketReason() { String qry = "SELECT FROM tickets WHERE reason=?"; mySQL.update(qry); return qry; }
Dos anyone has an Idea why this Error is showing up?
https://paste.gg/p/anonymous/72c8aef502684d5b801fea493397aa2a
addUnsafeEnchantment
You never set the ? to anything
TABLE IF NOT EXISTS tickets (reporter VARCHAR(16), reason VARCHAR(48))
This is my Table, i just wanna get the "reason" as a string
From the reporter (playername)
public String getTicketReason(String message) { String qry = "SELECT FROM tickets WHERE reason='"+message+"'"; mySQL.update(qry); return qry; }
You think make it like that or what?
I thinks its the return isn't it?
thanks s2
idk why, but it doesnt work
running publishToMavenLocal just says UP-TO-DATE tho there is nothing in the .m2 folder
you are not getting reason like that, you are actually quering reason with that query
I tried clearing caches etc
I don't have an idea how i should write this
Im basicly just returning the qry command
you basically currently say "give me the 'reason string' of the ban where the 'reason string' is "message"
so you already have the reason
?
How do I create my own building in the world?
that's like saying ```java
Player player2 = Bukkit.getPlayer(player1.getName());
Place some blocks
And if I have a very massive building? I also need to put chests of items inside it.
also people could easily sql inject stuff by giving a ban reason like stop cheating'; drop table bans. Look at PreparedStatements instead
Do it asynchronously and use BlockData.
Simplest way: Use the FAWE api.
in FAWE, is it possible to implement this through schematics? And will I be able to remove this building later
yes and yes
I was told that maybe a metadata packet isn't being sent? I have a magma cube and around half the time using mob.setInvisible(true) and mob.setSize(2) the magmacubes will still show and the magmacubes will be larger or smaller than 2
like there will be two players on the server and one player will see the magma cube and the other player won't see the magma cube
Set the size before spawning by using the Consumer<T> for the spawn method
in addition to this there are zombies I spawn that are supposed to be visible, I teleport them to look at each other, but one player will see them looking somewhere random while the other player will see them looking at each other (the same zombie will have different yaw/pitch values)
Which server version?
I use waterfall
This sounds like packets might be randomly lost
is waterfall bad or smth?
Could be anything. No way to tell.
Is there smth I can do to fix this?
Eliminate every possible error source one by one and find out what causes this
uhhh what would the error sources be?
i have an NMS class of an entity which implements another class
if i get the entity and check if its an instance of that another class
will i get an error or will it actually be an instance
public class LostAdventurer extends Zombie implements PlayerEntityStats, EntityStats {
It will actually be an instance of your class
event in question:
@EventHandler
public void onAttack(EntityDamageByEntityEvent event){
if (Utilities.getEntityClass(event.getDamager()) != null && !(event.getEntity() instanceof Player)){
((EntityStats) ((CraftEntity) event.getEntity()).getHandle()).onAttack((LivingEntity) event.getDamager(), (LivingEntity) event.getEntity(), event);
}
}```
the LostAdventurer has an onAttack method which gets triggered in this event
the check for Player is redundant
idk why i put that there
what
@EventHandler
public void onAttack(EntityDamageByEntityEvent event) {
if (((CraftEntity) event.getEntity()).getHandle() instanceof EntityStats stats) {
stats.onAttack((LivingEntity) event.getDamager(), (LivingEntity) event.getEntity(), event);
}
}
splendid
thanks for spoonfeeding lol
instanceof EntityStats stats wont work in jdk17
Pattern Matching for instanceof was introduced in Java 14
damn
@EventHandler
public void onAttack(EntityDamageByEntityEvent event) {
if (((CraftEntity) event.getEntity()).getHandle() instanceof EntityStats) {
((EntityStats) ((CraftEntity) event.getEntity()).getHandle()).onAttack((LivingEntity) event.getDamager(), (LivingEntity) event.getEntity(), event);
}
}```so this would work basically the same right?

at least store ((CraftEntity) event.getEntity()).getHandle()
Sure. At this point you can just put everything into one line. Same readability.
yep
the point of these events are that i wont have to look at them ever again
because the onAttack methods do all the modifications
Pretty clear, right? You are referencing a non-static method on a static context.
I get that
I know what that means
I don't know how I'm supposed to put it in a consumer cause it isn't static.
Example usage:
public void spawnHugeGlowSlime(Location location) {
World world = location.getWorld();
world.spawn(location, Slime.class, slime -> {
slime.setSize(4);
slime.setGlowing(true);
slime.setCollidable(false);
});
}
how can I set a player on fire?
Hm. Try setting the fire ticks.
setFireTicks(200)
oh I guess I could do it in-game as well
alright I'll do that instead
???
๐ฅ

๐ฅ โ๏ธ

๐ฅ ๐ซ
bruhh I tried that but I didn't see that it wass by default of type entity instead of type Slime by default. Thanks
โค๏ธโ๐ฅ โถ๏ธ ๐ค
I wonder if it would be worth doing reflections to call my methods based on enums to save me on precious fistfuls of code lines
it's like a whole 4 lines of code for every enum that I am using, that's cringe
Consumer
BiFunction
only use that one during pride month
...
check the calendar it's set people on fire month
<dependency>
<groupId>be.maximvdw</groupId>
<artifactId>MVdWPlaceholderAPI</artifactId>
<version>2.1.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
</exclusion>
</exclusions>
</dependency>``` I have this, however, I need some help to figure out how add this custom repo to my intellij.
Why would you add exclusions there?
I have no idea what exclusions means, I'm attempting to fork this plugin ๐
Does it transitively pull an old spigotmc version?
First time ever trying to add something to a plugin, so not sure
https://github.com/lukasvdgaag/SkyWarsReloaded/tree/dev here's the code I'm forking
If its not on maven central then you need to pull this dependency and build it as well. (mvn install)
Could you explain how to do the install? I'm sorry :P
mvn install
Just that?
This builds and installs a project into your local maven repository
Like so, yes?
You can also just use ijs maven tab
remove the initial mvn
Nope, never mind
just install
mvn is the "binary"
Yeah, same error.
:P how would I install them? that was basically my first question, sorry
If they are not on maven central or another repo then you need to clone and install them as well
Where/how would I do so (if you can link a guide or something)
Literally like you cloned your current project.
Find their github, clone the project, and build it using mvn install.
Huh, so, in a new window, I just clone in my first case, MVdWPlaceholderAPI and install it?
Since Maven 3.8.1 http repositories are blocked.
Possible solutions:
- Check that Maven pom files do not contain http repository http://repo.mvdw-software.be/content/groups/public/
- Add a mirror(s) for http://repo.mvdw-software.be/content/groups/public/ that allows http url in the Maven settings.xml
- Downgrade Maven to version 3.8.1 or earlier in settings```
Hm
Do I downgrade Maven?
No you dont downgrade maven
oh god
lol, I'm so lost.
https://github.com/Maximvdw/MVdWPlaceholderAPIย I just cloned this
oh, repo is dead ?
I have no clue, never tried to use the normal repo
I think repo is private and needs credentials
Should I try to put this in my Skywars POX?
the repo seems unresponsive
so yea, private I guess ?
which also, gl building this yourself then
welp
The url in the skywars pox points to: https://repo.mvdw-software.com/service/rest/repository/browse/public/
Is that also dead?
It doesn't match the one in the spigot repo stuff
How shall I use that?
basically add the repo like in the screenshot
Here's the pox I currently have: https://github.com/lukasvdgaag/SkyWarsReloaded/blob/dev/SkyWarsReloadedCore/pom.xml
chicken pox?!?!
It should work, just doesn't ๐
yesd
Any ideas, Lynx?
The developer of the plugin isn't very helpful, so yeah ๐
just add basically the stuff in the screenshot you linked
but replace the <url> part with the new link (https://repo.mvdw-software.com/service/rest/repository/browse/public/)
I'll try it
btw latest version of that is 3.1.1-SNAPSHOT
not 2.1.1
that screenshot is rather outdated
uh
but we knew that ๐
just saying the only issue here is that you used http and not https
oh rip
Could not find artifact be.maximvdw:MVdWPlaceholderAPI:pom:3.1.1-SNAPSHOT in bukkitmc (https://nexuslite.gcnt.net/repos/bukkit/)```
lmao
Pretty sure the repo has no certs to even allow https
you added the repo ye ?
If I use 2.1.1, I get a different error, but it's still red. ```xml
de.simonsator:paf-spigot:jar:1.5.1 was not found in https://nexuslite.gcnt.net/repos/bukkit/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of bukkitmc has elapsed or updates are forced
Try to run Maven import with -U flag (force update snapshots)```
it does it has a wildcard for the domain
https://paste.pythondiscord.com/gibobesabe here's what I have
suii
I added xml <repository> <id>mvdw-software</id> <name>MVdW Public Repositories</name> <url>https://repo.mvdw-software.com/service/rest/repository/browse/public/</url> </repository>, so yes
<repository>
<id>simonsators Repo</id>
<url>https://simonsator.de/repo</url>
</repository>```
I'm kinda surprised, I thought Maximvdw was a pretty well-known person in the Spigot community and it surprises me that his repo is private/outdated
I can prolly message him, not sure if he has a discord tho.
actually paf-spigot doesnt exist anymore apparently lol
PFT
how did the developer of this plugin manage to do this lmao
make sure you add this and then change it to Party-and-Friends-MySQL-Edition-Spigot-API instead of paf-spigot
great naming
The repo has paf https://nexuslite.gcnt.net/repository/paf
Wait, I'm confused.
So I add this repo
yeah
Then I do this? xml <dependency> <groupId>de.simonsator</groupId> <artifactId>Party-and-Friends-MySQL-Edition-Spigot-API</artifactId> <version>1.5.1</version> <scope>provided</scope> </dependency>
yeah
That fixed that one lol
We also have a paf-bungee xml <dependency> <groupId>de.simonsator</groupId> <artifactId>paf-bungee</artifactId> <version>1.0.1</version> <scope>provided</scope> </dependency>
how the hell is this working for the plugin dev
its called
Spigot-Party-API-For-RedisBungee
wait
thats redisbungee
uhhh
well only that one has version 1.0.1 I guess go for it
de.simonsator:Spigot-Party-API-For-RedisBungee:jar:1.0.1 was not found in https://nexuslite.gcnt.net/repos/bukkit/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of bukkitmc has elapsed or updates are forced
Try to run Maven import with -U flag (force update snapshots)``` ๐
Prolly the repo isn't updated
wat
Here's the current stuff: https://paste.pythondiscord.com/nuxahuvaxo
:D that worked, 3 remain ๐
<dependency>
<groupId>com.grinderwolf</groupId>
<artifactId>slimeworldmanager</artifactId>
<version>2.2.1</version>
<scope>provided</scope>
</dependency>```
HE DOESNT EVEN OWN THE DOMAAAIN
<repository>
<id>rapture-snapshots</id>
<url>https://repo.rapture.pw/repository/maven-snapshots/</url>
</repository>```
this guy really bought rapture.pw just to proceed to only host com.grinderwolf projects
oh wait there's 1 project under the pw. ...
What should I change the dependency to?
keep it the same no?
Doesn't work :P
ofc ofc
lol
IT DID
gg
2 more ๐
if not I just realised https://repo.glaremasters.me/repository/concuncan/ has the right version if you really need it
<dependency>
<groupId>net.gaagjescraft</groupId>
<artifactId>swr-extension</artifactId>
<version>1.7.1</version>
<scope>provided</scope>
</dependency>``` link to the spigot page: https://www.spigotmc.org/resources/skywarsreloaded-extension-new-playagain-feature-kit-menu-editor-npcs-1-8x-1-17x.69111/
Not sure if I need to buy it
An example might be helpful here
ugh thats annoying one sec
oh their repo doesnt work
ofc it doesnt
why SHOULD IT WORK
sorry for the question, since what version is GameProfile a thing? Can't seem to find it on 1.12
๐ i'm so sorry for putting this on you, xpdz
Christ, maybe we can contact em?
probablly
you will need to import Mojang libraries
It's an external mojang lib
oh wait
ope, imma do that. Sorry for the ping, forgot to turn it off
uh its fine dont add it
you could build it yourself but then it doesnt work because you need SWR built first
and im assuming you're trying to build SWR
Yes, I'm trying to build it and make some changes in the code
So, what should I do to SWR-Extension?
idek
lol, i asked the dev, but we can go to the last one
<dependency>
<groupId>be.maximvdw</groupId>
<artifactId>MVdWPlaceholderAPI</artifactId>
<version>2.1.1-SNAPSHOT</version>
</dependency>``` still this thing
I'm not sure where to contact max, so yeah
or perhaps it does its just slow
<repository>
<id>mvdw-software</id>
<name>MVdW Public Repositories</name>
<url>https://repo.mvdw-software.com/service/rest/repository/browse/public/</url>
</repository>``` I have this in here
that appears to work
how can I calculate in which direction the player is looking?
I'm not that good with Vector calculation but I know I can get the looking direction
as a Vector via player.getLocation().getDirection() but then?
can I somehow calculate an angle?
player#getEyeLocation
its not even in the codemc repo waat
well
https://jitpack.io/p/Maximvdw/MVdWPlaceholderAPI you can use this ig
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>```
What version?
Could not find artifact be.maximvdw:MVdWPlaceholderAPI:pom:8b5f4baa44 in bukkitmc (https://nexuslite.gcnt.net/repos/bukkit/)``` nope and nope
<dependency>
<groupId>be.maximvdw</groupId>
<artifactId>MVdWPlaceholderAPI</artifactId>
<version>2.1.1-SNAPSHOT</version>
</dependency>```
for the version use ce97b8e
why just not download the file and use it as systemPath
nope
bru
I'm now getting this... oml ```xml
com.grinderwolf:slimeworldmanager:jar:2.3.0-SNAPSHOT was not found in https://nexuslite.gcnt.net/repos/bukkit/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of bukkitmc has elapsed or updates are forced
Try to run Maven import with -U flag (force update snapshots)```
One sec
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.078 s
[INFO] Finished at: 2022-09-23T14:05:07-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
Process finished with exit code 1```
btw it's typical that jitpack doesn't properly work
it also doesn't work for me when using the tag
So <version>2.2.2-SNAPSHOT</version>
whut why did you enter mvn mvn
idk every second thursday, it sometimes works
๐
Whoops
com.grinderwolf:slimeworldmanager:jar:2.3.0-SNAPSHOT was not found in https://nexuslite.gcnt.net/repos/bukkit/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of bukkitmc has elapsed or updates are forced
Try to run Maven import with -U flag (force update snapshots)``` still happens even after build success.
Try to run Maven import with -U flag (force update snapshots)
did you already do that? bcus I think we fixed that
World world = myPlayerObject.world;
Is the same as
World world = myPlayerObject.getClass().getField("world").get(myPlayerObject);
The slime one is fixed... i think
just gotta figure out this: ```xml
Could not find artifact be.maximvdw:MVdWPlaceholderAPI:pom:2.1.1-SNAPSHOT in bukkitmc (https://nexuslite.gcnt.net/repos/bukkit/)
Could not find artifact be.maximvdw:MVdWPlaceholderAPI:pom:2.1.1-SNAPSHOT in bukkitmc (https://nexuslite.gcnt.net/repos/bukkit/)
just manually install the file to your repo
that's the only proper solution if you cannot build it yourself and if it isn't available in any repository
Maybe wrong channel but is there a website Where I can read about the request body from the maven deploy plugin?
I still dont get why you're asking this
the body is the actual file that it's about to upload
I mean
I need the parameters that the plugin put on the request
Because i need to know them to build the rest api
๐ค
And what about the repo id
And the Username and password
!!
Also how does the sever know the groupId, etc from the jar?
that's the request line
PUT /repositories/com/jeff_media/filename HTTP/1.1
[Headers...]
[Body]
you kept asking stuff about the body
Okay
you only said "how can I see the parameters in the body"
so your question is "how does a http put request look like"
I just want to know how does the maven deploy plugin formas the request
I recognize I wasnt explain really good
Yup
Do you know?
No, but https://github.com/Starloader-project/slbrachyura/blob/master/brachyura/src/main/java/io/github/coolcrabs/brachyura/maven/publish/AuthentificatedMavenPublishRepository.java#L63 could give you a hint to how it looks like
why don't you take a look at the link I sent?
Might not work with FTP, SSH, SFTP and other protocols though
I mean I know how works the http verbs
I just don tknow whst things contains the request
Because the request for deploying an artifact its diff from the download one
upload is "PUT", download is "GET"
followed by the path, e.g. /file.txt, followed by the protocol version, e.g. HTTP/1.1
so the "http verb" is PUT or GET
and it's part of the request
I already know that
I dont think you understand me
I asking what DATA is sent IN the REQUEST
NONE
Not what verb I need to use
well the URI and the version
GET /file.txt HTTP/1.1
that's the full request part
there is never anything more in that part
repository id is irrelevant
They are not taken from heaven
I know that
But that why I want to know how the request is form
๐คฃ ๐คฃ
that's in the "Authorization" header
They are sent as an unencrypted base64 string it seems
e.g.
GET /protect-file.txt HTTP/1.1
Authorization: <type> <credentials>
everything about that is explained here ^
But you should already know that if you read the links that I sent
in 90% of cases you have a "Basic" auth
Whst links
that
Oh sorry
I myself do not use that way though as I went the FTP route
Sadly stupid gradle does not support it, so right now I am working on alternatives.
I have a yml file I'm creating in my plugin folder, but I manually wrote the data to the yml file in the intellij, but the manually written data doesn't appear in the yml file inside the plugins folder. How can I get the manually written data to be loaded with the yml file itself?
is there a way to assign data to an item, like an unique id
how would I just generate 2x2 chunk area?
use PDC
Hi look your dm
what is PDC?
ok
thank you
the idea is, you can set custom data onto items, so you could set a custom string as an ID on an item
There are multiple types of values which can be stored
Also you can create own types
ok
Anyone has a proper reference for NMS 1.19?
But basic are like string, int and so on
I'm trying to include the dependency in maven but can't find it
there are lots of threads about it on spigotmc
Yes, but I can't find the 1.19 version
it will not let me create a name for my mine i am in 1.17.1
sucks to be mojang and spigotmc
what?
So if anyone could give a useful answer would be much appreciated
saveResource()
Use 1.19.2
i am trying to use MineResetLite and it will not let me create a name for my mine i am in 1.17.1 can someone help me with it
public class FileHandler extends YamlConfiguration {
private final Plugin plugin;
private final String name;
public FileHandler(Plugin plugin, String name) {
this.plugin = plugin;
this.name = name;
this.reload();
public void save() {
try
} catch (Exception ex) {
}
}
}
Lmao really harful to type it on cellphone


