#help-development
1 messages Β· Page 2029 of 1
What's the error?
can I use maven-assembly-plugin instead of shade plugin
because I don't get two files into my folder, and one fo them is not shaded
you don**'t** get two files but one of them is not shaded π€
maven shade is basically the better version of maven assembly
I set the output directory to my plugins folder but I get these two files
only one of them works
and where's the problem? use the working one
the original jar is the original without the shaded stuff iirc
since the output folder is plugins folder or my server one of them is considered as Ambiguous plugin
show your maven shade plugin declaration
ok
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputDirectory>C:\Users\marti\Desktop\minigame\plugins</outputDirectory>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
yeah
you should change the outpur directory in the maven-jar-plugin
not in the shade plugin
remove the <configuration> from your shade plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<outputDirectory>C:\mctest\plugins\</outputDirectory>
<finalName>MyAwesomePlugin</finalName>
</configuration>
</plugin>
and use this for the jar plugin
then I will get only the plugin with dependencies?
yes
ok, thanks
I get nullpointerexception when I run my plugin with this maven plugin
[13:23:36 ERROR]: Error occurred while enabling MiniGamePlugin v${project.version} (Is it up to date?)
forgot
that's not the issue with maven jar plugin
Show plugin yml
Need the full error in a paste
I fixed it the command in plugin in yml had different nameπ
guys with getBlockPlaced().setType(Material.AIR); i can "/setblock" to air right?
im using blockplaceEvent and i need to break the block after 10s
so use a runnable
wdym
use a runnable to set the block to air after 10 seconds
eh yes?
what happens is that I saw that there is a breakNaturally() and maybe it drops items from the block so I want to just disappear it
and this will remove it without any particles
thats ok
I love how you can use _ to make numbers more readable in java
public static void main(String... args) {
for(int i = 0; i < 1_000_000; i++) {
}
}
i think there is not. you can store it yourself tho
im sorry but how i can use runnable
π
yeah you could listen to PlayerChangeWorldEvent and then store the visited worlds in a string array in the player's PDC
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
of course!
cough gay
π«
friends hug
oh you have a problem with that you!
no it's gay, you didn't say nohomo
I only have problems with myself lol
haha, what kind of problems?
what that returns? Bukkit.getWorld("world");
should i use runnable or scheduler?
a World, obviously
yes but which world
The world world
the world named world, obviously
id use a Runnable
declaration: package: org.bukkit, class: Bukkit
thats exactly what I was looking for
oh just the usual stuff, like... having to pee but too lazy to get up, etc
forgetting your head when you go to work...
yeayea gotcha
what type of number is 20L?
a long
a loooooooooong one
how many seconds is 20L π
1
if you explode 10000 tnt at once it will drop no matter how good the machine, so still not 20 tps at all times
haha
If you need something to be bound by time and not by the game, use a ScheduledExecutorService.
a quick cheat sheet about java's datatypes
yep thanks
understandable
so helpfull, thanks
np!
oh now I get what Bukkit.getworld means, it returns the world with that name in my server, it can be end, nether or overworld
ok this is working
whats the difference between double and float then?
it can be however your worlds are called
good questoin, maybe it's twice as big
or it's the same float twice
yes
The float is slightly elevated above the normal numbers
thanks you all
oh of course, how could I forget about this
it's like basic java
smh
Smh
but how can I get the world name, for example if I put this plugin in some other server and it's world name isn't the same
Bukkit.getWorlds() returns a list of all worlds
alright good, but i hope your not creating a runnable for every block right?
yes π
and get you get the type for exam. overworld
probably have one and add blocks to a map with a time it was placed
world.getEnvironment()
then go through that every like 2 ticks or something and remove the ones that have been there for 10+ seconds
then you do 5 seconds?
maybe. but its bad practise
for(World wr : Bukkit.getWorlds()) {
if(wr.getEnvironment() == World.Environment.NORMAL) {
System.out.println("the overworld");
}else if(wr.getEnvironment() == World.Environment.NETHER) {
System.out.println("the nether");
}else if(wr.getEnvironment() == World.Environment.THE_END) {
System.out.println("the end");
}else {
System.out.println("costum dimension");
}
}```
what if you got 100 players placing at the same time
public static Map<Player, ArmorStand> HOLOGRAMS = new HashMap<>();
// method...
if (!(entity instanceof ArmorStand)) return;
LOOKING.put(player, entity);
actionBar(player, "Pressione (BOTΓ£O DIREITO DO MOUSE) para coletar este item");
final String name = entity.getCustomName();
final String[] str = name.split("delete:");
ItemStack stack = null;
stack = this.getLootName(str[1]).get().item();
final Material type = stack.getType();
Bukkit.getScheduler().runTask(plugin, () -> {
ArmorStand hologram = spawnHologram((ArmorStand) entity, type);
if (hologram == null) {
plugin.sendMessage("e nullo o holgogram");
}
HOLOGRAMS.put(player, hologram);
if (HOLOGRAMS.get(player) == null) {
plugin.sendMessage("no map colocando e nullo");
}
makeLook(hologram, player, delta);
});
// final ArmorPose pose = ArmorPose.HEAD;
// pose.setLocationPose(hologram, player.getLocation());
}```
im running this method on a async thread but when i spawn on sync trhead `ArmorStand hologram = spawnHologram((ArmorStand) entity, type);` , calling it back i get null error why?
that should work?
could do a HashMap where you save the System milliseconds (when the block was placed) as a value to the Block, then have one runnable terminate blocks every 10 ticks or so
i know but i'm not sure how to do as you suggest
you want me to make you an example?
yes please
should that example work?
it will be very simple and ur gonna have to change most ur self but it should explain how to do it
public class Test extends JavaPlugin implements Listener{
private final Map<Location,Long> placedBlocks = new HashMap<>();
private static long fiveSecondsInMilliSeconds = 5 * 1000;
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
Bukkit.getScheduler().runTaskTimer(this, () -> {
Iterator<Map.Entry<Location,Long>> it = placedBlocks.entrySet().iterator();
long currentTime = System.currentTimeMillis();
while(it.hasNext()) {
Map.Entry<Location,Long> entry = it.next();
Location loc = entry.getKey();
Long time = entry.getValue();
if(currentTime >= time + fiveSecondsInMilliSeconds) {
loc.getBlock().setType(Material.AIR);
it.remove();
}
}
}, 2, 2);
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlace(BlockPlaceEvent event) {
placedBlocks.put(event.getBlock().getLocation(),System.currentTimeMillis());
}
}
Do it like this
this only uses one runnable
that's way better than having 10k runnables
wouldnt saving the actual blocks be better than saving the locations?
notice that an Iterator is required because you cannot remove stuff from a map while iterating over it
having a block object will keep the chunk loaded IIRC
I'd use locations since they are merely a reference to a world + 5 numbers
thank you i will try
you can just use Chunk.addPluginTicket to keep a chunk loaded in one line
maybe even better to use your own location object. but idk how big the dif would be
should that be the nether location: Location loc = new Location(Bukkit.getWorld(World.Environment.NETHER.name()), 1, 1, 1);
yeah sure, a simple class that only stores int x,y,z and a world would be even better
I have a class called SimpleLocation for stuff like that
wtf
is that supposed to do
that won'T work
I wanna get nether name
you can't
there could be 100 different nether worlds
or none at all
only thing you can do is to loop over all loaded worlds and get the first one that is a nether
but as said, a server could have 100 different nethers
do you mean like that: java for(World wr : Bukkit.getWorlds()) { if(wr.getEnvironment() == World.Environment.NORMAL) { System.out.println("the overworld"); }else if(wr.getEnvironment() == World.Environment.NETHER) { System.out.println("the nether"); }else if(wr.getEnvironment() == World.Environment.THE_END) { System.out.println("the end"); }else { System.out.println("costum dimension"); } }
why dont you define the world you need in configuration
because I didn't get that idea
damn i need to do a system to clone the world π
@Nullable
public static World getNether() {
Optional<World> world = Bukkit.getWorlds()
.stream()
.filter(toTest -> toTest.getEnvironment() == World.Environment.NETHER)
.findFirst();
if(world.isPresent()) return world.get();
return null;
}
this gets you the first loaded nether world
or null if there is none
that's definitely better than just getting a random nether world
wow thanks, but how can there be more than one nether?
server owners can create world on demand?
with plugins like MUltiverse, you can create as many worlds as you want
for example I worked for a server that had 3 different nethers
ok granted, they were all separate servers on a bungee but I guess many servers just use multiverse or similar
ok then, thanks
can i hug you? (no homo)
only if you change that to yeshomo
fun fact, did you know discord supports the sed replace syntax like s/oldword/newword ?
ngl i think breaknaturally would look so good
turn it every tick into another material and then remove it
tell them to get better pc
:kekw:

im noob π
same
@manic delta
package de.jeff_media.test;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
public class Test extends JavaPlugin implements Listener{
private final Map<Location,Long> placedBlocks = new HashMap<>();
private static long fiveSecondsInMilliSeconds = 5 * 1000;
private static List<Material> blocks = Arrays.stream(Material.values()).filter(Material::isBlock).collect(Collectors.toList());
private static Material getRandomMaterial() {
return blocks.get(ThreadLocalRandom.current().nextInt(blocks.size()));
}
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
Bukkit.getScheduler().runTaskTimer(this, () -> {
Iterator<Map.Entry<Location,Long>> it = placedBlocks.entrySet().iterator();
long currentTime = System.currentTimeMillis();
while(it.hasNext()) {
Map.Entry<Location,Long> entry = it.next();
Location loc = entry.getKey();
Long time = entry.getValue();
if(currentTime >= time + fiveSecondsInMilliSeconds) {
loc.getBlock().setType(Material.AIR);
it.remove();
} else {
loc.getBlock().setType(getRandomMaterial());
}
}
}, 2, 2);
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlace(BlockPlaceEvent event) {
placedBlocks.put(event.getBlock().getLocation(),System.currentTimeMillis());
}
}
try this lmao
its getting longer by the second
and now make it build a house block by block and change color every tick. destroy the house and remove the block
i will use custom blocks per ranks
like wool for vip rank
yes and then let it explode into a realistic black hole with a fucking supernova instantly getting sucked up by the black hole
lmao
yessss
what if i want a specific list of blocks
change the List<Material> blocks
love that
have to be a paid premium feature
List<Material> blocks = Arrays.asList(new Material[] {Material.DIRT, Material.DIAMOND_BLOCK, ........
p2w ftw!
private static List<Material> blocks = Arrays.asList(Material.DIRT, Material.DIAMOND_BLOCK, Material.BEACON);
intelligence
tysm
lol this is funny
this is giving me a headache XD
oh well
lol
3 did
i just fucked up
Villager nado
what the actualy fuck
forgot a break
WTF
you saving the players pathing and giving it to the villagers?
I would love to see the code for that, could you give me some of it to satisfy my learning thirst?
the fucking minecraft plugin for intellij sucks so hard
and how can I make it stay longer in the different block? I mean I'll put the first block to be clay, the second red clay, the third green clay... but I want it to stay a little longer in a certain color, not every tick
can share it later, first need to refactor a bit
XD ok, thanks π
π§
by changing the tick amount
yes but it will affect the time in which they should disappear
or no?
not sure what you mean
i mean
yea thats what i mean
you want to have two loops, one to change the blocks and another one to get rid of them. Or create a custom Location object that also keeps track of when the block was changed in your loop
I want to make that when I put a block, it changes color every so often, but it is deleted within 7s
and how can I get another colored clay in Material.? xd
yes, so either use two schedulers running at different speeds, or use a custom class that holds the location and the time of the last block change
i'm using 1.8 so RED_stained_clay don't exist
using 1.8? ugh
yep
ur gonna have to work with damage
no idea how it works, I started with plugins in 1.13 and even then 1.8 was outdated since years
damn π
you're like 10 major versions behind
im using 1.8 for the pvp
Block#setData()
and thats the only reason to use it imo
or is there anything else thats good about 1.8?
for example
Block b;
b.setData((byte) 14); // Sets the colour of the block to RED, but it depends on what material the block is
BlockState state = b.getState();
state.update();
i just see that on spigot
lol
well did that not work?
b null 
i will try
bruh fite me
probably hidden in the vastness of nms
if I would ever have to use 1.8, I would use XMaterial to do stuff like colored blocks
it's in net.minecraft.server
xmaterial?
yes, XMaterial
what is it
sadly there is no XMobs
cross-compatible versions of different Bukkit APIs
quite useful if you need to support all versions of the API (although I wouldn't suggest coding in 1.8)
it basically decides at runtime what the block data is, e.g. on 1.8 RED_WOOL it gives you Material.WOOL with a data value of 14, and in proper MC versions it simply returns RED_WOOL
but I just see, you'll need XBlock instead of XMaterial
what is it
obfuscator
a code worsener
lol
let's stop saying obfuscator and start saying code worsener
it takes perfectly clean code and makes it look like @lavish hemlock wrote it
damn that was cold...
how can i convert material to block?
no idea, I never used XSeries
i mean using spigot normal
you dont
XBlock is not normal
you simply cant convert a material to a block
you clearly use XBlock in the screenshot
I don't know, as said I don't use 8 year old versions of this game π
uhm
does anyone know how I can enable block breaking or something if the player is opped
why would block breaking be disabled in the first place
no .._.. reason
cringe
thats not what you asked tho
how can I enable block breaking or something if the player is opped
BlockBreakEvent, check if the player is op, if not -> cancel
but how would I check if player is opped
Player#isOp()
ok thx
Im dumb
i can use Xmaterial
i hope it should work π
I have created a custom enchantment which work fine but when i combine it with other enchants using anvils it looses its powers
how much ticks is one second
20
is runTaskTimer in ticks or mills
ticks
oh that's why it didn't work lol
yes, you should never create custom enchantments
you should use the ItemStack's PDC to store your custom enchantments, NOT create new ones using the Enchantment class
it's not meant to be extended by plugins
PDC?
Persistent data container
?pdc
I am not eligible enough to understand but I have an idea I can create a GUI Which will add the enchantment for them
like in slimefun
Anyone who ever have experienced a correct code for a crafting recipe. However it doesn't show in-game?
(I know it's correct since I'm outputting recipe result to console. And it's showing the item)
I have created a acrafting recipe which works fine
What recipe are u making
where is the site where i can see all "commands" described?
So have I. Multiple times π
is it possible to create new naturally spawning mobs in spigot?
(I am talking about things like special Zombies or skeletons which always wear the same armor and have names and things like that)
and make them spawn without exchanging a randomly spawned mob for them?
like if i type event i see what uses there is for it
so what problem you are facing
there was a webside but i forgot where
what out put was it suppose to give and send the code
commands? you mean the builtin /commands, or the spigot API docs?
are you trying to hotbox your house? or why would you put weed and a bong together?
(Dont mock me for white-mode in eclispe. I just reset the meta on it xD)
also that's a bit much weed for such a tiny bong
just enough for the homies
spigot API docs i think. things like the onPlayerJoinevent stuff and so on
every of those buds is bigger than the bong and he's using 8 of them
?jd
thank you :)
np!
It's suppose to be glass later on π
hes using the weed to smoke the bong
why smoke weed when you can melt a bong and drink it
facts
any console errors?
https://paste.md-5.net/itevawucac.java some1 know why the protocol lib packets is not being called?
are you actually calling that method?
I am calling that method. Cus I wanted to double check any issues π
And console says the item should be there xD
are u talking with me?
nope
Yes...
anyway, you know anything about this? I want to make the special mobs into actual full objects inside my code. Can I just extend the LivingEntity class or the Skeleton class?
weird, it should work :/
Yah
Only custom recipes that's working for me rn is furnace recipes
I got a problem like that once
send your code in text pls
But i was able to find nno solution so i crated a new project
What part do you want
just the recipe part
and used the same logic
did you check whether Items.getBong() actually returns an itemstack?
Yes. I can spawn in the same ItemStack using a command
public static void registerRecipes() {
//////////////////////////////////////////////////////
// RECEPIES //
//////////////////////////////////////////////////////
NamespacedKey keyJoint = new NamespacedKey(Main.getMain(),"joint_item");
ShapedRecipe JointRecipe = new ShapedRecipe(keyJoint, Items.getJoint());
JointRecipe.shape("PPP","PGP","PPP");
JointRecipe.setIngredient('G', Material.GREEN_DYE);
JointRecipe.setIngredient('P', Material.PAPER);
Bukkit.addRecipe(JointRecipe);
NamespacedKey keyBong = new NamespacedKey(Main.getMain(),"bong");
ShapedRecipe Bong = new ShapedRecipe(keyBong, Items.getBong());
Bong.shape("MMM","MBM","MMM");
Bong.setIngredient('M', Material.GREEN_DYE);
Bong.setIngredient('B', Material.BREWING_STAND);
Bukkit.addRecipe(Bong);
NamespacedKey keyCocaine = new NamespacedKey(Main.getMain(),"cocaine");
ShapedRecipe Cocaine = new ShapedRecipe(keyCocaine, Items.getCocaine());
Cocaine.shape("SSS","CCC","GGG");
Cocaine.setIngredient('S', Material.SUGAR_CANE);
Cocaine.setIngredient('C', Material.COAL);
Cocaine.setIngredient('G', Material.GUNPOWDER);
Bukkit.addRecipe(Cocaine);
NamespacedKey keyLSDExtract = new NamespacedKey(Main.getMain(),"lsdextract");
ShapedRecipe LSDExtract = new ShapedRecipe(keyLSDExtract, Items.getLSDExtract());
LSDExtract.shape("PPP","SSS","BBB");
LSDExtract.setIngredient('P', Material.PUFFERFISH);
LSDExtract.setIngredient('S', Material.SPIDER_EYE);
LSDExtract.setIngredient('B', Material.BEETROOT);
Bukkit.addRecipe(LSDExtract);
NamespacedKey keyLSD = new NamespacedKey(Main.getMain(),"lsd");
ShapedRecipe LSD = new ShapedRecipe(keyLSD, Items.getLSD());
LSD.shape("RRR","RRR","PPP");
LSD.setIngredient('R', Material.RED_DYE);
LSD.setIngredient('P', Material.PAPER);
Bukkit.addRecipe(LSD);
@SuppressWarnings("deprecation")
FurnaceRecipe Marijuana = new FurnaceRecipe(Items.getMarijuana(), Material.GREEN_DYE);
Bukkit.getServer().addRecipe(Marijuana);
}
do you have any other plugins installed that have anything to do with custom crafting recipes?
Alright
but that shouldnt be a problem
Yeah
spigot should automatically replace it with a proper key
The furnacerecipe at the bottom works though
You can use underscores too. That is valid
ok, i have an other question, is there a way to enable/disable PVP for a specific player. Like e.getPlayer().disable/enable pvp
0-9a-zA-Z/_.- iirc
oh indeed, underscores work too
Namespaces may only contain lowercase alphanumeric characters, periods, underscores, and hyphens.
Keys may only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.
Nevermind I'm just blind
It is Choco xD
I was right the first time
A-Z is not allowed
Anyway π
but anyway it should either replace it automatically or throw an error
/tangent
so tl;dr I have no idea why it's not working
Darn ;-;
try something simple
okay its time to ask
add only one recipe consisting of only one dirt block
what does tl;dr mean
too long didnt read
I could try a unshaped recipe actually
basically "to summarize: bla bla"
Since furnace works
ah okay
I also have to add, I always used RecipeChoices instead of directly giving a Material
but that shouldn't be problem neither
but is it not short for somethin?
^
If you see the recipe in your listener being printed but you can't see it in the crafting table, something is cancelling it
because outside of strange naming conventions, all else looks fine
they claimed to not have any other recipe-altering plugins
(assuming that method is called)
Yeah. I am calling that method
it is called, they say the furnace recipe works
why is that all red though lol
Yeah and you see that being printed?
Yeah then some code is removing it from the table
if it gets printed, the event gets cancelled
Set the priority of that event to MONITOR and try there
If no print, then ye, confirms it
(and check if the event is cancelled)
a plugin might cancel it without setting the result to null
I don't think it's cancellable. The result can be set to null though
So that's really what you should be printing
Hang on. I might ahve found something though
and? did you find sth? π
Does anyone know how to have a colored wool as a Material? I'm using 1.8 and I need it as a material, I've been trying various ways but don't work
you cant in 1.8
Really? π
reallly
okay guys, serious question: it already took me a while to figure it out and i couldn't find an answer yet... how's your phone number?
it feels fine thanks
hes aight
my phone number is doing good thanks for asking
fuck english
why dont you just break pvp in 1.16 or 1.18
Change color to a wool block
u could use MaterialData for that i think
would need to do full lore and a resource pack i belive for it to show
no i think he just wants different colors other than white
on 1.8
Yes
yw u can use MaterialData ig
Weird Crafting recipe issue
Isn't it just Block#setData(byte)
Where the byte corresponds to a wool color
i'll try
can someone show me how the structure or a config.yml would look like if I was planning to change the drop of an item using the config.yml?
drops:
DIRT: #which drop to change
DIAMOND: #the itemstack type to drop
amount: 4 # the amount, u can also add other options here like display name or enchs etc
EMERLAD:
amount: 1
...
Something like that I suppose
yes thx u so much :)
this is my custom drops config
DIAMOND_ORE:
'1':
- material: DIAMOND
- amount: 1-2
- chance: 100%
'2': &super-diamond
- material: DIAMOND
- custom-model-data: 1
- amount: 1
- chance: 1%
- display-name: "<#5555ff>Super Diamond<#/000055>"
- lore:
- "This is a super diamond."
- "It's like a normal diamond, but rarer."
ZOMBIE:
'1': &every-hostile-mob
- material: ROTTEN_FLESH
- amount: 5
'2': *super-diamond
SPIDER:
'1': *every-hostile-mob
'2':
- material: COB_WEB
- amount: 1
'3': *super-diamond
so just by adding this to the plugin it should make dirt drop diamonds?
lol no
you have to code that yourself obviously
^
wdym???
I mean
what would I do?
That's just an example of how you could structure a config.yml for people to use.
then drop your custom drps
^
ahhh
that you get from your config
adding some stuff to your config never does anything
on its own
what name would fit a class that takes a selection and then shrinks it inwards
SelectionUtils ?
it doesn't really fit
what else would it be if not a method?
?paste
no idea what's that supposed to do π
have you played miniwalls before?
no
well in that game once the deathmatch starts the area starts shrinking
so like a worldborder
can you change the spawn point in a world guard region?
@tender shard yes but it shrinks and takes the blocks away as well
look https://www.youtube.com/watch?v=lRxGWYi73qw 26:33
The Arcade MiniGames offers you a wide range of fun and casual minigames which are played in a fast-paced style.
βΌ CHAPTERS βΌ
00:00 INTRO
00:09 BLOCKPARTY
02:12 TNT RUN
05:32 QUAKE
08:21 TNT TAG
09:18 BOMB LOBBERS
11:58 SPLEGG
13:12 TEMPLE RUN
15:13 PARTY GAMES
20:52 MINI WALLS
27:39 PROP HUNT
ββββββββββββββββββββββββ
β If you enjoy don't forg...
yes
there's a flag called "spawn"
ahh okay thx
i tried respawn-location
I'd call it GameArea or something like that then
that name doesn't explain what the class is doing
well it does, it holds information about the game's area
but the primary objective of the class is to shrink the area
How would I do this? I know how to cerate the code to do this, but I want it so its not based on how big the inventory is, I want it based on if the inventory is a certain name or smth
Player is also simply called Player and not "ClassThatAllowsPlayersToBeKilledAndToMoveAroundAndToUseTheChatEtc"
what do you mean with "this"?
@tall dragon@tender shardyey
Take a custom inventory, and overlay it with an image
you might wanna think about not using Block.setType but to use player.sendBlockChange instead
not possible to just overlay it i think
otherwise it results in a ton of block updates and it might get laggy
Useful spigot post https://www.spigotmc.org/threads/custom-inventory-ui.525744/
im using setData
Huh
yeah I'd just send a blockchange to all online players, so that the blocks on the server don'T actually change
thats a useful post that will help you out whats hard to understand?
like a packet?
there's a method for sending block changes but probably not in 1.8
π
Wouldnt abusing chaacters effect ALL uis however?
*characters
I just want to change it inside a region, so if you die in the region you spawn at a different point then if you die outside.
you can use different fonts
yes, that's the "spawn" flag
Well, is there a workaround to that?
The location to teleport to when a player dies within the region
workaround for what?
can you show me a example-command i am too stupid
ok im too stupid to understand this lol
ok, but why would a font be used for updating that stuff
sendBlockChange exists in 1.8
thats whats confusing me here lol
updating what stuff
{
"ascent":-1,
"chars":[
"\uD001"
],
"file":"custom/ui/test_button_main.png",
"height":48,
"type":"bitmap"
},
whuuut
pretty sure it does
π€·ββοΈ haven't looked at all the examples, but my best advice is try and see lol
indeed, but they're all deprecated, lol
very weird
I mean if it's deprecated, there should at least be a new method
@tender shard are you there for help 24/7 lol
except to wrap the nms Player
I guess HumanEntity was made in case there will be an NPC API some time in the future
which hasn't happened in the last 8 years lol
no, not 24/7 π
skull emoji
wouldnt it be set Block ?
then there wouldnt be any time left to drink alcohol
there is no Player#setBlock
I don't think he is drunk...
Player#sendBlockChange sends a "fake" block change
e.g. only visible to the client, for the server nothing changes
so it's nice e.g. for rainbow animations on existing blocks
not yet
only 2 beers so far but I got the jΓ€germeister open now
lol
DID YOU JUST ASSUME MY GENDER / SOBRIETY?!
yes
cold comming on?
I prefer to drink the jΓ€ger at room temperature
you can't help people without drinking something lol
oh fucking shit
I forgot to book a table at the restaurant
guess I'll go there tomorrow instead
most of teh time I prefer the other person drinks something
if its not incredibly busy you should be able to get one today tho
xd
what do you think of my funnel
show up at opening, you will get a seat
kind of pour π - could not help myself
why is the taper and nozzle transparent ?
they are always extremely busy >.<
awesome, now go make a spigot on top of it
hmm
ok i understand it
but how the hell do i make it only overlay
for a spesific ui
not based on size
:/
might make a spigot later
my photoshop skills are yet to be surpassed: a spigot using a funnel to piss on paper
hmm all the cones and small cylinders are transparent
its for a water pump thing
ooh yes
with this as logo
like performance spigot
hm but dont you need a pump somewhere so stuff even comes out of a spigot
why is there a Bow event but not one for crossbow ?
hmm, projectile does include arrow
yes
i wonder if it fires for bow in addition to the bow
uh
not neccessarily
will have to try and see i guess
water towers were used for that
that's why they're always 30 meters high
to provide enough pressure for the pipes etc
simply using gravity
I'm pretty sure it gets called for crossbows too

π€½ββοΈ
https://paste.md-5.net/ifawebecor.cs Sorry, any idea of why is this happening? I've changed the enumerator this methods takes in place and now i have this error
EntityShootBowEvent fires for bows AND crossbows, not for tridents
what's itembuilder line 225
ac is null
building pyramids lol
whats even better?
if (a == null)return\\n if (b == null)return or if (a == null || b == null) return?
makes no difference
I'd use the first one so I could add debug messages easily in case I ever need to find out whether it's a or b that's null
but it can't
obviously it can
both the same but would prefer the last
its taking it from an enumerator
so? Object[] asd = new Object[] { null, null };
of course items in a Iterable can be null
your stacktrace even clearly says it's exactly "ac" that's null
tbh I can't think of any Collection or anytrhing else implementing Iterable that can NOT hold null references
{null, null} kekw
why not
No one would've noticed if you didn't point it out
you should have changed it to internet-explorer
Lol
Can I change this?
you can disable the spawn-protection in server.properties
by setting it to 0
thx
or -1 if you're brave enough
microsoft edge bad lol
-0
or -2 if you want to see puppies dying
What does negative do
nothing
it cant every properly display my css code
Well that's boring.
-10 if you agree that the earth is round
-1OO if 
what does it make tho?
just that you can destroy blocks in the spawn right
spawn-protection prevents everyone except OPs to build in a radius arund the spawn
it also prevents things like PlayerInteractEvents there
you want to use 0 if you have worldguard anyway
yeah but if i have a world guard spawn area it doesnt matter right?
but if its 0
if it's 0, you can simply control everything using WG
ok thx
Someone know whats wrong with this ?
@tender shard Is there something online to get the slot images, or create one?
AKA the ui for a 27 slot
Or a 36 slot
etc
reload your pom
slot images? wdym?
All I can help you with is a troll face picture of md_5
if i die in the region i set the spawn i still spawn at the normal worlds-pawn
like this for example
Can anybody send me commands of spigotmc so that I can learn spigot coding. Ex - createexplosion
Like I need need every command
for explosions, just check out World#createExplosion in the javadocs (enter ?jd in this channel)
i personally cant find any
After reload
did you add their repository?
I guess you'll have to manually compile dynmap and let gradle install it to your local maven repo: https://github.com/webbukkit/dynmap
also why the heck are you using dynmap 2.5?
dunno if you have to add a repo
isn't that outdated since 200 years?
wth
It was just an example, like I need everything like that
I know just testing versions, I used 3.4
check out the javadocs: ?jd
public FurnaceInventory(Player player, Block block) {
super(null, "FURNACE_OVERRIDE_MENU", "&f" + CharRepo.FURNACE_OVERRIDE_CONTAINER_27, 27, block);
}
Can somebody give me a brief explanation on what this means?
what does "super" do
you have to manually compile and install it
?jd
it calls the constructor of the super class, i.e. the one you're extending
what so it just calls the parent class or smth?
if I die in the region, I set the spawn, I still spawn at the normal world-spawn
U guys are frikin smart
not me
how to make new ItemStack that always edible? (even not hungry)
Reskin a golden apple
?jd
yes
Player interact event + player#playEffect or something like that
Do i get like everything from javadocs? Ex - creating explosion, spawning wither
thanks
yes
everything that's part of the API
https://github.com/Terracottadev/terralava/blob/master/src/main/java/org/terradev/terralava/Terralava.java#L36-L98 is an example of it. It isn't perfect but that is the best you can do without nms or datapacks I reckon
Is there any server hosting that I can use to test my plugins
@tender shard sry for the ping
Homehosting is pretty good most of the time
Gimme website link pls @quiet ice (also sry for the ping)
127.0.0.1
Send me website link man
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
localhost or 127.0.0.1
I want to host my mc server for free with my own plugins
Chances are there is no website there, but you could run one π
I need a website to do that
offline-mode=false exists
idk why you're pinging me for this question? π I run a hosting company but that doesn't mean I give out servers for free lol
Just run the server on your pc
just host your own server on localhost
if you don't wanna pay for a server, do it at home
you do?
Idh premium acc
see link in my status
Mc premium account idh
Doesnβt matter
dats a discord
You can still run a local server without a premium account
How to set it to offline mode
that is the discord, yes, but my status has another link π
Unpremium mode
server.properties
why would you want to do that
Because he doesnβt have a premium account
there is only valid reason, which is to run servers behind a proxy
what are they doing here then
ah yes ur right
I donβt know, ask them
Buy the game instead of asking how to pirate it
and you think it's a good idea to openly admit that you downloaded it illegaly?
you should at least make up some excuse like "i have to use offline mode because I'm running a bungeecord"
or "i want to test my plugin locally with 2+ players but I only have one account"
or stuff like that
He is not familiar enough with minecraft servers to know that such excuses are possible I assume
now he knows it
That being said, how the hell do you even test a plugin locally with 3+ players with only a single account while avoiding malware and stuff?
btw wtf is galimulator? is it this weird game on steam?
Yep, also a game over on android
I should pirate it and try it out
jk I always buy games on steam and refund them an hour later if I dont like them
It probably is not for the average person as it is pretty boring but I have a blast attempting to write a mod loader for it
real chads speedrun a game within 2 hours and refund it
I mean the game is free over on android so a lot of people just emulate it
Hello there, can anyone help me please with a reflection cast problem ?
https://www.spigotmc.org/threads/illegal-reflection-cast.550606/
lol
can you ?paste the full stacktrace ps
?paste
yup I clean up all my dirty tests and I send you back the trace
oki
You are probably decompiling an outdated jar
we're going to find out. everything called "1.17.1" should have the same NMS names though
Yeah
of course there's like a thousand spigot versions of 1.17.1, but only one official mojang / NMS version for all of this
And here is the field type when I print it:
net.minecraft.world.level.biome.BiomeBase$TemperatureModifier
Hm, this makes it stranger
what also always helps is sth like this @calm whale :
Class clazz = Class.forName("...BiomeBase");
for(Field field : clazz.getDeclaredFields()) {
System.out.println(field); // Print out the type, name, etc of this field, no idea if this sout is enough
}
Already did it before, the field has the right name and type
see
Field biomeTemperatureModifierField = BiomeBase.a.class.getDeclaredField("f");
biomeTemperatureModifierField.setAccessible(true);
Bukkit.getLogger().info("Β§a"+biomeTemperatureModifierField.getType() + " " + biomeTemperatureModifierField.getName());
BiomeBase.TemperatureModifier biomeTemperatureModifier = (BiomeBase.TemperatureModifier) biomeTemperatureModifierField.get(oldBiome);
newBiome.a(biomeTemperatureModifier);```
BiomeBase.TemperatureModifier biomeTemperatureModifier = (BiomeBase.TemperatureModifier) biomeTemperatureModifierField.get(oldBiome);```
are you using remapped mojang .jar?
from BuildTools
At that point it'd say field not found exception though
if you use reflection, you must always use the "obfuscated" class and method names
What is BiomeBase.a.class?
I thought "f" is a field in BiomeBase and not in BiomeBase.a?
It is a static inner class of BiomeBase
it is in the a class
but oldBiome is of type BiomeBase and not of type BiomeBase.a, right?
yep
You are passing a BiomeBase when you actually must pass an object of type BiomeBase.a
what even is BiomeBase.a ?
I mean, what's the purpose of it - does it hold any information about a BiomeBase?
It holds temperature and some other data
yeah you've already sent this but that doesn't help. can you send the decompiled BiomeBase.class?
okay yeah so BiomeBase.a is just the biomebuilder. the actual biome doesnt have any information about it's former builder
one min pls
your "f" field is the third parameter passed to BiomeBase.d(...)
which is the field "d"
π€
hm that code is a mess lol
let me open intellij
it's easier than checking it on the pastebin
sure thank you for your help
https://paste.md-5.net/itevawucac.java some1 know why the protocol lib packet is not being called?
Suppose i now know what banner is in org.bukkit.block.structure
How do I code
Ike
Something
I just know the use of it, i want to know that command to do that
the inner class BiomeBase.d has a field called "d"
that's what you need
and to get the inner class "BiomeBase.d" you have to check the field "k" in BiomeBase
so get BiomeBase.getField("k"), which is of type BiomeBase.d, then get the field "d" of that one
that's it
so basically
BiomeBaseObject -> get field called "k". this is of type BiomeBase.d. Of this object, get the field "d" -> this is your temperature modifier
But how can I retrieve it ?
well something like this:
is there a way to let a player go through a block, like literly just walk through it (essentially dissabling the collision)
?
Entitled
Ha he
Be patient young one
Elaborating your question would help
No just that one need a website for learn that
Telling people to reply will only make you come across as pushy
BiomeBase.TemperatureModifier modifier = (BiomeBase.TemperatureModifier) biome.getClass().getDeclaredField("k").getClass().getDeclaredField("d").get(biome.getClass().getDeclaredField("k").get(biome));
something like this should work
haven't tested and it's pretty dirty
but yeah you basically have do it all with reflection lol
ok thnx I'm gonna test it, I will come back to tell you if it works, thnx π
also keep in mind that those stuff will change in every update
Mfn reply to me
can you stop asking me to answer? I don't even know what the question is that you asked
you ask me on how to code "something"?
I don't know how to code "something"
you gotta ask a bit more specific questions
Read it fully lad
^^^
?jd
I don't have time to scroll up and try to understand your question. if you want me to answer, please ask your question in one concise sentence
"pls help immediately"
I want to know the commands to code a spigot plugin, need a website/course to learn(for free ofc). For example ik what the use of banner is in org.bukkit.block.structure.
But
there are no "commands" to code a spigot plugin
there is no "website" that tells you everything about how spigot works. you'll have to dig through the API docs and read the descriptions for the classes and methods that are relevant to you
ze help will kome when it iz done
does anyone know what a "vehicle" is (I see it everywhere in the Javadocs but dont know what it is reffering to)
