parent
					
						
							
								fa5dc94d61
							
						
					
				
			
			
				commit
				
					
						13f8d073a9
					
				
			
		
					 3 changed files with 22 additions and 2 deletions
				
			
		
							
								
								
									
										20
									
								
								pom.xml
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								pom.xml
									
										
									
									
									
								
							| 
						 | 
					@ -93,6 +93,15 @@
 | 
				
			||||||
                    </execution>
 | 
					                    </execution>
 | 
				
			||||||
                </executions>
 | 
					                </executions>
 | 
				
			||||||
            </plugin>
 | 
					            </plugin>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <plugin>
 | 
				
			||||||
 | 
					                <groupId>org.apache.maven.plugins</groupId>
 | 
				
			||||||
 | 
					                <artifactId>maven-release-plugin</artifactId>
 | 
				
			||||||
 | 
					                <version>3.1.1</version>
 | 
				
			||||||
 | 
					                <configuration>
 | 
				
			||||||
 | 
					                    <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
 | 
				
			||||||
 | 
					                </configuration>
 | 
				
			||||||
 | 
					            </plugin>
 | 
				
			||||||
        </plugins>
 | 
					        </plugins>
 | 
				
			||||||
    </build>
 | 
					    </build>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -110,6 +119,10 @@
 | 
				
			||||||
            <id>maxhenkel-repo</id>
 | 
					            <id>maxhenkel-repo</id>
 | 
				
			||||||
            <url>https://maven.maxhenkel.de/repository/public</url>
 | 
					            <url>https://maven.maxhenkel.de/repository/public</url>
 | 
				
			||||||
        </repository>
 | 
					        </repository>
 | 
				
			||||||
 | 
					        <repository>
 | 
				
			||||||
 | 
					            <id>m724-repo</id>
 | 
				
			||||||
 | 
					            <url>https://git.m724.eu/api/packages/Minecon724/maven</url>
 | 
				
			||||||
 | 
					        </repository>
 | 
				
			||||||
    </repositories>
 | 
					    </repositories>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <dependencies>
 | 
					    <dependencies>
 | 
				
			||||||
| 
						 | 
					@ -145,4 +158,11 @@
 | 
				
			||||||
            <scope>compile</scope>
 | 
					            <scope>compile</scope>
 | 
				
			||||||
        </dependency>
 | 
					        </dependency>
 | 
				
			||||||
    </dependencies>
 | 
					    </dependencies>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <scm>
 | 
				
			||||||
 | 
					        <developerConnection>scm:git:git@git.m724.eu:Minecon724/tweaks724.git</developerConnection>
 | 
				
			||||||
 | 
					        <tag>HEAD</tag>
 | 
				
			||||||
 | 
					    </scm>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
| 
						 | 
					@ -38,7 +38,7 @@ public class SleepListener implements Listener {
 | 
				
			||||||
                lastDay = day;
 | 
					                lastDay = day;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (!skippedCurrentNight.contains(event.getPlayer())) {
 | 
					                if (!skippedCurrentNight.contains(event.getPlayer())) {
 | 
				
			||||||
                    double onePlayerRatio = 1.0 / (event.getPlayer().getServer().getOnlinePlayers().size() * world.getGameRuleValue(GameRule.PLAYERS_SLEEPING_PERCENTAGE));
 | 
					                    double onePlayerRatio = 1 / (event.getPlayer().getServer().getOnlinePlayers().size() * (world.getGameRuleValue(GameRule.PLAYERS_SLEEPING_PERCENTAGE) / 100.0));
 | 
				
			||||||
                    world.setTime((long) ((23459 - world.getTime()) * onePlayerRatio));
 | 
					                    world.setTime((long) ((23459 - world.getTime()) * onePlayerRatio));
 | 
				
			||||||
                    skippedCurrentNight.add(event.getPlayer());
 | 
					                    skippedCurrentNight.add(event.getPlayer());
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@ public class TimeForwardRunnable extends BukkitRunnable {
 | 
				
			||||||
    public TimeForwardRunnable(Plugin plugin) {
 | 
					    public TimeForwardRunnable(Plugin plugin) {
 | 
				
			||||||
        this.server = plugin.getServer();
 | 
					        this.server = plugin.getServer();
 | 
				
			||||||
        this.world = server.getWorld("world");
 | 
					        this.world = server.getWorld("world");
 | 
				
			||||||
        this.percentage = world.getGameRuleValue(GameRule.PLAYERS_SLEEPING_PERCENTAGE);
 | 
					        this.percentage = (world.getGameRuleValue(GameRule.PLAYERS_SLEEPING_PERCENTAGE) / 100.0);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue