#development
1 messages · Page 23 of 1
not the best way
🙃
Does someone know why my code doesn't work?
public void onBlockPlace(BlockPlaceEvent event) {
Player player = event.getPlayer();
Block block = event.getBlock();
Profile profile = ProfileManager.getProfile(player);
Material previous = block.getType();
if (player.getGameMode() == GameMode.CREATIVE && player.hasPermission("kyodo.admin")) {
return;
}
if (profile.getPlayerState() == PlayerState.PLAYING) {
event.setCancelled(false);
TaskUtil.runTaskLater(() -> block.setType(previous), 10 * 20L);
}
event.setCancelled(true);
}```
So I'm trying to set the block to previous type on block place after 10 seconds. In most cases that's air, but sometimes it can be water etc
Instead it always sets to cobblestone
Material previous = block.getType();
That's the block type you are placing
use blockstate
its a capture of the block's state that isnt modifyable by the original block object getting updated.
Blockstate wdym? Do u have an example?
a blockstate is basically just a copy of a block, so afaik any get methods that a block has the blockstate also has
so instead of doing
Block block = event.getBlock();
you would do
BlockState block = event.getBlock().getBlockState();
blockstates do have the getType() method
I'm pretty sure that wouldn't work either, you should do World#getBlockAt(block.getLocation())
lol
declaration: package: org.bukkit.event.block, class: BlockPlaceEvent
they want to set the block back to the original block type after an amount of time, which blackstates would work since the event is called just before the block is placed, giving a blockstate with the material type of the original block before placing
Luna! howdy

Yes but the passed in block is the new block that will be placed
The event uses the new block to potentially be placed
Could use interactevent and check if player is holding a block then check where the block will be placed.
afaik #getBlock() returns the before block and #getBlockPlaced() is the after block
unless its not?
oh i see
your method gets the before block but the blockstate should still be used afaik
so World#getBlockAt(block.getLocation()).getBlockState() might return the before block
ill boot up a test server and find out rn
The event is called after the block was placed
Which is why this method exists
i thought it was called just before it was placed
im wrong ofcourse
yeah i did
so uh minimessage, does it just auto italic everything
Yes
why
You need to disable it
wow i hate that incredible
Cause it's made by idots
prob mc default component behaviour
I usually append the component to an empty component with italic disabled
paper mimics the vanilla behaviour, the problem is actually spigot, which does this for you automatically
Sponge doesn't do this apparently. Based
Does anyone know why the line marked with red doesn't work? It should remove 1 of the items
have you ever thought about creating a variable, for the item in main hand
Well I'm just testing it out but afterwards sure lol
Why not set the block to the previous state instead?
That's what it does currently. If I have 4 items in the inventory and place one, it should decrease with 1 but it's just staying as 4
No, what you are doing is cancelling the event and manually (attempting to) decrease the item in hand
I mean, quite literally, setting the block to the previous state, without cancelling the event and all that jazz
https://jd.papermc.io/paper/1.19/org/bukkit/event/block/BlockPlaceEvent.html#getBlockReplacedState()
also sometimes spigot can be very fucky so you might have to set the item in main hand to one with a lower amount of items
Damn that sounds like a really shitty solution lol but I guess I'll try it, otherwise I'll go with Emily's approach
Okay yeah it didn't work either
some1 that can help me out? got a question about function & db need to screenshare otherwise uw ont understand it!! 😄
most people here are have the social skills of an ape so probably not
Okay I don't get the getBlockReplacedState(), how would I use it in this context?
Alright I don't know what I really did differently, but this somehow works https://i.imgur.com/35PeSl5.png
Even though it as far as I can see, should be the exact same thing as I did before
SetItemInMainHand() works, but SetAmount() doesn't. Good to know
That isn't a thing in 1.8 I think, at least I couldn't find it.
I tried using Block previousblock = event.getBlockReplacedState().getBlock();
But it still didn't work
Player player = event.getPlayer();
BlockState previousblock = event.getBlockReplacedState();
Material previous = previousblock.getType();
if (profile.getPlayerState() == PlayerState.PLAYING) {
event.setCancelled(false);
TaskUtil.runTaskLater(() -> previousblock.setType(previous), 10 * 20L);
}```
My current code which doesn't seem to work
A Block is quite simply a live representation of a Location + block data, the BlockState on the other hand is a snapshot of a Block, so affecting just the BlockState won't affect the block
Calling BlockState#update will "place" the BS back into the block (with all the data it had, if any, e.g. if it's a furnace that was cooking/smelting something then it will return back to that state)
??
huh'
Lmao u can’t read?
this isnt technical support its development where developers ask development questions to other devs
It says my number is in use but it’s not
Not discord support
for what??
this server is not affiliated in anyway + use discord tickets?
I’ve been tryna find a way to contact them for like a hour
Like I said earlier ther tech support is trash
Thanks
But already did that it didn’t really tell me nun
did u make a help and support ticket
Yep
I’ve called too
When I do it online they try to use the automated robot help but the thing is it says that my number is already in use so I have to talk to a actual person to have him disconnect the number if it is connected to an account that is not mine
Thanks tho once again u helped me more than anyone on the discord site tonight lmao
its 12:23 am and im in school atm lol
damn
Thx, so how would I make the certain block revert to old block after like 10 seconds?
It's mostly air, but sometimes it can be water too
Did you read the message right after?
either previousblock.update();after the setType() or previousblock.getBlock().setType(previous)
i believe that using previousblock.update() would be better as it keeps all original data about that block instead of just setting the type
So like this?
public void onBlockPlace(BlockPlaceEvent event) {
Player player = event.getPlayer();
BlockState previousblock = event.getBlockReplacedState();
Profile profile = ProfileManager.getProfile(player);
//Material previous = previousblock.getType();
if (player.getGameMode() == GameMode.CREATIVE && player.hasPermission("kyodo.admin")) {
return;
}
if (profile.getPlayerState() == PlayerState.PLAYING) {
event.setCancelled(false);
TaskUtil.runTaskLater(
previousblock::update, 10 * 20L);
}
}```
yes i th8nk
No
package explosionplugin.explosionplugin;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockExplodeEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.entity.EntityExplodeEvent;
public final class Main extends JavaPlugin implements Listener {
@Override
public void onEnable() {
// Plugin startup logic
System.out.println("Plugin started!");
}
@EventHandler
public void onEntityExplode(EntityExplodeEvent e) {
if (e.getEntity().getType() == EntityType.ENDER_CRYSTAL) {
e.blockList().clear();
}
}
@EventHandler
public void onEntityExplode(BlockExplodeEvent e){
if (e.getBlock().getType() == Material.RESPAWN_ANCHOR){
e.blockList().clear();
}
}
}```
no idea why it doesnt work (i'm a newbie at java, very new and just made my first plugin)
any of u know how i can make it so explosions from end crystals and respawn anchors do not do any block damage? this approach didn't work but i didn't know what i was doing eitherway lol
and how do I do that
or could I get a explanation
void registerEvents(@NotNull Listener listener, @NotNull Plugin plugin)```
Registers all the events in the given listener class
listener - Listener to register
plugin - Plugin to register
for listeners to work, they listener class needs to be registered as an event in the plugin
public final class Main extends JavaPlugin implements Listener {
so i need to add something to that?
You need to put it in your onEnable
alr
oh wait i see
i need to add
@EventHandler
public void onEntityExplode(EntityExplodeEvent e) {
if (e.getEntity().getType() == EntityType.ENDER_CRYSTAL) {
e.blockList().clear();
}
}
@EventHandler
public void onEntityExplode(BlockExplodeEvent e){
if (e.getBlock().getType() == Material.RESPAWN_ANCHOR){
e.blockList().clear();
}
}``` to onEnable listener
or listener manager and dont use onenable directly
alr
Doing this means you're using the class as it's own variable and since the class extends JavaPlugin and Listener, it can be used for both
but if you had a separate class that implements listener, you would need to do registerEvents(new ListenerClass(()) 
https://i.imgur.com/BkZ6Mby.png (listener reg)
https://i.imgur.com/JiHDnaf.png (main)
(just as reference, maybe it helps seeing what other ppl do. i like to keep onenable clean)
do i need ti import that registerListeners
if you use the Bukkit.getPluginManager() you will need to import Bukkit yes
if you just started plugins and java entirely i recommend
?learn-java
Online Courses:
Online courses are also great for learning java. Some websites that offer them are:
- Coursera - Free unless you want a certificate
- PluralSight - Great courses from what I've seen. Mostly Paid
- Udemy - Never used them myself but they seem to all or at least most be paid.
My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.
Oracle Docs:
Oracle docs can help a lot at learning and understanding java:
- Start with this,
- Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
- Hit this.
They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff
Other services:
Some other cool services that will help you learn java are:
As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!
the thing i don't know is how to make a minecraft plugin, not java
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
isnt it supposed to be java getServer().getPluginManager().registerEvents(this, this);
i have no idea tbh
thats what the docs state
am i missing anything
package explosionplugin.explosionplugin;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockExplodeEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.entity.EntityExplodeEvent;
public final class Main extends JavaPlugin implements Listener {
@Override
public void onEnable() {
// Plugin startup logic
getServer().getPluginManager().registerEvents(this, this);
System.out.println("Plugin started!");
}
@EventHandler
public void onEntityExplode(EntityExplodeEvent e) {
if (e.getEntity().getType() == EntityType.ENDER_CRYSTAL) {
e.blockList().clear();
}
}
@EventHandler
public void onEntityExplode(BlockExplodeEvent e){
if (e.getBlock().getType() == Material.RESPAWN_ANCHOR){
e.blockList().clear();
}
}
}```
@tight junco
lemme see
nope, explosions still do block damage
you could try cancelling the event who knows 
wouldnt that cancel the explosion damage too?
i'm trying to cancel only the block damage (the blocks affected by the explosions)
maybe who nkows
spigot can be funky
id more or less check if the event is actually running
actually got a better idea
put a debug message after the block clear to see if the event actually works
i've already done it with a different way
Hey, i need help.
positive_effects:
- "SPEED"
- "FAST_DIGGING"
This is my config.yml, i need to like take this names into a list and then write this list to console.
List<String> positiveEffects = config.getConfiguration().getStringList("positive_effects");
but i get this error https://pastebin.com/1tvYuy3e in console
There seems to be some invalid syntax in your config! You can paste it into https://yaml.helpch.at/ in order to find out where your issue is!
https://pastebin.com/7bNrQkdP My config.java class, this is how i import config.yml
what does the file contents look like
Uh does uuid (in string) return the full uuid or the trimmed uuid? (without the -)
Can't test it rn
with
it returns with -
okay ty
https://pastebin.com/g8r7gnXm i was testing if the config was reading by the plugin
IntelliJ keeps creating files using gradle 6.7, how do I change this?
Go to project settings and see what version is set there
7.3.3
Can you take a screen of that window?
Yeah
so I want to update the wrapper file
the standard wrapper file when creating a project
To not use this
So changed to this distributionUrl distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
Does it use 6.7 for all new projects?
Yes
I also changed this
But the issue is the standard wrapper properties file I believe, I wanna update that
There's also an update command
But would that update it for all new projects?
gradlew wrapper --gradle-version VERSION for the current project
MinecraftDev IntelliJ FTW. Used to have that problem and then I just used that plugin and it did it properly.
Yeah that worked, but is that possible to do automatically or something for all new projects?
I just can't find the setting for default distributionUrl
That would be per-project most likely?
At least if you're running gradlew that's the wrapper for that given project.
Yeah but I'd also like for it to work for non-minecraft projects
Fair
Yeah exactly
It looks like you can tell IntelliJ to use a default installation on your computer instead of it grabbing it's own.
So if you download the latest one, you should be able to set the setting to point towards your local installation.
Can someone help me pls
Thats an yaml syntax error, barry already gave you a fix
i've fixed it, but i can't add items from this section to a list
effects:
positive:
- "SPEED"
- "FAST_DIGGING"
for example i want to add the speed string into a list
List<String> positiveEffects = config.getConfiguration().getStringList("effects");
i use this but the size is always to 0
effects.possitive is what you want
Hello guys, so I am new at programming and I would like to know how to detect online players in a server
uh?
if you are new, stop searching for specific things
learn the basics
Bukkit.getOnlinePlayers?
Thank you 😄
Uh?
All apis have a #getOnlinePlayers call, It's part of a Java Object obv
Bukkit and spigot stuff is a bit different than normal OOP
No that was a joke, don't do that
Rather it was sarcasm because of Afonsos comment
how do i make required checkboxes with 4 sports they can choose out, they have to choose atleast 1!
html^
I mean, am I wrong?
I find it a lot better to learn java, or well the bukkit/spigot api slowly by following whatever tutorials or course you are doing. This is me assuming you are watching one of those.
People that start coding just to idk, to do a skywars plugin, tend to skip a lot of the basics which tends to also make them ask like 4000 questions
#getOnlinePlayers() isn't a biggie in this case, but if you do it with that already, then I can only imagine the rest.
Besides that, google is your best friend lul
Pretty sure html itself doesn't have this, so you would have to use javascript for it If I am not mistaken
Google 🙂
Dude asked a question and you yelled at them for being new
Yes you're wrong.
I didn't yell? I don't consider that yelling at all
is it answering their specific question? No. Is it helping them answer it themselves? Yes.
that's how I view it.
menu_title: 'Requirements Menu'
open_command: test
size: 9
items:
'rank':
material: PLAYER_HEAD
slot: 1
lore:
- '&eהדרגה שלך: &f%luckperms_prefix%&7(&a%luckperms_group_expiry_time_tiger%&7)'
view_requirement:
requirements:
tigerrank:
type: "has permission"
permission: rank.tiger
'rank1':
material: PLAYER_HEAD
slot: 0
lore:
- '&eהדרגה שלך: &f%luckperms_prefix%'
view_requirement:
requirements:
tigerrank:
type: "!has permission"
permission: rank.tiger
I don't like giving plain answers, I give answers that might help them answer it themselves, find that a way better way to learn than to just give the solution
how can i make this to 1 slot
Uh, wrong channel, use #general-plugins or #1007620980627230730
but u can help me?
make it to 1 slot?
.-.
I don't use DeluxeMenus
I would assume you use priorities
if that's a thing in DM
You told them to and I quote "Learn the basics"
That's not helpful in the slightest
Well, I did proceed to explain what I meant afterwards, but it's also not wrong, learning the basics is the first thing to do.
What you meant is regardless when you didn't actually do anything to help.
That is the point 😉
And well, It was quite a reflex to even say that, since I can't even count the times the issue was them actually not learning the basics and just skipping everything
this just confused me brain
They might just want to experiment with spigot api
Makes it more fun rather than making a rock paper scissors game in regular java
Helps with motivation
You’re wrong in this case… this is what happens when we don’t actually know the other people….
But do not worry, I ain’t discussing. That’s all
good point
I did this while learning actually having something you could see and change easily in my opinion was a far better medium (very visual not just text) it can be very useful
Hi I'm make my statistic money nick not working why? What problem
u needa put the dictionary english plugin resource pack machine
and then convert it to groovy
what
hi, i've included a function on a page which has to be viewed as a dropdown menu but it doesn't showup as a dropdownmenu
`<?php
function afdelingen(){
$array = array("Accountants", "Receptie", "HRM", "Belastingadviseurs", "Administratie", "Directie");
foreach($array as $afdelingen){
echo "<option value='strtolower($afdelingen)'>$afdelingen</option>";
}
}
?>`
I dont like you or php
who asked
Is it better to use a BufferedReader instead of Files.readAllLines(Path) to read the contents of a file?
Not really, the only reason I'd see that being "better" is if you wanna make more use of the reader in some way
No point in performing unnecessary work yourself
Help guys, I'm having trouble sending a parameter to the main class
I separated both codes, the main class and the class which I need to add the parameter from
Well, docs say that readAllLines shouldn't be used to read larger files... While I doubt it will be like that in my case do I still use it for safety
How large are we talking about?
The problem isn't "Files.readAllLines shouldn't be used for large files, use BufferedReader instead", the problem is that if you want to slurp all lines you need to bring the entire file into memory, that is the problem, and reading with a reader "directly" is no different
Realistically this is a real problem starting in the order of the several tens of megabytes, if that's the case then the stream-based approach (Files.lines) or using the BufferedReader + readLine could be of better use since you go through each line one at a time
what is the maven dependency for 1.8.8 papermc
hi, i've included a function on a page which has to be viewed as a dropdown menu but it doesn't showup as a dropdownmenu
`<?php
function afdelingen(){
$array = array("Accountants", "Receptie", "HRM", "Belastingadviseurs", "Administratie", "Directie");
foreach($array as $afdelingen){
echo "<option value='strtolower($afdelingen)'>$afdelingen</option>";
}
}
?>`
you need to define the dropdown first
org.github.paperspigot:paperspigot-api
same maven repo - https://repo.papermc.io/repository/maven-public/
thanks it works
Is there a way to open a sign gui for a player in 1.8.8? as there's no #openSign() method in 1.8.8
why does essentials not work ?
export const msMinecraftUploadSkin = async (mcAccessToken, skinData, variant, name) => {
const form = new FormData();
let file = await fs.promises.readFile(skinData, "binary");
form.append("variant", variant);
form.append("file", Buffer.from(file), {contentType: "image/png", filename: name});
return axios.post(
"https://api.minecraftservices.com/minecraft/profile/skins",
form,
{
headers: {
...form.getHeaders(),
"Content-Type": "multipart/form-data",
Authorization: `Bearer ${mcAccessToken}`
}
}
);
};```
I need some help, I am trying to upload a skin, but I am getting 401 Bad Request errors, and I am not sure why.
variant = classic
skinData = Path to the texture file
name = texture.png (The last part of the texture path)
I just wanna add support for PlaceholderAPI into my own plugin, How could I do this?
I am struggling to figure out how todo it
May I ask you to help me with one question?
would it allow me to use placeholders from other plugins?
oh if you only want to apply placeholders then you only need the first link
the second link is if you want to make placeholders yourself
Yeah, I'm having trouble with actually doing the things in the first link xD
https://mojang-api-docs.netlify.app/needs-auth/change-skin.html#response maybe the token is not good?
expand response
I tried using an invalid token I get 401 unauthorized
never mind
it still gives me 401 bad request even with a wrong token
I fixed the Token now I get 415 Bad Request
maybe the body is not right
i need to make an if and else statement, if they choose yes on family on the dropdown menu, they will get on the next page an decription textfield where they can fill in what they want, my code rn is like this;
if ($_SESSION["familie"] == "ja"){ echo }
but idk how to place a textfield after the echo
Does anyone know if/how you can apply a block tag to a block?
https://minecraft.fandom.com/wiki/Tag
(example: adding climbable to a dirt block)
plugin/mod/data pack?
Plugin, or data pack if not possible in a plugin
Yeah it's not possible with a plugin, that kind of stuff happens far too early in the "game" where plugins are nowhere near loaded
What about a data pack?
Most likely, uh I never created one myself but I assume you'd need to add the blocks in your tags/blocks/climbable.json?
https://minecraft.fandom.com/wiki/Data_pack
https://minecraft.fandom.com/wiki/Data_pack#Template
I'll look into it, thank you 😄
Even to blocks that are placed by a player?
That's not really how it happens
It's not per individual block in the world, the tags are a "property" of the 'block type'
Tightly tied to the whole registry system and all that is initialised waaaaaaaay before even the Server instance is created
When that initialisation finishes it's all locked down/frozen and spread throughout a good number of other places so it's not as simple as "just change it with reflection in the block"
Oh okay
I thought there was like a command to obtain blocks that had the tag, but I was probably thinking of items
It's not like PDC, it's not something in the NBT
It's something embedded in the block type itself
Got it, thanks for the help
might be only possible if you modify the server jar itself
Nowadays yes
Or with java agents but that's overkill
Paper team is working on a new API to be able to safely modify (or, well, put your own stuff into) registries and a bunch more stuff during bootstrapping/initialisation
Uhm, so if I use File[] files = new File("path").listFiles(); where would path be relative to ?
tried putting plugins/TestPlugin/data/
and got this error: java.lang.NullPointerException: Cannot read the array length because "<local7>" is null
I assume local7 is the path
that's the File[] files variable
and it's relative to the working dir, that is ., that is the server dir
so wouldn't this be correct?
if you want something in the plugin dir, use the plugin dir from the Plugin instance (Plugin#getDataDir or whatever)
getDataFolder*
oh ye ty
Is there a non reflection way of registering commands at runtime (dynamically)?
no
You can only get so far like putting the command in the CommandMap, Paper exposes the CM in the API so that's trivial, but at some point (after inserting the cmd in the cmd map) you have to call CraftServer::syncCommands
ic, thank you
I am coding a project where you can make DeathMessages configurable. In the YML file, there is a player list of this structure:
players:
a1b7942d-f0e0-479f-b9c2-2df166d99eb3: "deaths.one"
And then we have that "deaths.one" stored as:
deaths:
one: "%player% destroyed %target% with %item%!"
default: "%player% killed %target%."
This setup works on my server, but for the person I am making this plugin for, it errors when retrieving the player's value. If you need any more info, please let me know!!
CoDe
Hello a little question, if I have a (HashMap <Integer, Arraylist<Medicine>>) and the class Medicine has a name attribute how can I access that atrribute in the arraylist using the HashMap Integer key
?
This is how I grab the value:
String configMsg = Main.getInstance().getConfig().getString("players." + player.getUniqueId().toString());
I set it using:
Main.getInstance().getConfig().set("players." + player.getUniqueId().toString(), message);
Main.getInstance().saveConfig();
what about this setup isn't working?
You're saying, get the Nth element from the ArrayList, where N is the key in the hash map?
The line below this (which is configMsg = configMsg#replace(etc)) is giving a null pointer exception
It works fine on my server, but the other person's server it gives that error
put the exception in a paste bin and send it here. https://paste.helpch.at
what's in DeathListener.java line 54
actually, just put the whole DeathListener class in a paste bin and send it here if you can
Can I send it to you privately?
sure
when are you setting it?
it seems like it isn't actually set. are you setting it when the player first joins or when?
When a command is ran
well that's probably the problem. the command wasn't ran so the config option is missing
you should probably set a default string in your getString method
well at least that's 1 way to solve this. another would be to just listen for when a player first joins the server and set a default value in the config then
but then again, if that player never joins after that or never gets another death message other than the default one, you'll just have a bunch of unnecessary options saved in your file
The command was ran everytime before I killed someone
And I can see the option in the file, but it returns null
map.get() returns the arraylist, and then getindex() or whatevet the method is for getting a specific object from the list
its probably just get()
so like map.get(1).get(1).getattributeName() for example
something like that
im getting this error Notice: Undefined index: interesse4 in C:\xampp\htdocs\PJ6\PJ6Pagina3.php on line 17
when i dont click on a checkbox
<input type="checkbox" id="auto" name="auto"> <label for="auto">Auto</label> <br>
these are the checkboxes idk why they don't go to the next page if i'm not clicking on it
Hello community , Im trying to learn how to code a plugin of mine , i hope its fine to put my question here , im trying to make players lay on the bed at any time of the minecraft day does anyone knows how to get that done ?
uhm
why my ajleader boards doesnt connect or smth
i put the plugin in my plugins
but it doesnt exist
btw i use 1.16.5
shut up
i really dont get why people dont ask the developers of the plugin for the support and go to other places
Effort
that pumpalump guy is just a troll
they were harassing someone on another discord server and got beamed
wait what
They said they were harassing someone on another discord server and got beamed
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
don't ghost ping me
I believe they are called inlay hints. Prolly an option deep down in the settings
But aren't they enabled by default? It obviously neccessary that the variable actually has a type
you can right-click that
alternatively, go to settings and search for "type hints" or "inlay hints"
thank you guys
they harassed @mellow pond and got banned because of said harassment
the guy was very cringe and didnt deserve to exist on that server any longer.
fair enough
So I am making a Collections plugin, kinda like the one hypixel skyblock has. But I have to know, if it the item for example has already been used for the collection on ItemPickupItemEvent, would it be smart to put boolean in the persistentdatacontainer saying it's been already "claimed". Or would there be a better way of doing this?
PDC seems like a good solution for that
id stick a boolean saying it hasnt been claimed and then remove it once it had
if i could grab the nbt data of an item entity from skyblock while logged in it might give insight into how hypixel does it
Yeah they are down right now aren't they?
yep
and im not sure how to grab entity nbt data from an entity while its spawned
like ive grabbed nbt data from itemstacks before which was helpful when figuring out how custom items were identified
apparently F3+i grabs the entity data
there are mods to show NBT of items/entities
ive used the one for items
don't you need to have op for F3 + I to work? Not like it can't be bypassed by a mod, but like, if you're gonna have a mod for getting NBT then use one that shows them right up lol
you didnt have to be op to grab nbt data off an itemstack while its in your inventory
tho im not sure when F3+i was added to minecraft
that's not what i'm trying to say
even with entities, the nbt is already in your client
but some features are client-locked behind op
well ill find out when i login
Wouldn't use PDC in this case maybe be bad?
I mean, there's not many other options
but server file gonna go brrrr
No it's not bad
(or world, wherever the pdc data is stored)
Wait can u link
Oh wait nvm
yep imma assume theres a flag on the itemstack on its spawn and then is either removed from the itemstack when adding to inventory or its added to the item entity itself
why?
PDC is nothing but a fancy Map<Key & Type, Value>
persistentdatacontainer
permanent metadata on items, entities, and blocks that store extra data like furnaces (tilestates)
basically lets you add nbt data to an itemstack for example without using nms
and to entities and is saved instead of being discarded afaik
Why is there no PersistentDataType.BOOLEAN?
behind the scenes, booleans are stored as a single byte so you'd use PDT.BYTE, with 0 (false) and 1 (true)
though in general for a boolean I'd use a byte, but the presence of the key means it's true, and the absence false
some of these just seem like theyre encouraging anti-pattern
storing a FileConfiguration in a pdt should almost always be illegal
i wonder what stuff in itemstacks needs storing that isnt stored in nbt
i assume material type and amount
i mean... it's all stored in nbt eventually
Good evening,
If someone finds me the solution to this problem, I will pay him directly in reward.
I need a solution quickly if possible.
uh
Do you have a solution to this problem?
He's probably wondering why you're asking for a solution to someone else's problem
or is this an alt account?
I am his client
oh 💀 💀 💀 💀
it's gonna be hard to get any info given they didnt share the code publicly lol
And if I understood correctly, the database has a problem saving the UUIDS of the players
I can share it, if someone finds a solution, I pay it PayPal.
It's been two days that we are stuck on this problem :/
please show the code
Yes but I wanted to redo the whole plugin 🙂 to my criteria and removed 90% of the features of this plugin on spigot
@long solstice show the code 👍
System.err.println("Hello World");
terrible
D:
How can I share the code? I only have the .jar but he has the source code and everything else
?paste
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
main = putStrLn "Hello World"
oh
is that better
💀
yes!!
that is going to be a bit problematic
it's a small plugin
decompilers work fine
send it to like bm if you'd like
and if bm is ok with it
😌
or me and I'll send it to bm
if bm is ok with it
shouldve made something that works then
since even the client said it's a public plugin but with features removed
¯_(ツ)_/¯
skull
I do remember there is this obfuscator which costs a lot of money but has a trial where it prefixes System.out.prints
i think
but since plugins don't have System.out.print
ez free obfuscator
its been a long time tho so I don't remember the name
lmao
Who wants it I'll send it
Alright I'll send it ya one second
The plugin works fine on my server, I'm fairly certain it's either because of different spigot jars, or because of a conflicting plugin
oh so the plugin works?
Yeah, that's what I thought
just send it here lmao
if your server jar is breaking your config then your server jar is extremely cursed
Yes but not on his server
it's not like it's a super ultra blaster innovative plugin lmao
out of curiosity what jar is the client's server using
xD
i was wondering why you were saying "client's" when I thought you were talking to the client
Taco I think from what the error said
meantime me getting the well known NullPointerException but can't figure out how/why this crap is null xD
Oh no GuardSpigot
Oh welp
wait what?
I haven't heard of Taco in AGES
Yeah it's built on 1.8.8
configuration getString returning null
^
is the path correct
is the config null?
it works on the dev server
As I said it works on my server, but on his it doesn't work
@long solstice try to delete the plugin data folder on ur dev server
oh bruh
as in it's returning null?
Yeah
Are you using a library to manage configs?
shut it
I get the string, try to do Strin#replace and then it says cannot invoke replace because string is null
yes
Yes, I'm using the default spigot config system no libraries
I wonder how many skulls I will send in this whole convo
this is a dumb question but are you 100% sure it's the same player in the config that you're reading
where is the code
oh he sent it to you
however if it's a different player then obviously it's gonna be null
smh
Yeah it's messy, I threw it together very quickly, I'm gonna clean it up
I sent it to you too
that doesn't answer his question though
i haven't used them before
yes please
this is the first thing that comes to mind
Yes it is
aaaaaaaaaaa
this code will NPE if the player that dies isn't in the config
so irrespective of the problem it's still unsafe
how's he storing the player in the config? uuid?
ye
is it properly loaded?
Yeah
(I mean tbh, don't even recall how the config system in spigot works with loading etc)
@long solstice add a default value
getString("path", "default")
^^ ye, if it returns the default value then we know it's probably the path
unless you're sure that it's in the config
can you try printing Main.getInstance().getConfig().saveToString() and send it too (ideally on the server where it's not working)
then the classic debugging
also
yep this
you could also look through all the keys in the config and print them
tee hee
getInstance() 💀 4.0
¯_(ツ)_/¯
not using adventure
what would you use instead
DI?
dependency injection but that's besides the point
oh boy
?di
Dependency Injection
Dependency Injection is a way of providing objects with the objects they need ("dependencies"). This is usually done with a constructor, but can also be done for individual methods
Read more here: https://en.m.wikipedia.org/wiki/Dependency_injection
Dependency Injection in Java:
https://paste.helpch.at/yijawupoju.java
Dependency Injection in Kotlin:
https://paste.helpch.at/esogakutod.kt
stop getting distracted
^^ for future reference
@long solstice
but focus on the issue now
@long solstice
Ok will do those
if it works on spigot/paper then it's probably the fork being shit
maybe on both maybe? and compare them
which is already a suspicion if it works fine on your end
they already said it works on the test server
wouldn't doubt
haven't heard of Taco in quite a while
thought no one used it anymore lol
I got it wrong, they are using GuardSpigot not Taco
Oh is it
1.8.8 spigot fans be like yeah this is good lemme change 1 line and make a new product and sell it for $100000
god that's like the stupidiest mistake anyone could do ngl
- 75 bucks
- Paid server software 💀
to be fair they probably perform well
but there's free open source alternatives 🥲
that's like 99% of the time a very bad idea
to be fair i dont care
Matt is typing
woa matt
$75 for a fork of an os software wtf
is Taco open source?
yes
oh
🤓 technically all forks should provide source code to buyers as they are derivatives of the GPLv2 licensed craftbukkit
oh its deprecated
In this case, I paid only 25$, they passed it to 75, I was lucky 🙂 and it is not Taco, it is Spigot and Paper in 1.8.8
still a VERY bad idea.
oh yeah 4 technically
Even if it was 1 cent you'd be paying too much
💀 5.0
may I ask, why
okay so if it is paper then it's probably not the server software
They just fixed all the errors of Paper 1.8.8 which was no longer supported by the creators of Paper and optimized + this one. All Spigot/Paper plugins work with this Spigot
people tend to think expensive = better
and not enough research & past knowledge
so you're not using paper?
my money is currently just the fact that it's this and OP isn't hasnt noticed it's a different player dying
let me teach you something, there's a reason they stopped providing support for 1.8.8
ur wasting ur breath
well
haven't used either
keystrokes
but those are maintained 1.8 forks
Because it was the only Paper 1.8.8 that was "fixed" for 1.8.8
The default Paper 1.8.8 works very badly
Why are there so many forks
im good
you are good
look at the messages I sent above
🥲
what is this chat
Yes
either use a maintained and open source software like stated above OR you just be a cool guy and actually see the fact that 1.8.8 is 7 years, 3 months, and 23 days old and move to the newer versions which provide a lot more features, are quite stable, have bugs fixed and is supported 🙂
Si
just reassuring you guys that I have not hosted a 1.8 server in ages but I'm not gonna force a server owner to update everything to latest especially if it's a pvp related server
👍
I mean, I have hosted 1.8.8 servers, and imo they aren't worth the pain.
Besides that, the 1.8.8 community is small compared to the rest, they are just "loud"
if it's like a 1.8 pvp practice server then you might not want to use 1.8
people in this channel see 1.8 once and start losing it
they so picky that they even use 1.7
even when the only difference basically is that you can use higher cps consistently (like 20+)
which sucks anyways
It brings back personal trauma 😦
^ This message brought to you by PDC gang.
if I could give myself one title, I wouldn't be able to give me one, since I wouldn't be able to choose between "1.8 Hater" or "Skript hater"
Ok so, I did the save-to-string thing
Unfortunately, for a PVP server, players demand the server version of 1.8.8 for a so-called better PvP, without even having visited the server or tested the PvP, if it's not 1.8.8, nobody will come, I had no choice.
And as Paper 1.8.8 offered atrocious bugs, I was looking for a stable Spigot for 1.8.8 with most of the bugs fixed, I found this one so I took it 🙂
Originally I wanted to get StellarSpigot for 500$ but the author didn't sell it anymore.
and it has printed everything in the config
and has worked completely fine on my end
well i think we'd established that already
I am sending it to Astaldo to test on their server
God, paid not equals to good, it's actually quite the opposite, if you have no alternatives, use the already mentioned open sourced and maintained 1.8.8 forks.
fellas you're not gonna change anyone's mind here
(but def. don't buy a 500$ spigot fork lol)
you're just wasting your breath
Welp it's not about changing minds, it's about fixing an issue that points to the server jar
I smell drama. What did i miss.
did anyone even think about switching server jars just to see if it works?
problem solved 😎
I had no choice but to take the 1.8.8, I admit that I would have preferred a more recent version but the players are paramount, it is a 100% PVP server.
In France, some 1500 servers use 90% of the 1.8.8 for their server, which represents a very large part of the players involved in the 1.8.8 and therefore no server > 1.8.8 can resist 🙂 it is therefore a great risk to take over this version.
bro i literally said that about 3 times
oh my god shut up
mb
^
you are not being helpful
yes
funny
Hahaha
anyway
Ah 1.8. Thats such an old shoe. Not worth discussing. Gn.
:-: he has a point
The End.
If it was a minigame server, skyblock or something else... I could have taken one of the latest versions of minecraft because nobody would have minded.
@lyric gyro please for everyone's sanity just try running the plugin on spigot/paper 1.8.8 (not a fork), and also try with no other plugins
Feel the earth move and then hear my heart burst again
wait your heart?
if it works with that setup then we know it's an issue with the server or another plugin conflicting
oh my god shut up
So overdue I owe them
💀
afonso listed an alternative than updating but for the sake of not continuing this thing
please for everyone's sanity just try running the plugin on spigot/paper 1.8.8 (not a fork), and also try with no other plugins
if it works with that setup then we know it's an issue with the server or another plugin conflicting
i have just been repeating myself for the past 20 minutes while everyone argues about 1.8 forks
give me strength
Swept away, I'm stolen
oof
no server > 1.8.8 can resist
MCCI moment
what's with MCCI?
adVerTiSiNg!1!1!!1
Ok
Let the sky fall
When it crumbles
We will stand tall
Face it all
Together
Let the sky fall
When it crumbles
We will stand tall
Face it all, together
At sky fall
At sky fall
now
Weird flex, but okay.
Petition to rename this channel to #emilySinging
YES
omg no
:sadface:
Np ill cover lp support meanwhile xD
ngl we should have emily locked in an airtight box and thrown into the bottom of the atlantic ocean :3
for christmas
Erm
(for charity)
omg yes
to be precise, in the Mariana Trench
he gets it
hmmmmmmm?
😂
(for those who don't know, deepest known location in the ocean, located in the western pacific ocean)
nevermind the mariana trench is in the pacific
$1 for each feet
but it's deep 🥺
Hi guys
I see you want to make the server in 1.16 or idk
A recent version
1.8.8 ?
It’s a pvp/faction it need to be on 1.8.8 you can’t make a pvp server in 1.16 1.17 or idk what
Ye
For a full PVP server, I advise but people on this discord don't agree with me 😦
I’m a big player of pvp server
Everything is better in 1.8.8 and oldest version
Animations
we are devs, don't take it as an offense, we just don't like outdated things lol
I can’t imagine a pvp server in recent version
But ye, regarding popular opinions, PvP servers are better in 1.8
I understand, it's not easy for a developer to have to go back to an obsolete version of 1.8.8.
Although I know of some Faction servers that are in latest versions
Sometimes the oldest things are better
only for you.
This is a great risk for them
For a server owner and devs, it's a big nightmare
For development, no
But most players don't care about it if they have their dear old PvP mechanics xD
Only for a big % of pvp community on minecraft
That's also false.
I listed 2 free alternatives
that are on 1.8
Bro
you can keep on what you're using but I listed those two for you to know
@lyric gyro can you check dms
I don't have any experience with custom forks so I'm not going to force you
1.8 community is REALLY small, they are just "loud", but if you check statistics, they are REALLY low amount of players
In France every pvp server who use à New version don’t work
Yes
1.7 to 1.9
now look at the pvp community
1.8 may not be majority anymore but it's not REALLY low amount of players
Yes in France, all the servers which make in recent version a PvP server close because it is not 1.8.8
Hey guys this isn't the place to discuss this
Check the stats of a french pvp server who is in 1.16
it's decreasing every day, and it is REALLY low compared to the newer versions
And check a french pvp server who is in 1.8.8 or 1.7.9…
Please take this to dms or #off-topic
how do you know?
Last time I checked was probably a couple months ago but 1.7 pvp servers were doing pretty well
Cmt on dit le plus connu @lyric gyro
I think you completely failed to see the point but okay
yeah guys please just give it a rest lol
This is a warning
agree
Not here
yup
I hear pvp and I went bing
Go in #off-topic
this discussion has happened a million times before and never actually reaches a useful conclusion
the answer is, there is no conclusion, at the end it's all about opinions, anyways gonna leave this topic here
Yes but it is always useful to make debates to know what everyone thinks, his advice 🙂
nevertheless
not in here please
also what happened to testing the config on the other server lol
🪦
i originally asked 40 minutes ago
So anyways
We are doing it right now
Gradle 7.6 RC3 dropped recently.
Oh okay
they grow up so fast
Yeah we got the error again with the same plugin
um
I can't send images
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
Oh right lol
it's alright i saw it
Alright
did you print out the config / change the server software / remove other plugins yet?
I'm not sure what @lyric gyro did, the plugin should have printed the config though
I had left the files
well... can you send it then lol
should so did it print or not?
I am confused
nothing useful came out of it
"I like A" "I like B" k good for everyone
b932a47c-19af-3cdf-8435-68481bddd2a3: '&c%killer% &ftrashed on &c%player% &fwith
&7[&b%weapon%&7]'
uhhhhhhh
(those are 2 lines btw)
(not 1 line)
Wait, since I haven't seen the code, can like, someone explain rq what the objective of it is?
okay and the player who died definitely has the id b932a47c-19af-3cdf-8435-68481bddd2a3?
probably just a visual bug
no, it's on pastebin
or
probably console wrapping
that split it into 2 lines
would make sense
im not sure how console copy and paste works
it def. is weird, but I would assume it's just one of those two
doesn't matter that it's two lines
would getString work properly with 2 lines?
yes it's valid yaml still
hmm ok, interesting
Well, I just did some more testing
I mean, nothing I can do, don't have the code :-:
And I made a really stupid mistake
do tell
It was grabbing the UUID of the player who died, not the player who killed
yeah i said that lol
Yeah I know you did
ye lol
Sorry
i assumed that was what you wanted since you didn't correct me
rofl
all good
happens
But thanks for all your efforts, much appreciated
So if everything works out, @long solstice can you please tell me who helped here to keep my promise
yes
Come mp me private then and thank you so much 🙂 for the involvement, it's really great!
I didn't even see you say that and that's literally exactly what happened 💀
tee hee
Feeling very stupid
happens to the best of us
happens to the best
jinx
We are the same person 🥁
(but actually not)
or maybe we are just living in a simulation
and this was a preprogrammed answer
👀
guess we will never know
after brister mitten's maybe possibly unsure approval
actually kinda useless
but something to show off
yk
to new members
that dev den is cool
oh
What charset does Minecraft use for its chat / is there a list of available characters somewhere?
for ones that are formatted correctly you can find the unicode list in an empty resource pack file
if you can find an empty resource pack online you should beable to find the list
or open a minecraft jar file and go to assets\minecraft\textures\font\
Does anyone know how to override an NMS block with a custom block?
Like for example if I want to override the beacons tick method
i dont think your supposed to override blocks or if you can override them
I know you're not supposed to, but I would really like to lol
I was googling for "minecraft chat characters" etc. but couldn't find anything. Thanks to your message I tried the keyword unicode and found some stuff on minecraft wiki.
Minecraft supports all unicode characters from 0000 to FFFF.
I think I got it working
Idk if anybody here already has worked with RabbitMQ, but I would like to ask if the only difference between Direct Exchange and Topic Exchange is the fact that the former does not accept wildcards in the routing key field (when publishing a message), while the latter does
So basically this table then hmm
I'm trying to create a placeholder that return a Component from adventure, but I can't seem to find a method that allows it?
Any help greatly appreciated 🙂
PAPI doesn't support components as of now
Ah okay, thanks anyway!
what are the cases where getOfflinePlayer returns null?
If I recall correctly, even if the uuid is wrong, it returns an object
so when does it return actually null
lmao
thx anyways
https://paste.helpch.at/rucavubuwu.rb any ideas? I am quite confused ngl
I assume an issue with shading but like, I think I am shading it correctly, at least according to SimplixStorage's wiki
Why do your errors always have the weirdest things
You're not using plugman or anything like that right
Besides that you'd probably just have to rebuild the jar
that's actually a fun fact and true
nop restarting
I'm not sure


