#help-archived
1 messages · Page 74 of 1
QBINyt switch to LP, if you're using the official version of Pex please switch to LP.
Ok
It's outdated and shouldn't be used as the download was removed as well iirc.
New Team didn't fix t
how to add money to account
Idk ask your parents?
Bis there a way to sync ranks with LP through linked bungee servers?
i have the money
Yes
Using MySQL should sync it
doesn't show buy boutton
Ok thanks
Else you need to type a cmd for it to sync
If you use local stuff or other storages iirc
ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard scoreboard = manager.getNewScoreboard();
Objective objective = scoreboard.registerNewObjective("Dummy", "");
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
//set the title
String title = ChatColor.translateAlternateColorCodes('&', PlaceholderAPI.setPlaceholders(player, plugin.getConfig().getString("title")));
objective.setDisplayName(title); //title name
List<String> lines = plugin.getConfig().getStringList("lines");
int counter = lines.size();
for (String line : lines) {
Team team = scoreboard.registerNewTeam(line);
plugin.logger.info("Counter: " + counter);
String part1 = "";
String part2 = "";
String part3 = "";
int length = line.length();
if (length <= 16) {
part1 = line;
} else if (length <= 32) {
part1 = line.substring(0, 15);
part2 = line.substring(16);
} else {
part1 = line.substring(0, 15);
part2 = line.substring(16, 31);
part3 = line.substring(32);
}
plugin.logger.info("Part1: " + part1);
plugin.logger.info("Part2: " + part2);
plugin.logger.info("Part3: " + part3);
team.setPrefix(part1); //prefix
team.addEntry(part2); //middle part
objective.getScore(part2).setScore(counter); //middle part
team.setSuffix(part3); //suffix
counter--;
}
player.setScoreboard(scoreboard);
title: "Test Title"
lines:
- "line1"
- "line2"
- "line3"
my config^
I want you to read it carefully and either ask or Google anything you don't know
@wise dock thanks mate, ima read and do it now,i owe u one, (sorry i didnt reply my computer crashed 4 some reason ):)
is "counter" constant?
counter--;
No
[17:56:56 INFO]: [Board] Counter: 3
[17:56:56 INFO]: [Board] Part1: line1
[17:56:56 INFO]: [Board] Part2:
[17:56:56 INFO]: [Board] Part3:
[17:56:56 INFO]: [Board] Counter: 2
[17:56:56 INFO]: [Board] Part1: line2
[17:56:56 INFO]: [Board] Part2:
[17:56:56 INFO]: [Board] Part3:
[17:56:56 INFO]: [Board] Counter: 1
[17:56:56 INFO]: [Board] Part1: line3
[17:56:56 INFO]: [Board] Part2:
[17:56:56 INFO]: [Board] Part3:
The output it also correct
dont know scorepoard api very much, never used. I suggest you to no use
Is it because the prefix and suffix are the same value
dont know scorepoard api very much, never used. I suggest you to no use
Then how am i supposed to make a scoreboard lol
theres api / library things in google/github
just use them
or make papi support
and use one of spigot scoreboard plugin
I figured it out
It's because if the length is less than 16 it uses suffix
But that makes the main part = ""
and its duplicate
So it doesnt show
Scoreboard
yep it works
if (length <= 16) {
//set part 2 or it will be duplicate
part2 = line;
}
That was the issue
@EventHandler
public void onInteract(PlayerInteractEvent e) {
Player p = e.getPlayer();
ItemStack i = p.getItemInHand();
MapView mv = Bukkit.getServer().getMap(i.getDurability());
if (mv == null) {
p.sendMessage("map not found");
}
mv.setCenterX(p.getLocation().getBlockX());
mv.setCenterZ(p.getLocation().getBlockZ());
Scale s = mv.getScale();
Action ac = e.getAction();
if (ac == Action.RIGHT_CLICK_AIR) {
mv.setScale(Scale.FARTHEST);
}
if (ac == Action.LEFT_CLICK_AIR) {
mv.setScale(Scale.CLOSEST);
}
p.sendMessage(mv.getScale().toString());
}
Its not zooming in, but Im getting sent the messages
https://www.youtube.com/watch?v=WcKQgZVDbfI&feature=youtu.be This is what happens when I click on it instead of zoming it moves my cursor
Try MapMeta#setMapView
@upper hearth I'm in 1.8 I can't find that method
Eh I messed with trying to make a custom map. It doesn't go over 128x128 no matter the scale
I'm trying to get it i to zoom
hey @wise dock this shoudl work right????
I read through ur initial example and this is what i have ended up with:
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onInvClick(InventoryClickEvent e) {
Player p = (Player) e.getWhoClicked();
this.checkInventoryNextTick(p);
}
private void checkInventoryNextTick(final Player p) {
Bukkit.getScheduler().runTaskLater(plugin, new Runnable() {
@Override
public void run() {
final ItemStack helmet = p.getInventory().getHelmet();
final ItemStack chestplate = p.getInventory().getChestplate();
final ItemStack leggings = p.getInventory().getLeggings();
final ItemStack boots = p.getInventory().getBoots();
if ((helmet != null) && (helmet.getType() == Material.LEATHER_HELMET)) {
if (helmet.getItemMeta().getDisplayName() != null) {
if (p.getInventory().getHelmet().getItemMeta().getDisplayName().equalsIgnoreCase("§0Assassin Hood")) {
p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 1, true, false));```
the whole thing wouldnt fit
so i just put the first if statement
try it and see if it works 🙂
thx alot
also you don't need this.checkInventory...
this. has it's place, abusing it is not good form
or final
i am prone to abusing final, more often than not that's a good thing
so i can get rid of the ```this.checkInventoryNextTick(p);
}
private void checkInventoryNextTick(final Player p) {```
idk i find the excessive use of final annoying
rule of thumb is if you think something shouldn't change value then slap a final there. if your code has errors then you know your assumption is wrong 🙂
also you're helping JIT, even though lately it's pretty smart to figure it out eventually
modern JVM's figure that out by themselves.
yep they do
plus idk, the final word is just too long
here goes first test
const vs let in javascript is nice
OMG IT DIDNT WORK
This is unnessecary
public void onInteract(final PlayerInteractEvent e) {
final Player p = e.getPlayer();
final ItemStack i = p.getItemInHand();
yes, i can certainly see where you're coming from
for class vars im def. in to use final tho
for class vars wherever possible, but inside methods im much more relaxed for it
though for anonymous classes / lambda its required
umm @oak stump slap a this.plugin = plugin somewhere in your constructor
so occasionally doing it there if the compiler cant figure out its already effecively final
oh lol
thought it was still ther
test 2
nope
nothing happens at all
no errors
no effects
nothing
):
last thing you should check is the armor meta actually has the strings you're checking for
I'm trying to create a chest with items in a separate world to the player, but it just throws NPEs. Any advice?
https://hastebin.com/viquvaseso.java is the problem
real problem starts at 847
one easy way is to replace equalsIgnoreCase with contains("Assassin") and visually make sure it has that word in
if (helmet.getItemMeta().getDisplayName() != null) { do i need this
you can optimize a lot of things, but that comes later. first make it run 🙂
“Premature optimization is the root of all evil” @ Donald Knuth
🤔
That doesn't mean to write sloppy code
yes
and I wanna create a new world
But in this particular case we're going for seeing something work, get some adrenaline from that, and then come back to make it better as a learning experience
i don't think that's how you wanna do it
you'd want to use a custom generator for the world
ik
i think at least
want to put items to chest right? @idle zodiac
@fair abyss ye
ik
butttt
its in anoither world
so its thowing an NPE
what do i do XD
The chunk is loaded
The world should be loaded
but its still throwing an NPE
is your location null to?
i've been doing this shite all day
check it
uhh
-_*
and, your world
ok so my location is null
or run your code 1-2 tick (maybe sec )later
aah
just on enable() { new BukkitRunnable() -> code here).runTaskLater(this, 20,20)
example
ok...
cus some plugin's custom world's which has custom generator they can be null when onenable
oo ok
so
in my main class
in onenable
i make a new bukkitrunnaebleb
anad do smth with it
i'm so confused
why BukkitRunnable
lol ok
i've just started doing this
keep going then ima go
i have a good knowledge of java but spigot is new to me
It's not the hardest :]
why BukkitRunnable
@naive goblet
cus some plugin's custom world's which has custom generator they can be null when onenable
Consumer<BukkitTask>
tf
and Runnable
i'm so lost XD
It was answer to kingOf0
o ok
just on enable() { new BukkitRunnable() -> code here).runTaskLater(this, 20,20)
you now right? this code wont work if you copy paste
just example
use runnable how you want idc
@wise dock i still cant get it to work
aha
ive debugged it to the end of its life
i kind of know what to do now
Runnable accepts lambdas but cant be cancelled
I almost use bukkitrunnable unless i have multithreading operations i need to do onDisable, which in that case I just open a new thread
for @wise dock , this is my code, doesnt wanna work and i have tried everything, if it is not this then i get errors
I mean BukkitRunnable still exist because many plugins still use it
BukkitTask can replace it entirely I'd say
for @wise dock , this is my code, doesnt wanna work and i have tried everything, if it is not this then i get errors
does anyone know how to fix this?
why "checkInventoryNextTick" @oak stump
thats what came recommended, at first i didnt have a very good thing and then they intereduced ticks and stuff and it still doesnt work.
ignore my spelling
really, who suggest this and why
So I've made a BukkitRunnable to delay the chest generator 2 ticks, do you think this will work?
or another world like that?
ye
so try and see
its a new world for the island
any way of fixing it @fair abyss
basically, when a player equips a helmet called §0Assassin Hood i want it to give the player night vision
now its jsut not working at al
theres api for this event use them @oak stump
§0 ?
i didnt say spigot has api for this.
theres public api for this
on github etc
https://www.spigotmc.org/resources/lib-armorequipevent.5478/
first link i see on google
this is whats happenuing now
@fair abyss my brain idk
This hopefully should get into 1.16 and we finally will have an actual event for it
@final verge yes it will better for enchant plgs
also that one work's for mobs
great
like if a mob spawns in with armour, the event gets fired too
I just want to generate a chest XD
😛
i tried executing a cmd on an endermite
@idle zodiac can you send full code
literally
remove it
class Main extends JavaPlugin {
@Override public void onEnable() {
Bukkit.getScheduler().runTaskTimer(this, ()-> {
}, 20L, 20L);
}
}```
?
Edit this to change the output of the command!
We don't create a new instance of main in spigot api
my brain
Edit this to change the output of the command!
Much stuff about your brain now
so
@idle zodiac whats about organizing your class first?
maybe create a class for your world
@fair abyss ?
my brain hurts
so
I just want to run a piece of code a few ticks later than the rest
your brain hurts because you have no idea what your code is doing
move your new World()... to a class
you're just juggling random objects around
and java too
but I dont know spigot
dont think so
you have problem with basics
XDD
I can't even understand what are you trying to achieve with code you linked above
put items on chest xD
No. Do not create any new instances of 99.9% of interfaces within Bukkit
World is not an interface to be created
You retrieve it from other sources from the API
literally
Whether that be events, entities, locations, whatever
bukkit has events for World initialization and loading
as long as it works XD
you should use these
to manipulate fresh worlds
You cannot create a new World()
instead of trying to schedule it
just want to be "innocent" no body telled him say create new World()
Look
also World is just bukkit interface for CraftWorld which is wrapper for nms world object
as Choco said
the rest is fine
cohoco says use Bukkit's mtehod to create a world
@oak stump one thing i noticed you're checking for "cloak" meta for both chest and leggings.
Bukkit.createWorld
there should be method like this
also if you're creating some kind of skyblock plugin
creating a world per player is bad idea performance wise
@novel phoenix It's ok for now as its only going to be small. I can edit it later
Does anyone know how to pull the colon to the command chest eg.
ID: 160:8
i'm not gpiong to have thousands of players ok
@pure canopy yeah
edit durability
I just want chest generation
I believe thats how you do it in older vers
@ Conclure # 1262 help me by DM
taking it as you're doing it in 1.8.8 or below
?
uhm
👏 You 👏 can 👏 not 👏 instantiate 👏 a 👏 World 👏 instance 👏
here the channel to get help
Edit this to change the output of the command!
I removed my world instantiation
@idle zodiac You have done much right but the difference here is that creating a new World like that is not the way to go. It probably exist a method to create a new World. It's rare to create new instances except from items
now what
so how would you add it here to pull the 2 points in an id
||cristal1:
COMMAND: ''
NAME: ''
LORE:
ID: 160:8
POSITION-X: 1
POSITION-Y: 1||
Bukkit.createWorld(#WorldCreator)
Because most things alr exist on the server so we just have to get the right instances
maybe Bukkit.createWorld(new WorldCreator("idk"))
I've done that
edit it
now the trouble is pasting my schem
because it wants a worldedit world object
I cant cast a bukkit world to a we world
@pure canopy
how can i paste my schem without doing that
Any recommendations for a paginated gui api? Need to make a quick one and don't feel like making my own for it
also thanks for just dividing my line count by 100 XDDDD
I just want chest generation
@idle zodiac
Chest block = (Chest) location.getBlock();
block.getBlockInventory().addItem(new ItemStack(Material.STICK));
?
Edit this to change the output of the command!
Haven't herad of that
@pure canopy Split the :
how do i use it
ok
AHA
com.sk89q.worldedit.world.World world = new BukkitWorld(world1);
is this legal
dont think so..
ok...
getting the different between two times?
@devout mirage just - them
thanks
i need to save a time when a player does a command
¨Map
time is long in ms
just - them
and then when i run a special command i want to see how long its been since the player ran the command
in seconds
Use a Map<Player, Long>
examples please
mind you i need this to work across servers
some server may be in italy other in france
long time2 = idk;
long difInSeconds = (time - time2) / 1000;
so i need same time zone for both
Wait why is it you're creating a world?
Veron I think you should learn some data structures 😄
Aren't you trying to set a chest in an existing world?
UNIX time doesn't have timezones
he's trying to paste a schematic
whats a unix time?
Yea so... why Bukkit.createWorld()?
he wanted to get we instance, then he "new ..." :D
Wait why is it you're creating a world?
@subtle blade
yeah he knows now
Okay
@devout mirage can you show us examples of your own code before asking for examples
he was trying to get the world edit World
Missed a bit of conversation. Was outside playing with the dogs lol
(joking, just sort out your dependencies)
?
@naive goblet I have to modify there
cristal1: COMMAND: '' NAME: '' LORE: ID: 160:8 POSITION-X: 1 POSITION-Y: 1
chestcommands??
Edit this to change the output of the command!
regexz
points?
so paste it
Can i use BukkitImplAdapter for what i'm trying to do?
public class Invite {
int pastTime = null;
public void setTime() {
pastTime = //get current time here converted to seconds
}
public int getTimeDifference() {
int currentTime = //get current time here converted to seconds
return currentTime - pastTime; //returns seconds passed between both times
}
}
@novel phoenix
you get current time in millis by doing System.currentTimeMillis()
/ 1000 for get secondd
then you can convert it with TimeUnit.MILLISECONDS.toSeconds(value)
1000ms = 1 sec
so if i set time on one server in france and get the time difference on another server in italy the time difference will be accurate?
do you have ntp set up on both servers?
no
do it
i need to get the time of a specific state
and use that states time for both servers
how do i do that
System.currentTimeMillis() returns UNIX time
it doesn't have timezones on top of it
if you synchronize time on both servers using ntp
bruh
unix isnt a country...
thats the most american thing I've read today
well i need to know how to get the time in california
well google how to get time in specific timezone then?
couldnt find out how
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int hour = calendar.get( Calendar.HOUR ); ```
how do i use get this time in seconds?
@naive goblet https://paste.md-5.net/nukazipusu.bash
ok so now regardless of where the server is hosted it will give me the NY time in seconds?
that I have to modify so that it pulls the id
@idle zodiac I think you're supposed to get BukkitAdapter object using the WE plugin instance
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int second = calendar.get( Calendar.SECOND); ```
which you can get using the bukkit PluginManager
?
Edit this to change the output of the command!
something like getServer().getPluginManager().getPlugin("WorldEdit")
O OK
I might get the syntax wrong
am i able to use essentialsx to give someone a golden shovel on join with the one time kit?
public class Test {
int pastTime = 0;
public void setTime() {
pastTime = getTime();
}
public int getTimeDifference() {
int currentTime = getTime();
return currentTime - pastTime;
}
public int getTime() {
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int second = calendar.get( Calendar.SECOND);
return second;
}
public boolean minutePassed() {
return getTimeDifference() >= 61;
}
}
@fair abyss @novel phoenix
good?
@novel phoenix not woroking XD
yes wont work
"second"
is same
everywhere
in world
"hour" is different
@devout mirage
no its not
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int second = calendar.get( Calendar.SECOND);
System.out.println("s: " + second);
Calendar calendar2 = new GregorianCalendar();
TimeZone tz2 = TimeZone.getTimeZone("Asia/Istanbul");
calendar2.setTimeZone(tz2);
int second2 = calendar2.get( Calendar.SECOND);
System.out.println("s2: " + second2);```
Hi. Do anyone know why i my scoreboard flash when tablist updated? (downloaded tablist and scoreboard)
how can it be the same???
second is same everywhere...
@idle zodiac can't help you with implementation specifics
how can 5am be the same as 6pm in seconds?
cuz I haven't worked with it for years
its common sense
so they will be the same across everytimezone?
ok try that with other time zones
this conversation is giving me vibes
like 5 others and lets see if theyre the same
dude
everyone's time is xx:22 now
what the final result should be
everyone's time is xx:23 now
so how the fuck
i think your idea is wrong
can i tell if 5 minutes passed
just re think what you want to do
public class Test {
int pastTime = 0;
public void setTime() {
pastTime = getTime();
}
public int getTimeDifference() {
int currentTime = getTime();
return currentTime - pastTime;
}
public int getTime() {
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int second = calendar.get( Calendar.SECOND);
return second;
}
public boolean minutePassed() {
return getTimeDifference() >= 61;
}
}```
comparing SECOND wont help you
or MINUTE
Edit this to change the output of the command!
i know it wont fucking help
thats why i said i need to compare the time with the same time zone
why are you so adamant
-_-
System.out.println("c: " + (calendar.getTimeInMillis() - calendar2.getTimeInMillis());
tell me how to do it with this code to see if 5 minutes have passed
public class Test {
int pastTime = 0;
public void setTime() {
pastTime = getTime();
}
public int getTimeDifference() {
int currentTime = getTime();
return currentTime - pastTime;
}
public int getTime() {
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int second = calendar.get( Calendar.SECOND);
return second;
}
public boolean minutePassed() {
return getTimeDifference() >= 61;
}
}```
i already said
how do i tell if 5 minutes have passed with my code above
compare time in milis
HOW
@frigid ember whats your problem
is there anybody here who knows html for buycraft and can tell me how to fix this error
am i able to use essentialsx to give someone a golden shovel on join with the one time kit?
i just told you to wait
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.
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.
uhm
bot having a seizure
yes
@fair abyss you still didnt explain how
said like 5 minute ago
yes he did
its just editing my code
@subtle blade can you warn this kid
^^
dont offer help if you arent going to actualy help
-_-
already helped...
if you did i wouldnt be here still
read the fucking chat dude
Veron get the millis turn it to minutes and compare?
public class Test {
int pastTime = 0;
public void setTime() {
pastTime = getTime();
}
public int getTimeDifference() {
int currentTime = getTime();
return currentTime - pastTime;
}
public int getTime() {
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int second = calendar.get( Calendar.SECOND);
return second;
}
public boolean threeMinutePassed() {
return getTimeDifference() >= 183;
}
}```
dont want to reinvestigate in a chaos
stfu
cus they are same
let Conclure help
im not talking to you?
youre spamming stop
pity custom discord emojis are behind paywall
actually you spammed this code 3 times.
in this server
stop talking and let conclure help cause you keep saying you already helped me which atually wasnt help and you refuse to post any code so just sftu
okay
so
do calender.getSeconds(Calender.SECONDS) / 60
and we get minutes
right?
right
there should be newbiekit in essentials config (or similar thing)
anyone are you able to change the essentalsx first join kit contents?
i deleted it my bad
Yeah I c
just googling it probably help
Veron store the times
i have it stored in the pastTime var
lol
yeah if only there was a method to retrieve
current unix time
in milliseconds
🤔
public class TimeIgnoringComparator implements Comparator<Calendar> {
public int compare(Calendar c1, Calendar c2) {
if (c1.get(Calendar.YEAR) != c2.get(Calendar.YEAR))
return c1.get(Calendar.YEAR) - c2.get(Calendar.YEAR);
if (c1.get(Calendar.MONTH) != c2.get(Calendar.MONTH))
return c1.get(Calendar.MONTH) - c2.get(Calendar.MONTH);
return c1.get(Calendar.DAY_OF_MONTH) - c2.get(Calendar.DAY_OF_MONTH);
}
}
```Code from stackoverflow [https://stackoverflow.com/questions/1439779/how-to-compare-two-dates-without-the-time-portion]
// Convert timestamp to ZonedDateTime in the correct time zone
ZonedDateTime estTime = ts.toLocalDateTime().atZone(ZoneId.of("America/New_York"));
// Could pass in ZoneId.of("Asia/Kolkata") argument to now(...), but not required
// as "now" is the same instant in all time zones.
ZonedDateTime zonedNow = ZonedDateTime.now();
// Can use other ChronoUnit values if required.
long timeDiff = ChronoUnit.MILLIS.between(zonedNow, estTime);
System.out.println(timeDiff);```
You could do something similar to this
public class Test {
int pastTime = 0;
public int getTime() {
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int hour = calendar.get( Calendar.HOUR);
int second = calendar.get( Calendar.SECOND);
return hour+second;
}
public void setTime() {
pastTime = getTime();
}
public int getTimeDifference() {
int currentTime = getTime();
return currentTime - pastTime;
}
public boolean minutesPassed(int minutes) {
return getTimeDifference() >= ((60 * minutes)+ 1);
}
}
```what about this? adding hour and seconds?
@naive goblet
// Convert timestamp to ZonedDateTime in the correct time zone ZonedDateTime estTime = ts.toLocalDateTime().atZone(ZoneId.of("America/New_York")); // Could pass in ZoneId.of("Asia/Kolkata") argument to now(...), but not required // as "now" is the same instant in all time zones. ZonedDateTime zonedNow = ZonedDateTime.now(); // Can use other ChronoUnit values if required. long timeDiff = ChronoUnit.MILLIS.between(zonedNow, estTime); System.out.println(timeDiff);```
just use this fucking and go away
@fair abyss i dont want your crap help begone
the worst people I see ever.
Who can help me with disabling mob Ai
invalid entity ?
good so go away
Hey guys, do you know why maps aren't zooming in #help-archived message
veron
@silk cape which version
@naive goblet do you see this working?
1.8
make a constructor for test
@silk cape delete all AI goals from NMS entity
where is it?
will my code work or not
@novel phoenix hey
its 1.8+
where i need to put that code
want to summon a mob without ai? with commands @silk cape
I generating RealisticworldGenerator
mythic mobs can override default mobs
include mobs spawned from spawners
@silk cape you will probably have more success finding public plugin for this or hire someone to write it for you if you're not a developers yourself
@safe thunder don't understand the screenshot
can you provide more info
@safe thunder add utf support
[21:41:08] [Server thread/WARN]: Invalid entity id 'minecraft:v─▒nd─▒cator' at spawner minecraft:overworld:[736,22,-501]
[21:41:14] [Server thread/WARN]: Invalid entity id 'minecraft:zomb─▒e_v─▒llager' at spawner minecraft:overworld:[685,37,-624]
[21:41:31] [Server thread/WARN]: Invalid entity id 'minecraft:guard─▒an' at spawner minecraft:overworld:[278,97,-612]
[21:41:31] [Server thread/WARN]: Invalid entity id 'minecraft:v─▒nd─▒cator' at spawner minecraft:overworld:[271,97,-612]
[21:41:31] [Server thread/WARN]: Invalid entity id 'minecraft:zomb─▒e' at spawner minecraft:overworld:[271,97,-619]
[21:41:56] [Server thread/WARN]: Invalid entity id 'minecraft:enderm─▒te' at spawner minecraft:overworld:[-335,26,-571]
[21:42:07] [Server thread/WARN]: Invalid entity id 'minecraft:w─▒tch' at spawner minecraft:overworld:[-333,41,-239]
[21:42:15] [Server thread/WARN]: Invalid entity id 'minecraft:cave_sp─▒der' at spawner minecraft:overworld:[-292,104,-131]
[21:42:15] [Server thread/WARN]: Invalid entity id 'minecraft:cave_sp─▒der' at spawner minecraft:overworld:[-303,104,-131]
[21:42:38] [Server thread/WARN]: Invalid entity id 'minecraft:zomb─▒e_v─▒llager' at spawner minecraft:overworld:[-361,14,131]
@fair abyss I added
sure?
Same problem
what OS
your all "i" has problem
java -Xms3G -Xmx3G -Dfile.encoding=UTF-8 -jar spigot.jar nogui
PAUSE
cus they arent "i"
yes
is it your plugin?
dont think so
@novel phoenix RealisticWorldGenerator
is it cracked?
public class Test {
final int pastTime = 0;
public Test() {
pastTime = new GregorianCalendar()
.setTimeZone(TimeZone
.getTimeZone("America/New_York"))
.get(Calender.SECOND);
}
public int getTimeDifference() {
int currentTime = new GregorianCalendar()
.setTimeZone(TimeZone
.getTimeZone("America/New_York"))
.get(Calender.SECOND);
return (currentTime - pastTime)
}
}```
@fair abyss no Original I buyed
Maybe something like that @devout mirage
are you running on windows?
idk if the methods are compatible but you get the point
@novel phoenix yes Windows 10 Pro Single Language Turkish
create a new instance everytime you want to check and let it be gcd after
But what about my code?
will it work or no ```
public class Test {
int pastTime = 0;
public int getTime() {
Calendar calendar = new GregorianCalendar();
TimeZone tz = TimeZone.getTimeZone("America/New_York");
calendar.setTimeZone(tz);
int hour = calendar.get( Calendar.HOUR);
int second = calendar.get( Calendar.SECOND);
return hour+second;
}
public void setTime() {
pastTime = getTime();
}
public int getTimeDifference() {
int currentTime = getTime();
return currentTime - pastTime;
}
public boolean minutesPassed(int minutes) {
return getTimeDifference() >= ((60 * minutes)+ 1);
}
}
try?
@safe thunder try running in PowerShell?
yeah, try launching in powershell instead
I try...
does it work?
Hi, can you tell me what variable is used in tab reborn so that the name of the user comes out??
kingOf0 what mods have you been contributing to in forge?
Where do I post a config resource?
none of them is public
I'm able to delete and copy a world folder OKAY, but when I create I get a null error that's driving me nuts! 🙃
Bukkit.unloadWorld(worldName, false);
FileUtils.deleteDirectory(old);
FileUtils.copyDirectory(old, new));
Bukkit.createWorld(new WorldCreator(worldName).environment(World.Environment.THE_END));
[error]
java.lang.NullPointerException: null
org.bukkit.craftbukkit.v1_15_R1.CraftServer.createWorld(CraftServer.java:1068)
org.bukkit.Bukkit.createWorld(Bukkit.java:548)
Anybody have a suggestion?
Where do I post a config resource?
Are you good in how the models works in forge?
not very much
My error is on the createWorld line, no idea what's null there...
just know mcp
ah
Hi, can you tell me what variable is used in tab reborn so that the name of the user comes out??
humm
doesn't good at forge
well knowing mcp is handy as well
yep 😄
@novel phoenix
i have some
code
from NoAi plugin
can you take a look on it
or someone else
I guess?
where i need to send
well
because that is how noai is supposed to work
if you need them to stop moving or attacking
Bukkit.createWorld throwing this null error makes no sense.
just set your mob's speed to 0
😅
well he can ask someone to do that
so, he can only set their speed with other plugins
and this channel isn't really an appropriate place for that
Any ideas why Bukkit.createWorld is throwing a null erorr when it only requires a name, and i'm giving it a name!
can you paste full stacktrace at least
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.createWorld(CraftServer.java:1068) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at org.bukkit.Bukkit.createWorld(Bukkit.java:548) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at com.mary.rubydragon.ResetEnd$5.run(ResetEnd.java:79) ~[?:?]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:461) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1253) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:430) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1170) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:959) ~[patched_1.15.2.jar:git-Paper-"827cc632"]
at java.lang.Thread.run(Thread.java:834) [?:?]
Invoking undeclared fields?
@stiff arrow your trying to delete a world file and re create correct?
send ur code
now paste full line 79
and all references from 79
I use the following on a plugin and it creates correctly
public static void createNewWorld(){
WorldCreator worldCreator = new WorldCreator(worldName);
worldCreator.generateStructures(true);
worldCreator.type(WorldType.NORMAL);
Bukkit.getServer().createWorld(worldCreator);
}
Hi! Apparently BukkitAdapter is not visible... any help?
I'm able to create normal worlds okay too, just not ends
Occy reflection?
XDDD
bruh
I took a break
Hey guys, what causes this? https://www.youtube.com/watch?v=WXK80olJgvs&feature=youtu.be
@EventHandler
public void onInteract(PlayerInteractEvent e) {
Player p = e.getPlayer();
ItemStack i = p.getItemInHand();
MapMeta meta = (MapMeta) i.getItemMeta();
MapView mv = Bukkit.getServer().getMap(i.getDurability());
if (mv == null) {
p.sendMessage("map not found");
}
mv.setCenterX(p.getLocation().getBlockX());
mv.setCenterZ(p.getLocation().getBlockZ());
Scale s = mv.getScale();
Action ac = e.getAction();
if (ac == Action.RIGHT_CLICK_AIR) {
mv.setScale(Scale.FARTHEST);
}
if (ac == Action.LEFT_CLICK_AIR) {
mv.setScale(Scale.CLOSEST);
}
meta.setScaling(true);
p.sendMessage(mv.getScale().toString());
}
I needed to gain some braincells
I am confused.
did you grab WorldEditPlugin instance?
yes
Casting is a nwb mistake but yeah you might wanna makea null check as well
does it have methods to get adapters?
JavaPlugin checkForWe = getServer().getPluginManager().getPlugin("WorldEdit");
if(checkForWe != null && checkForWe.isEnabled())
{
WorldEditPlugin we = (WorldEditPlugin) checkForWe;
// check methods for we instance here
}
syntax might be incorrect
look up correct methods and class names yourself
ok
hello i have a problem my friend has minecraft pirate in which to enter my server what should i do
server.properties Enable offline mode
how do you post code in the chat?
use three of ` these bad boys
@fair abyss Do you know optimize 1.15 in mob lags ?
thanks friend for help
Impl means
its implemented
means its not interface or abstract class
the difference is how you get it
I have this BukkitRunnable that i call with halfBorder.runTaskTimer(Uhc.getPlugin(), 0, 5); but even though I have canceld the task when its called a 2nd time i get Already scheduled as 10 error ``` private static BukkitRunnable halfBorder = new BukkitRunnable() {
@Override
public void run() {
if(worldBorder.getSize() >= newWorldSize) {
worldBorder.setCenter(0, 0);
worldBorder.setSize(worldBorder.getSize() - 1);
} else {
Uhc.broadcastMessage("World size has halfed");
Bukkit.getServer().getScheduler().cancelTask(halfBorder.getTaskId());
}
}
};
and because sk89q (rightfully) hates static references you're forced to do things the right way
ok
I am looking to set up a bungee cord server with different dedis for each subsequent server
How can I secure myself and are there any guides?
@novel phoenix
show your current code
@rocky fulcrum BukkitTask 😛
i downloaded mythic mobs
much better
you
is it there
yes
ok
com.sk89q.worldedit.world.World world = BukkitImplAdapter().adapt(world1);
idk how to use this
@silk cape I've never used this plugin so I can't help you with configuring it
i was just assuming that it would be the same as BukkitAdapter XD
does it work?
uh
there aren't any errors
but i still can't use BukkitAdapter
idk how to get it to work
I feel so stupid rn
That doesn't work
lemme find javadocs then
Occy do you use Intellij?
yes
Browse the dependency?
import it
i do for schematic loading
what won't work
from what I've heard
using FAWE on production servers might not be a good idea
because it sometimes breaks
in hilarious ways
Hey guys, do you know how to fix this #help-archived message
@frigid ember what are you trying to achieve with this code and what isn't working
in text form
I'm trying to zoom in and out when I right or left click, but when I do it glitches
welcome to hell
you don't reapply
the item meta
back to map itemstack
i.setItemMeta(meta);
in the end
The meta doesn't work anyways I couldn't cast it
@idle zodiac whats the issue
@frigid ember you should check for correct item
and he doesnt return in his check
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_8_R3.inventory.CraftMetaItem cannot be cast to org.bukkit.inventory.meta.MapMeta
I'm going to do that after I get the zooming working
@dusty topaz So, I can't use BukkitAdapter, apparently its invisible. I;ve tried everythiung these lovely people have told me to do XD
not the answer
Idk just said what was reasonable from what I saw
that will never be the answer
But surely if he is going to involve nms then handle it through craftbukkit
Cant think of any other way 🤔
thats not how it works
How innit?
Could someone help me with the following scheduler problem https://paste.md-5.net/cumajoqali.java when calling setBoarder() for the 2nd time I get an error "Already scheduled as 10"
if you depend on spigot you can use nms
a spigot server has nms inside of it
which is how it runs the server ... lol
hey @idle zodiac
Theres only that import anways
Well if you're trying to convert and a CraftItemStack for instance and you need the Bukkit version of it lmao how else wouild you adapt?
