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