#help-development
1 messages ยท Page 2192 of 1
hm
you probably edited it on github
there you go then
@jagged quail are u using mfnalex's updatecchecker?
yes
Hey Guys How Can I Set Material of GUI on config?
dude
don;t spam
sowwy <3
check if args.length is 0
remove "[0]"
and the "" around 0
working good now
Like arrays should be one of the first things you learn
are java arrays the same as js arrays
ah
git merge be like
this is meant to be an about command
its good
git merge good
?learnjava @urban kernel
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.
i have that bot blocked
@urban kernel
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.
chat flood
lol pulse
lol
blocklist.add()
js
blocklist.add("347005619825278976")
if (args.length === "0") {
}
dude thats not even right
2 and 3 "=" throw err
Then make your plugins with js lol
=====
exactly xddd
=== syntax isnt in java
you wish
======
You are wanting to check the length, which is a number value. "0" is trying to compare teh value of length to a String
well === is js is equivalent to == in java
and == in js is equivalent to Objects.equals() in java
so i remove ""?
i have my gross first fly command on github
yes
doesnt even do anything!!! xD
ik this is a basic java question, but I didn't have anywhere to ask...
how can I loop into an array and stop when an array is null?
and only two =
@opal juniper want to see my horrible first fly command
sure

Just use a Set instead of an ArrayList
want to see the latest version
at least you are using the uuids not player refs
bump
I mean
i'll actually go test it @opal juniper
the logic seems like it shouldnt work
its alpha for a reason ๐คท
but if it has a value check the next
what is a bStats **
lol
my bad autocorrect
a stats websit
||```java
T[] arr;
for (T element : arr) {
if(element == null) {
continue;
}
//TODO
}```||
websit
okay ty
it sits on the web
why is "bastard" in your autocorrect ๐ค
whatโs it used for
๐
about your plugin
logging plug stats
like the users, where they are, what java ver, os info etc
i see i see
even my bad plugin has bStats https://bstats.org/plugin/bukkit/Mecha-Plugin/15385
then i can sell the data to advertisers?
even my shit one doesnt
Can you guys suggest me plugins to make on middle level. I keep doing the same things.
nope its a non profit
cringe
all it does is collect info about the server
crafting recipes
as he said
the "continue;" continues the loop right?
okay thanks
ew
skips the code that comes after the continue
yes, it skips to next iteration
ru dumb
and goes to the next iteration ^
dont want to look at my Msg class then ๐
oh yeah adri
lmfao
im a dummy, you probably wanna break
y
custom lang file when
Bukkit.broadcastMessage(ChatColor.GOLD + "[" + ChatColor.RED + ChatColor.GOLD + "]" + ChatColor.WHITE + args[0]);
"&aSuccess".clr()
package me.oliver193.mecha;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
public class Msg {
public static void send(CommandSender sender, String message) {
send(sender, message, "&a");
}
public static void send(CommandSender sender, String message, String prefix) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', prefix + message));
}
}```
thats literally my util class from a year ago
i've come to the point that im not storing a single string that will be outputted in the game
except for error messages

imagine sender.send
fun String.clr(): String = this.replace("&", "\u00a7")
uh
since when do custom mob names break their behavior?
i see skeletons fighting each other when changing their names
when console runs the command, what would sender.getName() return
i'll send screen recording using it in a min
CONSOLE @urban kernel
lemme spin up a test server
and if its remote, then Rcon
ty
how would i go about getting data from multiple database tables in one method?
creating multiple statement and combing the data?
or is there something better
cant believe i still havent implemented this
can u test my piece of shit on it
ok test server is up
how to check if cause of entitydamageevent is player?
if the damaged enetity is a player @thorny dawn ?
im basically trying to disable pvp between players (allow for mobs)
im aware of how to get the entity type but event.cause doesnt have a type property
oh
well listen to entitydamagebyentityevent
check if the entity and damager are both players
๐
if they are then cancel
ty
Look up a JOIN statement sql
Is there any way to get a player's IP from just the Player object, not the preloginevent?
no
unless you're going for NMS
Okay
map the ip to the uuid during the preloginevent
why does negative mining fatigue no longer work?
Someone fixed it I guess
someone know how to set a custom speed with the command? i do this but i know that this code doesnt working
I really hope not because that's gonna suck
Why are you using a loop
i dont see what the point of repeating the setWalkSpeed multiple times is
โValueโ
huh
i dont now i ty do something but I have no idea how to do it
Itโs between -1 and 1
can you just make the player walk backwards then lol?
Yes pretty sure
thats funny
is there any way where you can get the enchants of an item in a crafting recipe
nobody knows ig
Would making a resourcepack that includes the translation for my custom enchantment? I registered it like a Minecraft enchantment.
wdym?
someone know how to get nbt from a CraftEntity?
Like an ExactChoice?
like if i wanted to make a plugin to upgrade sharpness level
from 5 to 6, but i want to keep the enchants from the old sword, and just upgrade to sharp 6 if the sword being upgraded already has sharp 5
One of the save methods
The only way you could do that is watch the prepare crafting event and make sure the output has the same enchantments as the input
oh thank , i found it!
Would probably make more sense to do with an anvil
public void InventoryClick(PrepareItemCraftEvent e)?
yeah
im using items in the recipe tho
not ench books
:what:
can any1 suggest me the best way to store block data?, so i mean the block type and for example if its a directional the direction. and have this be serializable, deserializable?
will i need to write custom serialization for each block state?, so bassically every TileEntity?
So have the player make a "custom item" with the other ingredients and combine it in an avnil
sure
upgrade stone
also i never figured out how to make crafting recipes require stacked items
you can't
Hypixel doesn't use vanilla crafting, they have their own system
Does setresult in craft inventory uses some sort of queue? Because when I set it it seems that it actually adds to a queue because if the slot is already filled with some items I need to remove them and then I see the new item
Well, okay, you can't in the recipe
but you could make sure the slot with that item has the amount you want and set the output as nothing until it has the amount you want
@ivory sleet sorry, i don't really know about arrays could you assist me a little bit?
You can just save the TileEntity to nbt with NMS or use BlockStateMeta and BlockDataMeta
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
For the things I don't think that are expensive enough, I just make compressed items/blocks
ehm sure
okay, so here i want to check if the array is null and if it is add the name of a player
but i don't know how to continue...
i never dealt with crafting plugins before
how would u get certain slots
for (int i = 0; i < members.size; i++)
oh
his for loop is fine
just that u can do smth like
u cant use a for each loop for what he wants to do
what is he adding the name to anyways
cuz how would you know the index of the player u wanna add?
why would u need the index
to an array
maybe I can add them on a hashmap and then save the names in the file?
@acoustic pendant what are you trying to do?
save the names to smth
how?
how would u do members[index] = name?
but that when the server closes it doesn't get removed
You should be able to use first, or just specify the exact slot if you know the recipe never changed orientation
@acoustic pendant how are they stored in the first place?
storage-slots:
- '2:2'
- '2:3'
- '2:4'
- '2:5'
- '2:6'
- '2:7'
- '2:8'
- '3:2'
- '3:3'
- '3:4'
- '3:5'
- '3:6'
- '3:7'
- '3:8'
- '4:2'
- '4:3'
- '4:4'
- '4:5'
- '4:6'
- '4:7'
- '4:8'
- '5:2'
- '5:3'
- '5:4'
- '5:5'
- '5:6'
- '5:7'
- '5:8'
does this look friendly to modify?
first num is row, second is slot
files
Okay, can you backup and explain what it's doing and how?
It's teams for skyblock islands, I assume
yea
Whatever minion sent is confusing me
How can I define the main class with maven?
u can save the name
you don't need to?
What are you talking about?
cuz there aint no way ur saving the indices onto the config file
he wants to check if an item in the array is null, and set it if it is, that's what i understood
i think adri wanted to store names right?
Yea, but i think i found other way
Maven doesn't care what your main class is, it just compiles the jar and manages dependencies
How can I start a .jar file defining the main class in maven
what
i never used maven ๐ง
you mean a class with public static void main?
why tf are you asking about that here, if that's your question
this is #help-development
yes
nope
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<mainClass>your.package.here.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
@mystic vale
@mystic vale are you trying to make a plugin or what?
imagine using maven ๐คข
Imagine using Gr*dle
even tho maven is techcnially better
lmao maven is good what are you on about
i dont
Gradle is ass, or at least ForgeGradle is
i dont use gradle
from a guy on the internet
uhm, but now that i think, how can i do a limit here, lemme think
unbased
ยฏ_(ใ)_/ยฏ
Gradle is a pain in the ass
can i maybe use an array here with the limit of players?
@acoustic pendant can you please explain what your plugin is actually doing for loading and saving these values?
some skyblock plugin
that doesn't help
where he wants to have a group limit or smth
team limit
co-op limit
wtv
but idk what else he is trying to do
so don't do that when you save it?
idk what he is trying to do either exactly
yea, i file it in a file
here
hypixel skyblock ah and bz both down ๐ญ
what r u trying to do exactly
okay
so
the relevant thing, is creating the island
I have done that
and now instead of name: ... just storing 1 string
so get the player's name and store that when you save it?
i would like it to store for example 5 and be able to get that
Ik how to do that i think
Whatever you're doing makes no sense somewhere
why are you saving invited players under the sender's UUID?
the sender's UUID in the "name" of each island
is
Make a UUID for new islands and save everything under that
Your code makes no sense
it works
public void setHasIsland(Player player, boolean create) {
getCustomFile().set("hasIsland." + player.getName(), create);
save();
}
Storing values like that by a player's name is a terrible idea
uhm, why? I think is great
yes
Are you saving island members in the island or in a separate entry?
I will create a section inside the island section wich stores the team except the leader
is that a great idea?
Hey Guys How can I add some property on Custom Food. For Example I'm making custom golden apple and How can run codes when player eat it.
You could do something like
islandUUID:
bank: integer
name: ""
owner:
uuid: uuid
lastName: "" #if you want to pull it for some reason
members:
- memberUUID
- memberUUID1
players:
playerUUID:
information:
playerUUID1:
informations:
yea
I know how to do all except the members thing
how are lists in configs done?
oh
so store it on a list and for example when the player leaves store it in the file?
You could do that, or update the stored list when a new member is added or a member is removed
but the server could be stopped before a new member is added
just update it every time someone makes island modifications?
?paste
https://paste.md-5.net/ukubolahug.java im getting this error but literally everything is working properly so what should i do? Should I just ignore it?
never ignore errors
Cannot invoke "org.bukkit.inventory.Inventory.getTitle()" because the return value of "org.bukkit.event.inventory.InventoryClickEvent.getClickedInventory()" is null
are sections like this?
test the value of getClickedInventory() and return if it is null
yes
k ty
you should probably try to use shorter names
yaml already isn't the fastest and that's going to get slow if it gets big
you should also probably use different yaml files for storing different things
one for the actual config, one for players, and one for islands
just make a method to return the config section for them
this is the IslandManager file so i was doing all related to island there
Okay
Btw, what's the method to create a list in a file?
can I listen to block tick, eg. call a method for each hopper when it ticks?
(without saving a list of blocks or iterating over all the blocks)
i can give a horse admin permissions ๐ค
You can just make an empty path and set it to a list
okay, thanks!
config().set("path", yourList);
Does anyone have a json file to create a custom GUI for a double chest?
https://gyazo.com/ed0f407e6914e4da18c8e4e18fc748f6
Is it possible to make this explosion do no damage within the built in method, or do I need to make an event listener to handle it?
Yup it's possible
So what do I do within the method to make it do no damage?
Which "method"?
createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks)
Is there a way that my program can log whenever a class is used? Im trying to find a problem in like 100 files.
does Bukkit.getPlayer(args[1]) return valid if arg[1] is a uuid in string form?
no
Use UUID.fromString()
RIP
Is there a method to return true if a string can be a valid UUID?
Just test the length. If the string is 36 use a UUID. if less use the string
Ok
You can just run a null check on that method
Or surround with a try catch (not my first choice)
Don't think so, that's not really a spigot question though. If you're trying to find a problem in 100 files then you should be able to use some deductive reasoning to find out which file(s) could be causing the problem
or describe the issue so we can better advise
^
Anyone got any hex color parsing methods
So I can just do &#fe28sjL
or something like that
hello, does anyone know how to add more caves into 1.8 in worldcreator?
Hey Guys! How Can I remove death/join/achievement message from chat
get the even and cancel it
Okay! thanks
i'm not sure if u can set it to null
that isnt really real tho?
set it to null or it will send an empty message
since a string can be 36 letters and still not a uuid
I believe they're all in the spigot.yml or gamerules, don't try to cancel an event
For example if you cancel the death event the player simply won't die
correct, you still have to error check the UUID creation, but thats the jist
Or if you cancel the join event, the player cannot join
i think you can use this regex:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Is there any way with the spigot api to create a custom recipe that involves using a certain amount of ingredients to craft a certain item. I heard that the API only checks for material and not quantity. Is this true?
Not sure performing the regex pattern match would be any quicker than UUID.fromString in a try/catch
anyone?
Probably true because there is nothing that takes more than 1 item to craft
Custom crafting gui :p
oh that's so true I didn't even think about that
time to make an API
have fun
preciate it. I did in a previous plugin I just gotta abstract it to something people can actually use
how can i effectively use permissions in 1.8.8 spigot plugin?
permissions:
reports.*:
description: grants every permission
children:
reports.mod:
description: allows acceptance/deniable of reports
reports.report:
description: allows reports
im trying to do something like this in plugin.yml
but idk how to use it properly with commands
note: im using luckperms
is there a block tick event, that gets called for each tile entity, like a hopper, each tick?
@EventHandler
public static void onAttack(EntityDamageByEntityEvent edmg){
Player sender = (Player) edmg.getDamager();
sender.sendMessage(String.valueOf(edmg.getEntity()));```
How can i apply an effect (like poison) on the entity i damaged?
That is correct to register the permissions so they are seen by Bukkit. to assign to commands just add a permission line under teh command entry
will getTicksLived still count up if the entity is agelocked?
no
oh
thats it?
just add the check as first line of the command
is there any alternative, that doesn't require saving a list of the blocks or iterating over all the loaded blocks?
and luckperms does the rest?
no
You add them into the plugin.yml under each command
hello, does anyone know how to add more caves into 1.8 in worldcreator?
oh
well im registering commands
a little
differently
if they are assigned to a command that command executor will not fire if the player doesn't have the permission
how? you need to add the commands into plugin.yml file
@EventHandler
public static void onAttack(EntityDamageByEntityEvent edmg){
Player sender = (Player) edmg.getDamager();
sender.sendMessage(String.valueOf(edmg.getEntity()));```
How can i apply an effect (like poison) on the entity i damaged?
The command map also has permissions
public abstract class AbstractCommand extends Command implements PluginIdentifiableCommand {
private final CommandParams params;
private final CommandPermissions permissions;
protected AbstractCommand() {
super("");
this.params = getClass().getAnnotation(CommandParams.class);
this.permissions = getClass().getAnnotation(CommandPermissions.class);
setName(params.name());
setDescription(params.description());
setPermission(permissions.permission());
setUsage(params.usage().replace("<command>", this.params.name()));
if (params.aliases().split(",").length > 0) {
setAliases(Arrays.asList(params.aliases().split(",")));
}
}
@CommandParams(name = "report", description = "Allows player reports")
@CommandPermissions(source = CommandSource.IN_GAME, permission = "reports.report")
public class ReportCommand extends AbstractCommand {
heres an example
@eternal oxide
#addPotionEffect()
registering them through reflection
checking which classes implement AbstractCommand
it looks fine
well i can see how to do it on a player but not sure how on the entity that i just damaged (like a zombie)
doesnt event.getEntity() have an addPotionEffect() property?
why would you extend Command?
no potion effect, which is odd since the docs do say it can be applied on that entity so
its literally there lmao
ignore the weird syntax im using kotlin
am i stupid?
im creating my custom implementation of a command
so in the future its easier to register them and work with commands
its not there for me
@EventHandler
public static void onAttack(EntityDamageByEntityEvent edmg){
Player sender = (Player) edmg.getDamager();
sender.sendMessage(String.valueOf(edmg.getEntityType()));```
edmg.getEntity() doesnt do anything?
wdym?
edmg.getEntity().addPotionEffect()
have u imported the spigot library correctly
hmm well im clueless rn
what spigot version are u at?
please
how can I check? i downloaded the most recent version
EntityDamageByEntityEvent#getEntity() returns an Entity, for which addPotionEffect() does not exist
That's part of LivingEntity
no?
LivingEntity damaged = (LivingEntity) edmg.getEntity();
damaged.addPotionEffect()```
this works fine for me
thatd make sense
yea
is kotlin worth learning over java?
it has some neat features that come out of the box and it looks a bit cleaner
ill show you
?paste
@thorny dawn
you manage to get around from a lot of boilerplate java may create and its cool
im not dealing with an issue he asked a question
ooh that does look nice
still, it's better to use paste than uploading a picture
@EventHandler
public static void onAttack(EntityDamageByEntityEvent edmg){
Player sender = (Player) edmg.getDamager();
sender.sendMessage(String.valueOf(edmg.getEntityType()));
LivingEntity damaged = (LivingEntity) edmg.getEntity();
damaged.addPotionEffect(new PotionEffect(PotionEffectType.POISON, 10, 2));
}```
this is my entire event, it doesnt add the potion effect on the ZOMBIE i just hit which is weird since it should
the point is to get an overall image of how the syntax looks not to copy code
is the event registered?
people like unchecked casts
yep, it is, it sends the entitytype in chat
you know he can just use another ide and it will look otherwise, the code will be the same in paste
hmm nope, still wont poison a sheep
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_18_R2.block.CraftBlock cannot be cast to class org.bukkit.block.Chest
player.getWorld().getBlockAt(airdropLoc).setType(Material.CHEST);
airdropLoc.getBlock().setMetadata("airdrop", new FixedMetadataValue(plugin, airdropLoc.getBlock()));
fillChest((Chest) airdropLoc.getBlock());
particilizeAirdrop(airdropLoc);
Why can't I cast the airdropLoc.getBlock() to a Chest, even though I set it to a chest one line earlier
i think u have to cast the block itself, since setting the block type to chest wont do anything
is it possible to change parts of a lang file through plugin? like names of certain blocks and whatnot
Actually I had to check if it was a chest even though I knew it was a chest
no i think you have to do it through a resource pack. but if you really want to then you can probably change a pack in code.
at least how to generate more ores please
Sick
rip, im just trying to add hex code colors to a block name
Learn about chunk generation
i think thats possible you just have to use grave instead of the and synbol
the blockstate can be a chest
you can without a texture pack, What version?
declaration: package: org.bukkit.block, interface: Chest
1.18
I'm not planning on generating new worlds from scratch, I just want to pump up the volume of ores in a world
I'd suggest checking out Iridium Chat Color API they have a pretty good thing going there. That way you don't have to spend any time setting it up yourself
You can use something similar to how world edit would do it or learn about chunk generation and apply it to new chunks
yall see any issues here? Poison does apply to a sheep but when hitting it, it just doesnt apply it
do you have an example?
I use this personally I think its a good option
what way does the wolrd edit do it? any link for gitthub on 18.?
you can change world type to AMPLIFIED but i DO NOT RECOMMEND IT as it will eat up all of your servers performance and get a time out error if you dont have the specs to support it
Is there a way to get the NBT data of an item in like a HashMap format? I'm making custom models for my plugin and i need the CustomModelData nbt tag of a Firework Star from an item.
again, I just want to have more ores in the world, preferably more caves but not change the world from default
Just replace a certain amount of stone with ores
Make a method to determine what blocks should go where
oh god, another hour or so will go into this, thanks though
how can i clear the console in java
for(var i = 0; i < 100; i++) {
getPlugin().getServer().broadcastMessage("");
}
in java
not spigot api
@EventHandler
public static void onAttack(EntityDamageByEntityEvent edmg){
Player sender = (Player) edmg.getDamager();
sender.sendMessage(String.valueOf(edmg.getEntityType()));
LivingEntity damaged = (LivingEntity) edmg.getEntity();
damaged.addPotionEffect(new PotionEffect(PotionEffectType.POISON, 10, 2));
}```
anyone got a reason as to why this wont apply poison on a mob i hit?
oh mb
Is there a way to get the NBT data of an item in like a HashMap format? I'm making custom models for my plugin and i need the CustomModelData nbt tag of a Firework Star from an item.
windows?
maybe because it's static
java console
and it concerns me as to why you'd think to make a static void, specially for an event
also 10 ticks of poison is like 0.5s which won't be notable
How do I spawn a firework particle?
Hello, can anyone suggest healing sound?
arrow ding
Thank you
are you using windows as your operating system?
hey im making a pickaxe plugin where if you mine a certain block, it gets added to a map. and im trying to show the amount of blocks broken on the lore, however the lore doesnt get displayed nor do you get a message saying you mined a block on event
@EventHandler
public void onMine(BlockBreakEvent event) {
Player player = event.getPlayer();
Pickaxe pickaxe = Pickaxes.UUID_PICKAXE_MAP.get(player.getUniqueId());
if (player.getInventory().getItemInHand().getItemMeta().getDisplayName().equals(("&6&lPickaxe"))) {
final Material type = event.getBlock().getType();
if(pickaxe.getOreMap().containsKey(type)) {
pickaxe.getOreMap().put(type, pickaxe.getOreMap().get(type) + 1);
player.sendMessage("You mined " + pickaxe.getOreMap().get(type) + " " + type.name());
}
}
}```
did you register the event?
yeah
private final Map<Material, Integer> oreMap = new HashMap<Material, Integer>() {{
put(Material.DIAMOND_ORE, 0);
put(Material.GOLD_ORE, 0);
put(Material.IRON_ORE, 0);
}};
private final ItemStack pickaxe = new ItemBuilder(Material.DIAMOND_PICKAXE)
.displayname("&6&lPickaxe")
.build();
public void giveItem(Player player) {
this.update(player, 1);
}
public void update(Player player, int slot) {
ItemMeta itemMeta = pickaxe.getItemMeta();
itemMeta.setLore(Arrays.asList(
Colorizer.colorize("&bDiamonds: " + oreMap.get(Material.DIAMOND_ORE)),
Colorizer.colorize("&eGold Ingots: " + oreMap.get(Material.GOLD_INGOT)),
Colorizer.colorize("&7Iron Ingots: " + oreMap.get(Material.IRON_INGOT))
));
pickaxe.setItemMeta(itemMeta);
player.getInventory().setItem(slot, pickaxe);
}```
I'm doing chest.getInventory().setContents(rewardContents); but it just ends up putting the items on the ground, any thoughts?
Use pdc to check if it's a pic or not
pdc?
PersistentDataContainer
Get the NBT of an ItemStack.
cant i just do java if (player.getInventory().getItemInHand().equals(pickaxe.getPickaxe())) {
You can test it but the safest way to go would be to use pdcs.
I use it so often now that I know how to use it
It's very helpful
ive never heard of this but ill see if this would change anything
no
the pickaxe can be damaged
then it doesnt equals amymore
would isSimilar work?
no
ig ill use pdcs then
yes thar's the way to go ๐
pdc ?
no
pdc is 1.14
it exists since 1.14 so its quite old
not really a newer version yea
newer than 1.8
even my grandpa is younger than 1.8
no idea why you're using this almot 10 years old version
there are still large communities based in older versions yk
lol bullshit
everyone who's not totally stupid keeps up to date
sure, bring it on
Depends what you think "big" is
some people like the old pvp style more
although no idea if I can load the link you*re going to send, I'm still using Windows XP
sorry but there's still big communities using WIndwos XP
a large portion of the factions community play 1.8, along with hcf and practice playing even older versions in 1.7
bullshit
also wtf is hcf
search up ricefarmer11 on youtube
or you search "how to update minecraft" on youtube
yeah anyway, have fun in using 1.8
some people just dont like the new style of pvp
yeah idk some people also think that hitler is still alive and lives in argentina
that comparison is completely unrelated to the topic at hand lol
well both are based off people who cannot simply stay up to date
and you being semi hostile doesnt help the point you're making
I hate teh new combat, but I still use 1.18.2
because I cannot stand persons using 8 year old MC versions
and still expect help here
it's weird
update to the latest version and you'll get proper information here
gamers, how do I also change the player's name color and not just its prefix with scoreboard teams?
you can only use NBT tags if you keep staying on 1.8
NBT isnt part of the API though and its version dependant
yeah sorry but what did you expect
if ask questions for a 10 year old version, of course people will tell you to update
wait, so when you have pvp server based on 1.8 pvp version you should update, what's the logic??
Yes you should.
๐คก
You can use words instead of emojis if you're mentally capable of such
you say that every server that makes 1.8 pvp should update to newest version so that they can make the pvp again, but on the newest versions that isn't possible
In this channel we give support on the current (recent) version. It's up to each individual if they choose to give advice on older versions. Pretty much no one gives support on 1.8 anymore.
Except it is possible? Maybe not the block mechanic but if servers like Hypixel can do it then I'm sure any server can lol
hypixel is on 1.8??? the use viaversion for players
That's what i thought
they probably have their own viaversions but the point stands
Yeah but viaversion does what exactly? Translates versions backwards. If you can translate something backwards then it's possible to do it on the latest version
Also allows newer vesions to join
what? viaversions backwards? 1st thats entirely own plugin 2nd it only translates the blocks intop other versions, the mechanics stands
you may not see the cooldown in 1.8 but your hits are lower
Except you can still do 1.8 pvp on 1.18. People just try to justify their use of an archaic version
you're not making sense
yes, because of viaversion, the server is on 1.8 and viaversions allows players to join and use of 1.8 mechanics
So if a 1.18 client can use 1.8 mechanics you realize that means you can do 1.8 mechanics in 1.18 right?
Like you understand how programming works right?
you can go backwards with functions but not forward, like you understand how programming works, right?
i mean its possible to have a 1.18 server with 1.8 pvp mechanics
You are actually pretty dumb. If a client can do something then what reason is there for the server to not also be able to do that thing?
I know there are some plugins that try to allow it but the hit reg and cooldown still can't process that like fast and there are bhgs

you're just showing how dumb you are, the things from 1.8 are in 1.18 but things from 1.18 are NOT in 1.8
Who cares if they aren't there. You just don't send that to the client
Yes but to make 1.18 work with 1.8 1.18 must be able to do the things you want from 1.8
only if you change minecraft client
What?
the client have the cooldown, not the server
:L
Yet viaversion works?
so you can't have 1.18 pvp server with 1.8 mechanics as the player have cooldown for attacking
but you can ๐
You can disable the cooldown
U can disable cooldown lol
I swear this channel is so entertaining sometimes
I would have also left
grow up and stop pvping on 1.8 lol ๐
you can have 1.8 pvp on 1.18, and 1.18 pvp on 1.8. not really sure why this is being even argued since its just a fact
invalid
you can set atk cooldown on items
which makes it seemingly 1.8
some people just love to live in the past
I don't think he is ever coming back
yes, because from 1.8 you don't have the cooldown, but in 1.18 you have, if server is 1.8 and client is 1.18 (using viaversions) have the cooldown and player requests the packet with it and recieves null it doesn't instantiate the variable, but if you have 1.18 and 1.18 it recieves the default from server, then asks plugin and see that it's 0 but because of latency it takes time, if you have 1.18 and 1.8 it never requests for that packet
but the latency :/
are you just saying random words now
What latency. It's client side
hate it when i request a packet but its null and doesnt instantiate the variables
I literally study it in school
I just think it's a fundamental misunderstanding of a client-server relationship
no support here for 10 year old MC versinos ยฏ_(ใ)_/ยฏ
the default is 0 and recieves null ยดยด 0
i have no clue what packets or variable instantiation or null values has to do with this
what? you never been on a server and hit players and nothing happened?
Yes because the internet cut out
noone here uses 10 year old MC versions
so you didn't receive the packet about hitting and other things, and nothing happened
proven you wrong before you even said it
bump
can't paste in images
hm you're the only one who asked anything about 1.8
get verified then
no, I said that people still use 1.8
those people are wack ๐
yeah but those people are living in the past
can't, mods are not responding and my account is tied to old discord
yea about 6.9 % of all servers are 1.8...
how to simulate 1.8 pvp in 1.18:
remove cooldown when player hits someone
how to simulate 1.18 pvp in 1.8
add cooldown when player hits someone
Why would you not receive the packet? Did the client not send it? There is no reason for you to not receive a packet like that.
yea you also gotta tweak how health regen works because its different with the new combat, but still not too complex
that would be still 69000 from 1mil
so a very, very small share
yet its still 6.9% we can all do math here right?
what??? you need internet connection and when you don't have it you don't recieve packets
No really?
where are you even getting this 1m number from lol
from 54689 there are 3,773 1.8 servers
ended up having to use texture pack, still came out well imo
yeah those servers are for handicapped people
Your entire argument is 1.8 pvp cannot be replicated when it already has and the plugin(s) that have done it have 10s of thousands of downloads
Correct, a TINY amount.
that's an example of how much can 6.9% be
looks great ๐
where are you getting 54689 from??
but 6.9% = 6.9%
just block this person already
They're a redditor it makes sense
bruh
hey
I'm a redditor too
well a random reddit meme said it, so it must be true
so there are even more
Ihave more than 10k subscribers on reddit :< don't hate on redditors pls
There are 1.7.10 servers wtf
what? we just said that is 6.9%
and where is that number coming from
7% share using 1.8.8
that's about 7% too much
11,437 in the small minority vastly
And the best part is 90% of them or more allow 1.18 users to play
and now count avarage of 60 players per one of those servers
How to create a NPC via ProtocolLib?
also probably 90% of those servers have exactly 0 players online right now
The average players on a server is close to 1.
did you ever hear of hypixel?
prime example of sample bias
I said average you average redditor lol
oh you mean this shitty server where you get spam messages 3 seconds after you joined?
Do you understand what an average is?
if you devide the current playing players by the amount of servers you get 0.8
hence there are a ton of servers with none online
do you understand that many servers can have about 5 players and hypixel carries it?
also the reason hypixel is such a buggy spaghetti coded mess is probably because its in 1.8
Ok, I see you don;t understand math
you will not get any help here for your 1.8 questions nonetheless
people here don't like living in the past too long
50% of players on a 1.8 server use 1.8. how shocking
I'm trying to "copy" information from one horse to another like so:
horse.setJumpStrength(normalHorse.getJumpStrength());
horse.setAge(normalHorse.getAge());
horse.setEatingHaystack(normalHorse.isEatingHaystack());
horse.setStyle(normalHorse.getStyle());
horse.setColor(normalHorse.getColor());
...
what is "memory" of an entity, and how would I copy it over to horse from normalHorse?
i asked none 1.8 questions
Arguing over. questions are asked
you know it's 1.8 to 1.18??
yes??
thats ah
what is your point here
inv.addItem(item);
is there a way for me to choose which slot this item goes into?
Inventory#setItem(int slot, ItemStack item)
#setItem()
from 10 versions 50% of players still use 1.8
oh lovely i forgot about that
because its a 1.8 based server...
they have none
bump
can you pls stop sending weird hypixel png files
canyou pls stop sending ANY links
this channel is to ask questions about developing plugins
still is also not official.
you are just spamming this channel
can you just accept the fact that you're wrong?
nothing is official
buh buh we aren't
that links clearly shows that almost noone uses 1.8
You probably have to add your server to that list so it's probably not even complete
noone uses 1.8, confirmed
๐
why is politics hapenning in here lmfao
1st there are only server most servers are 1791
im tryna get some spigot help
someone here joined and thinks 1.8 is awesome and refuses to acknowledge that this version is 10 years old, unsupported, and that noone uses it
?
A horse has no Memory. Its currently only Villagers
just block this person already
only reason i use 1.8 is for pvp
saves much time
but like i dont see the argument
Only use 1.8 on hypixel because thats the core version
1.18 has similar pvp if you want it to. Also 1.8 pvp sucks cause low skill. 
yeah lol
1.8 pvp is just "who clicks the fastest"
1.8 is pvp for noobs
i like 1.8 pvp but thats personal preference
I hate that this is true
I use 1.8 to test plugins that don't need new api stuff cuz the serber loads so quick
really? what is RAM_COOLDOWN_TICKS and stuff for then
Kids like it cause it has a low skillcap
eh theres a little bit more to it but yeah thats a big part
also about extending your reach by w-tapping or keeping ur sprint by strafing
I quit pvp as soon as people figured out drag clicking its become unfun as someone who plays casual to just have someone hitting over 60cps
What is drag clicking?
abusing a shitty mouse
yeah
I dont understand
you drag your finger downward across your mouse and it like "bumps" up and down 100 times per second
Lmfao
and you hit 100cps by just moving your finger down your mouse
tbf i dont use 1.8 for pvp but i still like it, not like i code in it tho ๐คท๐ป
it only works on specific mice
michael scott is the best macgyver ever, change my mind
i code mods with forge 1.8.8 if that counts
O.O
oh ok thanks
I never made a mod
I haven't either
mod APIs are too complex for me atm still I rather learn something easier like spigot till I get a lot better at java
i would like to get into modding but i dont have any projects
this is awfully specific but how can i create a random amount of items with each item being random as well, these items will go into a chest too, i have a method in mind but itd take a while
Modding in modern versions really isn't that hard
I'm probably experienced enf to make a mod, i just don't care to
same
Create a list of materials that are items and get a random one when u need to and generate a number from 1 to the max stacksize
You can filter by Material#isItem for that list.
1.8 is garbage
oh thats so much easier than what i was gonna do, ty
Don't start that conversation again
what's the difference between Entity#setPersistent and LivingEntity#setRemoveWhenFarAway
i mean there are still 1,530,000 monthly users that use 1.8
oh god
pls go talk in general lmao
not again
i know a guy who never moved on past 1.8
#general or something idk
he still doesnt know what elytras are
lol
?
what class is that?
the first Sets whether or not the entity gets persisted, and the second sets whether or not the living entity despawns when away from players or not
oh okay
thanks
also how do i get and set a horses speed
i figured out jump strength but speed is weird
Attributes
thanks
is it bad that i made a class with a constructor that accepts 12 things?
we'd have to see your code to tell u that
depends
gonna make a "container" class to hold some of those things
just so it's easier to read, still need to pass all 12 things in
yep i need all 12
none can be a default and only set if different?
i hate constructors with a large amount of params
same lol
hence why i'm asking this
i made a class that holds all the menu items and pass those in
if it comes from a config you could instead pass a config path/instance reference in the constructor instead
it's for a configurable menu
it can also be made ingame
i think ur builder idea is actually genius
ill throw an exception if everything isnt set
sounds better than a 12 arg constructor ๐
๐ณ
๐
this is my code , i want to get nbt from player , but it print {} , is there any thing i understand wrong?
@Override
public void onEnable() {
getLogger().info("onEnable is called!");
Bukkit.getScheduler().scheduleSyncRepeatingTask(this,()->{
List <Entity> entities = new ArrayList<>();
List <World> world_list = Bukkit.getServer().getWorlds();
for (World world : world_list) {
entities.addAll(world.getEntities());
}
for (Entity entity : entities){
if (entity.getType() == EntityType.PLAYER){
System.out.println("test");
getNBTFromEntity(entity);
}
}
},0,2);
}
@Override
public void onDisable() {
getLogger().info("onDisable is called!");
}
public void getNBTFromEntity(Entity target){
CraftEntity entity = (CraftEntity) target;
CompoundTag nbt = new CompoundTag();
entity.getHandle().save(nbt);
System.out.println(nbt);
}```
i think at line 28 , it should save entity's nbt to CompoundTag nbt
at line 29 , it should print entity's nbt out
but it gives me {} ,a empty CompoundTag
presidentdata
There will be no online Players when onEnable runs, unless its a reload
Tru
@odd adder use persistent data also use like Bukkit.getOnlinePlayers() or whatever it is on a command