#help-development
1 messages ยท Page 886 of 1
Depends on what you describe "where they're looking at". If you mean "the block they're looking at", you can rayCast the player direction and find the nearest block in sight. Then teleport to the block location
If you just want to teleport x block further, you can multiply the direction vector of the player and add it to the location of the player to get the new location
Both are ok. getEyeLocation returns the location with the fixed y corresponding to the height of the player iirc
What do you mean? You don't need to call an event when you teleport the player. It's automatically thrown
To teleport just Player#teleport(Location)
yeh
Please note that Player#getEyeLocation returns the current location of the player
And not the "looking at" location
he can rayCast the player direction
I would have to return the Location#getDirection?
So
Player#getLocation & Player#getEyeLocation both gives the current location of the player. (Eye location just corrects the y position to match the eye's height)
Direction of a location is a vector pointing the player's direction. You can use that to multiply and add this vector to some location to get the resulting location in that given direction.
Other possibility is to rayCast: you throw rays in the direction of the player and get all the entities and or blocks in that direction.
Other method, use the method LivingEntity#getTargetBlock
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/LivingEntity.html#getTargetBlock(java.util.Set,int)
declaration: package: org.bukkit.entity, interface: LivingEntity
Might work. You should test
But you should be careful as the player might be teleported in blocks. + adding to the player location might pose some issues if you don't clone the location (to be verified)
Gotcha, how would I avoid spawning in blocks?
Using getTargetBlock could help you. Really depends on how you want to implement that
For instance if the #getTargetBlock returns a location closer to the player, teleport him here, otherwiser further
Item might be null
Bumping problem
chat reset only works if there is a character after it, so try adding a space?
or put the reset in the message instead
I need help i place a crate and it was working properly but them i thought to remove it and place at a new place but mistakely when i crouched and left clicked it gets removed but the crate name is still hovering in air please help i tried removing the plugin also but it didnt worked
the error is with crate plus reloaded plugin
sounds like its an entity?
just kill the entity near you, you can get its uuid by using some commands I believe
once you have the uuid, kill the entity using its uuid ๐
i did i diid /killall entites
its a armor stand
cuz i triend placing a helmet on it
indeed and that doesn't work on invisible ones
it can wear full armor
but how can i fix it
I told you how
you need to fetch its UUID
and then use the kill command using its UUID
you need to add nearby entity to a scoreboard
which should reveal its UUID
once you have the UUID, you can remove the scoreboard and kill the entity
bro idk how to do that
then looks like you need to go learn how ๐
ONLY WORKS IN 1.8 snapshots +
outro music: Professor Kliq - "Bust This Bust That"
Mob Spleef Minigame Download:
http://www.planetminecraft.com/project/mob-spleef-17/
Twitter - https://twitter.com/Recabilly
NozMythos Master Builders:
http://www.youtube.com/use...
here is a video that should demonstrate
This place isn't for being spoonfed everything, you have to learn how to do stuff on your own too. ๐
thanks soo much
no
no
ip isn't a guarantee either that the account belongs to the same person
your best bet is just to ban the account and not worry about if they come back again
dox them and cut their wires
I imagine the wire cutting won't work out too well if they are not using wires to begin with XD
it also didnt work : (
What should i add to my RPG style game with custom mystic item system i made, (tiered items, custom enchantments i need ideas to think of, and vanilla enchantments are allowed up to 1 per Mystic item)
I am wondering should i continue working on items first or the actual game play. I have been dwelling on these ideas for a while, ive already begun my project and have a lot of ideas just kinda lost rn and have too many ideas i wanna start slow.
Continue on gameplay
Ty
I read this as wife ๐ฏ
does some1 have some easy ideas what i can make as a newbie
kits, this will help you get started with inventories, potion effects & enchantments
when comfortable, move it to blocks where you will gain further experience
smth easier xD
Make a simple combat logger
okay ty i can try
is it this that the attacked player and the attacker ther name come in the konsole?
or what means combat logger
chat channels
No,
On damage -> Send message to attacker and victim that they're in combat for like 30 seconds
If a player logs out while in combat then send it to the console (and do other stuff)
okay ty
yes
Hi, does anyone know how i would go about getting a custom player head (with base64 value) as an item? thx in advance :)
https://www.spigotmc.org/threads/beginners-guide-to-itemstacks.623654/
Scroll down to Creating a head item with a skin texture
can some1 explain hashmaps
Hello, I have a problem with connecting the Vault plugin. Everything in the pom.xml file is correct, and I have the Vault plugin downloaded on the server, unfortunately my plugin does not detect it at all, does anyone know how to fix it?
You need an economy plugin together with Vault if you want to simply fetch an economy provider and use it
But show us how you "detect" Vault
Anybody familiar with Docker? ๐
I'm trying to connect my API to 2 databases. My docker-compose.yml looks the following: https://paste.md-5.net/ginurozifo.bash
All the services launch, but the API cannot connect to either of the databases. The databases also log this:
backdb-1 | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
backdb-1 | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1 | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1 | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)
So the API technically works, but calling any request that does a database call returns an error.
What error? 
By error I mean an error that indicates no database connection
Because, well, the API failed to connect to the database
It's the first time I'm working with Vault, because I'm planning to create my own plugin based on storing money in a database, commands, etc. Such a plugin instead of essentials or cmi
I don't think there's a stacktrace actually
Just like an HTTP error code
Because that's what I made it return when a database connection is not present
Yeah there are no errors/stacktraces. The only quote unqoute error is this
show ur pom.xml, plugin.yml, do you get any error messages?
wtf is that host ip
okay good
Do you have any idea about this?
I am not sure. The only reason the healthcheck is there in the first place is because that was one of the "solutions" I'd found. I don't even know what it does lol
No, backdb-1 and accdb-1 are MariaDB instances
Code: https://pastebin.com/EqmnRwF5
pom: https://pastebin.com/KqU7PdCN
plugin:
name: economyplg
main: com.vaultsupport.MoneyPlugin
version: 1.0-SNAPSHOT
api-version: 1.15
commands:
addmoney:
description: testing
usage: /addmoney
removemoney:
description: testing
usage: /addmoney
And error: [14:11:16 INFO]: [economyplg] Loading server plugin economyplg v1.0-SNAPSHOT
[14:11:16 INFO]: [economyplg] Enabling economyplg v1.0-SNAPSHOT
[14:11:16 ERROR]: [economyplg] Disabled due to no Vault dependency found!
[14:11:16 INFO]: [economyplg] Disabling economyplg v1.0-SNAPSHOT
smells like your API is fucking up ?
It was working perfectly on local machine
I'm trying to dockerize it to then deploy to my hosting
I followed the tutorial and tried to integrate my cookie clicker code into the framework, but now the hashmap for cookies doesn't save properly. It seems to reset or clear whenever I exit the GUI. I suspect I misplaced the code within the decorate() method, but I'm unsure. Do you know what i'm doing wrong? https://pastes.dev/tS6mbmHsWe. I want the hashmap to be the same map throughout the code.
Are you using the docker network address instead of the host machine address?
The IPs I provide for my API is backdb and accdb (with no ports because 3306), which should be the docker virtual network (services are named backdb and accdb)

This is the docker-compose.yml in case you missed it, that'll probably be more convenient https://paste.md-5.net/ginurozifo.bash
That rebinds them on my machine but leaves them intact in the respective containers, no?
A new TestGUI instance is created each time someone opens this GUI.
This means the Map will always be empty
And if my API wouldn't be able to connect to the databases in the first place, it wouldn't be able to even attempt to authenticate
No?
right fucking compose syntax
yea das nota container port mbmb
I mean, the log literally just looks like your API is not properly closing the connections
Is the authentication successful?
your DBs are just complaining that the connection from a single container (probably your api) is no longer sending shit
how are you managing db connections in your api
No, my databases log the following:
backdb-1 | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
backdb-1 | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1 | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1 | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)
And calling any database-related http queries fails subsequenty
Get yourself a stacktrace then
Hmmm
There is none
This is all that I have
Stacktrace of what exactly?
One sec
Your API
the stacktrace of a further query that uses the DB ^
like, your API is failing probably because you somewhere fuck up with connections and now its trying to use a then closed connection instance
what do you get back when running a http call against your API then 
get("/subsets") {
coroutineScope {
val resultSet = db.query(FETCH_SUBSETS) ?: return@coroutineScope call.respond(HttpStatusCode.InternalServerError, "Failed to fetch subsets")
val subsets = mutableListOf<Subset>()
while (resultSet.next()) {
val name = resultSet.getString("name")
val imageUrl = resultSet.getString("image_url")
subsets.add(Subset(name, imageUrl))
}
if (subsets.isEmpty()) {
return@coroutineScope call.respond(HttpStatusCode.NotFound, "No subsets found")
}
call.respond(HttpStatusCode.OK, subsets)
}
}
I'm receiving the 404
a 404 ?
So I need a 2nd class to create the methods & map and then pass the necessaryinformation to the TestGUI class right?
However there should be some subsets
Wait, so you dont have a conection at all
Seemingly
I thought you could attempt an authentication
Yes. Keep your data in manager classes of which only one instance exists.
This manager is created when the server starts and passed to all places which need to interact with the data.
How can I open the terminal for one of my databases? I wanna try something
Is it docker attach
docker exec -it <container> bash
attach just attaches you to the running process
which is not what you want in this case
Ty, 1 sec
you need to add vault as dependency to plugin.yml there is instructions on spigot site
For some incredibly arbitrary reason deleting all the tables and letting them be recreated has solved the problem 
You should upgrade your java version as well. 1.8 is pretty outdated
I ran desc table before and after and it was the exact same
But the problem is no more lmao
Which version do you recommended?
Oh interestingly the database warnings did not go anywhere
Is there a SpigotMC Api?
Latest LTS version supported by your target spigot version
Spiget?
O nice
I tried, even though I added something like this: softdepend: [Vault] the plugin cannot hook Vault
Do you have a plugin which actually registers a service for the Economy class?
Vault has no actual functionality. Its simply an empty frame which needs an implementation from a 3rd plugin.
You mean this? public class Money extends AbstractEconomy {
Possible to get the description as html or markdown?
I mean this line
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
Do you have a 3rd party plugin like EssentialsX which actually creates a service provider?
Otherwise this is always null because nobody provides a class for Economy
Wait. Are you planning to use the economy or provide the economy?
To me it looks like you are doing a weird scramble of both
Your setupEconomy method seems pointless to me. Delete it.
Ah, so it works on this principle... I planned to make a plugin that would have the /money remove|take|set commands and save everything in the database, because I don't want to use Essentials or CMI because these plugins have many commands such as gamemode or vanish which I already have in my plugin
Anyone looking for custom BungeeCord or Spigot plugins?
DM -> Me
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/

eyes sus
Hey there. Using spigot's 1.20.4 api
var slime = owner.getWorld().spawn(target.getLocation().add(0, 1, 0), Slime.class);
slime.setSize(1);
slime.setAI(false);
slime.setInvisible(true);
slime.setSilent(true);
slime.setInvulnerable(true);
slime.setCollidable(true); // Tried both true and false
slime.setLeashHolder(owner);
Why this slime do move the player? What am I doing wrong?
Is teh slime moving the player ONLY when it spawns or all teh time?
all the time
If only when spawning, use teh spawn method that takes a Consumer and change it's spawn settings in there.
oh, no idea then
I don't think collideable works between players
Yeah. See the Javadoc note: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/LivingEntity.html#setCollidable(boolean)
You could add all players and that slime to a Team
Idk if I understand that wrong but doesn't that mean player-player? I have slime-player rn
I think it's just any player collision
oh let me try
(and for reference, setCollidable(false) would have been the right value :p)
yeah noticed that while trying to see if it actually sets the value
Yeah that did work. Thank you
Hi, is there any reason why DecoratedPot is not implementing Container interface? If not I would probably PR it there as it makes sense to have it...
How should i create an invisibility potion item that lasts for 30 seconds?
this is what i have for now
public ItemStack getInvisPot() {
InvisPot = new ItemStack(Material.POTION);
PotionMeta meta = (PotionMeta) InvisPot.getItemMeta();
meta.setBasePotionType(PotionType.INVISIBILITY);
meta.setDisplayName("Potion of Invisibility(30 sec)");
InvisPot.setItemMeta(meta);
return InvisPot;
}
// Create Item
ItemStack item = new ItemStack(Material.POTION);
// Get meta
PotionMeta meta = (PotionMeta) item.getItemMeta();
// Create custom effect
PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, /* Duration */30 * 20, /*Amplifier/Level*/1);
// Add effect to meta
meta.addCustomEffect(effect, false);
// Set meta to item
item.setItemMeta(meta);
ty i will test
what happens if I create a fake player via protocolLib with an existing nickname on the server?
and player join to server with this nick
If using PL the player won;t actually exist to anyone but the client so the server will be fine. The client is going to have a fit though
The server will overwrite anything you sent via PL
does that mean fake player will simply disappear for the player?
In order for the fake player to be visible in the tab, do you need to spawn next to each player?
Hello , I would like to ensure that when a player dies, it updates a scoreboard with the number of players alive. Problem, I can't set this up, can someone help me? Im coding in 1.8.
What part do you need help with
Currently, when a player dies, the scoreboard does not update. It only updates when you move from one phase to another.
public class PeriodicalDatabaseAccess extends BukkitRunnable {
@Override
public void run () {
if(!PearlQueue.pearlQueue.isEmpty()) {
HeeseLogger.getInstance().getLogger().info("Executing periodical database access...");
try {
Statement statement;
statement = GetConnection.getConnection().createStatement();
for (PearlThrowLog i : PearlQueue.pearlQueue) {
String sql = "INSERT INTO pearl_logs(uuid, world, x, y, z, yaw, pitch, timestamp) VALUES('" +
i.getPlayerUuid() + "', '" +
i.getPlayerLocation().getWorld().getName() + "', " +
i.getPlayerLocation().getBlockX() + ", " +
i.getPlayerLocation().getBlockY() + ", " +
i.getPlayerLocation().getBlockZ() + ", " +
i.getPlayerLocation().getYaw() + ", " +
i.getPlayerLocation().getPitch() + ", '" +
i.getTime() + "')";
PearlQueue.pearlQueue.poll();
}
statement.close();
}catch(SQLException e) {
HeeseLogger.getInstance().getLogger().info("Error with statement");
e.printStackTrace();
}
}
}
}```
why this dont work?
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
i mean this dont insert anything to my database
can someone help me?
You're never calling the query? or am I missing something
idk
also don't concat strings to your query
Still missing important code
it works but it wont insert into my db
Well yeah you're never telling it to insert anything
so how can i do that
run the sql query
and don't blindly copy paste code
It's important that you understand what it does
Looks like your ad blocker is on.
ร
We rely on ads to keep creating quality content for you to enjoy for free.
Please support our site by disabling your ad blocker.
how can i enter the site?
Close the popup
i write this code myself
You just said you took it from the internet
no
with the help of chatgpt?
no
Yeah having the amount of people remaining in the team name will cause issues
please can someone help me?
Since the amount changes it won't work when you try to fetch the team
?spoon
Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.
๐
and it wont work
omg this is the worst code i ever seen
i know what im doing
but i have some issues
in my code
how i can fix that so ?
Change the way you handle the team name
i will give u half of my 20$ if u can help me
._.
lol
I already sent a tutorial for you
Man the guy whos paying you is getting scammed lmao
I already did
no u didnt
I'm not going to write the plugin for you
No
huh
what does he need help with
okay thx
They need to be spoonfed code so they can sell it to someone
._.
no?
oof chatgpt
i just need some help
anybody has knowledge about MMOItems?
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
I have some stupid bug
event.getPlayer().openInventory
Ok sorry, I'm trying to register a custom ability to the config with API and it doesn't recognize it
Could you show your code?
@compact zodiac can u help me please?
?paste
i will give u half of my 20$
to fix my problem
i need to send this plugin today to my client
please
ok go to private chat
what is the problem tho
.
They're not calling their SQL statement
so I sent them a tutorial they refuse to read
if someone can help me i will give
and instead they beg for code
10$
bruh
and they're taking a comission for it ๐
The other dude is wasting his money
Yeah
please
I'm not going help any further with that
Yeah it's help not write the code for you
Maybe know what you're doing before you take a commission
ill help you for 100 bucks
if its that easy why u dont just help me
Not a single person wants your 10$ here
15$ its max
I'll do it for the full 20 and an extra commission for everything the initial cost doesn't cover my hourly charge is 20 dollars an hour
Not only is this not enough for the mental anguish you bring but also you could spend 0$ if you would just read
bro
i dont want read i just want help
lMAO
xd
You won't ever become a good programmer with this mindset
But I suppose you don't care do you
You just want money
Then attempt begging
nah he cappin
I agree for 20 dollars an hour
Yeah if you could just put more than 0 amount of effort into getitng the money
if i give someone my 10$ of 20 i still have profit
If you're trying to replace the ender chest inventory you could do so in the interact event instead
You will NOT survive doing 20$ commissions, 10 of which you give away
i will
@young knoll this is getting annoying and not relevant to this channel

bro i just need help
help-development is not help-me-do-my-job-for-my-customer
Tell me your strategy how you gonna survive on that
Im really curious
?
brother 20$ will not cover rent
Which you will not
yes i will
I hope you would have 20 commissions per month
forget about being able to do it or not
This is not the world where 20 people a day will order Minecraft plugins from an inexperienced underage person
he can't even code it
I doubt they will get that if they keep acting like this ๐
Let alone, well, you actually completing those commissions successffuluy
But that is still 400 dollars 
so he is going to ask here 20x a day to get 20 different people to write plugins for him
xD
i have 3 years expirience in java
No
Are there any error messages?
Sad
XDDDDDDDDDDDDDDDDDDDD
you can't even spell experience
yes
If this is your code with 3 years of experience I don't have a word
expirience :stonks:
in my country its 16+
How does that answer my question
https://paste.md-5.net/utatudoqik.coffeescript its also net registering the default ones
XDDDDD
yes i can use discord
If you are over 16 and so delusional that you think you can code 20+ Minecraft plugins per day with no programming skill
Well this is just sad
you won't do 20 plugins a day as a completely professional guy too
Then go complete the ocmmission
i just forgot how to use sql
Oi
Look it up
What is going on here
xdddd
Guess you'll have to ask MMOItems support since their wiki appears to be behind a login
You also forgot about sql injection as it seems
I really hope this dude is a troll
And about abstracting your dB calls
someone has walked upon the amazing grift of doing 20x $20 plugin commissions on spigot and asking people here to code said plugins for them
And not actually a real person thinking that
some guy wants other people to write code for their plugin they get as a commission
I got the plugin from my customer..
Something like that
Worry not! He has 3 years of Java experience!!
Can someone answer me this, when I install protocolLib on my bukkit/spigot server it turns off other plugins like venturechat, mycommands. Can anyone help me with this?
no, 3 years of java expirince
Mb
Ah yes you must commission the commission
check startup logs
Also #help-server
20 of them daily, actually
guys I got a $1 plugin commission who wants to do it for 98.9 cents
says that plugins like venture chat are out of date and are in the newest version
Do you have at least 3 years of java expirince?
I have 8 years of shitposting on irc and here combined
Holy fuck
hello im back
Why exactly
so can someone just help me
and that homie asked some guys on the spigot discord to do it for them for 100$
no
๐งข
remind me to never be a homie of yours
pro tip: hire broke desperate people
I don't know if you saw the previous 15 minutes of our conversation with you but no one is willing to help you
Coll is clearly dead
So, just me?
I've been a better person to people I despise
me too
honestly, I'd sometimes do plugin work for 5$/hour
I'm broke and desperate and I wouldn't even take that
I saw that Y2K
Can you recommend anything by any chance? I'm really desperate
?
Nah.. it's not
I barely ever get commissions because literally no one wants minecraft plugins lmao
It's not bad tbh for a hobby
i just earn 20$ for simple plugin
buddy you can't spell experience or program, you're in no position to be giving advice
And you think you want 20 of tjhem a day
20$ projects are good when you're starting
i have 3 years expirience
he's not starting, he has 3 years of expirince
Yeah he has 3 years of experience
It's expirince*
he has 3 years of getting rinsed
3 years of tutorial hell maybe?..
(He has 3 years expirience in Java)
the biggest help we can give you is make fun of you until you understand why what you are doing is worth making fun of
but this is a highly unfortunate situation if you are legit 16+ and think you can make money this way
in total i earn like 200$ in 10 days
You do not
yes i do
show it kid
Mhm
how can i show u xD
you must have the transfers somewhere
or are people showing up to your house with cash envelopes
Can I get some vouches from people who commissioned you? ๐
you could have bought chatgpt+ instead of asking here for help
vouches?
think I made that in a day
dont asked

Illusion once again proving that he is superior amongst us
Before podkladson ofc
Yeah
yeah pod's a god
You know, people commission you, and then they like leave a review
Can I get some of them to message me and tell me how good you were
yes i can do that xD
No I just don't buy your shit
10 people message me saying how good of a programmer you are and I rethink my decisions
guys stop bullying the clearly underaged kid, ignore him and move on
Kids deserve to be bullied though
i just going from server to server and asking server owners that he need some plugins
unless he gets the money and then sends them a trash chatgpt coded plugin and then just blocks them finds new people who don't know much and repeats the process
that can i write
Dude code you sent is awful for multiple reason, don't try to convince us about something xd
and im doing it
you can go bully him in minecraft but take that out of here
Well you did 10 people though right
Just a couple more minutes
no
Oh really, 200/20 is not 10 anymore?
every plugins cost 20?
According to you, yes
i dont ever say that
and?
Not full quote, 1 sec
Well either way
How many people commissioned you?
For those 200$ you made in 10 days
like 5-6
Get all of them to message me
XDDD
u are really that desperate that u need to take vouches from my clients
on 200$?
u dont ever make that mutch of money
or what
that just adds up to 120
^
I don't give a fuck about your clients at least because you probably do not have any
Zbll I wouldnt really bother that much, we already saw that his code is shit 
Some?
You mean 5-6 people
I am too engaged
Its gonna be his alt accounts ๐
When the hyperfixation is over I can go
Seeing as he can't type it won't be hard to recognize
What is going on ?
hi im help
get lost epic, didn't you read the hat
i didnt even realise there was text on it
go read the hat
i just read the hat
how does it make you feel
exactly the same
I knew it, he's illiterate
epic ebic sucks and hes to stop pinging me
can't even tell an e from an a apart
sounds like something someone who can't read would say
for(int i = 0; i < 9; i++) {
inventory.setItem(i, redBorder);
}
for(int i = 36; i < 45; i++) {
inventory.setItem(i, redBorder);
}
// Set Collumn borders
for (int i = 9; i <= 27; i += 9) {
inventory.setItem(i, brownBorder);
}
for (int i = 17; i <= 37; i += 9) {
inventory.setItem(i, brownBorder);
}```
i can read perfectly fine
Is there better way to do this please?
if i cant read how do i know how to respond
right click - speak message
what if my ears dont work
you put the speakers in your mouth and feel the vibrations
better? not really
you can insert data into a list and check as you go but eh
Hello, how do I update my resource
public boolean isBorder(int index, int size) {
int rowSize = 9;
return index < rowSize || // top row
index > (size - rowSize) || // Bottom row
index % rowSize == 0 || // left column
index % rowSize == (rowSize - 1); // Right column
}
sumn like that
and then the first request you'll get anyway is for a way to customize that menu
I don't even bother with these anymore
mine are either completely hardcoded or loaded from config and nothing in between
loaded from config is the proper approach
Just have a layout and items
and you just hardcode certain keys
everything absolutely can
fite me
bet
you know it aint' true
I know it is
this man has never made an inventory-based minigame before
PING PONG
I've made tetris iirc
ha but you can't load the positional data from config you absolute scrub
Wtf
i now verifed and still i have this:
huh
title: "Ping Pong"
layout:
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'
items:
l: # left
type: AIR # Placeholder
left-selected:
type: BLACK_STAINED_GLASS
what
type deal
what is "this"?
ow fuck his pseudocode is so bad it actually strained my neck looking at it
hopefully he is not talking about the tick in his username
ok boomer
That'd be peak comedy
hi, the block#getLoc get the vertex of the block and not the center, how i can get the center?
Location#toCenterLocation
tnx
Enable 2fa to post update
dont exist
Using 1.8?
yes
classic
public Location toCenterLocation(Location original) {
Location copy = original.clone(); // You can get rid of this if you want a mutable location
copy.setX(original.getBlockX() + 0.5);
copy.setY(original.getBlockY() + 0.5);
copy.setZ(original.getBlockZ() + 0.5);
return copy;
}
this is going to be one hell of a plugin if he can't figure out how to center a block
i try
also does the blockpos return the bottom or the top of the block, I forget
I thought it was the top
atleast he aint copy pasting
just returns floored
Beef?
Chicken
Wings
Fair enough
Which is bottom
man I am doing a great job at not looking at those support tickets
please help, i now activate 2fa and i have still this: Enable 2fa to post update
You're a donor how do you even see tickets
what tickets
You need to wait some time for it to update iirc
Idk he's the one talking about tickets
magma's tickets are in his own server
tysm for respond
Then why talk about them here ๐
why not
yo, any ideas on how I can make those TextDisplays spawn exactly at the tip of the gun?
gun? that's illegal
it doesn't matter because I am pretty sure mc has different first and third person rendering for the hands
so if it looks right to the player it will look wrong to everyone else
I know
(or in third person)
that's why you send the right one to the player and the other one to all other players
but I wanna figure out for the first person player now
mmmmh bullet location mismatch
just keep trying, unless you have some visualization assist tool
unfortunately, I don't have such tool
you could use blockbench and see it in first person, presumably that model was probably made with it
if you make a cube at the tip you might be able to derive is coordinates
yes
though they are probably not in real units
yeah they aren't
do the math or do the guessing
I did the math on something very similar
oh fuck now I have to do rotation maths again
you have to to make an animatable models plugin
bc relative coords to world space bla bla bla
I know, that's why I am saying why not use them
also keep in mind unless something changed gun models are against mojang tos
yes
that could be fun t odo
also, do you by any chance know how to disable this weird grey background?
afaik you can't
maybe with one of the more recent entity types I've not looked at too closely yet
hmmm
or they just had a modded client
and not shaders?
core shaders in resourcepack could be
there's barely a ceiling to what you can do with shaders
pretty sure you could make the client play doom
lmao
Thanks
mm
this 500$ project nearly tripld in price
but the deadline is half as long
hmm
I'm fucked
?fork
SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.
You should ask Paper about Paper API
NDA?
no
Then you can always ask someone else to help you
a skywars clone
here's the kicker
200-400 players will be in this "beta"
original idea was 3 weeks
@torn shuttle I am so intelligent
I hope they have a system for lobbies and such
I just used some maths
Would be real bad if you need to handle the load balancing yourself
Can't have all of those players on one server
uh yeah I'll need to load balance
I might need to make a proxy plugin in like 3 hours
I might just create all the game lobbies manually as we have no load balancing service
I'm not sure if you'll make it in time ๐
Good luck ๐
Time for a text shader
oh no
do I really have to use shaders?
That's the only way I'm aware of
Anyone got some good pointers for where to learn shader stuff. I've been told they are crazy powerful and I wanna see what I can do
With display entities this should not happen
this is a TextDisplay
Join the shaderLABS discord
Are those for vanilla shades or Iris/optifine? Or both
The discord has channels for both
Did you set the backgrounds alpha to 0?
And make sure the character has no values at those corners as well.
Epic thank you
how do I set the alpha to 0?
also learning GLSL can be quite useful outside of Minecraft
By setting the background color
that is deprecated, should I use it anyways?
oh can you set the background color ๐
thanks smile, it is working :D
Its this weird policy spigot has for draft api
It's just to note that it can change in the future
looking great
with some maths, hacky font stuff and Display Entities, this "particle" is possible lmao
Make it emmit light as well ๐
that's a great idea!
Might look cool in the dark or in caves
I am really proud as my gun-system is finally getting great
this custom raytracing and maths stuff made me learn a LOT about complex mathematics and so on
Now make war crimes in Minecraft
What do you need custom raytracing for?
this makes it possible to track on which exact pixel of the player-skin the bullet hit
I can literally say if the bullet hit the player's eye. And yes the rotation of the torso and so on is simulated
this kid is going to move his pc to the local rotisseries so he can have the cook feed him chicken while he programs
getHitPosition is a thing
you can do some path based on that
source?
you're going to liquid cool your tower with the fat from the rotisserie
that im intelligent? lmao
idk, probably not gonna work as accurate and well tho
don't make me feel bad for wasting hundreds of hours on it plz
is using sockets for sending data across servers a good idea?
If its a private project then i would recommend a different approach
which approach do you recommend?
Using some sort of message broker
redis?
For example
and then i would listen for updates on a new thread, right?
You can create a topic and then publish and subscribe on this topic.
This should be done on a different threat.
okay, I've seen ppl just do while(true) and then listen to anything thats being published on a different thread, is there a better approach then just looping for eternity?
Yes... for sure
How would I go about having keybinds displayed in lore of an item?
Example with Redisson:
A publisher:
RedissonClient redisson = Redisson.create();
RTopic topic = redisson.getTopic("SomeChannel");
// Execute on other thread:
SomeMessageObj message = new SomeMessageObj();
topic.publish(message);
A subscriber:
RedissonClient redisson = Redisson.create();
RTopic topic = redisson.getTopic("SomeChannel");
topic.addListener(SomeMessageObj.class, new MessageListener<SomeMessageObj>() {
@Override
public void onMessage(String channel, SomeMessageObj message) {
//...
}
});
In this case the subscriber will use the common fork join pool. You can pass an executor if you want.
*SomeMessageObj can be any class which you support with your Codec.
Can be String.class if you want to keep it simple.
and the onMessage, gets called every time when something is gathered?
no further config needed by me?
onMessage will be called every time someone calls topic.publish(message); on the topic with the name "SomeChannel".
Nothing else you need to configure. Just start a Redis server, create a client and then publish or listen on a topic.
If you want to use Redisson, then here is the quickstart guide.
https://github.com/redisson/redisson#quick-start
i cant really understand how the other server know when topic.publish() is called. because it wont called on the other servers, i guess redis handles that?
it is just called on the one server therefore only fired there ?
Just treat it like the spigot event system. But instead of events you have messages now.
No need to fully understand it but if you want to i can explain it a bit.
If you want and have the time the explain, sure I'd like to listen and learn about this.
You can even have an async subscription natively
RFuture<Integer> listenerFuture = topic.addListenerAsync(SomeObject.class, new MessageListener<SomeObject>() {
@Override
public void onMessage(String channel, SomeObject message) {
//...
}
});
๐
Hmm?
it's really not liking this pull
Ah, i thought they posted something on a forum or website -.-
yeah I think I found some edge case with markdown editors and pulling here
me using an executor to not nuke the main thread because jedis is special
me adding a 1 in a billion chance to trigger thread.sleep for 3 seconds to give the poor cpu a break
you laugh now but who will be left alive when AI takes over?
cmarco
Randomly set fields in other plugins classes to null and watch the developer trying to fix random NPEs in despair
7smile7 how much thinking did you put into your machine plugin's architecture
Probably between 0 and 100 thinks
Meh. I wrote something similar a while ago so not too much.
There is a pretty distinct architectural style ive developed which can be applied to pretty much any plugin.
But i honestly just eyeball public plugins because they are so small.
12 thinks are 1 thought btw
144 thinks are a thoss
I only think in prime thinks. So 149 or 151 would more accurate than a measly 144
20.736 is a thonker then
a thonker is something that galileo would convert to football fields
ah alr
I might start doing that
is your plugin open src
Its not. And i would have a pretty different approach if i where to write it again now.
That's pretty normal
why is Main.getInstance() null?
NPE here: https://pastebin.com/e0U0jDau
Main: https://pastebin.com/ssDTife4
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.
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.
i deployed my maven package to GitHub and I'm trying to access my methods
why do you have two classes extending JavaPlugin? o0
its from maven dependency
Did you forget to set the dependency in your plugin.yml
no
name: testduapi
version: '${project.version}'
main: md.mirrerror.testduapi.Testduapi
depend:
- DiscordUtils
?paste
You're shading DiscordUtils into testduapi, and hence testduapi is accessing the "included" version of DiscordUtils, which never had any instance created - hence instance is null. Set the <scope> to provided
same issue
<dependency>
<groupId>md.mirrerror</groupId>
<artifactId>discordutils</artifactId>
<version>4.8</version>
<scope>provided</scope>
</dependency>
mvn clean package and try again
i got a new error and my messages are not printed at all:
[22:37:01 WARN]: [testduapi] Task #13 for testduapi v1.0 generated an exception
java.lang.NoSuchMethodError: 'net.dv8tion.jda.api.JDA md.mirrerror.discordutils.models.DiscordUtilsBot.getJda()'
show your DiscordUtilsBot class
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.
i don#t see any getJda() method there
oh you're using lombok
are you relocating JDA to another package?
paste your discordutils pom
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.
<createDependencyReducedPom>false</createDependencyReducedPom> remove this, then mvn clean install it again, then recompile the other one too with mvn clean package
same stacktrace, but now I get the first message
remove shadedArtifactAttached too
looks like your other plugin is depending (in maven) on your unshaded .jar with JDA as transitive dependency at the default package location, while you're actually running the shaded .jar
by disabling the dependency reduced pom, and enablin shadedArtifactAttached to true, you're preventing maven from just depending on the shaded .jar
same stacktrace
[22:51:37 INFO]: [testduapi] []
[22:51:37 WARN]: [testduapi] Task #13 for testduapi v1.0 generated an exception
java.lang.NoSuchMethodError: 'net.dv8tion.jda.api.JDA md.mirrerror.discordutils.models.DiscordUtilsBot.getJda()'
at md.mirrerror.testduapi.Testduapi.lambda$onEnable$0(Testduapi.java:15) ~[testduapi-1.0.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1631]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.18.2.jar:git-Purpur-1631]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1558) ~[purpur-1.18.2.jar:git-Purpur-1631]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:522) ~[purpur-1.18.2.jar:git-Purpur-1631]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1482) ~[purpur-1.18.2.jar:git-Purpur-1631]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.18.2.jar:git-Purpur-1631]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1631]
at java.lang.Thread.run(Thread.java:1623) ~[?:?]
then try to use a normal getter instead of lombok
maybe lombok + relocate doesn't work
but I use a lombok getter in the first print statement as well
and it works
you're not relocating the class of the returned object there
I'd write an additional getter for the JDA, because if you just use "getJda" again, then lombok will probably try to add its own getter, see "ah there is already a method like that" But then fails because it has a different return type or sth - idk I stopped using lombok
maybe its a bit confusing sometimes but i find it very comfortable for some big projects
still the same stacktrace
also it suggests me to use lombok ๐
yeah as I said, rename the method
idk just use getShadedJDA() for test purposes
then decompile your .jar and see what the actual return types are for getJda and getShadedJda
ok, then i have to redeploy my maven package, it may take some minutes
?whereami
ok the problem is that i am dumb af
i just had to redeploy
cause now it works for the both getters
lmao
tysm bro
np
private final List<String> vaultsPermissionsList = Arrays.asList(
"rg.allowedvaults.one",
"rg.allowedvaults.two",
"rg.allowedvaults.three",
"rg.allowedvaults.four",
"rg.allowedvaults.five",
"rg.allowedvaults.six",
"rg.allowedvaults.seven"
);
private ItemStack createVaultItem(Material material, String displayName, int i) {
ItemStack itemStack = new ItemStack(material);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setDisplayName(ChatColor.AQUA + displayName.replace("%int%", String.valueOf(i)));
List<String> itemLore = new ArrayList<>();
itemLore.add(ChatColor.translateAlternateColorCodes('&', "&fClick here to access your&l&c #%vaultNumber% &rvault!".replace("%vaultNumber%", String.valueOf(i))));
itemMeta.setLore(itemLore);
itemStack.setItemMeta(itemMeta);
return itemStack;
}
private Inventory createVaultsInventory(Player player){
Inventory vaultsInventory = Bukkit.createInventory(player, 27, ChatColor.AQUA + "Vaults");
int vaultSlot = 0;
for (int i = 0; i < vaultsPermissionsList.size(); i++) {
String permission = vaultsPermissionsList.get(i);
if (player.hasPermission(permission)) {
Material material = Material.ENDER_CHEST;
String displayName = "Vault %int%";
vaultSlot++;
ItemStack vaultItem = createVaultItem(material, displayName, vaultSlot);
vaultsInventory.setItem(i + 10, vaultItem);
}
}
return vaultsInventory;
}
public Inventory getVaultsInventory(Player player){
return createVaultsInventory(player);
}```
Any notes other than not using pdc?
This is just the inventory creation for the vaults gui where based on a players permissions, only that many vaults will be shown
does anybody have an idea how I could possibly improve the performance of this piece of code significantly? This is getting ran A LOT of times. I am thinking about some sort of caching or sth
what does maven want?
if((current.getX() % 1) == 0 || (current.getY() % 1) == 0 || (current.getX() % 1) == 0 ) {
Material material = location.getWorld().getBlockAt(current).getType();
if(material != Material.AIR && material != Material.WATER && material != Material.LAVA) {
return new RayCastResult(RCType.block, current, null, null);
}
}
current is the position of the ray at the moment
this checks against any hits against blocks
Wrong java version
how do i change it, i changed it in the pom but doesnt work
if I calculated it correctly, 20.000 times per shoot
What version are you using in intellij
Prey sure iirc
i think it is 16, this here is java version right?
Hello, I would like my ArkaziaLobby Plugin to need My ArkaziaLibs plugin to work but I don't know how I can put it locally because it is in the same file
Yeah should be fine not sure tbh
plugins {
`java-library`
`maven-publish`
idea
id("com.github.johnrengelman.shadow") version "8.1.1"
}
repositories {
mavenLocal()
maven("https://repo.maven.apache.org/maven2/")
maven("https://jitpack.io")
maven("https://repo.opencollab.dev/maven-releases/")
maven("https://repo.opencollab.dev/maven-snapshots/")
}
dependencies {
//Check it out https://jitpack.io/#PowerNukkitX/PowerNukkitX
compileOnly("com.github.PowerNukkitX:PowerNukkitX:master-SNAPSHOT")
}
group = "fr.arkazia.lobby"
version = "1.0.0"
description = "ArkaziaLobby"
java.sourceCompatibility = JavaVersion.VERSION_17
idea {
module {
isDownloadSources = true
isDownloadJavadoc = false
}
}
java {
withSourcesJar()
}
tasks.build {
dependsOn(tasks.shadowJar)
}
sourceSets {
hand {
resources {
srcDirs("src/main/resources")
}
}
}
tasks.compileJava {
options.encoding = "UTF-8"
options.compilerArgs.add("-Xpkginfo:always")
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
}
tasks.test {
useJUnitPlatform()
jvmArgs(listOf("--add-opens", "java.base/java.lang=ALL-UNNAMED"))
jvmArgs(listOf("--add-opens", "java.base/java.io=ALL-UNNAMED"))
}
tasks.withType<AbstractCopyTask>() {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
what is the purpose of these JPMS hacks?
me?
Yeah. Are you reflecting into java.io and java.lang?
oh, junit - disregard my comment then
but I'm looking for how to depend on my ArkaziaLibs plugin for my ArkaziaLobby
Anyone got notes on this system for displaying an amount of vaults based on players permissions? (other than not using pdc haha)
Use the maven-publish-plugin and depend on the library as a maven dependency?
Yes but how
Alternatively you could use gradle's project(...) dependency, but I am not a fan of that approach
can you show me an example
or how to do it
I cannot think of any minecraft-specific ones from the top of my head (I generally use maven heh)
because I just started using gradle
is there a plugin that adds another slot next to shield for wings or backpacks or someone that can help me make one
plugins {
id 'maven-publish'
// [...]
}
publish {
dependsOn publishToMavenLocal // Gradle doesn't quite like this line but otherwise I get issues when publishing so what gives?
}
publishing {
publications {
plugin(MavenPublication) { publication ->
groupId project.group
artifactId project.archivesBaseName
version '2.0.0'
from components['java']
}
}
repositories {
if (System.getProperty('publishRepo') != null) {
maven {
url System.getProperty('publishRepo')
allowInsecureProtocol = true
}
} else {
mavenLocal()
}
}
}
in your library gradle file and including the dependency should be trivial afterwards
Unless you need help with code, this probably aint the place
Just remember to run the ./gradlew publish task on the library
maybe use mavenLocal()
Oh yeah, you also need to add the mavenLocal repo on your consuming gradle project
but you already did that though
You need to actually invoke the publish task
It is comparable to maven's install goal
Well technically ./gradlew publishToMavenLocal would be mvn install while ./gradlew publish is mvn deploy, but generally it is the same
Hey geol, wouldn't happen to have a free couple minutes to give my system a lookover perhaps?
Problem is I plainly don't understand the problem
Eh might be more fit for code review thread then... was just looking for notes on how I'm achieving my goal... maybe there is a better / easier way to do it
Well the only issue I can forsee is with how you open these vaults and handle interactions with them but otherwise I don't see any glaring deficiencies (but remember that I am rather lenient when it comes to bad code)
Eh I'll figure that out when I get to it haha but thank you!
would it be fine for me to use Server#getEntity(UUID) on entities that might be in unloaded chunks? like does it load the chunk to get the entity or is null returned if the entity isnt loaded
when I drink inivis and the color of the player's nametag is colorful, his nametag won't hide!
Well I say that because there has recently been a high-profile exploit caused by checking the names of inventories instead of doing saner access control
it will just return null
epic
I think you always have to load the chunk if its unloaded
Oh I wasn't aware of this...
@EventHandler
public void onEntitySpawn(EntitySpawnEvent event) {
if(event.getEntityType() == EntityType.PAINTING || event.getEntityType() == EntityType.ARMOR_STAND || event.getEntityType() == EntityType.ITEM_FRAME) {
return;
} else {
event.setCancelled(true);
}
}
Does someone know why this doesnt work? It works that it doesnt spawn other things then the if conditions but it doesnt let me spawn the things in the if condition
It was a vulnerability inside the Vulcan anticheat if you are interested (https://www.youtube.com/watch?v=lv1mCT8cR04).
That is actually so damn funny
Please help ๐
how can someone be that stupid while coding
Does the EntitySpawnEvent even fire for BlockEntities?
for item frames and paintings, there's HangingPlaceEvent
How can i fix it though like i want it with entityspawnevent
why would this work though
what is your goal? prevent all entity spawns except paintings, armor stands, and itemframes?
(No errors in console)
Nope, paintings, armor stands, itemframes should can be spawned, anything else should be not.
is the listener even being called - that is does it log something if you add a log statement in it?
yeah that's what I said
did u register the listener?
Sorry read it wrong
Yes because it already works with everything else like the other entitys
ok
So.. how can i fix
o h I an dumb. I'd still log the spawned entity types though
im really confused why it wouldnt work with it
the code should work fine. are you listening to any other events?
public void onEntitySpawn(EntitySpawnEvent event) {
if(event.getEntityType() == EntityType.PAINTING || event.getEntityType() == EntityType.ARMOR_STAND || event.getEntityType() == EntityType.ITEM_FRAME) {
System.out.println("Placed: " + event.getEntityType().getName());
return;
} else {
System.out.println("Placed: " + event.getEntityType().getName());
event.setCancelled(true);
}
System.out.println("Placed (Outside if statements): " + event.getEntityType().getName());
}```
like this?
ye
lets see...
it logs other entitys that are being spawned but not the ones in the if statements wtf
like
the { else doesnt even get logged
even though its a whole different entity. It only logs the outside if statement thing
Uh now you are confusing me. Could you give us an excerpt of the logs?
Sorry. I have a feeling that the if statement doesnt even work (magicly lol). You can see in the code that i log everything else outside the if statement if something spawns, that works but everything that is being logged in the if statement and else statement.. doesnt get logged

you can still configure the items