#help-development
1 messages · Page 259 of 1
?paste the full method
does 1.9 even have titles
i guess?
are you importing the correct api version in maven/gradle
letme change my api version
if you are running this on 1.9, you should be using the 1.9 api
ikr but the test server is only on 1.9
yeah it seems that the method doesnt exist
ty
how I can cancal a task in the task ?
return statement?
return what
nothing, just return;
I want to completely shut of the task
thats bukkit task ?
never used it like that
I am using new Runnable
what ?
why is it bad ?
if you instantiate a bukkitrunnable without any reason ill kill you
Is there any permissions to make it so I can enable/disable certain gamemodes? I.E enable survival and spectator but disable creative for someone
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
how can I basically change the fracture of a block like the way u see how it is fractured or broken for my custom block breaking system?
Player#sendBlockDamage
declaration: package: org.bukkit.entity, interface: Player
1.0 is most damaged, 0.0 is undamaged
My World#rayTraceEntities isn't precise at all for some reason
heres the code:
//RayTrace
RayTraceResult rtr = player.getWorld().rayTraceEntities(player.getLocation(),
player.getEyeLocation().getDirection(), 3, 2, new Predicate<Entity>() {
@Override
public boolean test(Entity entity) {
return entity instanceof LootHolder;
}
});
if(rtr == null || rtr.getHitEntity() == null)
return;
It returns the entity only when im 3 blocks away. Not closer not furthet
LootHolder.class::isInstance \😢
right thx
fixed
but still doesn't return the entity when im closer then 3blocks
maybe cuz you pass in 3
thats for maxDistance tho
ok nvm
just reloaded the server and it picks it up at <= 3
combination of 3 and 2 then?
thx tho
public BotObject bot;
@Override
public void onEnable() {
bot = new BotObject(this);
Bukkit.getPluginManager().registerEvents(new BotEvents(bot.plugin),this);
getCommand("bot").setExecutor((sender, command, label, args) -> {
Player p = (Player) sender;
bot.moveBot(p.getLocation());
return true;
});
why this command create new object?
?paste BotObject
this is so wired
?details
Please provide your server version, relevant server logs ( https://paste.md-5.net/ ), a list of plugins, and what you've already tried doing.
i dont thing more ditales will make things clearly
what are you trying to do and whats not working
i call some function in my BotObjct, like this, but it recreate object somehow
so you want a new Bot, which im guessing is an NPC, to spawn at that players location when they run /bot
no it have to tp existing one, but instead it creates new BotObject, like all the vars in object changes to default
please use code tags
?codeblock
You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
Becomes:
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
it doesn't
your code would not be making a new bot on the cmd being ran
there is might be reason why?
no, it doesn't happen
the code you sent will only ever create exactly one bot object
^^
if i call this method inside BotObject it works fine, but if i call it with this command all field in method becomes defaut (just like it was recreated (i dont even have such function that would do that))
if you call new BotObject you are creating a new object, not getting the one that already exists
?basics
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
@tame bay
Thanks
?paste your whole code pls
?di this is for me dontmindit
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
its too big
if your code is over that limit refactor it
i dont ever see a reason for it to be over the limit
public class Bot extends JavaPlugin implements Listener {
public BotObject bot = new BotObject(this);
@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvents(new BotEvents(bot.plugin),this);
getCommand("bot").setExecutor((sender, command, label, args) -> {
Player p = (Player) sender;
bot.moveBot(p.getLocation());
return true;
});
i even created it like this, but im pretty sure this command creates new object
what even is the limit
whats the issue
that command does not create a new BotObject when you run the command
my class for event listening
you create one in the <clinit> block, and another one in onEnable
in onEnable(), just use "bot" instead of "new BotEvents(...)"
unless BotObject#moveBot creates a new instance of BotObject somehow, that command does not create a new instance
yeah the command doesn't, but still they have 2 different objects. one in the field, and another as local variable in onEnable
oh yeah
is there any way i can change the texture of a custom item (made in a plugin) using a resource pack
custom model data
yes
it dont work, idk how to register them..
show your new "main class" code
?paste
"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.
it is the same, idk how to regist events now
Bukkit.getPluginManager().registerEvents(new BotEvents(bot.plugin),this);
in this
hmmmm.. any idea what the most efficient way is too check if a player would see a trail of my bullet?
(iterating over 1000 players to check if they are seeing every single location of every single particle would be very bad)
use "bot" instead of "new BotEvents(...)"
and also:
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
Inventory.containsAtLeast
will that work for checking if palyer has specific amount of someitme
yes
that's what it's for
unchecked casts \🤔
I'm trying to get an item from a string(eg. "minecraft:dirt" or "minecraft:oak:log") with Material.getMaterial but this returns me null
you would need to strip the minecraft: iirc
that won't work
I don’t know if you found one yet but here ya go. https://www.youtube.com/watch?v=XGxn_Mb8VzI
Wooo! Custom textures finally :) Since this is my first custom textures video, I made it pretty simple. There is definitely a lot we can do with textures as well as multiple ways to apply it to a player but first, we need to learn the basics. In this video, I explain how a texture pack works, how we make our own, and finally how to apply it to a...
not coded red 
Lol why
you probably need to use UnsafeValues
then do getMaterial(String, int) on that
that however won't work for stuff like "minecraft:oak:log"
is that actual naming?
i have no clue, that's what they sent
if they use the names in the file desc, its minecraft:oak_log
if it is, it was a horrible idea
if you wanna go the API way: replace all ":" with "_" and make it all uppercase and completely remove the "minecraft:" part
yeah that's also how I remember it
either the dude who asked this was mistaken, or mojang fucked up again
uppercasing and removing the material:-part is not needed once you use Material#getMaterial with the proper strings as input
according to the docs, uppercasing IS needed
maybe you are confusing it with matchMaterial(String) ?
@shell trench use Material#matchMaterial, this seems to be doing what you are looking for
Bro what
whoever the fuck came up with that naming scheme should rot in hell
it's indeed very weird
This is just a glorified version of #valueOf
I'm already glad that they removed all those numeric IDs though
Cannot invoke "org.bukkit.Server.getOfflinePlayer(String)" because "org.bukkit.Bukkit.server" is null ? what is that
why is that null
It’s actually quite good.
Show code.
Where are you running that
onEnable
It should be called #valueOf, not #getMaterial as it is very similar to #matchMaterial
Sec
you have a local variable called Bukkit?
Material is an enum, so it’s already a function. Probably made like that to not confuse things.
I think Bukkit is a class
It’s likely the static bukkit interface-class thingy
or package or smth
"org.bukkit.Bukkit.server" is not bukkit
but not with the same descriptor
I didn't make it
True
?paste
Your class here and we’ll point out your issue
A full stack trace would be nice too
oh oops it iss missing that
yeah I was testing that
Most likely a server field in bukkit?
I wanted to see if I could get my UUID while I was offline
If you have joined the server before you can.
Yeye
There shouldn’t really be an issue, try using getServer().getOfflinePlayer instead of Bukkit.getOfflinePlayer
Also getServer().broadcastMessage (or whatever)
that worked, thanks
does anyone know how commands add the "sub commands" "usage" info on the chat?
LIke this:
i don't know what those are called, not sure what to search on google for threads
its called tab complete
is it an event or per command?
mate return a switch instead
that sounds very confusing looking at it at first
how can I create an npc ?
use citizens api
well you basically have to return list of strings which represent the arguments
nah thx
you check the args.length to see at which position you are, so f.e. args[0] would have to return some root args
and that stringutil methods just ensures that whenever you type /test a you get all the completions starting with an a and not all the other ones too
without api ?
kek
not that long ago
not J8
I forgor when they added lambda
You can't fool me there
on tf version were I coding
That ain't lambda
So sometimes I like to review some of the more popular plugins just to find out how they're made. This is a pretty dumb question but do I need to add anything to code when I put my classes in different folders.
For more context my current project structure is
src/
me/
david/
LearningSpigot/
Main.java
(different command classes are also here)
generators/
``` Would I need to add anything for my code to find the classes located in the generator classes?
no later haha
That is the improved switchcase, but certainly not lambdas
Oh is he talking about the switch single lines
Java 11 that was added iirc
J12 added switch expressions according to google.
I mean you can also add break; on a single line 😉
Looks like shit though
But ywa ig
Yeah I doubt that it is J11, at least I don't recall using it
?main
Spigot is an api
but no
I did Main because that's what the spigot wiki said
breh
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
thanks
np
what the heck is that
the reason you shouldnt name your pluign main class main
I just changed my main class to my plugin name and updated plugin.yml
Anyone know a way to get a servers view distance inside the plug-in.
nothing
chunk load event
or I dont understand ur question
I mean the view distance option. How many chunks the server will load around the player
Ah ty
I couldn’t find it because I kept trying to use render distance not view distance whoops
?jd-s is your friend
I’m assuming that’s in chunks (it doesn’t say)
prob InventoryOpenEvent
a tragedy in four steps: anyone a clue whats happening here?
Like
I restarted the server, manually copied the file, and recompiled cuz i wasnt sure if i maybe copied too early.
But it isnt loading the new plugin even after i restarted the server after making sure the new version is in the plugins folder
wait
it no longer reaches that part of the code even though i havent changed anything else
urgh
uuuuuuuuummmmm
i think the javadoc's wrong
whats up with it
or incomplete at the very least
org.bukkit.configuration.ConfigurationSection
@NotNull String getName()
Gets the name of this individual ConfigurationSection, in the path.
This will always be the final part of getCurrentPath(), unless the section is orphaned.
Returns:
Name of this section
HOWEVER
if you have, in that level, a string entry with the name <path>.name it takes that one instead
wtf
like
one spits out tt and one spits out the actual last part of the path
That seems right to me. If you have an input of "my.path.to.value", the return should be "value"
With that specific method.
If you want the actual value, you have to use the #getX() methods.
yea but that isnt working
uuuurgh
do i do regex on the full qualified path then
actually
What are you trying to get?
well the last part of the path of the configurationsectino
The name of the section or the value?
Then use ConfiguratIonSection#getName()
Hello, i was wondering if mysql was a good option for storing plugin data ? Is it viable ?
eh most people go with that cuz it can be done internally though i dont recall how
Yaml and JSON are not viable 😅
Yes and the database can be elsewhere too, compared to a json or yml, for backups/recovery it's nice
I hate when people use yaml and json for databases
Just use a real database
Like at minimum sqlite
xD, some says it's the easiest to use for beginners, uhhhh actually no, hard to config a database but when you have it it goes way faster and you don't ever need to bother about json corruption lul
amazon s3 is the real thing
I have a small problem
everything is working fine until I tried adding PDC onto my item
public CustomMelee (String itemName,
ArrayList<EnchantmentPlus> itemEnchantments,
ArrayList<String> itemLore,
Material itemMaterial,
String e1, String e2, String e3) {
this.itemName = itemName;
this.itemEnchantments = itemEnchantments;
this.itemLore = itemLore;
itemItemStack = new ItemStack(itemMaterial);
itemItemMeta = itemItemStack.getItemMeta();
PersistentDataContainer itemData = itemItemMeta.getPersistentDataContainer();
itemData.set(new NamespacedKey(Main.getPlugin(), "e1"), PersistentDataType.STRING, e1);
itemData.set(new NamespacedKey(Main.getPlugin(), "e2"), PersistentDataType.STRING, e2);
itemData.set(new NamespacedKey(Main.getPlugin(), "e3"), PersistentDataType.STRING, e3);
Did you set the itemmeta back on the itemstack? ItemStack#setItemMeta()
yes
so it was working before. i could get the item with lore/enchants and the items name
but after i introduced PDC doesnt work
?paste the full method
why is all of that in a constuctor
?paste how you are getting the pdc
lemme check console
14.12 22:28:15 [Server] [INFO] _nitey issued server command: /pdc
14.12 22:28:15 [Server] [ERROR] null
and that null is from?
i also tried getting the item with AsynchPlayerChatEvent and it also doesnt work
how do i check
how is it being sent to console without an NPE
?paste the full method of where you run the CustomMeele class
whats an NPE
?npe
The NullPointerException, (commonly referred to as NPE), is thrown in the following cases, but not sealed to: 1. null is passed into a method or constructor which does not allow it; 2. When trying to access a field on an object pointing to null; 3. Casting null to a primitive. See https://stackoverflow.com/a/3988794/17047120 for information on how to debug NPEs.
your main problem seems that you arent ever returning that material
unless you have a getter somewhere else
im heading to bed so you'll probably need to wait for some other people to get more help
did 1.19.3 change much nms stuff
@EventHandler
public static void update_mob_name(EntityDamageEvent event){
if(event.getEntity() instanceof Entity){
String[] entity_name = event.getEntity().getName().split(" ");
String final_name = String.join(" ", Arrays.copyOfRange(entity_name, 0, entity_name.length - 1));
String display_to_mob = final_name + " " + ChatColor.GREEN + Math.round(((LivingEntity) event.getEntity()).getHealth() * 10.0) / 10.0 + ChatColor.WHITE + "/" + ChatColor.GREEN + ((LivingEntity) event.getEntity()).getMaxHealth() + ChatColor.RED + "❤";
event.getEntity().setCustomName(display_to_mob);
}
}``` Why does the first hit on a mob not update there hp?
if(event.getEntity() instanceof Entity){ pointless

will always be true
this really just sounds like a python developer converting to java
anyone know what event is fired when a player converts dirt to mud
What does the player do to convert it?
Probably PlayerInteractEvent and then check for what happened
thats what I was thinking but wasnt sure
a player right clicks a dirt block with water bottle
Hey, i'm struggling so hard to spawn some banners, could i get ur help ?
The code for now:
public static void turnIntoBanner(int x, int y, int z, World world, BlockFace direction) {
System.out.println("1");
Block block = world.getBlockAt(x, y, z);
System.out.println("2");
block.setType(Material.BANNER);
System.out.println("3");
Banner banner = (Banner)block;
System.out.println("4");
((Directional) banner.getData()).setFacingDirection(direction);
System.out.println("5");
banner.update();
}
[00:07:09 ERROR]: Could not pass event PlayerInteractEvent to pluginOneCube v1.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-21fe707-741a1bd]
Nvm
I can show you the context maybe ?
Nono its fine
okok
You cannot just cast the block to a banner
Or can you?
At this point im not sure /;
I've seen some people saying that it works :')
You cannot cast Block to Banner @faint sedge
You have to get the BlockState from it and cast that to Banner
like this ?
public static void turnIntoBanner(int x, int y, int z, World world, BlockFace direction) {
System.out.println("1");
Block block = world.getBlockAt(x, y, z);
System.out.println("2");
block.setType(Material.BANNER);
System.out.println("3");
Banner banner = (Banner)block.getState();
System.out.println("4");
((Directional) banner.getData()).setFacingDirection(direction);
System.out.println("5");
banner.update();
}```
Indeed
Doesn't work :(
You’re going to have to be more specific
I've tried like this in first place
What does “doesn’t work” mean
1
[00:28:25 INFO]: 2
[00:28:25 INFO]: 3
[00:28:25 ERROR]: Could not pass event PlayerInteractEvent to pluginOneCube v1.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-21fe707-741a1bd]
at
Same error
It's too long :')
?paste
can you read it ?
copy/paste link here
it says that block location is not a banner
but i just turned it into a banner ?
Oh should i update it ?
Theres no update method for a Block
there is no banner at the location you are passing
??? ofc theres no banner, there is air and i want to turn the air into banner ?
block.setType(Material.BANNER);
you cant cast air to a banner
He is setting the Air to a banner
i think i can cause i'm printing the 3 before crashing
And then casting it
so the block.setType(Material.BANNER); is fine
Yes sure
the problem is here Banner banner = (Banner)block.getState();
But i don't know how to fix it
Cause Banner extends BlockState so it should be OK
Omg i think I know
Hey I got an Idea which I would love to get an opinion on.
I want to make a home plugin. The plugins are stored in a database. When a user uses the /homes command a Investory should open containing a wool block for each home in the database.
Now I was thinking about saving the inventory as a hashmap value. So when the user uses the command it would just load the inventory from the hashmap and spare the request from the database aswell as creating a new inventory
Ist that a good solution or would that actually be worse for the Server?
Ok my problem comes from the fact that there is org.bukkit.block.Banner and org.bukkit.material.banner
public static void turnIntoBanner(int x, int y, int z, World world, BlockFace direction) {
System.out.println("1");
Block block = world.getBlockAt(x, y, z);
System.out.println("2");
block.setType(Material.BANNER);
System.out.println("3");
Banner banner = (Banner)block.getState();
System.out.println("4");
((Directional) banner.getData()).setFacingDirection(direction);
System.out.println("5");
banner.update();
}```
so idk what to do :'(
cause i need both
cast to the correct Banner
use long format
org.bukkit.etc
yeah got it
Alright. Thanks 👍
I fixed it, tysm for helping @eternal oxide @orchid gazelle
String display_to_mob = final_name + " " + ChatColor.GREEN + Math.round(((LivingEntity) event.getEntity()).getHealth() - event.getDamage()) + ChatColor.WHITE + "/" + ChatColor.GREEN + Math.round(((LivingEntity) event.getEntity()).getMaxHealth()) + ChatColor.RED + "❤"; Most effective way to display 0 if the mob's health is a negative number?
someone came from python
you should use getFinalDamage over getDamage
string name = final_name + " " + ChatColor.GREEN + (finalHealth <= 0 ? 0 : finalHealth);```etc
+1
Indeed that lang is creating bad habbits
Is there a better way hide little client icons with people when they're nicked? From my understanding I need to change their entire uuid!
I'm trying to make a flag system like vulcan
and
idfk know how
or where to start
my command /shop works on 1.19 but doesnt on 1.19.2 has there been a chance in jar?
?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.
fixed

?paste
this.voidbox.onBreak(new BlockBreakEvent(block, player));
I'm surprised I actually got the opprotunity to ever instanciate a command class
never think I've done this before
Does anyone know how much of a task creating a rpg type plugin would be?
Custom classes, world events, bosses and shit
J basing it off current rpg type plugins, is it a high complex thing?
im using joystack with spigot... is there a way to allow for tnt duping?
https://paste.md-5.net/exosucirex.java
The player interacting with the NPC doesn't work and the command /queue doesn't work either, can someone please tell me how to fix my code?
what about it doesnt work
that's a lot... I would print some debug statements
is there an error
to see where it doesn't work/fire
cow
how would i go about creating a new section with pdc?
like yeah i can prefix all the ids with soemthing
but i would rather have all of them grouped yk
create one from the adapter context of an existing pdc
final PersistentDataContainer container = itemMeta.getPersistentDataContainer();
final PersistentDataContainer inner = container.getAdapterContext().newPersistentDataContainer();
alright thank you
I used this code to change the font of string message but it doesn't work 😦
Is there anyway to solve that?
TextComponent text = new TextComponent("\uF000\u0001");
text.setFont("custom");
Msg.send(player, text.getFont());
best thing ever
I heavily use that stuff for MorePersistentDataTypes lol
oh and also, components suck
the adventure components?
both suck
noone ever though "oh yeah let's use this weird component builder instead of just using a &c&lSTRING
maybe you'll like OysterMessage
gotta love the lack of a code sample on the readme
https://github.com/JEFF-Media-GbR/Oyster-Message it combines legacy + adventure
yeah it sucks
but it works well
I mean
I just have a message file system
that does shit for me
then I just do
messages.sendMessage(sender, "no-permission");
does it support adventure?
then go for your current stuff
ye
yaaay
legacy works until it doesn't
¯_(ツ)_/¯
minedown is a pretty good alternative if you want to stick to the legacy syntax
which I don't mind tbh, while a bit of a harder learning curve for the colour codes it is very condensed

Hi guys, I'm experimenting entity velocities, I've found a strange behavior. I've set to an arrow (without gravity enabled) a velocity but this velocity with the time tend to reach 0
Does anyone know why this happens?
air friction
you have to set the velocity on each tick, otherwise it will of course slow down again
best class ever
Wow, wasn't thinking that Minecraft has counted for air friction. Ty
Hello, i'm using a custom GUI inventory and InventoryClickEvent to cancel and prevent items to be taken
But when I use SHIFT + click, item appear and flickering on the right bottom of inventory (first animation) and if I set the gamemode at the same time, item stay in user inventory but disapear when I select it. (snd animation)
How can i prevent that ?
update inventory?
yeah try to upadte the inventory
Player#updateInventory() or sth like that
ok i'll try thanks
however it will probably still look like they took the item for like 0.1 seconds or so
I don't think you can prevent that
ok it works, thanks
great
ghost item moment
it's just an Illusion
@tender shard holy shit
hm?
you haven't seen it yet?
Nope
I got it since like 1.5 weeks or so
Not very active here
I fucking love it
Last talked to you it was the insult thing in ur discord lol
I asked that person to also draw logos for all my plugins
lmao
it does look really nice
thanks :3
Was it the person I sent you?
yowza
ah okay
that's gonna be very expensive ugh
I got 21 resources on spigotmc
12$ * 21
that'll be over 250 $
😏
it’s okay with that commission rate in the about me I think it’s possible
how has it gone up 50 dollars since you last mentioned it lmfao
saw it when I clicked in to the pfp xd
too many requests
:c I need to establish a presence like you
I already got 10+ open comissions
such deterrence would only work far against me lmao
also, never underestimate your own worth
when someone sees "oh this dude charges 125€ per hour?" then they think "damn that dude must know his shit"
noone ever said "that's too expensive"
Nah I agree
With the first part at least
but everyone I think I give a fair price to doesn’t take the quote xd
also you always have to think about the taxes that go off from the hourly price
75€ is like 50€ after taxes
You pay taxes on that?
He’s a business
ofc I do, I have to
like legally established
Oh
and of course it’s illegal not to pay taxes
even as an individual kek
would be funny if I didnt pay taxes lol
I am not a buidiness so no taxes for me ig
Welp guess the irs is coming for my kneecaps
are you from the US?
if so, yeah, you have to declare EVERYTHING you make to the IRS
No, but the irs is very persistant at being annoying
Not from us just saying it because it's what most people recognize
the general rule is - if you earn money, you gotta declare it. doesn't matter if it's only 20$ from some random discord member
it’s called the IRS in other nations as well?
you always have to declare everything
no
Nope
in germany this jerk is called FINANZAMT
ah y’all are confusing this American here
(finance authority)
We have the fps
talking about the IRS when not actually meaning the IRS, liars!
I was talking about IRS
for example:
if you are a US citizen but you live in germany, and you make all your money in germany, and actually have nothing to do with US besides citizenship:
then the IRS is still trying to fuck you
that's why we have a DOPPELBESTEUERUNGSABKOMMEN with the US
Anyway, time for the help portion of this channel
A what now?
noone asked a question yet
How would one turn a colour into a block?
"double tax treaty"
wdym
it’s all one word in german?
yes, we always combine existing words to create new ones, it's called "compound"
ah shit yk I learnt a German word in English class a bit ago
Fervhenguan, definitely spelt it wrong though
ughm
I got a camera that picks up images and I want to display them in game
no idea what that is supposed to mean
you can use wool or concrete powder for pixels
ah fuck me
how old are you?
So I look at the rgb of a pixel and match it with the closest of those?
yeah, that's the best thing you can do
Unfortunate I can't use all blocks
well ofc you can
it might not have been German
but remember, people could have their own resource pack
There’s a program called SpriteCraft that does this and I believe it has texture pack support.
So?
Ty for all the help boys and girls
whats going on in here
Running from the irs don't worry
that means, what you consider to be "red" might as well be "orange" or "yellow" on someone else's resource pack
Fair
why i can't extend my class to EntityCreature? it gives this error:
https://prnt.sc/1_gM96Yx2Lky
how can i fix this
same thing happens with any entity class
use mojang mappings
then it'll work
if you use gradle: you are fucked
bruh we are PH buds
PersistentDataAdapterContext pdcAdapter = meta.getPersistentDataContainer().getAdapterContext();
PersistentDataContainer pdc = pdcAdapter.newPersistentDataContainer();
//stuff
meta.getPersistentDataContainer().set(ItemNamespacedKey.INTERNAL_CATEGORY.nsk, PersistentDataType.TAG_CONTAINER, pdc);```

but theres no trace of the pdc in the item in game
what are you trying to add
Apply (reapply) the meta to the item
it's because you create a new PDC
also that is so jank
so um any ideas?
you are never supposed to create a new PDC unless you know exactly what you're doing
item.setItemMeta(meta)
alex wheres you pdc link
just use ItemMeta#getPersistentDataContainer
i do
not helpful rn
why do you create a new PDC?
Full code then, maybe?
you're not supposed to do that
im trying to like have a category? section? so it would be like
PDC:
-> Stuff
-> Item Effects
_ _ - > stuff
idk does it make sense?
I see, but
PersitantDataContainer pdc = meta.getPersistentDataContainer();
pdc.set(NameSpacedKey, Type.STRING, "among us");
item.setMeta(meta);
i know that
so why are you making a new pdc
yeah they explained it here
to have smth like that
But yeah give full code pls
?paste
Didn't have the item.setItemMeta tho
alr
I don't see you ever calling ItemStack#setItemMeta though
xd
ok i have added mojang mapping to my maven dependency but some of the classes from nms are gone like the EntityCreature. did i do anything wrong or there is a replacement for that?
you dont return item meta so you cant be setting the meta
wdym
yes, 1 sec pls
you are running this, then dont return item meta but you are trying to set the item meta
?switchmappings
@near citrus
wouldnt it like affect the original object tho?
alr ill check it out
is that not what you want to do
it is
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
because you are trying to set item meta to something you dont have
what? now im confused
you run compileStats then not returing anything or setting stuff outside of the method, then in compileItem you are trying to set the meta to what you have in compileStats
well yeah because in compileStats i owuld be modifying the meta i passed in in compileItem
thanks alot i found it
great
it doesnt work like that tho
actually it does?
they dont return anything or use the result from compileStats so how are they changing the meta to something else
but that's not needed
when you change the ItemMeta object, it.... erm.. "keeps being changed" lol
so your saying that by settings the meta in compileStats, it somehow just changes the base meta

idk I didnt invent this class
uh because its still the same object
when you ass it to a method you dont create a new object for that value
its all a mess 😭
jnak
yup
when spawning dragons in the overworld, they seem to hate moving unless they take kb in some weird way. any way to force them to do the b-lining that they normally do?
i noticed that if you push them they suddenly gain AI
should i try that with a vector?
i would guess they only move around there "perch" point so you would need to simulate that im guessing
iirc dragons ai is hard coded
so the only way to make them work the way you want would be completely remaking it
you'll need NMS
the dragon code is a huge mess
@quaint mantle give us ?nms
what is it supposed to show though
make ?nms show this: https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
nms
make the response something like
NMS also know as net.minecraft.server is the base minecraft server code, it can be used in plugins to use things not in the api. To use NMS go to https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
or that
gives an explanation and a link
@quaint mantle weed boy, add the command
maybe don’t link directly to your blog 
ughm
jeff already has links here
?switching
also that link is used by most people to show how to use nms
Hey, in 1.8.9 (minecraft) i want to set a head in some specific directions (North, East etc). It works for the cartesian ones, but it doesn't for SOUTH_WEST or NORTH_EAST for example. There's no error, it just doesn't work. Can u help me ?
Block b = world.getBlockAt(blockToChange);
BlockState skullState = b.getState();
((Directional) skullState.getData()).setFacingDirection(facing);
skullState.update();```
the block is 100% a playerhead
idk abuot that. all I know is that I don't earn anything when people visit the blog, so I don't think there's any reason to NOT send it
i wonder if optic knows how to add commands
1.8.9 is so old, it's almost old enough to buy booze in my country
?1.8
Too old! (Click the link to get the exact time)
HAhahahah
it can buy alcohol at 8?
switch to 1.19 then ask again
But theres a lot of minecraft servers that are running in 1.8
no
And I have to stick to it
Well, the servers that are interesting to me are all in 1.8
nobody uses 1.8 except for like 6% of servers
fuck he beat me to it
But it's 100% of my servers :)
They move far away from it if you push them
@vagrant stratus do you know how to add custom commands
ok but I doubt that anyone here can help you, 99% of people here are using a recent version
we need ?nms
ask Imajin, he can do that
I think that optic doesn't have the perms to add commands
He was just talking in general yesterday
now something doesnt add up there
that was yesterday
8 year olds can buy it?
sure
i mean
wtf is going on in germany
it's not allowed to sell booze to young people, but they are allowed to buy it
the law only applies to shpo owners, but not to customers
i mean
§ 1 BGB
dont tell me you didnt buy it at like 12?
i cant be the only one
i mean
i was buying them for my dad but still
yuh
lol well that's still illegal
not illegal if they dont get caughtttt
cigarattes are for 18+ only unless you bought them in the 60's
how to teleport player without closing chest GUI?
teleport them
just reopen the inv after teleporting
reopen the gui after teleport
without closing their gui
would be flashy but
okay tanks
no problem fellow tank
how to make location1 be 0.5 blocks closer to location2
add a new Vector to location1?
i mean how to calculate
what exactly are you trying to achieve?
Location newLoc = location1.add(location2.toVector().subtract(location1.toVector()).normalize().multiply(0.5));``` i guess
or smth similar
Good command 🔥
nooooo
us when no ```
NMS also known as net.minecraft.server is the base minecraft server code, it can be used to access non-present elements in the api. To use NMS go to https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
@quaint mantle
poor english
its fine (totally)
known, not know
oh shit I gotta work on the nms tutorial
i didnt even see that lmoa
it can be used in plugins to use things not in the api reads better as it can be used by plugins to access things not in the api
fixed it
to access things that are not present in the api
much better
;-;
now we just need @quaint mantle
?nms
my comments are getting worse and worse
why comment stuff what you can just not
comments are great
yep, worth while though
ooh, new keyboard is nice
got a ducky keyboard (brown keys)
damn
feels very different to my old MasterproS
hi does anybody know why these coordinates are so scuffed?
mf cant make gun code
lol
why would you want to send the particles to players that arent even in that world tho?
well basicly it does not
and here's how you render a line
since then it will just return no points and therefore do not draw any particles
:o
well still cannot see whats wrong with my code
your logic all wacky
why?
I need to draw projections for every players, since otherwise the range of the particles is 31
just use a mutable vector and add a pre-defined direction
uhhh
Scoreboard How will I find him
Bukkit.getScoreboardManager().getMainScoreboard();
thats why im doing it like that
Guys I have a hardcore world with change to the difficult, I want to add PotionEffects (like speed, streght, etc) to mobs with a plugin how I add that?
nvm I got an idea lol
?nms
great
look at this great response alex
time for some Jägermeister?
now I only have to install some ads and phishing plugins and then I can live in a mansion like md_5 does
it could be that
I got gin tonic rn
why
ahhh thats also good
Guys I want to add PotionEffects (like speed, streght, etc) to mobs with a plugin how I add that?
lol
hahwahaha
it was a few months ago
naaaah
buying it is way less expensive than recreating it
Guys I want to add PotionEffects (like speed, streght, etc) to mobs with my plugin how I add that?
alex can i borrow your gun
Entity#addPotionEffect or sth I guess
ok screw this now im confused
how? why? where? when?
https://hastebin.com/jazokocola.properties Someone know how to fix that error ?
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
what's SPListener line 324?
I am currently trying to get a List of Locations to spawn particles on, depending on a Location it starts + the length of it
but..
My method:
public void saveFile(Gson gson, String name, String path, JsonElement element) {
File f = createFile(name, path);
f.getParentFile().mkdirs();
System.out.println(f.getParentFile().mkdirs());
try (Writer writer = new FileWriter(name)) {
gson.toJson(element, writer);
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}```
I gotta use some raytracing shit lol
what's line 324
main.getUtil().saveFile(main.gson, "MapStorage.json", main.getDataFolder().getPath(), main.gson.toJsonTree(sto));
what's "sto"?
fake bullet?
ye thats fine
you mean just using an arrow with another texture huh
no that does not work for what I need
Max Velocity of Entities is 60m/s
and I need 900
because its how mojang coded it lol
if you go over 4.1, the client will no longer have the right velocity and it will be buggy displaying
guns
RayTraces
because that is slow as shit
and then it is garbage gun system
ahaha when you google "dead dog" it actually shows pics of dead dogs lmao
oh yes it is, I tested it
not really
Guys I want to add PotionEffects (like speed, streght, etc) to mobs with my plugin how I add that?
and a gun has a lot more
How I put the code?
well now imagine my players driving a car to get away from bullets lol
which is 1. bugged asf and 2. laggy asf
google it.
A class to store data
"Add potion effects to mobs, spigot"
do you think I dont?
Basicly:
DrawerStorage sto = new DrawerStorage();
sto.setAmount(Integer.parseInt(am));
sto.setLocation(e.getBlock().getLocation());
sto.setMaxamout(2068);
sto.setMat(Material.getMaterial(mat));
sto.setOwner(p.getName());```
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
I have ArmorStand inside some blocks
But I want to move it a bit back, without teleporting, so its nice and smooth
But setting its velocity doesn't do anything at all
I do get MOVED in Console
what is moveByForce
accidentally left it out from the snippet
this being velocity when souted
these are all modifications made on that ArmorStand
then write a custom TypeAdapter for that class
mutable stuff aaaaa
or make all fields public
what actually is the protected type
protected means it can only be changed from within the class or subclasses
it's like package-protected except that it doesnt care about the package
is it actually good
it has it's usecases ofc
in 99% of cases you will not need it though
example: the health field in the CraftEntity class
you don't want people to access it directly, but if you now have CraftZombie, it's supposed to have access to it
I will do that
Whats Custom TypeAdapter cause it still not work
Ok lil test that later
how i can reload gradle dependency loading (downloading) in intellij?
it's a class that turns a jsonobject into your custom class
like reload gradle without the G in top right?
just click the "gradle reload" button in intellij
this one :)
ow thanks
yea
looks like you forgot a } in your build.gradle lol
the project is not mine
?paste ur build.gradle
?switch to maven
no
no
what happens when you run gradle build anyway?
use gradlew build
gradle 🥲
"Oh I need to download myself, because version 3.4.1 is not compatible with 3.4.0 anymore"
where are the errors it says
File -> Invalidate Caches -> Check every box and click on "Invalidate & Restart"
then get a beer because it'll take like 3 minutes before it starts working again
thats not a gradle issue
tf is val
yeah it's an IntelliJ issue